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 ~TRootDialog() override;
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 void CloseWindow() override;
46 virtual void Popup();
47 Bool_t HandleKey(Event_t *event) override;
48
49 void TabPressed();
50
51 ClassDefOverride(TRootDialog,0) //Native GUI method argument prompt dialog box
52};
53
54#endif
55
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGTransientFrame(const TGTransientFrame &)=delete
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.
TGLayoutHints * fL2
text entry layout
Definition TRootDialog.h:26
TGLayoutHints * fL1
label layout
Definition TRootDialog.h:25
void CloseWindow() override
Called when closed via window manager action.
virtual void Add(const char *argname, const char *value, const char *type)
Add a label and text input field.
TRootDialog(TRootContextMenu *cmenu=nullptr, const TGWindow *main=nullptr, 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.
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
~TRootDialog() override
Delete the dialog.
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
TRootContextMenu * fMenu
associated context menu
Definition TRootDialog.h:24
Bool_t HandleKey(Event_t *event) override
The key press event handler in this dialog.
int main(int argc, char **argv)
Definition hadd.cxx:631
Event structure.
Definition GuiTypes.h:175