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#include "TGFrame.h"
17
19
20
22
23private:
24 TRootContextMenu *fMenu; ///< associated context menu
25 TGLayoutHints *fL1; ///< label layout
26 TGLayoutHints *fL2; ///< text entry layout
27 TList *fWidgets; ///< label and text field widgets created in dialog
28 Bool_t fOk; ///< if true show OK button
29 Bool_t fCancel; ///< if true show Cancel button
30 Bool_t fApply; ///< if true show Apply button
31 Bool_t fHelp; ///< if true show Online Help button
32
33public:
34 TRootDialog(TRootContextMenu *cmenu = nullptr, const TGWindow *main = nullptr,
35 const char *title = "ROOT Dialog", Bool_t okB = kTRUE,
36 Bool_t cancelB = kTRUE, Bool_t applyB = kFALSE,
37 Bool_t helpB = kTRUE);
38 virtual ~TRootDialog();
39
40 virtual void Add(const char *argname, const char *value, const char *type);
41 //virtual void Add(TGComboBox *optionSel);
42
43 virtual const char *GetParameters();
44
45 virtual void CloseWindow();
46 virtual void Popup();
47 virtual Bool_t HandleKey(Event_t *event);
48
49 void TabPressed();
50
51 ClassDef(TRootDialog,0) //Native GUI method argument prompt dialog box
52};
53
54#endif
55
int main()
Definition Prototype.cxx:12
const Bool_t kFALSE
Definition RtypesCore.h:101
const Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDef(name, id)
Definition Rtypes.h:325
int type
Definition TGX11.cxx:121
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:499
ROOT GUI Window base class.
Definition TGWindow.h:23
A doubly linked list.
Definition TList.h:38
This class provides an interface to context sensitive popup menus.
A TRootDialog is used to prompt for the arguments of an object's member function.
Definition TRootDialog.h:21
virtual Bool_t HandleKey(Event_t *event)
The key press event handler in this dialog.
TGLayoutHints * fL2
text entry layout
Definition TRootDialog.h:26
TGLayoutHints * fL1
label layout
Definition TRootDialog.h:25
virtual void Add(const char *argname, const char *value, const char *type)
Add a label and text input field.
Bool_t fHelp
if true show Online Help button
Definition TRootDialog.h:31
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
if true show Cancel button
Definition TRootDialog.h:29
Bool_t fApply
if true show Apply button
Definition TRootDialog.h:30
TList * fWidgets
label and text field widgets created in dialog
Definition TRootDialog.h:27
virtual void Popup()
Popup dialog.
Bool_t fOk
if true show OK button
Definition TRootDialog.h:28
virtual ~TRootDialog()
Delete the dialog.
virtual void CloseWindow()
Called when closed via window manager action.
TRootContextMenu * fMenu
associated context menu
Definition TRootDialog.h:24
Event structure.
Definition GuiTypes.h:174