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 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
int main()
Definition Prototype.cxx:12
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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:498
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
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.
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.
TRootContextMenu * fMenu
associated context menu
Definition TRootDialog.h:24
Bool_t HandleKey(Event_t *event) override
The key press event handler in this dialog.
Event structure.
Definition GuiTypes.h:174