ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 #ifndef ROOT_TGFrame
27 #include "TGFrame.h"
28 #endif
29 
30 class TRootContextMenu;
31 
32 
33 class TRootDialog : public TGTransientFrame {
34 
35 private:
36  TRootContextMenu *fMenu; // associated context menu
37  TGLayoutHints *fL1; // label layout
38  TGLayoutHints *fL2; // text entry layout
39  TList *fWidgets; // label and text field widgets created in dialog
40  Bool_t fOk; // if true show OK button
41  Bool_t fCancel; // if true show Cancel button
42  Bool_t fApply; // if true show Apply button
43  Bool_t fHelp; // if true show Online Help button
44 
45 public:
46  TRootDialog(TRootContextMenu *cmenu = 0, const TGWindow *main = 0,
47  const char *title = "ROOT Dialog", Bool_t okB = kTRUE,
48  Bool_t cancelB = kTRUE, Bool_t applyB = kFALSE,
49  Bool_t helpB = kTRUE);
50  virtual ~TRootDialog();
51 
52  virtual void Add(const char *argname, const char *value, const char *type);
53  //virtual void Add(TGComboBox *optionSel);
54 
55  virtual const char *GetParameters();
56 
57  virtual void CloseWindow();
58  virtual void Popup();
59  virtual Bool_t HandleKey(Event_t *event);
60 
61  void TabPressed();
62 
63  ClassDef(TRootDialog,0) //Native GUI method argument prompt dialog box
64 };
65 
66 #endif
67 
virtual void Add(const char *argname, const char *value, const char *type)
Add a label and text input field.
Definition: TRootDialog.cxx:77
Bool_t fApply
Definition: TRootDialog.h:42
void TabPressed()
Handle Tab keyboard navigation in this dialog.
virtual ~TRootDialog()
Delete the dialog.
Definition: TRootDialog.cxx:66
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Bool_t fHelp
Definition: TRootDialog.h:43
TRootDialog(TRootContextMenu *cmenu=0, const TGWindow *main=0, const char *title="ROOT Dialog", Bool_t okB=kTRUE, Bool_t cancelB=kTRUE, Bool_t applyB=kFALSE, Bool_t helpB=kTRUE)
Bool_t fCancel
Definition: TRootDialog.h:41
TRootContextMenu * fMenu
Definition: TRootDialog.h:36
#define ClassDef(name, id)
Definition: Rtypes.h:254
Bool_t fOk
Definition: TRootDialog.h:40
A doubly linked list.
Definition: TList.h:47
TList * fWidgets
Definition: TRootDialog.h:39
virtual Bool_t HandleKey(Event_t *event)
The key press event handler in this dialog.
tuple main
Definition: hsum.py:20
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual const char * GetParameters()
Get parameter string (called by contextmenu after OK or Apply has been selected). ...
virtual void CloseWindow()
Called when closed via window manager action.
TGLayoutHints * fL1
Definition: TRootDialog.h:37
int type
Definition: TGX11.cxx:120
virtual void Popup()
Popup dialog.
TGLayoutHints * fL2
Definition: TRootDialog.h:38
const Bool_t kTRUE
Definition: Rtypes.h:91
float value
Definition: math.cpp:443