Logo ROOT  
Reference Guide
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
29
30
32
33private:
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
43public:
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
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassDef(name, id)
Definition: Rtypes.h:326
int type
Definition: TGX11.cxx:120
A doubly linked list.
Definition: TList.h:44
virtual Bool_t HandleKey(Event_t *event)
The key press event handler in this dialog.
TGLayoutHints * fL2
Definition: TRootDialog.h:36
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)
Create a method argument prompt dialog.
Definition: TRootDialog.cxx:40
TGLayoutHints * fL1
Definition: TRootDialog.h:35
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 fHelp
Definition: TRootDialog.h:41
virtual const char * GetParameters()
Get parameter string (called by contextmenu after OK or Apply has been selected).
void TabPressed()
Handle Tab keyboard navigation in this dialog.
Bool_t fCancel
Definition: TRootDialog.h:39
Bool_t fApply
Definition: TRootDialog.h:40
TList * fWidgets
Definition: TRootDialog.h:37
virtual void Popup()
Popup dialog.
Bool_t fOk
Definition: TRootDialog.h:38
virtual ~TRootDialog()
Delete the dialog.
Definition: TRootDialog.cxx:66
virtual void CloseWindow()
Called when closed via window manager action.
TRootContextMenu * fMenu
Definition: TRootDialog.h:34
int main(int argc, char **argv)