Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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-2021, 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 = nullptr, const TGWindow *main = nullptr,
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:92
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassDef(name, id)
Definition Rtypes.h:325
int type
Definition TGX11.cxx:121
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
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.
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.
virtual ~TRootDialog()
Delete the dialog.
virtual void CloseWindow()
Called when closed via window manager action.
TRootContextMenu * fMenu
Definition TRootDialog.h:34
int main()
Event structure.
Definition GuiTypes.h:174