Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TRootDialog.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 20/02/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TRootDialog
13 #define ROOT_TRootDialog
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TRootDialog //
19 // //
20 // A TRootDialog is used to prompt for the arguments of an object's //
21 // member function. A TRootDialog is created via the context menu's //
22 // when selecting a member function taking arguments. //
23 // //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #include "TGFrame.h"
27 
28 class TRootContextMenu;
29 
30 
31 class TRootDialog : public TGTransientFrame {
32 
33 private:
34  TRootContextMenu *fMenu; // associated context menu
35  TGLayoutHints *fL1; // label layout
36  TGLayoutHints *fL2; // text entry layout
37  TList *fWidgets; // label and text field widgets created in dialog
38  Bool_t fOk; // if true show OK button
39  Bool_t fCancel; // if true show Cancel button
40  Bool_t fApply; // if true show Apply button
41  Bool_t fHelp; // if true show Online Help button
42 
43 public:
44  TRootDialog(TRootContextMenu *cmenu = 0, const TGWindow *main = 0,
45  const char *title = "ROOT Dialog", Bool_t okB = kTRUE,
46  Bool_t cancelB = kTRUE, Bool_t applyB = kFALSE,
47  Bool_t helpB = kTRUE);
48  virtual ~TRootDialog();
49 
50  virtual void Add(const char *argname, const char *value, const char *type);
51  //virtual void Add(TGComboBox *optionSel);
52 
53  virtual const char *GetParameters();
54 
55  virtual void CloseWindow();
56  virtual void Popup();
57  virtual Bool_t HandleKey(Event_t *event);
58 
59  void TabPressed();
60 
61  ClassDef(TRootDialog,0) //Native GUI method argument prompt dialog box
62 };
63 
64 #endif
65