ROOT
Version master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
▼
gui
►
browsable
►
browserv7
►
canvaspainter
doc
►
fitpanel
►
fitpanelv7
►
ged
▼
gui
doc
▼
inc
►
HelpText.h
TG3DLine.h
TGApplication.h
►
TGButton.h
TGButtonGroup.h
►
TGCanvas.h
►
TGClient.h
TGColorDialog.h
TGColorSelect.h
►
TGComboBox.h
TGCommandPlugin.h
TGDimension.h
►
TGDNDManager.h
►
TGDockableFrame.h
►
TGDoubleSlider.h
TGEventHandler.h
TGFileBrowser.h
►
TGFileDialog.h
►
TGFont.h
►
TGFontDialog.h
►
TGFrame.h
►
TGFSComboBox.h
►
TGFSContainer.h
►
TGGC.h
TGIcon.h
TGIdleHandler.h
►
TGImageMap.h
TGInputDialog.h
TGLabel.h
►
TGLayout.h
TGListBox.h
►
TGListTree.h
►
TGListView.h
TGMdi.h
►
TGMdiDecorFrame.h
TGMdiFrame.h
►
TGMdiMainFrame.h
►
TGMdiMenu.h
►
TGMenu.h
TGMimeTypes.h
►
TGMsgBox.h
►
TGNumberEntry.h
TGObject.h
►
TGPack.h
TGPasswdDialog.h
►
TGPicture.h
►
TGProgressBar.h
TGRedirectOutputGuard.h
TGResourcePool.h
►
TGScrollBar.h
TGShapedFrame.h
►
TGShutter.h
TGSimpleTable.h
TGSimpleTableInterface.h
►
TGSlider.h
TGSpeedo.h
►
TGSplitFrame.h
►
TGSplitter.h
TGStatusBar.h
TGString.h
TGTab.h
►
TGTable.h
TGTableCell.h
TGTableContainer.h
►
TGTableHeader.h
►
TGTableLayout.h
►
TGText.h
TGTextBuffer.h
TGTextEdit.h
►
TGTextEditDialogs.h
TGTextEditor.h
TGTextEntry.h
►
TGTextView.h
►
TGTextViewStream.h
►
TGToolBar.h
TGToolTip.h
TGTripleSlider.h
►
TGuiBuilder.h
►
TGView.h
►
TGWidget.h
TGWindow.h
TGXYLayout.h
TRootApplication.h
TRootBrowser.h
TRootBrowserLite.h
TRootCanvas.h
TRootContextMenu.h
TRootControlBar.h
TRootDialog.h
TRootEmbeddedCanvas.h
TRootGuiFactory.h
TRootHelpDialog.h
►
TVirtualDragManager.h
►
WidgetMessageTypes.h
►
src
►
guibuilder
►
guihtml
►
recorder
►
sessionviewer
►
webdisplay
►
webgui6
►
hist
►
io
►
main
►
master
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
TGWidget.h
Go to the documentation of this file.
1
// @(#)root/gui:$Id$
2
// Author: Fons Rademakers 05/01/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_TGWidget
13
#define ROOT_TGWidget
14
15
16
#include "
GuiTypes.h
"
17
#include "
WidgetMessageTypes.h
"
18
#include "
TString.h
"
19
20
//--- Text justification modes
21
22
enum
ETextJustification
{
23
kTextLeft
=
BIT
(0),
24
kTextRight
=
BIT
(1),
25
kTextCenterX
=
BIT
(2),
26
kTextTop
=
BIT
(3),
27
kTextBottom
=
BIT
(4),
28
kTextCenterY
=
BIT
(5)
29
};
30
31
32
//--- Widget status
33
34
enum
EWidgetStatus
{
35
kWidgetWantFocus
=
BIT
(0),
36
kWidgetHasFocus
=
BIT
(1),
37
kWidgetIsEnabled
=
BIT
(2)
38
};
39
40
41
class
TGWindow
;
42
43
class
TGWidget
{
44
45
protected
:
46
Int_t
fWidgetId
;
///< the widget id (used for event processing)
47
Int_t
fWidgetFlags
;
///< widget status flags (OR of EWidgetStatus)
48
const
TGWindow
*
fMsgWindow
;
///< window which handles widget events
49
TString
fCommand
;
///< command to be executed
50
51
TGWidget
(
const
TGWidget
&
tgw
):
52
fWidgetId
(
tgw
.
fWidgetId
),
fWidgetFlags
(
tgw
.
fWidgetFlags
),
53
fMsgWindow
(
tgw
.
fMsgWindow
),
fCommand
(
tgw
.
fCommand
) { }
54
TGWidget
&
operator=
(
const
TGWidget
&
tgw
) {
55
if
(
this
!=&
tgw
) {
56
fWidgetId
=
tgw
.fWidgetId;
fWidgetFlags
=
tgw
.fWidgetFlags;
57
fMsgWindow
=
tgw
.fMsgWindow;
fCommand
=
tgw
.fCommand; }
return
*
this
; }
58
Int_t
SetFlags
(
Int_t
flags) {
return
fWidgetFlags
|= flags; }
59
Int_t
ClearFlags
(
Int_t
flags) {
return
fWidgetFlags
&=
~flags
; }
60
61
public
:
62
TGWidget
():
63
fWidgetId
(-1),
fWidgetFlags
(0),
fMsgWindow
(nullptr),
fCommand
() { }
64
TGWidget
(
Int_t
id
):
65
fWidgetId
(id),
fWidgetFlags
(0),
fMsgWindow
(nullptr),
fCommand
() { }
66
virtual
~TGWidget
() { }
67
68
Int_t
WidgetId
()
const
{
return
fWidgetId
; }
69
Bool_t
IsEnabled
()
const
{
return
(
Bool_t
)((
fWidgetFlags
&
kWidgetIsEnabled
) != 0); }
70
Bool_t
HasFocus
()
const
{
return
(
Bool_t
)((
fWidgetFlags
&
kWidgetHasFocus
) != 0); }
71
Bool_t
WantFocus
()
const
{
return
(
Bool_t
)((
fWidgetFlags
&
kWidgetWantFocus
) != 0); }
72
virtual
void
Associate
(
const
TGWindow
*
w
) {
fMsgWindow
=
w
; }
73
virtual
void
SetCommand
(
const
char
*
command
) {
fCommand
=
command
; }
74
const
char
*
GetCommand
()
const
{
return
fCommand
.
Data
(); }
75
76
ClassDef
(
TGWidget
,0)
// Widget base class
77
};
78
79
#endif
GuiTypes.h
ClassDef
#define ClassDef(name, id)
Definition
Rtypes.h:342
BIT
#define BIT(n)
Definition
Rtypes.h:90
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ETextJustification
ETextJustification
Definition
TGWidget.h:22
kTextCenterX
@ kTextCenterX
Definition
TGWidget.h:25
kTextLeft
@ kTextLeft
Definition
TGWidget.h:23
kTextBottom
@ kTextBottom
Definition
TGWidget.h:27
kTextTop
@ kTextTop
Definition
TGWidget.h:26
kTextRight
@ kTextRight
Definition
TGWidget.h:24
kTextCenterY
@ kTextCenterY
Definition
TGWidget.h:28
EWidgetStatus
EWidgetStatus
Definition
TGWidget.h:34
kWidgetIsEnabled
@ kWidgetIsEnabled
Definition
TGWidget.h:37
kWidgetWantFocus
@ kWidgetWantFocus
Definition
TGWidget.h:35
kWidgetHasFocus
@ kWidgetHasFocus
Definition
TGWidget.h:36
w
winID w
Definition
TGWin32VirtualGLProxy.cxx:39
TString.h
WidgetMessageTypes.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TGWidget
The widget base class.
Definition
TGWidget.h:43
TGWidget::fWidgetId
Int_t fWidgetId
the widget id (used for event processing)
Definition
TGWidget.h:46
TGWidget::Associate
virtual void Associate(const TGWindow *w)
Definition
TGWidget.h:72
TGWidget::TGWidget
TGWidget(Int_t id)
Definition
TGWidget.h:64
TGWidget::fCommand
TString fCommand
command to be executed
Definition
TGWidget.h:49
TGWidget::GetCommand
const char * GetCommand() const
Definition
TGWidget.h:74
TGWidget::HasFocus
Bool_t HasFocus() const
Definition
TGWidget.h:70
TGWidget::ClearFlags
Int_t ClearFlags(Int_t flags)
Definition
TGWidget.h:59
TGWidget::~TGWidget
virtual ~TGWidget()
Definition
TGWidget.h:66
TGWidget::fWidgetFlags
Int_t fWidgetFlags
widget status flags (OR of EWidgetStatus)
Definition
TGWidget.h:47
TGWidget::SetFlags
Int_t SetFlags(Int_t flags)
Definition
TGWidget.h:58
TGWidget::TGWidget
TGWidget()
Definition
TGWidget.h:62
TGWidget::fMsgWindow
const TGWindow * fMsgWindow
window which handles widget events
Definition
TGWidget.h:48
TGWidget::IsEnabled
Bool_t IsEnabled() const
Definition
TGWidget.h:69
TGWidget::operator=
TGWidget & operator=(const TGWidget &tgw)
Definition
TGWidget.h:54
TGWidget::TGWidget
TGWidget(const TGWidget &tgw)
Definition
TGWidget.h:51
TGWidget::SetCommand
virtual void SetCommand(const char *command)
Definition
TGWidget.h:73
TGWidget::WidgetId
Int_t WidgetId() const
Definition
TGWidget.h:68
TGWidget::WantFocus
Bool_t WantFocus() const
Definition
TGWidget.h:71
TGWindow
ROOT GUI Window base class.
Definition
TGWindow.h:23
TString
Basic string class.
Definition
TString.h:139
TString::Data
const char * Data() const
Definition
TString.h:376
bool
int
gui
gui
inc
TGWidget.h
ROOT master - Reference Guide Generated on Fri Mar 28 2025 05:27:08 (GVA Time) using Doxygen 1.10.0