ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
gui
gui
inc
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
#ifndef ROOT_TGFrame
28
#include "
TGFrame.h
"
29
#endif
30
#ifndef ROOT_TGString
31
#include "
TGString.h
"
32
#endif
33
#ifndef ROOT_TGPicture
34
#include "
TGPicture.h
"
35
#endif
36
#ifndef ROOT_TGWidget
37
#include "
TGWidget.h
"
38
#endif
39
40
//--- Menu entry status mask
41
42
enum
EMenuEntryState
{
43
kMenuActiveMask
=
BIT
(0),
44
kMenuEnableMask
=
BIT
(1),
45
kMenuDefaultMask
=
BIT
(2),
46
kMenuCheckedMask
=
BIT
(3),
47
kMenuRadioMask
=
BIT
(4),
48
kMenuHideMask
=
BIT
(5),
49
kMenuRadioEntryMask
=
BIT
(6)
50
};
51
52
//--- Menu entry types
53
54
enum
EMenuEntryType
{
55
kMenuSeparator
,
56
kMenuLabel
,
57
kMenuEntry
,
58
kMenuPopup
59
};
60
61
62
class
TGPopupMenu
;
63
class
TGMenuBar
;
64
class
TGMenuTitle
;
65
class
TTimer
;
66
class
TGSplitButton
;
67
68
//////////////////////////////////////////////////////////////////////////
69
// //
70
// TGMenuEntry //
71
// //
72
// This class contains all information about a menu entry. //
73
// It is a fully protected class used internally by TGPopupMenu. //
74
// //
75
//////////////////////////////////////////////////////////////////////////
76
77
class
TGMenuEntry
:
public
TObject
{
78
79
friend
class
TGPopupMenu
;
80
friend
class
TGMenuBar
;
81
82
protected
:
83
Int_t
fEntryId
;
// the entry id (used for event processing)
84
void
*
fUserData
;
// pointer to user data structure
85
EMenuEntryType
fType
;
// type of entry
86
Int_t
fStatus
;
// entry status (OR of EMenuEntryState)
87
Int_t
fEx
,
fEy
;
// position of entry
88
UInt_t
fEw
,
fEh
;
// width and height of entry
89
TGHotString
*
fLabel
;
// menu entry label
90
TGString
*
fShortcut
;
// menu entry shortcut
91
const
TGPicture
*
fPic
;
// menu entry icon
92
TGPopupMenu
*
fPopup
;
// pointer to popup menu (in case of cascading menus)
93
94
private
:
95
TGMenuEntry
(
const
TGMenuEntry
&);
// not implemented
96
TGMenuEntry
&
operator=
(
const
TGMenuEntry
&);
// not implemented
97
98
public
:
99
TGMenuEntry
(): fEntryId(0), fUserData(0), fType(), fStatus(0),
100
fEx(0), fEy(0), fEw(0), fEh(0), fLabel(0), fShortcut(0), fPic(0), fPopup(0) { }
101
virtual
~TGMenuEntry
() {
if
(fLabel)
delete
fLabel
;
if
(fShortcut)
delete
fShortcut
; }
102
103
Int_t
GetEntryId
()
const
{
return
fEntryId
; }
104
const
char
*
GetName
()
const
{
return
fLabel ? fLabel->
GetString
() : 0; }
105
const
char
*
GetShortcutText
()
const
{
return
fShortcut ? fShortcut->
GetString
() : 0; }
106
virtual
Int_t
GetStatus
()
const
{
return
fStatus
; }
107
EMenuEntryType
GetType
()
const
{
return
fType
; }
108
TGPopupMenu
*
GetPopup
()
const
{
return
fPopup
; }
109
TGHotString
*
GetLabel
()
const
{
return
fLabel
; }
110
TGString
*
GetShortcut
()
const
{
return
fShortcut
; }
111
Int_t
GetEx
()
const
{
return
fEx
; }
112
Int_t
GetEy
()
const
{
return
fEy
; }
113
UInt_t
GetEw
()
const
{
return
fEw
; }
114
UInt_t
GetEh
()
const
{
return
fEh
; }
115
const
TGPicture
*
GetPic
()
const
{
return
fPic
; }
116
void
*
GetUserData
()
const
{
return
fUserData
; }
117
118
ClassDef
(
TGMenuEntry
,0);
// Menu entry class
119
};
120
121
122
//////////////////////////////////////////////////////////////////////////
123
// //
124
// TGPopupMenu //
125
// //
126
// This class creates a popup menu object. Popup menu's are attached //
127
// to TGMenuBar objects. //
128
// //
129
//////////////////////////////////////////////////////////////////////////
130
131
class
TGPopupMenu
:
public
TGFrame
{
132
133
friend
class
TGMenuTitle
;
134
friend
class
TGMenuBar
;
135
friend
class
TGSplitButton
;
136
137
protected
:
138
TList
*
fEntryList
;
// list of menu entries
139
TGMenuEntry
*
fCurrent
;
// currently selected menu entry
140
Bool_t
fStick
;
// stick mode (popup menu stays sticked on screen)
141
Bool_t
fHasGrab
;
// true if menu has grabbed pointer
142
Bool_t
fPoppedUp
;
// true if menu is currently popped up
143
UInt_t
fXl
;
// Max width of all menu entries
144
UInt_t
fMenuWidth
;
// width of popup menu
145
UInt_t
fMenuHeight
;
// height of popup menu
146
TTimer
*
fDelay
;
// delay before poping up cascading menu
147
GContext_t
fNormGC
;
// normal drawing graphics context
148
GContext_t
fSelGC
;
// graphics context for drawing selections
149
GContext_t
fSelbackGC
;
// graphics context for drawing selection background
150
FontStruct_t
fFontStruct
;
// font to draw menu entries
151
FontStruct_t
fHifontStruct
;
// font to draw highlighted entries
152
Cursor_t
fDefaultCursor
;
// right pointing cursor
153
const
TGWindow
*
fMsgWindow
;
// window which handles menu events
154
TGMenuBar
*
fMenuBar
;
// menu bar (if any)
155
TGSplitButton
*
fSplitButton
;
// split button (if any)
156
UInt_t
fEntrySep
;
// separation distance between ebtris
157
158
static
const
TGFont
*
fgDefaultFont
;
159
static
const
TGFont
*
fgHilightFont
;
160
static
const
TGGC
*
fgDefaultGC
;
161
static
const
TGGC
*
fgDefaultSelectedGC
;
162
static
const
TGGC
*
fgDefaultSelectedBackgroundGC
;
163
164
void
DrawTrianglePattern
(
GContext_t
gc,
Int_t
l
,
Int_t
t,
Int_t
r
,
Int_t
b);
165
void
DrawCheckMark
(
GContext_t
gc,
Int_t
l
,
Int_t
t,
Int_t
r
,
Int_t
b);
166
void
DrawRCheckMark
(
GContext_t
gc,
Int_t
l
,
Int_t
t,
Int_t
r
,
Int_t
b);
167
virtual
void
DoRedraw
();
168
virtual
void
DrawEntry
(
TGMenuEntry
*
entry
);
169
virtual
void
Reposition
();
170
171
static
FontStruct_t
GetDefaultFontStruct
();
172
static
FontStruct_t
GetHilightFontStruct
();
173
static
const
TGGC
&
GetDefaultGC
();
174
static
const
TGGC
&
GetDefaultSelectedGC
();
175
static
const
TGGC
&
GetDefaultSelectedBackgroundGC
();
176
177
private
:
178
TGPopupMenu
(
const
TGPopupMenu
&);
// not implemented
179
TGPopupMenu
&
operator=
(
const
TGPopupMenu
&);
// not implemented
180
181
public
:
182
TGPopupMenu
(
const
TGWindow
*p = 0,
UInt_t
w = 10,
UInt_t
h
= 10,
183
UInt_t
options = 0);
184
virtual
~TGPopupMenu
();
185
186
virtual
void
AddEntry
(
TGHotString
*s,
Int_t
id
,
void
*ud = 0,
187
const
TGPicture
*p = 0,
TGMenuEntry
*before = 0);
188
virtual
void
AddEntry
(
const
char
*s,
Int_t
id
,
void
*ud = 0,
189
const
TGPicture
*p = 0,
TGMenuEntry
*before = 0);
190
virtual
void
AddSeparator
(
TGMenuEntry
*before = 0);
191
virtual
void
AddLabel
(
TGHotString
*s,
const
TGPicture
*p = 0,
192
TGMenuEntry
*before = 0);
193
virtual
void
AddLabel
(
const
char
*s,
const
TGPicture
*p = 0,
194
TGMenuEntry
*before = 0);
195
virtual
void
AddPopup
(
TGHotString
*s,
TGPopupMenu
*popup,
196
TGMenuEntry
*before = 0,
const
TGPicture
*p = 0);
197
virtual
void
AddPopup
(
const
char
*s,
TGPopupMenu
*popup,
198
TGMenuEntry
*before = 0,
const
TGPicture
*p = 0);
199
virtual
void
EnableEntry
(
Int_t
id
);
200
virtual
void
DisableEntry
(
Int_t
id
);
201
virtual
Bool_t
IsEntryEnabled
(
Int_t
id
);
202
virtual
void
HideEntry
(
Int_t
id
);
203
virtual
Bool_t
IsEntryHidden
(
Int_t
id
);
204
virtual
void
DefaultEntry
(
Int_t
id
);
205
virtual
void
CheckEntry
(
Int_t
id
);
206
virtual
void
CheckEntryByData
(
void
*user_data);
207
virtual
void
UnCheckEntry
(
Int_t
id
);
208
virtual
void
UnCheckEntryByData
(
void
*user_data);
209
virtual
void
UnCheckEntries
();
210
virtual
Bool_t
IsEntryChecked
(
Int_t
id
);
211
virtual
void
RCheckEntry
(
Int_t
id
,
Int_t
IDfirst,
Int_t
IDlast);
212
virtual
Bool_t
IsEntryRChecked
(
Int_t
id
);
213
virtual
void
PlaceMenu
(
Int_t
x
,
Int_t
y
,
Bool_t
stick_mode,
214
Bool_t
grab_pointer);
215
virtual
Int_t
EndMenu
(
void
*&userData);
216
virtual
void
DeleteEntry
(
Int_t
id
);
217
virtual
void
DeleteEntry
(
TGMenuEntry
*
entry
);
218
virtual
TGMenuEntry
*
GetEntry
(
Int_t
id
);
219
virtual
TGMenuEntry
*
GetCurrent
()
const
{
return
fCurrent
; }
220
virtual
TGMenuEntry
*
GetEntry
(
const
char
*s);
221
const
TList
*
GetListOfEntries
()
const
{
return
fEntryList
; }
222
virtual
void
DrawBorder
();
223
virtual
Bool_t
HandleButton
(
Event_t
*event);
224
virtual
Bool_t
HandleMotion
(
Event_t
*event);
225
virtual
Bool_t
HandleCrossing
(
Event_t
*event);
226
virtual
Bool_t
HandleTimer
(
TTimer
*t);
227
virtual
void
Associate
(
const
TGWindow
*w) { fMsgWindow = w; }
228
virtual
void
SetMenuBar
(
TGMenuBar
*bar) { fMenuBar = bar; }
229
TGMenuBar
*
GetMenuBar
()
const
{
return
fMenuBar
; }
230
virtual
void
Activate
(
Bool_t
) { }
231
virtual
void
Activate
(
TGMenuEntry
*
entry
);
232
virtual
void
SavePrimitive
(std::ostream &
out
,
Option_t
*option =
""
);
233
234
UInt_t
GetEntrySep
()
const
{
return
fEntrySep
; }
235
virtual
void
SetEntrySep
(
UInt_t
sep
) { fEntrySep =
sep
; }
236
237
virtual
void
PoppedUp
() {
Emit
(
"PoppedUp()"
); }
// *SIGNAL*
238
virtual
void
PoppedDown
() {
Emit
(
"PoppedDown()"
); }
// *SIGNAL*
239
virtual
void
Highlighted
(
Int_t
id
) {
Emit
(
"Highlighted(Int_t)"
,
id
); }
// *SIGNAL*
240
virtual
void
Activated
(
Int_t
id
) {
Emit
(
"Activated(Int_t)"
,
id
); }
// *SIGNAL*
241
242
ClassDef
(
TGPopupMenu
,0)
// Popup menu
243
};
244
245
246
//////////////////////////////////////////////////////////////////////////
247
// //
248
// TGMenuTitle //
249
// //
250
// This class creates a menu title. A menu title is a frame //
251
// to which a popup menu can be attached. Menu titles are automatically //
252
// created when adding a popup menu to a menubar. //
253
// //
254
//////////////////////////////////////////////////////////////////////////
255
256
class
TGMenuTitle
:
public
TGFrame
{
257
258
protected
:
259
TGPopupMenu
*
fMenu
;
// attached popup menu
260
TGHotString
*
fLabel
;
// menu title
261
Int_t
fTitleId
;
// id of selected menu item
262
void
*
fTitleData
;
// user data associated with selected item
263
Bool_t
fState
;
// menu title state (active/not active)
264
Int_t
fHkeycode
;
// hot key code
265
FontStruct_t
fFontStruct
;
// font
266
Pixel_t
fTextColor
;
// text color
267
GContext_t
fNormGC
,
fSelGC
;
// normal and selection graphics contexts
268
269
virtual
void
DoRedraw
();
270
271
static
const
TGFont
*
fgDefaultFont
;
272
static
const
TGGC
*
fgDefaultSelectedGC
;
273
static
const
TGGC
*
fgDefaultGC
;
274
275
private
:
276
TGMenuTitle
(
const
TGMenuTitle
&);
// not implemented
277
TGMenuTitle
&
operator=
(
const
TGMenuTitle
&);
// not implemented
278
279
public
:
280
static
FontStruct_t
GetDefaultFontStruct
();
281
static
const
TGGC
&
GetDefaultSelectedGC
();
282
static
const
TGGC
&
GetDefaultGC
();
283
284
TGMenuTitle
(
const
TGWindow
*p = 0,
TGHotString
*s = 0,
TGPopupMenu
*menu = 0,
285
GContext_t
norm
=
GetDefaultGC
()(),
286
FontStruct_t
font =
GetDefaultFontStruct
(),
287
UInt_t
options = 0);
288
virtual
~TGMenuTitle
() {
if
(fLabel)
delete
fLabel
; }
289
290
Pixel_t
GetTextColor
()
const
{
return
fTextColor
; }
291
void
SetTextColor
(
Pixel_t
col) { fTextColor = col; }
292
virtual
void
SetState
(
Bool_t
state);
293
Bool_t
GetState
()
const
{
return
fState
; }
294
Int_t
GetHotKeyCode
()
const
{
return
fHkeycode
; }
295
TGPopupMenu
*
GetMenu
()
const
{
return
fMenu
; }
296
const
char
*
GetName
()
const
{
return
fLabel ? fLabel->
GetString
() : 0; }
297
virtual
void
DoSendMessage
();
298
virtual
void
SavePrimitive
(std::ostream &
out
,
Option_t
*option =
""
);
299
300
ClassDef
(
TGMenuTitle
,0)
// Menu title class
301
};
302
303
304
//////////////////////////////////////////////////////////////////////////
305
// //
306
// TGMenuBar //
307
// //
308
// This class creates a menu bar. //
309
// //
310
//////////////////////////////////////////////////////////////////////////
311
312
class
TGMenuBar
:
public
TGHorizontalFrame
{
313
314
friend
class
TGPopupMenu
;
315
316
protected
:
317
TGMenuTitle
*
fCurrent
;
// current menu title
318
TList
*
fTitles
;
// list of menu titles
319
Cursor_t
fDefaultCursor
;
// right pointing cursor
320
Bool_t
fStick
;
// stick mode (popup menu stays sticked on screen)
321
TList
*
fTrash
;
// garbage
322
Bool_t
fKeyNavigate
;
// kTRUE if arrow key navigation is on
323
TGPopupMenu
*
fMenuMore
;
// extra >> menu
324
TGLayoutHints
*
fMenuBarMoreLayout
;
// layout of the extra menu
325
Bool_t
fWithExt
;
// indicates whether the >> menu is shown or not
326
TList
*
fOutLayouts
;
// keeps trace of layouts of hidden menus
327
TList
*
fNeededSpace
;
// keeps trace of space needed for hidden menus
328
329
virtual
void
AddFrameBefore
(
TGFrame
*
f
,
TGLayoutHints
*
l
= 0,
330
TGPopupMenu
*before = 0);
331
332
virtual
void
BindHotKey
(
Int_t
keycode,
Bool_t
on =
kTRUE
);
333
virtual
void
BindKeys
(
Bool_t
on =
kTRUE
);
334
void
BindMenu
(
TGPopupMenu
* subMenu,
Bool_t
on);
335
336
private
:
337
TGMenuBar
(
const
TGMenuBar
&);
// not implemented
338
TGMenuBar
&
operator=
(
const
TGMenuBar
&);
// not implemented
339
340
public
:
341
TGMenuBar
(
const
TGWindow
*p = 0,
UInt_t
w = 60,
UInt_t
h
= 20,
342
UInt_t
options =
kHorizontalFrame
|
kRaisedFrame
);
343
virtual
~TGMenuBar
();
344
345
virtual
void
AddPopup
(
TGHotString
*s,
TGPopupMenu
*menu,
TGLayoutHints
*
l
,
346
TGPopupMenu
*before = 0);
347
virtual
void
AddPopup
(
const
char
*s,
TGPopupMenu
*menu,
TGLayoutHints
*
l
,
348
TGPopupMenu
*before = 0);
349
virtual
TGPopupMenu
*
AddPopup
(
const
TString
&s,
Int_t
padleft = 4,
Int_t
padright = 0,
350
Int_t
padtop = 0,
Int_t
padbottom = 0);
351
virtual
void
AddTitle
(
TGMenuTitle
*title,
TGLayoutHints
*
l
,
TGPopupMenu
*before = 0);
352
353
virtual
TGPopupMenu
*
GetPopup
(
const
char
*s);
354
virtual
TGPopupMenu
*
RemovePopup
(
const
char
*s);
355
356
virtual
TGMenuTitle
*
GetCurrent
()
const
{
return
fCurrent
; }
357
virtual
TList
*
GetTitles
()
const
{
return
fTitles
; }
358
virtual
Bool_t
HandleButton
(
Event_t
*event);
359
virtual
Bool_t
HandleMotion
(
Event_t
*event);
360
virtual
Bool_t
HandleKey
(
Event_t
*event);
361
virtual
void
SavePrimitive
(std::ostream &
out
,
Option_t
*option =
""
);
362
virtual
void
Layout
();
363
void
PopupConnection
();
364
TGFrameElement
*
GetLastOnLeft
();
365
366
ClassDef
(
TGMenuBar
,0)
// Menu bar class
367
};
368
369
#endif
TGMenuBar::GetLastOnLeft
TGFrameElement * GetLastOnLeft()
Returns the last visible menu title on the left of the '>>' in the menu bar.
Definition:
TGMenu.cxx:265
TGMenuBar::AddTitle
virtual void AddTitle(TGMenuTitle *title, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup via created before menu title.
Definition:
TGMenu.cxx:432
TGMenuEntry::fType
EMenuEntryType fType
Definition:
TGMenu.h:85
TGPopupMenu::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle pointer crossing event in popup menu.
Definition:
TGMenu.cxx:1357
TGPopupMenu::GetDefaultSelectedGC
static const TGGC & GetDefaultSelectedGC()
Return the selection graphics context in use.
Definition:
TGMenu.cxx:1964
FontStruct_t
Handle_t FontStruct_t
Definition:
GuiTypes.h:40
TGPopupMenu::fSplitButton
TGSplitButton * fSplitButton
Definition:
TGMenu.h:155
TGPopupMenu::fMenuWidth
UInt_t fMenuWidth
Definition:
TGMenu.h:144
TGMenuTitle::fState
Bool_t fState
Definition:
TGMenu.h:263
TGMenuTitle::GetMenu
TGPopupMenu * GetMenu() const
Definition:
TGMenu.h:295
TGMenuBar::fMenuBarMoreLayout
TGLayoutHints * fMenuBarMoreLayout
Definition:
TGMenu.h:324
TGHotString
Definition:
TGString.h:56
TGMenuTitle::SetState
virtual void SetState(Bool_t state)
Set state of menu title.
Definition:
TGMenu.cxx:2049
TGPopupMenu::GetEntry
virtual TGMenuEntry * GetEntry(Int_t id)
Find entry with specified id.
Definition:
TGMenu.cxx:1887
TGMenuTitle::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition:
TGMenu.cxx:2134
TGMenuEntry::fShortcut
TGString * fShortcut
Definition:
TGMenu.h:90
TGPopupMenu::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button event in the popup menu.
Definition:
TGMenu.cxx:1328
Option_t
const char Option_t
Definition:
RtypesCore.h:62
TGPopupMenu::UnCheckEntries
virtual void UnCheckEntries()
Uncheck all entries.
Definition:
TGMenu.cxx:1809
TGMenuEntry::TGMenuEntry
TGMenuEntry()
Definition:
TGMenu.h:99
TGMenuEntry::GetShortcut
TGString * GetShortcut() const
Definition:
TGMenu.h:110
TGPopupMenu::GetCurrent
virtual TGMenuEntry * GetCurrent() const
Definition:
TGMenu.h:219
TGMenuTitle::fSelGC
GContext_t fSelGC
Definition:
TGMenu.h:267
BIT
#define BIT(n)
Definition:
Rtypes.h:120
h
TH1 * h
Definition:
legend2.C:5
TGMenuBar::fTitles
TList * fTitles
Definition:
TGMenu.h:318
TGPopupMenu::DisableEntry
virtual void DisableEntry(Int_t id)
Disable entry (disabled entries appear in a sunken relieve).
Definition:
TGMenu.cxx:1714
TGMenuTitle::GetTextColor
Pixel_t GetTextColor() const
Definition:
TGMenu.h:290
TGMenuTitle::~TGMenuTitle
virtual ~TGMenuTitle()
Definition:
TGMenu.h:288
TGMenuBar::fNeededSpace
TList * fNeededSpace
Definition:
TGMenu.h:327
Cursor_t
Handle_t Cursor_t
Definition:
GuiTypes.h:35
TGMenuEntry::fEh
UInt_t fEh
Definition:
TGMenu.h:88
TGMenuEntry::fEx
Int_t fEx
Definition:
TGMenu.h:87
TGPopupMenu::fEntrySep
UInt_t fEntrySep
Definition:
TGMenu.h:156
kMenuPopup
Definition:
TGMenu.h:58
TGPopupMenu::IsEntryChecked
virtual Bool_t IsEntryChecked(Int_t id)
Return true if menu item is checked.
Definition:
TGMenu.cxx:1835
TGPopupMenu::GetDefaultSelectedBackgroundGC
static const TGGC & GetDefaultSelectedBackgroundGC()
Return the selection background graphics context in use.
Definition:
TGMenu.cxx:1974
TGPopupMenu::UnCheckEntry
virtual void UnCheckEntry(Int_t id)
Uncheck menu entry (i.e. remove check mark).
Definition:
TGMenu.cxx:1797
TGMenuTitle
Definition:
TGMenu.h:256
GContext_t
Handle_t GContext_t
Definition:
GuiTypes.h:39
TGPopupMenu::Reposition
virtual void Reposition()
Reposition entries in popup menu.
Definition:
TGMenu.cxx:1206
TString
Basic string class.
Definition:
TString.h:137
TGMenuTitle::fgDefaultSelectedGC
static const TGGC * fgDefaultSelectedGC
Definition:
TGMenu.h:272
TGMenuBar::fCurrent
TGMenuTitle * fCurrent
Definition:
TGMenu.h:317
TGMenuBar::fTrash
TList * fTrash
Definition:
TGMenu.h:321
TGMenuTitle::DoRedraw
virtual void DoRedraw()
Draw a menu title.
Definition:
TGMenu.cxx:2078
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
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::fMenuBar
TGMenuBar * fMenuBar
Definition:
TGMenu.h:154
TGPopupMenu::fgDefaultFont
static const TGFont * fgDefaultFont
Definition:
TGMenu.h:158
TGMenuBar::GetTitles
virtual TList * GetTitles() const
Definition:
TGMenu.h:357
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:2300
TGPopupMenu::Activated
virtual void Activated(Int_t id)
Definition:
TGMenu.h:240
TGMenuEntry::fEw
UInt_t fEw
Definition:
TGMenu.h:88
TGMenuTitle::fLabel
TGHotString * fLabel
Definition:
TGMenu.h:260
TGPopupMenu::GetEntrySep
UInt_t GetEntrySep() const
Definition:
TGMenu.h:234
TGPopupMenu::DrawEntry
virtual void DrawEntry(TGMenuEntry *entry)
Draw popup menu entry.
Definition:
TGMenu.cxx:1496
TGMenuBar::fStick
Bool_t fStick
Definition:
TGMenu.h:320
TGFrameElement
Definition:
TGLayout.h:118
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=0)
Add a menu separator to the menu.
Definition:
TGMenu.cxx:1057
TGMenuTitle::operator=
TGMenuTitle & operator=(const TGMenuTitle &)
TGPopupMenu::fEntryList
TList * fEntryList
Definition:
TGMenu.h:138
TGMenuTitle::fFontStruct
FontStruct_t fFontStruct
Definition:
TGMenu.h:265
kMenuDefaultMask
Definition:
TGMenu.h:45
TGMenuBar::Layout
virtual void Layout()
Calculates whether the >> menu must be shown or not and which menu titles are hidden.
Definition:
TGMenu.cxx:190
TGMenuEntry::fPic
const TGPicture * fPic
Definition:
TGMenu.h:91
kMenuCheckedMask
Definition:
TGMenu.h:46
TGPopupMenu::DrawBorder
virtual void DrawBorder()
Draw border round popup menu.
Definition:
TGMenu.cxx:1594
TGPopupMenu::IsEntryRChecked
virtual Bool_t IsEntryRChecked(Int_t id)
Return true if menu item has radio check mark.
Definition:
TGMenu.cxx:1868
TGMenuEntry::fStatus
Int_t fStatus
Definition:
TGMenu.h:86
TGPopupMenu::Highlighted
virtual void Highlighted(Int_t id)
Definition:
TGMenu.h:239
x
Double_t x[n]
Definition:
legend1.C:17
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
Pixel_t
ULong_t Pixel_t
Definition:
GuiTypes.h:41
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::fDefaultCursor
Cursor_t fDefaultCursor
Definition:
TGMenu.h:152
TGMenuEntry::fEy
Int_t fEy
Definition:
TGMenu.h:87
TGMenuBar::fOutLayouts
TList * fOutLayouts
Definition:
TGMenu.h:326
kMenuLabel
Definition:
TGMenu.h:56
kMenuEnableMask
Definition:
TGMenu.h:44
TGPopupMenu::fMsgWindow
const TGWindow * fMsgWindow
Definition:
TGMenu.h:153
kMenuSeparator
Definition:
TGMenu.h:55
TGMenuEntry::fPopup
TGPopupMenu * fPopup
Definition:
TGMenu.h:92
TGPopupMenu::UnCheckEntryByData
virtual void UnCheckEntryByData(void *user_data)
Uncheck a menu entry (i.e.
Definition:
TGMenu.cxx:1823
TGMenuEntry::GetShortcutText
const char * GetShortcutText() const
Definition:
TGMenu.h:105
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:1621
TGPopupMenu::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return the default font structure in use.
Definition:
TGMenu.cxx:1984
TGString
Definition:
TGString.h:34
TGMenuTitle::fTitleData
void * fTitleData
Definition:
TGMenu.h:262
TGPopupMenu::SetMenuBar
virtual void SetMenuBar(TGMenuBar *bar)
Definition:
TGMenu.h:228
TGPopupMenu::EndMenu
virtual Int_t EndMenu(void *&userData)
Close menu and return ID of selected menu item.
Definition:
TGMenu.cxx:1279
TGHorizontalFrame
Definition:
TGFrame.h:461
TGPopupMenu::fStick
Bool_t fStick
Definition:
TGMenu.h:140
TGFrame.h
TGFrame
Definition:
TGFrame.h:143
TGPopupMenu::operator=
TGPopupMenu & operator=(const TGPopupMenu &)
TGPopupMenu::fgHilightFont
static const TGFont * fgHilightFont
Definition:
TGMenu.h:159
out
char * out
Definition:
TBase64.cxx:29
TQObject::Emit
void Emit(const char *signal)
Acitvate signal without args.
Definition:
TQObject.cxx:559
TGMenuBar::GetCurrent
virtual TGMenuTitle * GetCurrent() const
Definition:
TGMenu.h:356
TGPopupMenu::EnableEntry
virtual void EnableEntry(Int_t id)
Enable entry. By default entries are enabled.
Definition:
TGMenu.cxx:1695
TList
A doubly linked list.
Definition:
TList.h:47
TGMenuEntry::GetStatus
virtual Int_t GetStatus() const
Definition:
TGMenu.h:106
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
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:1457
TGWindow
Definition:
TGWindow.h:38
TGMenuEntry::GetEx
Int_t GetEx() const
Definition:
TGMenu.h:111
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:1641
TGMenuEntry::fUserData
void * fUserData
Definition:
TGMenu.h:84
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:325
EMenuEntryState
EMenuEntryState
Definition:
TGMenu.h:42
TGPopupMenu::GetMenuBar
TGMenuBar * GetMenuBar() const
Definition:
TGMenu.h:229
TGMenuTitle::fMenu
TGPopupMenu * fMenu
Definition:
TGMenu.h:259
TGPopupMenu::fFontStruct
FontStruct_t fFontStruct
Definition:
TGMenu.h:150
TGMenuTitle::fHkeycode
Int_t fHkeycode
Definition:
TGMenu.h:264
TGMenuBar::fMenuMore
TGPopupMenu * fMenuMore
Definition:
TGMenu.h:323
TGPopupMenu::IsEntryEnabled
virtual Bool_t IsEntryEnabled(Int_t id)
Return true if menu entry is enabled.
Definition:
TGMenu.cxx:1726
r
ROOT::R::TRInterface & r
Definition:
Object.C:4
TGMenuTitle::TGMenuTitle
TGMenuTitle(const TGMenuTitle &)
TGPopupMenu::fMenuHeight
UInt_t fMenuHeight
Definition:
TGMenu.h:145
TGMenuBar::fDefaultCursor
Cursor_t fDefaultCursor
Definition:
TGMenu.h:319
TGPopupMenu::HideEntry
virtual void HideEntry(Int_t id)
Hide entry (hidden entries are not shown in the menu).
Definition:
TGMenu.cxx:1741
TGMenuBar::HandleKey
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events in a menu bar.
Definition:
TGMenu.cxx:683
TGPopupMenu::fgDefaultGC
static const TGGC * fgDefaultGC
Definition:
TGMenu.h:160
TGPopupMenu::fDelay
TTimer * fDelay
Definition:
TGMenu.h:146
TGPopupMenu::fHasGrab
Bool_t fHasGrab
Definition:
TGMenu.h:141
TGPopupMenu::Associate
virtual void Associate(const TGWindow *w)
Definition:
TGMenu.h:227
TGPopupMenu::fXl
UInt_t fXl
Definition:
TGMenu.h:143
TGMenuTitle::GetHotKeyCode
Int_t GetHotKeyCode() const
Definition:
TGMenu.h:294
kMenuEntry
Definition:
TGMenu.h:57
TGMenuTitle::GetDefaultGC
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Definition:
TGMenu.cxx:2144
TGPopupMenu::fNormGC
GContext_t fNormGC
Definition:
TGMenu.h:147
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
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
TGPopupMenu::fSelbackGC
GContext_t fSelbackGC
Definition:
TGMenu.h:149
ROOT::Math::detail::sep
Definition:
GenVectorIO.h:35
TGMenuEntry::GetEw
UInt_t GetEw() const
Definition:
TGMenu.h:113
l
TLine * l
Definition:
textangle.C:4
TTimer
Handles synchronous and a-synchronous timer events.
Definition:
TTimer.h:57
TGMenuTitle::fgDefaultFont
static const TGFont * fgDefaultFont
Definition:
TGMenu.h:271
TGPicture.h
TGPopupMenu::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion event in popup menu.
Definition:
TGMenu.cxx:1384
TGMenuEntry::GetPopup
TGPopupMenu * GetPopup() const
Definition:
TGMenu.h:108
entry
Long64_t entry
Definition:
TTreeFormula.cxx:100
TGMenuBar::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle a mouse button event in a menubar.
Definition:
TGMenu.cxx:620
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:1850
TGPopupMenu::fgDefaultSelectedGC
static const TGGC * fgDefaultSelectedGC
Definition:
TGMenu.h:161
TGPopupMenu::fgDefaultSelectedBackgroundGC
static const TGGC * fgDefaultSelectedBackgroundGC
Definition:
TGMenu.h:162
kMenuActiveMask
Definition:
TGMenu.h:43
TGPopupMenu::GetListOfEntries
const TList * GetListOfEntries() const
Definition:
TGMenu.h:221
TGMenuBar::RemovePopup
virtual TGPopupMenu * RemovePopup(const char *s)
Remove popup menu from menu bar.
Definition:
TGMenu.cxx:558
TGPopupMenu::PoppedDown
virtual void PoppedDown()
Definition:
TGMenu.h:238
TGMenuTitle::fTitleId
Int_t fTitleId
Definition:
TGMenu.h:261
TGMenuTitle::DoSendMessage
virtual void DoSendMessage()
Send final selected menu item to be processed.
Definition:
TGMenu.cxx:2121
TGMenuTitle::GetDefaultSelectedGC
static const TGGC & GetDefaultSelectedGC()
Return default selection graphics context in use.
Definition:
TGMenu.cxx:2154
TGString.h
TGMenuTitle::SetTextColor
void SetTextColor(Pixel_t col)
Definition:
TGMenu.h:291
TGMenuTitle::fTextColor
Pixel_t fTextColor
Definition:
TGMenu.h:266
TGPopupMenu::CheckEntryByData
virtual void CheckEntryByData(void *user_data)
Check a menu entry (i.e.
Definition:
TGMenu.cxx:1785
f
double f(double x)
Definition:
testIntegration.cxx:12
TGPopupMenu::SetEntrySep
virtual void SetEntrySep(UInt_t sep)
Definition:
TGMenu.h:235
kMenuHideMask
Definition:
TGMenu.h:48
TGMenuEntry::GetType
EMenuEntryType GetType() const
Definition:
TGMenu.h:107
TGMenuEntry::GetPic
const TGPicture * GetPic() const
Definition:
TGMenu.h:115
TGFont
Definition:
TGFont.h:155
TGMenuEntry::fEntryId
Int_t fEntryId
Definition:
TGMenu.h:83
y
Double_t y[n]
Definition:
legend1.C:17
TGPopupMenu::fHifontStruct
FontStruct_t fHifontStruct
Definition:
TGMenu.h:151
TGMenuEntry::GetEy
Int_t GetEy() const
Definition:
TGMenu.h:112
kMenuRadioMask
Definition:
TGMenu.h:47
TGMenuBar::~TGMenuBar
virtual ~TGMenuBar()
Delete menu bar object.
Definition:
TGMenu.cxx:152
TGSplitButton
Definition:
TGButton.h:383
TGMenuBar::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle a mouse motion event in a menu bar.
Definition:
TGMenu.cxx:587
TGMenuEntry::operator=
TGMenuEntry & operator=(const TGMenuEntry &)
TGMenuEntry::GetEntryId
Int_t GetEntryId() const
Definition:
TGMenu.h:103
TGPopupMenu::GetHilightFontStruct
static FontStruct_t GetHilightFontStruct()
Return the font structure in use for highlighted menu entries.
Definition:
TGMenu.cxx:1994
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
TGMenuEntry::ClassDef
ClassDef(TGMenuEntry, 0)
TGPopupMenu::DefaultEntry
virtual void DefaultEntry(Int_t id)
Set default entry (default entries are drawn with bold text).
Definition:
TGMenu.cxx:1679
TGMenuBar::PopupConnection
void PopupConnection()
Connects the corresponding cascaded menu to the proper slots, according to the highlighted menu entry...
Definition:
TGMenu.cxx:286
kMenuRadioEntryMask
Definition:
TGMenu.h:49
TGMenuEntry::~TGMenuEntry
virtual ~TGMenuEntry()
Definition:
TGMenu.h:101
TGWidget.h
TGMenuEntry::GetName
const char * GetName() const
Returns name of object.
Definition:
TGMenu.h:104
TGMenuBar::GetPopup
virtual TGPopupMenu * GetPopup(const char *s)
Return popup menu with the specified name.
Definition:
TGMenu.cxx:537
TGPopupMenu::DoRedraw
virtual void DoRedraw()
Draw popup menu.
Definition:
TGMenu.cxx:1482
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:1772
TGMenuBar::fKeyNavigate
Bool_t fKeyNavigate
Definition:
TGMenu.h:322
TGPopupMenu::PoppedUp
virtual void PoppedUp()
Definition:
TGMenu.h:237
TGPopupMenu::fCurrent
TGMenuEntry * fCurrent
Definition:
TGMenu.h:139
TGMenuTitle::GetState
Bool_t GetState() const
Definition:
TGMenu.h:293
TGPopupMenu::fPoppedUp
Bool_t fPoppedUp
Definition:
TGMenu.h:142
kRaisedFrame
Definition:
TGFrame.h:78
TGMenuBar
Definition:
TGMenu.h:312
TGPopupMenu::TGPopupMenu
TGPopupMenu(const TGPopupMenu &)
TGMenuTitle::GetName
const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition:
TGMenu.h:296
TGMenuBar::BindMenu
void BindMenu(TGPopupMenu *subMenu, Bool_t on)
If on kTRUE bind subMenu hot keys, otherwise remove key bindings.
Definition:
TGMenu.cxx:352
TGMenuTitle::fNormGC
GContext_t fNormGC
Definition:
TGMenu.h:267
TGMenuEntry::fLabel
TGHotString * fLabel
Definition:
TGMenu.h:89
TGPopupMenu::DeleteEntry
virtual void DeleteEntry(Int_t id)
Delete entry with specified id from menu.
Definition:
TGMenu.cxx:1916
Event_t
Definition:
GuiTypes.h:175
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:1660
TGPopupMenu::Activate
virtual void Activate(Bool_t)
Definition:
TGMenu.h:230
TGMenuBar::operator=
TGMenuBar & operator=(const TGMenuBar &)
TGLayoutHints
Definition:
TGLayout.h:63
TGString::GetString
const char * GetString() const
Definition:
TGString.h:44
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
TGMenuTitle::fgDefaultGC
static const TGGC * fgDefaultGC
Definition:
TGMenu.h:273
TGPopupMenu::fSelGC
GContext_t fSelGC
Definition:
TGMenu.h:148
kHorizontalFrame
Definition:
TGFrame.h:76
TGPopupMenu
Definition:
TGMenu.h:131
TGMenuEntry::GetLabel
TGHotString * GetLabel() const
Definition:
TGMenu.h:109
kTRUE
const Bool_t kTRUE
Definition:
Rtypes.h:91
TGPicture
Definition:
TGPicture.h:46
EMenuEntryType
EMenuEntryType
Definition:
TGMenu.h:54
norm
double norm(double *x, double *p)
Definition:
unuranDistr.cxx:40
TGMenuEntry
Definition:
TGMenu.h:77
TGMenuEntry::GetUserData
void * GetUserData() const
Definition:
TGMenu.h:116
TGGC
Definition:
TGGC.h:35
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 &)
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::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:2164
TGPopupMenu::GetDefaultGC
static const TGGC & GetDefaultGC()
Return default graphics context.
Definition:
TGMenu.cxx:1954
TGPopupMenu::IsEntryHidden
virtual Bool_t IsEntryHidden(Int_t id)
Return true if menu entry is hidden.
Definition:
TGMenu.cxx:1758
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:2332
TGMenuEntry::GetEh
UInt_t GetEh() const
Definition:
TGMenu.h:114
TGPopupMenu::~TGPopupMenu
virtual ~TGPopupMenu()
Delete a popup menu.
Definition:
TGMenu.cxx:972