ROOT
v6-20
Reference Guide
TGMenu.h
Go to the documentation of this file.
1
// @(#)root/gui:$Id$
2
// Author: Fons Rademakers 09/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_TGMenu
13
#define ROOT_TGMenu
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TGMenuBar, TGPopupMenu, TGMenuTitle and TGMenuEntry //
19
// //
20
// This header contains all different menu classes. //
21
// //
22
// Selecting a menu item will generate the event: //
23
// kC_COMMAND, kCM_MENU, menu id, user data. //
24
// //
25
//////////////////////////////////////////////////////////////////////////
26
27
#include "
TGFrame.h
"
28
#include "
TGString.h
"
29
#include "
TGPicture.h
"
30
#include "
TGWidget.h
"
31
32
//--- Menu entry status mask
33
34
enum
EMenuEntryState
{
35
kMenuActiveMask
=
BIT
(0),
36
kMenuEnableMask
=
BIT
(1),
37
kMenuDefaultMask
=
BIT
(2),
38
kMenuCheckedMask
=
BIT
(3),
39
kMenuRadioMask
=
BIT
(4),
40
kMenuHideMask
=
BIT
(5),
41
kMenuRadioEntryMask
=
BIT
(6)
42
};
43
44
//--- Menu entry types
45
46
enum
EMenuEntryType
{
47
kMenuSeparator
,
48
kMenuLabel
,
49
kMenuEntry
,
50
kMenuPopup
51
};
52
53
54
class
TGPopupMenu
;
55
class
TGMenuBar
;
56
class
TGMenuTitle
;
57
class
TTimer
;
58
class
TGSplitButton
;
59
60
//////////////////////////////////////////////////////////////////////////
61
// //
62
// TGMenuEntry //
63
// //
64
// This class contains all information about a menu entry. //
65
// It is a fully protected class used internally by TGPopupMenu. //
66
// //
67
//////////////////////////////////////////////////////////////////////////
68
69
class
TGMenuEntry
:
public
TObject
{
70
71
friend
class
TGPopupMenu
;
72
friend
class
TGMenuBar
;
73
74
protected
:
75
Int_t
fEntryId
;
// the entry id (used for event processing)
76
void
*
fUserData
;
// pointer to user data structure
77
EMenuEntryType
fType
;
// type of entry
78
Int_t
fStatus
;
// entry status (OR of EMenuEntryState)
79
Int_t
fEx
,
fEy
;
// position of entry
80
UInt_t
fEw
,
fEh
;
// width and height of entry
81
TGHotString
*
fLabel
;
// menu entry label
82
TGString
*
fShortcut
;
// menu entry shortcut
83
const
TGPicture
*
fPic
;
// menu entry icon
84
TGPopupMenu
*
fPopup
;
// pointer to popup menu (in case of cascading menus)
85
86
private
:
87
TGMenuEntry
(
const
TGMenuEntry
&);
// not implemented
88
TGMenuEntry
&
operator=
(
const
TGMenuEntry
&);
// not implemented
89
90
public
:
91
TGMenuEntry
():
fEntryId
(0),
fUserData
(0),
fType
(),
fStatus
(0),
92
fEx
(0),
fEy
(0),
fEw
(0),
fEh
(0),
fLabel
(0),
fShortcut
(0),
fPic
(0),
fPopup
(0) { }
93
virtual
~TGMenuEntry
() {
if
(
fLabel
)
delete
fLabel
;
if
(
fShortcut
)
delete
fShortcut
; }
94
95
Int_t
GetEntryId
()
const
{
return
fEntryId
; }
96
const
char
*
GetName
()
const
{
return
fLabel
?
fLabel
->
GetString
() : 0; }
97
const
char
*
GetShortcutText
()
const
{
return
fShortcut
?
fShortcut
->
GetString
() : 0; }
98
virtual
Int_t
GetStatus
()
const
{
return
fStatus
; }
99
EMenuEntryType
GetType
()
const
{
return
fType
; }
100
TGPopupMenu
*
GetPopup
()
const
{
return
fPopup
; }
101
TGHotString
*
GetLabel
()
const
{
return
fLabel
; }
102
TGString
*
GetShortcut
()
const
{
return
fShortcut
; }
103
Int_t
GetEx
()
const
{
return
fEx
; }
104
Int_t
GetEy
()
const
{
return
fEy
; }
105
UInt_t
GetEw
()
const
{
return
fEw
; }
106
UInt_t
GetEh
()
const
{
return
fEh
; }
107
const
TGPicture
*
GetPic
()
const
{
return
fPic
; }
108
void
*
GetUserData
()
const
{
return
fUserData
; }
109
110
ClassDef
(
TGMenuEntry
,0);
// Menu entry class
111
};
112
113
114
//////////////////////////////////////////////////////////////////////////
115
// //
116
// TGPopupMenu //
117
// //
118
// This class creates a popup menu object. Popup menu's are attached //
119
// to TGMenuBar objects. //
120
// //
121
//////////////////////////////////////////////////////////////////////////
122
123
class
TGPopupMenu
:
public
TGFrame
{
124
125
friend
class
TGMenuTitle
;
126
friend
class
TGMenuBar
;
127
friend
class
TGSplitButton
;
128
129
protected
:
130
TList
*
fEntryList
;
// list of menu entries
131
TGMenuEntry
*
fCurrent
;
// currently selected menu entry
132
Bool_t
fStick
;
// stick mode (popup menu stays sticked on screen)
133
Bool_t
fHasGrab
;
// true if menu has grabbed pointer
134
Bool_t
fPoppedUp
;
// true if menu is currently popped up
135
UInt_t
fXl
;
// Max width of all menu entries
136
UInt_t
fMenuWidth
;
// width of popup menu
137
UInt_t
fMenuHeight
;
// height of popup menu
138
TTimer
*
fDelay
;
// delay before poping up cascading menu
139
GContext_t
fNormGC
;
// normal drawing graphics context
140
GContext_t
fSelGC
;
// graphics context for drawing selections
141
GContext_t
fSelbackGC
;
// graphics context for drawing selection background
142
FontStruct_t
fFontStruct
;
// font to draw menu entries
143
FontStruct_t
fHifontStruct
;
// font to draw highlighted entries
144
Cursor_t
fDefaultCursor
;
// right pointing cursor
145
const
TGWindow
*
fMsgWindow
;
// window which handles menu events
146
TGMenuBar
*
fMenuBar
;
// menu bar (if any)
147
TGSplitButton
*
fSplitButton
;
// split button (if any)
148
UInt_t
fEntrySep
;
// separation distance between ebtris
149
150
static
const
TGFont
*
fgDefaultFont
;
151
static
const
TGFont
*
fgHilightFont
;
152
static
const
TGGC
*
fgDefaultGC
;
153
static
const
TGGC
*
fgDefaultSelectedGC
;
154
static
const
TGGC
*
fgDefaultSelectedBackgroundGC
;
155
156
void
DrawTrianglePattern
(
GContext_t
gc,
Int_t
l
,
Int_t
t,
Int_t
r
,
Int_t
b
);
157
void
DrawCheckMark
(
GContext_t
gc,
Int_t
l
,
Int_t
t,
Int_t
r
,
Int_t
b
);
158
void
DrawRCheckMark
(
GContext_t
gc,
Int_t
l
,
Int_t
t,
Int_t
r
,
Int_t
b
);
159
virtual
void
DoRedraw
();
160
virtual
void
DrawEntry
(
TGMenuEntry
*entry);
161
virtual
void
Reposition
();
162
163
static
FontStruct_t
GetDefaultFontStruct
();
164
static
FontStruct_t
GetHilightFontStruct
();
165
static
const
TGGC
&
GetDefaultGC
();
166
static
const
TGGC
&
GetDefaultSelectedGC
();
167
static
const
TGGC
&
GetDefaultSelectedBackgroundGC
();
168
169
private
:
170
TGPopupMenu
(
const
TGPopupMenu
&);
// not implemented
171
TGPopupMenu
&
operator=
(
const
TGPopupMenu
&);
// not implemented
172
173
public
:
174
TGPopupMenu
(
const
TGWindow
*p = 0,
UInt_t
w = 10,
UInt_t
h
= 10,
175
UInt_t
options = 0);
176
virtual
~TGPopupMenu
();
177
178
virtual
void
AddEntry
(
TGHotString
*
s
,
Int_t
id
,
void
*ud = 0,
179
const
TGPicture
*p = 0,
TGMenuEntry
*before = 0);
180
virtual
void
AddEntry
(
const
char
*
s
,
Int_t
id
,
void
*ud = 0,
181
const
TGPicture
*p = 0,
TGMenuEntry
*before = 0);
182
virtual
void
AddSeparator
(
TGMenuEntry
*before = 0);
183
virtual
void
AddLabel
(
TGHotString
*
s
,
const
TGPicture
*p = 0,
184
TGMenuEntry
*before = 0);
185
virtual
void
AddLabel
(
const
char
*
s
,
const
TGPicture
*p = 0,
186
TGMenuEntry
*before = 0);
187
virtual
void
AddPopup
(
TGHotString
*
s
,
TGPopupMenu
*popup,
188
TGMenuEntry
*before = 0,
const
TGPicture
*p = 0);
189
virtual
void
AddPopup
(
const
char
*
s
,
TGPopupMenu
*popup,
190
TGMenuEntry
*before = 0,
const
TGPicture
*p = 0);
191
virtual
void
EnableEntry
(
Int_t
id
);
192
virtual
void
DisableEntry
(
Int_t
id
);
193
virtual
Bool_t
IsEntryEnabled
(
Int_t
id
);
194
virtual
void
HideEntry
(
Int_t
id
);
195
virtual
Bool_t
IsEntryHidden
(
Int_t
id
);
196
virtual
void
DefaultEntry
(
Int_t
id
);
197
virtual
void
CheckEntry
(
Int_t
id
);
198
virtual
void
CheckEntryByData
(
void
*user_data);
199
virtual
void
UnCheckEntry
(
Int_t
id
);
200
virtual
void
UnCheckEntryByData
(
void
*user_data);
201
virtual
void
UnCheckEntries
();
202
virtual
Bool_t
IsEntryChecked
(
Int_t
id
);
203
virtual
void
RCheckEntry
(
Int_t
id
,
Int_t
IDfirst,
Int_t
IDlast);
204
virtual
Bool_t
IsEntryRChecked
(
Int_t
id
);
205
virtual
void
PlaceMenu
(
Int_t
x
,
Int_t
y
,
Bool_t
stick_mode,
206
Bool_t
grab_pointer);
207
virtual
Int_t
EndMenu
(
void
*&userData);
208
virtual
void
DeleteEntry
(
Int_t
id
);
209
virtual
void
DeleteEntry
(
TGMenuEntry
*entry);
210
virtual
TGMenuEntry
*
GetEntry
(
Int_t
id
);
211
virtual
TGMenuEntry
*
GetCurrent
()
const
{
return
fCurrent
; }
212
virtual
TGMenuEntry
*
GetEntry
(
const
char
*
s
);
213
const
TList
*
GetListOfEntries
()
const
{
return
fEntryList
; }
214
virtual
void
DrawBorder
();
215
virtual
Bool_t
HandleButton
(
Event_t
*event);
216
virtual
Bool_t
HandleMotion
(
Event_t
*event);
217
virtual
Bool_t
HandleCrossing
(
Event_t
*event);
218
virtual
Bool_t
HandleTimer
(
TTimer
*t);
219
virtual
void
Associate
(
const
TGWindow
*w) {
fMsgWindow
= w; }
220
virtual
void
SetMenuBar
(
TGMenuBar
*
bar
) {
fMenuBar
=
bar
; }
221
TGMenuBar
*
GetMenuBar
()
const
{
return
fMenuBar
; }
222
virtual
void
Activate
(
Bool_t
) { }
223
virtual
void
Activate
(
TGMenuEntry
*entry);
224
virtual
void
SavePrimitive
(std::ostream &out,
Option_t
*option =
""
);
225
226
UInt_t
GetEntrySep
()
const
{
return
fEntrySep
; }
227
virtual
void
SetEntrySep
(
UInt_t
sep
) {
fEntrySep
=
sep
; }
228
229
virtual
void
PoppedUp
() {
Emit
(
"PoppedUp()"
); }
// *SIGNAL*
230
virtual
void
PoppedDown
() {
Emit
(
"PoppedDown()"
); }
// *SIGNAL*
231
virtual
void
Highlighted
(
Int_t
id
) {
Emit
(
"Highlighted(Int_t)"
,
id
); }
// *SIGNAL*
232
virtual
void
Activated
(
Int_t
id
) {
Emit
(
"Activated(Int_t)"
,
id
); }
// *SIGNAL*
233
234
ClassDef
(
TGPopupMenu
,0)
// Popup menu
235
};
236
237
238
//////////////////////////////////////////////////////////////////////////
239
// //
240
// TGMenuTitle //
241
// //
242
// This class creates a menu title. A menu title is a frame //
243
// to which a popup menu can be attached. Menu titles are automatically //
244
// created when adding a popup menu to a menubar. //
245
// //
246
//////////////////////////////////////////////////////////////////////////
247
248
class
TGMenuTitle
:
public
TGFrame
{
249
250
protected
:
251
TGPopupMenu
*
fMenu
;
// attached popup menu
252
TGHotString
*
fLabel
;
// menu title
253
Int_t
fTitleId
;
// id of selected menu item
254
void
*
fTitleData
;
// user data associated with selected item
255
Bool_t
fState
;
// menu title state (active/not active)
256
Int_t
fHkeycode
;
// hot key code
257
FontStruct_t
fFontStruct
;
// font
258
Pixel_t
fTextColor
;
// text color
259
GContext_t
fNormGC
,
fSelGC
;
// normal and selection graphics contexts
260
261
virtual
void
DoRedraw
();
262
263
static
const
TGFont
*
fgDefaultFont
;
264
static
const
TGGC
*
fgDefaultSelectedGC
;
265
static
const
TGGC
*
fgDefaultGC
;
266
267
private
:
268
TGMenuTitle
(
const
TGMenuTitle
&);
// not implemented
269
TGMenuTitle
&
operator=
(
const
TGMenuTitle
&);
// not implemented
270
271
public
:
272
static
FontStruct_t
GetDefaultFontStruct
();
273
static
const
TGGC
&
GetDefaultSelectedGC
();
274
static
const
TGGC
&
GetDefaultGC
();
275
276
TGMenuTitle
(
const
TGWindow
*p = 0,
TGHotString
*
s
= 0,
TGPopupMenu
*menu = 0,
277
GContext_t
norm =
GetDefaultGC
()(),
278
FontStruct_t
font =
GetDefaultFontStruct
(),
279
UInt_t
options = 0);
280
virtual
~TGMenuTitle
() {
if
(
fLabel
)
delete
fLabel
; }
281
282
Pixel_t
GetTextColor
()
const
{
return
fTextColor
; }
283
void
SetTextColor
(
Pixel_t
col) {
fTextColor
= col; }
284
virtual
void
SetState
(
Bool_t
state);
285
Bool_t
GetState
()
const
{
return
fState
; }
286
Int_t
GetHotKeyCode
()
const
{
return
fHkeycode
; }
287
TGPopupMenu
*
GetMenu
()
const
{
return
fMenu
; }
288
const
char
*
GetName
()
const
{
return
fLabel
?
fLabel
->
GetString
() : 0; }
289
virtual
void
DoSendMessage
();
290
virtual
void
SavePrimitive
(std::ostream &out,
Option_t
*option =
""
);
291
292
ClassDef
(
TGMenuTitle
,0)
// Menu title class
293
};
294
295
296
//////////////////////////////////////////////////////////////////////////
297
// //
298
// TGMenuBar //
299
// //
300
// This class creates a menu bar. //
301
// //
302
//////////////////////////////////////////////////////////////////////////
303
304
class
TGMenuBar
:
public
TGHorizontalFrame
{
305
306
friend
class
TGPopupMenu
;
307
308
protected
:
309
TGMenuTitle
*
fCurrent
;
// current menu title
310
TList
*
fTitles
;
// list of menu titles
311
Cursor_t
fDefaultCursor
;
// right pointing cursor
312
Bool_t
fStick
;
// stick mode (popup menu stays sticked on screen)
313
TList
*
fTrash
;
// garbage
314
Bool_t
fKeyNavigate
;
// kTRUE if arrow key navigation is on
315
TGPopupMenu
*
fMenuMore
;
// extra >> menu
316
TGLayoutHints
*
fMenuBarMoreLayout
;
// layout of the extra menu
317
Bool_t
fWithExt
;
// indicates whether the >> menu is shown or not
318
TList
*
fOutLayouts
;
// keeps trace of layouts of hidden menus
319
TList
*
fNeededSpace
;
// keeps trace of space needed for hidden menus
320
321
virtual
void
AddFrameBefore
(
TGFrame
*
f
,
TGLayoutHints
*
l
= 0,
322
TGPopupMenu
*before = 0);
323
324
virtual
void
BindHotKey
(
Int_t
keycode,
Bool_t
on =
kTRUE
);
325
virtual
void
BindKeys
(
Bool_t
on =
kTRUE
);
326
void
BindMenu
(
TGPopupMenu
* subMenu,
Bool_t
on);
327
328
private
:
329
TGMenuBar
(
const
TGMenuBar
&);
// not implemented
330
TGMenuBar
&
operator=
(
const
TGMenuBar
&);
// not implemented
331
332
public
:
333
TGMenuBar
(
const
TGWindow
*p = 0,
UInt_t
w = 60,
UInt_t
h
= 20,
334
UInt_t
options =
kHorizontalFrame
|
kRaisedFrame
);
335
virtual
~TGMenuBar
();
336
337
virtual
void
AddPopup
(
TGHotString
*
s
,
TGPopupMenu
*menu,
TGLayoutHints
*
l
,
338
TGPopupMenu
*before = 0);
339
virtual
void
AddPopup
(
const
char
*
s
,
TGPopupMenu
*menu,
TGLayoutHints
*
l
,
340
TGPopupMenu
*before = 0);
341
virtual
TGPopupMenu
*
AddPopup
(
const
TString
&
s
,
Int_t
padleft = 4,
Int_t
padright = 0,
342
Int_t
padtop = 0,
Int_t
padbottom = 0);
343
virtual
void
AddTitle
(
TGMenuTitle
*title,
TGLayoutHints
*
l
,
TGPopupMenu
*before = 0);
344
345
virtual
TGPopupMenu
*
GetPopup
(
const
char
*
s
);
346
virtual
TGPopupMenu
*
RemovePopup
(
const
char
*
s
);
347
348
virtual
TGMenuTitle
*
GetCurrent
()
const
{
return
fCurrent
; }
349
virtual
TList
*
GetTitles
()
const
{
return
fTitles
; }
350
virtual
Bool_t
HandleButton
(
Event_t
*event);
351
virtual
Bool_t
HandleMotion
(
Event_t
*event);
352
virtual
Bool_t
HandleKey
(
Event_t
*event);
353
virtual
void
SavePrimitive
(std::ostream &out,
Option_t
*option =
""
);
354
virtual
void
Layout
();
355
void
PopupConnection
();
356
TGFrameElement
*
GetLastOnLeft
();
357
358
ClassDef
(
TGMenuBar
,0)
// Menu bar class
359
};
360
361
#endif
Cursor_t
Handle_t Cursor_t
Definition:
GuiTypes.h:33
GContext_t
Handle_t GContext_t
Definition:
GuiTypes.h:37
FontStruct_t
Handle_t FontStruct_t
Definition:
GuiTypes.h:38
Pixel_t
ULong_t Pixel_t
Definition:
GuiTypes.h:39
r
ROOT::R::TRInterface & r
Definition:
Object.C:4
b
#define b(i)
Definition:
RSha256.hxx:100
f
#define f(i)
Definition:
RSha256.hxx:104
h
#define h(i)
Definition:
RSha256.hxx:106
Int_t
int Int_t
Definition:
RtypesCore.h:41
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:87
Option_t
const char Option_t
Definition:
RtypesCore.h:62
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:326
BIT
#define BIT(n)
Definition:
Rtypes.h:83
TGFrame.h
kRaisedFrame
@ kRaisedFrame
Definition:
TGFrame.h:62
kHorizontalFrame
@ kHorizontalFrame
Definition:
TGFrame.h:60
EMenuEntryState
EMenuEntryState
Definition:
TGMenu.h:34
kMenuRadioMask
@ kMenuRadioMask
Definition:
TGMenu.h:39
kMenuRadioEntryMask
@ kMenuRadioEntryMask
Definition:
TGMenu.h:41
kMenuHideMask
@ kMenuHideMask
Definition:
TGMenu.h:40
kMenuCheckedMask
@ kMenuCheckedMask
Definition:
TGMenu.h:38
kMenuActiveMask
@ kMenuActiveMask
Definition:
TGMenu.h:35
kMenuDefaultMask
@ kMenuDefaultMask
Definition:
TGMenu.h:37
kMenuEnableMask
@ kMenuEnableMask
Definition:
TGMenu.h:36
EMenuEntryType
EMenuEntryType
Definition:
TGMenu.h:46
kMenuEntry
@ kMenuEntry
Definition:
TGMenu.h:49
kMenuSeparator
@ kMenuSeparator
Definition:
TGMenu.h:47
kMenuPopup
@ kMenuPopup
Definition:
TGMenu.h:50
kMenuLabel
@ kMenuLabel
Definition:
TGMenu.h:48
TGPicture.h
TGString.h
TGWidget.h
TGFont
Definition:
TGFont.h:149
TGFrameElement
Definition:
TGLayout.h:112
TGFrame
Definition:
TGFrame.h:127
TGGC
Definition:
TGGC.h:31
TGHorizontalFrame
Definition:
TGFrame.h:445
TGHotString
Definition:
TGString.h:52
TGLayoutHints
Definition:
TGLayout.h:57
TGMenuBar
Definition:
TGMenu.h:304
TGMenuBar::fMenuMore
TGPopupMenu * fMenuMore
Definition:
TGMenu.h:315
TGMenuBar::RemovePopup
virtual TGPopupMenu * RemovePopup(const char *s)
Remove popup menu from menu bar.
Definition:
TGMenu.cxx:558
TGMenuBar::fStick
Bool_t fStick
Definition:
TGMenu.h:312
TGMenuBar::~TGMenuBar
virtual ~TGMenuBar()
Delete menu bar object.
Definition:
TGMenu.cxx:152
TGMenuBar::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle a mouse motion event in a menu bar.
Definition:
TGMenu.cxx:587
TGMenuBar::HandleKey
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events in a menu bar.
Definition:
TGMenu.cxx:683
TGMenuBar::operator=
TGMenuBar & operator=(const TGMenuBar &)
TGMenuBar::AddTitle
virtual void AddTitle(TGMenuTitle *title, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup via created before menu title.
Definition:
TGMenu.cxx:432
TGMenuBar::BindHotKey
virtual void BindHotKey(Int_t keycode, Bool_t on=kTRUE)
If on kTRUE bind hot keys, otherwise remove key binding.
Definition:
TGMenu.cxx:380
TGMenuBar::fWithExt
Bool_t fWithExt
Definition:
TGMenu.h:317
TGMenuBar::fCurrent
TGMenuTitle * fCurrent
Definition:
TGMenu.h:309
TGMenuBar::GetPopup
virtual TGPopupMenu * GetPopup(const char *s)
Return popup menu with the specified name.
Definition:
TGMenu.cxx:537
TGMenuBar::fTrash
TList * fTrash
Definition:
TGMenu.h:313
TGMenuBar::AddFrameBefore
virtual void AddFrameBefore(TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)
Private version of AddFrame for menubar, to make sure that we indeed only add TGMenuTitle objects to ...
Definition:
TGMenu.cxx:500
TGMenuBar::BindKeys
virtual void BindKeys(Bool_t on=kTRUE)
If on kTRUE bind arrow, popup menu hot keys, otherwise remove key bindings.
Definition:
TGMenu.cxx:334
TGMenuBar::GetCurrent
virtual TGMenuTitle * GetCurrent() const
Definition:
TGMenu.h:348
TGMenuBar::GetTitles
virtual TList * GetTitles() const
Definition:
TGMenu.h:349
TGMenuBar::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a menu bar widget as a C++ statement(s) on output stream out.
Definition:
TGMenu.cxx:2339
TGMenuBar::BindMenu
void BindMenu(TGPopupMenu *subMenu, Bool_t on)
If on kTRUE bind subMenu hot keys, otherwise remove key bindings.
Definition:
TGMenu.cxx:352
TGMenuBar::fOutLayouts
TList * fOutLayouts
Definition:
TGMenu.h:318
TGMenuBar::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle a mouse button event in a menubar.
Definition:
TGMenu.cxx:620
TGMenuBar::GetLastOnLeft
TGFrameElement * GetLastOnLeft()
Returns the last visible menu title on the left of the '>>' in the menu bar.
Definition:
TGMenu.cxx:265
TGMenuBar::PopupConnection
void PopupConnection()
Connects the corresponding cascaded menu to the proper slots, according to the highlighted menu entry...
Definition:
TGMenu.cxx:286
TGMenuBar::fNeededSpace
TList * fNeededSpace
Definition:
TGMenu.h:319
TGMenuBar::fDefaultCursor
Cursor_t fDefaultCursor
Definition:
TGMenu.h:311
TGMenuBar::fKeyNavigate
Bool_t fKeyNavigate
Definition:
TGMenu.h:314
TGMenuBar::Layout
virtual void Layout()
Calculates whether the >> menu must be shown or not and which menu titles are hidden.
Definition:
TGMenu.cxx:190
TGMenuBar::fMenuBarMoreLayout
TGLayoutHints * fMenuBarMoreLayout
Definition:
TGMenu.h:316
TGMenuBar::fTitles
TList * fTitles
Definition:
TGMenu.h:310
TGMenuBar::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup menu to menu bar.
Definition:
TGMenu.cxx:415
TGMenuBar::TGMenuBar
TGMenuBar(const TGMenuBar &)
TGMenuEntry
Definition:
TGMenu.h:69
TGMenuEntry::GetPopup
TGPopupMenu * GetPopup() const
Definition:
TGMenu.h:100
TGMenuEntry::fEx
Int_t fEx
Definition:
TGMenu.h:79
TGMenuEntry::GetShortcutText
const char * GetShortcutText() const
Definition:
TGMenu.h:97
TGMenuEntry::GetPic
const TGPicture * GetPic() const
Definition:
TGMenu.h:107
TGMenuEntry::TGMenuEntry
TGMenuEntry()
Definition:
TGMenu.h:91
TGMenuEntry::GetShortcut
TGString * GetShortcut() const
Definition:
TGMenu.h:102
TGMenuEntry::fStatus
Int_t fStatus
Definition:
TGMenu.h:78
TGMenuEntry::fEntryId
Int_t fEntryId
Definition:
TGMenu.h:75
TGMenuEntry::GetUserData
void * GetUserData() const
Definition:
TGMenu.h:108
TGMenuEntry::fLabel
TGHotString * fLabel
Definition:
TGMenu.h:81
TGMenuEntry::GetLabel
TGHotString * GetLabel() const
Definition:
TGMenu.h:101
TGMenuEntry::TGMenuEntry
TGMenuEntry(const TGMenuEntry &)
TGMenuEntry::GetEw
UInt_t GetEw() const
Definition:
TGMenu.h:105
TGMenuEntry::GetEx
Int_t GetEx() const
Definition:
TGMenu.h:103
TGMenuEntry::~TGMenuEntry
virtual ~TGMenuEntry()
Definition:
TGMenu.h:93
TGMenuEntry::GetEy
Int_t GetEy() const
Definition:
TGMenu.h:104
TGMenuEntry::fEw
UInt_t fEw
Definition:
TGMenu.h:80
TGMenuEntry::GetStatus
virtual Int_t GetStatus() const
Definition:
TGMenu.h:98
TGMenuEntry::fPic
const TGPicture * fPic
Definition:
TGMenu.h:83
TGMenuEntry::fShortcut
TGString * fShortcut
Definition:
TGMenu.h:82
TGMenuEntry::fUserData
void * fUserData
Definition:
TGMenu.h:76
TGMenuEntry::fEy
Int_t fEy
Definition:
TGMenu.h:79
TGMenuEntry::operator=
TGMenuEntry & operator=(const TGMenuEntry &)
TGMenuEntry::GetType
EMenuEntryType GetType() const
Definition:
TGMenu.h:99
TGMenuEntry::GetEh
UInt_t GetEh() const
Definition:
TGMenu.h:106
TGMenuEntry::fType
EMenuEntryType fType
Definition:
TGMenu.h:77
TGMenuEntry::fEh
UInt_t fEh
Definition:
TGMenu.h:80
TGMenuEntry::fPopup
TGPopupMenu * fPopup
Definition:
TGMenu.h:84
TGMenuEntry::GetName
const char * GetName() const
Returns name of object.
Definition:
TGMenu.h:96
TGMenuEntry::GetEntryId
Int_t GetEntryId() const
Definition:
TGMenu.h:95
TGMenuTitle
Definition:
TGMenu.h:248
TGMenuTitle::fLabel
TGHotString * fLabel
Definition:
TGMenu.h:252
TGMenuTitle::~TGMenuTitle
virtual ~TGMenuTitle()
Definition:
TGMenu.h:280
TGMenuTitle::fgDefaultGC
static const TGGC * fgDefaultGC
Definition:
TGMenu.h:265
TGMenuTitle::fTitleData
void * fTitleData
Definition:
TGMenu.h:254
TGMenuTitle::GetTextColor
Pixel_t GetTextColor() const
Definition:
TGMenu.h:282
TGMenuTitle::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a title menu widget as a C++ statement(s) on output stream out.
Definition:
TGMenu.cxx:2307
TGMenuTitle::GetName
const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition:
TGMenu.h:288
TGMenuTitle::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition:
TGMenu.cxx:2141
TGMenuTitle::fMenu
TGPopupMenu * fMenu
Definition:
TGMenu.h:251
TGMenuTitle::TGMenuTitle
TGMenuTitle(const TGMenuTitle &)
TGMenuTitle::fHkeycode
Int_t fHkeycode
Definition:
TGMenu.h:256
TGMenuTitle::SetState
virtual void SetState(Bool_t state)
Set state of menu title.
Definition:
TGMenu.cxx:2056
TGMenuTitle::fNormGC
GContext_t fNormGC
Definition:
TGMenu.h:259
TGMenuTitle::fgDefaultFont
static const TGFont * fgDefaultFont
Definition:
TGMenu.h:263
TGMenuTitle::GetDefaultGC
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Definition:
TGMenu.cxx:2151
TGMenuTitle::GetHotKeyCode
Int_t GetHotKeyCode() const
Definition:
TGMenu.h:286
TGMenuTitle::fgDefaultSelectedGC
static const TGGC * fgDefaultSelectedGC
Definition:
TGMenu.h:264
TGMenuTitle::DoRedraw
virtual void DoRedraw()
Draw a menu title.
Definition:
TGMenu.cxx:2085
TGMenuTitle::GetMenu
TGPopupMenu * GetMenu() const
Definition:
TGMenu.h:287
TGMenuTitle::GetDefaultSelectedGC
static const TGGC & GetDefaultSelectedGC()
Return default selection graphics context in use.
Definition:
TGMenu.cxx:2161
TGMenuTitle::SetTextColor
void SetTextColor(Pixel_t col)
Definition:
TGMenu.h:283
TGMenuTitle::GetState
Bool_t GetState() const
Definition:
TGMenu.h:285
TGMenuTitle::DoSendMessage
virtual void DoSendMessage()
Send final selected menu item to be processed.
Definition:
TGMenu.cxx:2128
TGMenuTitle::operator=
TGMenuTitle & operator=(const TGMenuTitle &)
TGMenuTitle::fTextColor
Pixel_t fTextColor
Definition:
TGMenu.h:258
TGMenuTitle::fSelGC
GContext_t fSelGC
Definition:
TGMenu.h:259
TGMenuTitle::fState
Bool_t fState
Definition:
TGMenu.h:255
TGMenuTitle::fFontStruct
FontStruct_t fFontStruct
Definition:
TGMenu.h:257
TGMenuTitle::fTitleId
Int_t fTitleId
Definition:
TGMenu.h:253
TGPicture
Definition:
TGPicture.h:36
TGPopupMenu
Definition:
TGMenu.h:123
TGPopupMenu::PoppedUp
virtual void PoppedUp()
Definition:
TGMenu.h:229
TGPopupMenu::DrawBorder
virtual void DrawBorder()
Draw border round popup menu.
Definition:
TGMenu.cxx:1601
TGPopupMenu::fEntryList
TList * fEntryList
Definition:
TGMenu.h:130
TGPopupMenu::AddLabel
virtual void AddLabel(TGHotString *s, const TGPicture *p=0, TGMenuEntry *before=0)
Add a menu label to the menu.
Definition:
TGMenu.cxx:1092
TGPopupMenu::GetEntrySep
UInt_t GetEntrySep() const
Definition:
TGMenu.h:226
TGPopupMenu::HideEntry
virtual void HideEntry(Int_t id)
Hide entry (hidden entries are not shown in the menu).
Definition:
TGMenu.cxx:1748
TGPopupMenu::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *popup, TGMenuEntry *before=0, const TGPicture *p=0)
Add a (cascading) popup menu to a popup menu.
Definition:
TGMenu.cxx:1149
TGPopupMenu::DefaultEntry
virtual void DefaultEntry(Int_t id)
Set default entry (default entries are drawn with bold text).
Definition:
TGMenu.cxx:1686
TGPopupMenu::fPoppedUp
Bool_t fPoppedUp
Definition:
TGMenu.h:134
TGPopupMenu::fgDefaultGC
static const TGGC * fgDefaultGC
Definition:
TGMenu.h:152
TGPopupMenu::fCurrent
TGMenuEntry * fCurrent
Definition:
TGMenu.h:131
TGPopupMenu::GetEntry
virtual TGMenuEntry * GetEntry(Int_t id)
Find entry with specified id.
Definition:
TGMenu.cxx:1894
TGPopupMenu::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion event in popup menu.
Definition:
TGMenu.cxx:1391
TGPopupMenu::GetDefaultSelectedGC
static const TGGC & GetDefaultSelectedGC()
Return the selection graphics context in use.
Definition:
TGMenu.cxx:1971
TGPopupMenu::fDefaultCursor
Cursor_t fDefaultCursor
Definition:
TGMenu.h:144
TGPopupMenu::fgDefaultSelectedBackgroundGC
static const TGGC * fgDefaultSelectedBackgroundGC
Definition:
TGMenu.h:154
TGPopupMenu::IsEntryChecked
virtual Bool_t IsEntryChecked(Int_t id)
Return true if menu item is checked.
Definition:
TGMenu.cxx:1842
TGPopupMenu::AddEntry
virtual void AddEntry(TGHotString *s, Int_t id, void *ud=0, const TGPicture *p=0, TGMenuEntry *before=0)
Add a menu entry.
Definition:
TGMenu.cxx:987
TGPopupMenu::fMenuHeight
UInt_t fMenuHeight
Definition:
TGMenu.h:137
TGPopupMenu::IsEntryRChecked
virtual Bool_t IsEntryRChecked(Int_t id)
Return true if menu item has radio check mark.
Definition:
TGMenu.cxx:1875
TGPopupMenu::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button event in the popup menu.
Definition:
TGMenu.cxx:1335
TGPopupMenu::CheckEntryByData
virtual void CheckEntryByData(void *user_data)
Check a menu entry (i.e.
Definition:
TGMenu.cxx:1792
TGPopupMenu::fSplitButton
TGSplitButton * fSplitButton
Definition:
TGMenu.h:147
TGPopupMenu::SetMenuBar
virtual void SetMenuBar(TGMenuBar *bar)
Definition:
TGMenu.h:220
TGPopupMenu::fNormGC
GContext_t fNormGC
Definition:
TGMenu.h:139
TGPopupMenu::~TGPopupMenu
virtual ~TGPopupMenu()
Delete a popup menu.
Definition:
TGMenu.cxx:972
TGPopupMenu::fSelGC
GContext_t fSelGC
Definition:
TGMenu.h:140
TGPopupMenu::Highlighted
virtual void Highlighted(Int_t id)
Definition:
TGMenu.h:231
TGPopupMenu::operator=
TGPopupMenu & operator=(const TGPopupMenu &)
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=0)
Add a menu separator to the menu.
Definition:
TGMenu.cxx:1057
TGPopupMenu::GetDefaultGC
static const TGGC & GetDefaultGC()
Return default graphics context.
Definition:
TGMenu.cxx:1961
TGPopupMenu::UnCheckEntries
virtual void UnCheckEntries()
Uncheck all entries.
Definition:
TGMenu.cxx:1816
TGPopupMenu::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a popup menu widget as a C++ statement(s) on output stream out.
Definition:
TGMenu.cxx:2171
TGPopupMenu::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return the default font structure in use.
Definition:
TGMenu.cxx:1991
TGPopupMenu::fgDefaultSelectedGC
static const TGGC * fgDefaultSelectedGC
Definition:
TGMenu.h:153
TGPopupMenu::fgDefaultFont
static const TGFont * fgDefaultFont
Definition:
TGMenu.h:150
TGPopupMenu::CheckEntry
virtual void CheckEntry(Int_t id)
Check a menu entry (i.e. add a check mark in front of it).
Definition:
TGMenu.cxx:1779
TGPopupMenu::Activate
virtual void Activate(Bool_t)
Definition:
TGMenu.h:222
TGPopupMenu::fEntrySep
UInt_t fEntrySep
Definition:
TGMenu.h:148
TGPopupMenu::fMenuBar
TGMenuBar * fMenuBar
Definition:
TGMenu.h:146
TGPopupMenu::Reposition
virtual void Reposition()
Reposition entries in popup menu.
Definition:
TGMenu.cxx:1206
TGPopupMenu::SetEntrySep
virtual void SetEntrySep(UInt_t sep)
Definition:
TGMenu.h:227
TGPopupMenu::DisableEntry
virtual void DisableEntry(Int_t id)
Disable entry (disabled entries appear in a sunken relieve).
Definition:
TGMenu.cxx:1721
TGPopupMenu::DrawEntry
virtual void DrawEntry(TGMenuEntry *entry)
Draw popup menu entry.
Definition:
TGMenu.cxx:1503
TGPopupMenu::EnableEntry
virtual void EnableEntry(Int_t id)
Enable entry. By default entries are enabled.
Definition:
TGMenu.cxx:1702
TGPopupMenu::UnCheckEntryByData
virtual void UnCheckEntryByData(void *user_data)
Uncheck a menu entry (i.e.
Definition:
TGMenu.cxx:1830
TGPopupMenu::PoppedDown
virtual void PoppedDown()
Definition:
TGMenu.h:230
TGPopupMenu::IsEntryHidden
virtual Bool_t IsEntryHidden(Int_t id)
Return true if menu entry is hidden.
Definition:
TGMenu.cxx:1765
TGPopupMenu::fDelay
TTimer * fDelay
Definition:
TGMenu.h:138
TGPopupMenu::fXl
UInt_t fXl
Definition:
TGMenu.h:135
TGPopupMenu::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle pointer crossing event in popup menu.
Definition:
TGMenu.cxx:1364
TGPopupMenu::fFontStruct
FontStruct_t fFontStruct
Definition:
TGMenu.h:142
TGPopupMenu::UnCheckEntry
virtual void UnCheckEntry(Int_t id)
Uncheck menu entry (i.e. remove check mark).
Definition:
TGMenu.cxx:1804
TGPopupMenu::Associate
virtual void Associate(const TGWindow *w)
Definition:
TGMenu.h:219
TGPopupMenu::EndMenu
virtual Int_t EndMenu(void *&userData)
Close menu and return ID of selected menu item.
Definition:
TGMenu.cxx:1286
TGPopupMenu::GetCurrent
virtual TGMenuEntry * GetCurrent() const
Definition:
TGMenu.h:211
TGPopupMenu::DeleteEntry
virtual void DeleteEntry(Int_t id)
Delete entry with specified id from menu.
Definition:
TGMenu.cxx:1923
TGPopupMenu::GetHilightFontStruct
static FontStruct_t GetHilightFontStruct()
Return the font structure in use for highlighted menu entries.
Definition:
TGMenu.cxx:2001
TGPopupMenu::DoRedraw
virtual void DoRedraw()
Draw popup menu.
Definition:
TGMenu.cxx:1489
TGPopupMenu::fMsgWindow
const TGWindow * fMsgWindow
Definition:
TGMenu.h:145
TGPopupMenu::GetDefaultSelectedBackgroundGC
static const TGGC & GetDefaultSelectedBackgroundGC()
Return the selection background graphics context in use.
Definition:
TGMenu.cxx:1981
TGPopupMenu::fStick
Bool_t fStick
Definition:
TGMenu.h:132
TGPopupMenu::fHifontStruct
FontStruct_t fHifontStruct
Definition:
TGMenu.h:143
TGPopupMenu::DrawRCheckMark
void DrawRCheckMark(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
Draw radio check mark. Used for radio button type menu entries.
Definition:
TGMenu.cxx:1667
TGPopupMenu::DrawCheckMark
void DrawCheckMark(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
Draw check mark. Used for checked button type menu entries.
Definition:
TGMenu.cxx:1648
TGPopupMenu::RCheckEntry
virtual void RCheckEntry(Int_t id, Int_t IDfirst, Int_t IDlast)
Radio-select entry (note that they cannot be unselected, the selection must be moved to another entry...
Definition:
TGMenu.cxx:1857
TGPopupMenu::GetMenuBar
TGMenuBar * GetMenuBar() const
Definition:
TGMenu.h:221
TGPopupMenu::fMenuWidth
UInt_t fMenuWidth
Definition:
TGMenu.h:136
TGPopupMenu::TGPopupMenu
TGPopupMenu(const TGPopupMenu &)
TGPopupMenu::PlaceMenu
virtual void PlaceMenu(Int_t x, Int_t y, Bool_t stick_mode, Bool_t grab_pointer)
Popup a popup menu.
Definition:
TGMenu.cxx:1238
TGPopupMenu::HandleTimer
virtual Bool_t HandleTimer(TTimer *t)
If TPopupDelayTimer times out popup cascading popup menu (if it is still the current entry).
Definition:
TGMenu.cxx:1464
TGPopupMenu::GetListOfEntries
const TList * GetListOfEntries() const
Definition:
TGMenu.h:213
TGPopupMenu::Activated
virtual void Activated(Int_t id)
Definition:
TGMenu.h:232
TGPopupMenu::fSelbackGC
GContext_t fSelbackGC
Definition:
TGMenu.h:141
TGPopupMenu::fgHilightFont
static const TGFont * fgHilightFont
Definition:
TGMenu.h:151
TGPopupMenu::fHasGrab
Bool_t fHasGrab
Definition:
TGMenu.h:133
TGPopupMenu::DrawTrianglePattern
void DrawTrianglePattern(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
Draw triangle pattern.
Definition:
TGMenu.cxx:1628
TGPopupMenu::IsEntryEnabled
virtual Bool_t IsEntryEnabled(Int_t id)
Return true if menu entry is enabled.
Definition:
TGMenu.cxx:1733
TGSplitButton
Definition:
TGButton.h:379
TGString
Definition:
TGString.h:30
TGString::GetString
const char * GetString() const
Definition:
TGString.h:40
TGWindow
Definition:
TGWindow.h:32
TList
A doubly linked list.
Definition:
TList.h:44
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
TQObject::Emit
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition:
TQObject.h:164
TString
Basic string class.
Definition:
TString.h:131
TTimer
Handles synchronous and a-synchronous timer events.
Definition:
TTimer.h:51
y
Double_t y[n]
Definition:
legend1.C:17
x
Double_t x[n]
Definition:
legend1.C:17
ROOT::Math::detail::sep
@ sep
Definition:
GenVectorIO.h:35
TGeant4Unit::bar
static constexpr double bar
Definition:
TGeant4SystemOfUnits.h:221
TGeant4Unit::s
static constexpr double s
Definition:
TGeant4SystemOfUnits.h:162
Event_t
Definition:
GuiTypes.h:173
l
auto * l
Definition:
textangle.C:4
gui
gui
inc
TGMenu.h
ROOT v6-20 - Reference Guide Generated on Fri Apr 1 2022 00:20:55 (GVA Time) using Doxygen 1.9.4