Logo ROOT   6.07/09
Reference Guide
TGButton.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 06/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_TGButton
13 #define ROOT_TGButton
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGButton, TGTextButton, TGPictureButton, TGCheckButton TGRadioButton //
19 // and TGSplitButton //
20 // //
21 // This header defines all GUI button widgets. //
22 // //
23 // TGButton is a button abstract base class. It defines general button //
24 // behaviour. //
25 // //
26 // Selecting a text or picture button will generate the event: //
27 // kC_COMMAND, kCM_BUTTON, button id, user data. //
28 // //
29 // Selecting a check button will generate the event: //
30 // kC_COMMAND, kCM_CHECKBUTTON, button id, user data. //
31 // //
32 // Selecting a radio button will generate the event: //
33 // kC_COMMAND, kCM_RADIOBUTTON, button id, user data. //
34 // //
35 // If a command string has been specified (via SetCommand()) then this //
36 // command string will be executed via the interpreter whenever a //
37 // button is selected. A command string can contain the macros: //
38 // $MSG -- kC_COMMAND, kCM[CHECK|RADIO]BUTTON packed message //
39 // (use GET_MSG() and GET_SUBMSG() to unpack) //
40 // $PARM1 -- button id //
41 // $PARM2 -- user data pointer //
42 // Before executing these macros are expanded into the respective //
43 // Long_t's //
44 // //
45 //////////////////////////////////////////////////////////////////////////
46 
47 #ifndef ROOT_TGFrame
48 #include "TGFrame.h"
49 #endif
50 #ifndef ROOT_TGWidget
51 #include "TGWidget.h"
52 #endif
53 
54 //--- Button states
55 
61 };
62 
63 
64 class TGWidget;
65 class TGHotString;
66 class TGPicture;
67 class TGToolTip;
68 class TGButtonGroup;
69 class TGPopupMenu;
70 class TGTextLayout;
71 
72 class TGButton : public TGFrame, public TGWidget {
73 
74 friend class TGButtonGroup;
75 
76 protected:
77  UInt_t fTWidth; // button width
78  UInt_t fTHeight; // button height
79  EButtonState fState; // button state
80  Bool_t fStayDown; // true if button has to stay down
81  GContext_t fNormGC; // graphics context used for drawing button
82  void *fUserData; // pointer to user data structure
83  TGToolTip *fTip; // tool tip associated with button
84  TGButtonGroup *fGroup; // button group this button belongs to
85  Pixel_t fBgndColor; // actual background color
86  Pixel_t fHighColor; // highlight color
87  UInt_t fStyle; // button style (modern or classic)
88 
89  virtual void SetToggleButton(Bool_t) { }
90  virtual void EmitSignals(Bool_t wasUp);
91 
92  static const TGGC *fgDefaultGC;
93  static const TGGC *fgHibckgndGC;
94 
95  static Window_t fgReleaseBtn; // the last released button
96 
97 private:
98  TGButton(const TGButton&); // not implemented
99  TGButton& operator=(const TGButton&); // not implemented
100 
101 public:
102  static const TGGC &GetDefaultGC();
103  static const TGGC &GetHibckgndGC();
104 
105  TGButton(const TGWindow *p = 0, Int_t id = -1, GContext_t norm = GetDefaultGC()(),
106  UInt_t option = kRaisedFrame | kDoubleBorder);
107  virtual ~TGButton();
108 
109  virtual Bool_t HandleButton(Event_t *event);
110  virtual Bool_t HandleCrossing(Event_t *event);
111  virtual void SetUserData(void *userData) { fUserData = userData; }
112  virtual void *GetUserData() const { return fUserData; }
113  virtual void SetToolTipText(const char *text, Long_t delayms = 400); //*MENU*
114  virtual TGToolTip *GetToolTip() const { return fTip; }
115  virtual void SetState(EButtonState state, Bool_t emit = kFALSE);
116  virtual EButtonState GetState() const { return fState; }
117  virtual void AllowStayDown(Bool_t a) { fStayDown = a; }
118  virtual void SetGroup(TGButtonGroup *gr);
119  TGButtonGroup *GetGroup() const { return fGroup; }
120 
121  virtual Bool_t IsDown() const;// { return !(fOptions & kRaisedFrame); }
122  virtual void SetDown(Bool_t on = kTRUE, Bool_t emit = kFALSE);
123  virtual Bool_t IsOn() const { return IsDown(); }
124  virtual void SetOn(Bool_t on = kTRUE, Bool_t emit = kFALSE) { SetDown(on, emit); }
125  virtual Bool_t IsToggleButton() const { return kFALSE; }
126  virtual Bool_t IsExclusiveToggle() const { return kFALSE; }
127  virtual void Toggle(Bool_t emit = kFALSE) { SetDown(IsDown() ? kFALSE : kTRUE, emit); }
128  virtual void SetEnabled(Bool_t e = kTRUE); //*TOGGLE* *GETTER=IsEnabled
129  virtual UInt_t GetStyle() const { return fStyle; }
130  virtual void SetStyle(UInt_t newstyle);
131  virtual void SetStyle(const char *style);
132 
133  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
134 
135  GContext_t GetNormGC() const { return fNormGC; }
136 
137  virtual void Pressed() { Emit("Pressed()"); } // *SIGNAL*
138  virtual void Released() { Emit("Released()"); } // *SIGNAL*
139  virtual void Clicked() { Emit("Clicked()"); } // *SIGNAL*
140  virtual void Toggled(Bool_t on) { Emit("Toggled(Bool_t)", on); } // *SIGNAL*
141 
142  ClassDef(TGButton,0) // Button widget abstract base class
143 };
144 
145 
146 class TGTextButton : public TGButton {
147 
148 protected:
149  TGHotString *fLabel; // button text
150  Int_t fMLeft; // margin left
151  Int_t fMRight; // margin right
152  Int_t fMTop; // margin top
153  Int_t fMBottom; // margin bottom
154  Int_t fTMode; // text justify mode
155  Int_t fWrapLength; // wrap length
156  Int_t fHKeycode; // hotkey
157  TGTextLayout *fTLayout; // text layout
158  FontStruct_t fFontStruct; // font to draw text
159  Bool_t fHasOwnFont; // kTRUE - font defined locally, kFALSE - globally
160  Bool_t fStateOn; // bit to save the state across disable/enable
161  Bool_t fPrevStateOn; // bit to save previos state On/Off
162 
163  static const TGFont *fgDefaultFont;
164 
165  void Init();
166  virtual void DoRedraw();
167 
168 private:
169  TGTextButton(const TGTextButton&); // not implemented
170  TGTextButton& operator=(const TGTextButton&); // not implemented
171 
172 public:
173  static FontStruct_t GetDefaultFontStruct();
174 
175  TGTextButton(const TGWindow *p, TGHotString *s, Int_t id = -1,
177  FontStruct_t font = GetDefaultFontStruct(),
178  UInt_t option = kRaisedFrame | kDoubleBorder);
179  TGTextButton(const TGWindow *p = 0, const char *s = 0, Int_t id = -1,
181  FontStruct_t font = GetDefaultFontStruct(),
182  UInt_t option = kRaisedFrame | kDoubleBorder);
183  TGTextButton(const TGWindow *p, const char *s, const char *cmd,
184  Int_t id = -1, GContext_t norm = GetDefaultGC()(),
185  FontStruct_t font = GetDefaultFontStruct(),
186  UInt_t option = kRaisedFrame | kDoubleBorder);
187 
188  virtual ~TGTextButton();
189 
190  virtual TGDimension GetDefaultSize() const;
191 
192  virtual Bool_t HandleKey(Event_t *event);
193  const TGHotString *GetText() const { return fLabel; }
194  virtual const char *GetTitle() const { return fLabel->Data(); }
195  TString GetString() const { return TString(fLabel->GetString()); }
196  virtual void SetTextJustify(Int_t tmode);
197  Int_t GetTextJustify() const { return fTMode; }
198  virtual void SetText(TGHotString *new_label);
199  virtual void SetText(const TString &new_label);
200  virtual void SetTitle(const char *label) { SetText(label); }
201  virtual void SetFont(FontStruct_t font, Bool_t global = kFALSE);
202  virtual void SetFont(const char *fontName, Bool_t global = kFALSE);
203  virtual void SetTextColor(Pixel_t color, Bool_t global = kFALSE);
204  virtual void SetForegroundColor(Pixel_t fore) { SetTextColor(fore); }
205  Bool_t HasOwnFont() const;
206  void SetWrapLength(Int_t wl) { fWrapLength = wl; Layout(); }
207  Int_t GetWrapLength() const { return fWrapLength; }
208  void SetMargins(Int_t left=0, Int_t right=0, Int_t top=0, Int_t bottom=0)
209  { fMLeft = left; fMRight = right; fMTop = top; fMBottom = bottom; }
210 
211  virtual void SetLeftMargin(Int_t val) { fMLeft = val; }
212  virtual void SetRightMargin(Int_t val) { fMRight = val; }
213  virtual void SetTopMargin(Int_t val) { fMTop = val; }
214  virtual void SetBottomMargin(Int_t val) { fMBottom = val; }
215 
216  Int_t GetLeftMargin() const { return fMLeft; }
217  Int_t GetRightMargin() const { return fMRight; }
218  Int_t GetTopMargin() const { return fMTop; }
219  Int_t GetBottomMargin() const { return fMBottom; }
220 
221  void ChangeText(const char *title) { SetTitle(title); } //*MENU*icon=bld_rename.png*
222 
223  FontStruct_t GetFontStruct() const { return fFontStruct; }
224 
225  virtual void Layout();
226  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
227 
228  ClassDef(TGTextButton,0) // A text button widget
229 };
230 
231 
232 class TGPictureButton : public TGButton {
233 
234 protected:
235  const TGPicture *fPic; // picture to be put in button
236  const TGPicture *fPicD; // picture shown when button disabled
237  Bool_t fOwnDisabledPic; // kTRUE if disabled picture was autogenerated
238 
239  virtual void DoRedraw();
240  virtual void CreateDisabledPicture();
241 
242 private:
243  TGPictureButton(const TGPictureButton&); // not implemented
244  TGPictureButton& operator=(const TGPictureButton&); // not implemented
245 
246 public:
247  TGPictureButton(const TGWindow *p, const TGPicture *pic, Int_t id = -1,
249  UInt_t option = kRaisedFrame | kDoubleBorder);
250  TGPictureButton(const TGWindow *p, const TGPicture *pic, const char *cmd,
251  Int_t id = -1, GContext_t norm = GetDefaultGC()(),
252  UInt_t option = kRaisedFrame | kDoubleBorder);
253  TGPictureButton(const TGWindow *p = 0, const char* pic = 0, Int_t id = -1,
255  UInt_t option = kRaisedFrame | kDoubleBorder);
256  virtual ~TGPictureButton();
257 
258  virtual void SetPicture(const TGPicture *new_pic);
259  virtual void SetDisabledPicture(const TGPicture *pic);
260  const TGPicture *GetPicture() const { return fPic; };
261  const TGPicture *GetDisabledPicture() const { return fPicD; };
262  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
263 
264  ClassDef(TGPictureButton,0) // A picture button widget
265 };
266 
267 
268 class TGCheckButton : public TGTextButton {
269 
270 private:
271 
272  TGCheckButton(const TGCheckButton&); // Not implemented
273  TGCheckButton& operator=(const TGCheckButton&); // Not implemented
274 
275 protected:
276  EButtonState fPrevState; // previous check button state
277  const TGPicture *fOn; // button ON picture
278  const TGPicture *fOff; // button OFF picture
279  const TGPicture *fDisOn; // button disabled and was ON picture
280  const TGPicture *fDisOff; // button disabled and was OFF picture
281 
282 
283  void Init();
284  void PSetState(EButtonState state, Bool_t emit);
285  virtual void DoRedraw();
286  virtual void EmitSignals(Bool_t wasUp = kTRUE);
287 
288  static const TGFont *fgDefaultFont;
289  static const TGGC *fgDefaultGC;
290 
291 public:
292  static FontStruct_t GetDefaultFontStruct();
293  static const TGGC &GetDefaultGC();
294 
295  TGCheckButton(const TGWindow *p, TGHotString *s, Int_t id = -1,
297  FontStruct_t font = GetDefaultFontStruct(),
298  UInt_t option = 0);
299  TGCheckButton(const TGWindow *p = 0, const char *s = 0, Int_t id = -1,
301  FontStruct_t font = GetDefaultFontStruct(),
302  UInt_t option = 0);
303  TGCheckButton(const TGWindow *p, const char *s, const char *cmd, Int_t id = -1,
305  FontStruct_t font = GetDefaultFontStruct(),
306  UInt_t option = 0);
307  virtual ~TGCheckButton();
308 
309  virtual TGDimension GetDefaultSize() const;
310 
311  virtual Bool_t HandleButton(Event_t *event);
312  virtual Bool_t HandleKey(Event_t *event);
313  virtual Bool_t HandleCrossing(Event_t *event);
314  virtual Bool_t IsToggleButton() const { return kTRUE; }
315  virtual Bool_t IsOn() const { return fState == kButtonDown; }
316  virtual Bool_t IsDown() const { return fState == kButtonDown; }
317  virtual Bool_t IsDisabledAndSelected() const { return ((fState == kButtonDisabled) && fStateOn); }
318  virtual void SetDisabledAndSelected(Bool_t);
319  virtual void SetState(EButtonState state, Bool_t emit = kFALSE);
320  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
321 
322  ClassDef(TGCheckButton,0) // A check button widget
323 };
324 
325 
326 class TGRadioButton : public TGTextButton {
327 
328 private:
331 
332 protected:
333  EButtonState fPrevState; // previous radio button state
334  const TGPicture *fOn; // button ON picture
335  const TGPicture *fOff; // button OFF picture
336  const TGPicture *fDisOn; // button disabled and was ON picture
337  const TGPicture *fDisOff; // button disabled and was OFF picture
338 
339  void Init();
340  void PSetState(EButtonState state, Bool_t emit);
341  virtual void DoRedraw();
342  virtual void EmitSignals(Bool_t wasUp = kTRUE);
343 
344  static const TGFont *fgDefaultFont;
345  static const TGGC *fgDefaultGC;
346 
347 public:
348  static FontStruct_t GetDefaultFontStruct();
349  static const TGGC &GetDefaultGC();
350 
351  TGRadioButton(const TGWindow *p, TGHotString *s, Int_t id = -1,
353  FontStruct_t font = GetDefaultFontStruct(),
354  UInt_t option = 0);
355  TGRadioButton(const TGWindow *p = 0, const char *s = 0, Int_t id = -1,
357  FontStruct_t font = GetDefaultFontStruct(),
358  UInt_t option = 0);
359  TGRadioButton(const TGWindow *p, const char *s, const char *cmd, Int_t id = -1,
361  FontStruct_t font = GetDefaultFontStruct(),
362  UInt_t option = 0);
363  virtual ~TGRadioButton();
364 
365  virtual TGDimension GetDefaultSize() const;
366 
367  virtual Bool_t HandleButton(Event_t *event);
368  virtual Bool_t HandleKey(Event_t *event);
369  virtual Bool_t HandleCrossing(Event_t *event);
370  virtual void SetState(EButtonState state, Bool_t emit = kFALSE);
371  virtual void SetDisabledAndSelected(Bool_t);
372  virtual Bool_t IsToggleButton() const { return kTRUE; }
373  virtual Bool_t IsExclusiveToggle() const { return kTRUE; }
374  virtual Bool_t IsOn() const { return fStateOn; }
375  virtual Bool_t IsDown() const { return fStateOn; }
376  virtual Bool_t IsDisabledAndSelected() const { return ((fState == kButtonDisabled) && fStateOn); }
377  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
378 
379  ClassDef(TGRadioButton,0) // A radio button widget
380 };
381 
382 
383 class TGSplitButton : public TGTextButton {
384 
385 friend class TGPopupMenu;
386 
387 private:
388  TGSplitButton(const TGSplitButton&); // Not implemented
389  TGSplitButton& operator=(const TGSplitButton&); // Not implemented
390 
391  void CalcSize();
392  void DrawTriangle(const GContext_t gc, Int_t x, Int_t y);
393  Bool_t HandleSButton(Event_t *event);
394  Bool_t HandleSCrossing(Event_t *event);
395  Bool_t HandleSKey(Event_t *event);
396  void SetMenuState(Bool_t state) ;
397 
398 protected:
399  // Data members for menu functionality
400  Bool_t fSplit; // kTRUE if menu is in split mode
401  EButtonState fMBState; // state for menu button in split mode
402  UInt_t fTBWidth; // width of text button
403  UInt_t fMBWidth; // width of menu button
404  TGPopupMenu *fPopMenu; // pointer to popup menu
405  Int_t fEntryId; // Id of the currently active menu entry
406  TGHotString *fMenuLabel; // Label of the menu;
407  Cursor_t fDefaultCursor; // Default Cursor
408  Bool_t fKeyNavigate; // kTRUE is keynavigation is being used
409  TGString fWidestLabel; // Longest label that can be on the button
410  TGString fHeighestLabel; // Heighest label that can be on the button
411 
412  virtual void DoRedraw();
413  void Init();
414  void BindKeys(Bool_t on = kTRUE);
415  void BindMenuKeys(Bool_t on = kTRUE);
416 
417 public:
418  TGSplitButton(const TGWindow *p, TGHotString *menulabel,
419  TGPopupMenu *popmenu, Bool_t split = kTRUE,
420  Int_t id = -1, GContext_t norm = GetDefaultGC()(),
421  FontStruct_t fontstruct = GetDefaultFontStruct(),
422  UInt_t option = kRaisedFrame | kDoubleBorder);
423 
424  virtual ~TGSplitButton();
425 
426  virtual TGDimension GetDefaultSize() const ;
427 
428  virtual void SetText(TGHotString *new_label);
429  virtual void SetText(const TString &new_label);
430  virtual void SetFont(FontStruct_t font, Bool_t global = kFALSE);
431  virtual void SetFont(const char *fontName, Bool_t global = kFALSE);
432  virtual void SetMBState(EButtonState state);
433  virtual void SetSplit(Bool_t split);
434  Bool_t IsSplit() { return fSplit; }
435  virtual Bool_t HandleButton(Event_t *event);
436  virtual Bool_t HandleCrossing(Event_t *event);
437  virtual Bool_t HandleKey(Event_t *event);
438  virtual Bool_t HandleMotion(Event_t *event);
439  virtual void Layout();
440 
441  virtual void MBPressed() { Emit("MBPressed()"); } // *SIGNAL*
442  virtual void MBReleased() { Emit("MBReleased()"); } // *SIGNAL*
443  virtual void MBClicked() { Emit("MBClicked()"); } // *SIGNAL*
444  virtual void ItemClicked(Int_t id) { Emit("ItemClicked(Int_t)", id); } // *SIGNAL*
445 
446  // Slots
447  void HandleMenu(Int_t id) ;
448 
449  ClassDef(TGSplitButton, 0) //a split button widget
450 };
451 
452 #endif
TGPopupMenu * fPopMenu
Definition: TGButton.h:404
void ChangeText(const char *title)
Definition: TGButton.h:221
Handle_t FontStruct_t
Definition: GuiTypes.h:40
Bool_t IsSplit()
Definition: TGButton.h:434
Int_t fTMode
Definition: TGButton.h:154
virtual void Pressed()
Definition: TGButton.h:137
Int_t GetWrapLength() const
Definition: TGButton.h:207
virtual void * GetUserData() const
Definition: TGButton.h:112
virtual void MBPressed()
Definition: TGButton.h:441
virtual void EmitSignals(Bool_t wasUp)
Emit button signals.
Definition: TGButton.cxx:335
Bool_t fPrevStateOn
Definition: TGButton.h:161
virtual void Released()
Definition: TGButton.h:138
const TGPicture * fOn
Definition: TGButton.h:277
virtual Bool_t HandleKey(Event_t *)
Definition: TGFrame.h:228
const char Option_t
Definition: RtypesCore.h:62
virtual Bool_t IsOn() const
Definition: TGButton.h:374
const TGPicture * fDisOff
Definition: TGButton.h:280
virtual void SetRightMargin(Int_t val)
Definition: TGButton.h:212
static const TGGC * fgDefaultGC
Definition: TGButton.h:289
Int_t GetRightMargin() const
Definition: TGButton.h:217
void * fUserData
Definition: TGButton.h:82
virtual void Toggled(Bool_t on)
Definition: TGButton.h:140
Handle_t Cursor_t
Definition: GuiTypes.h:35
Int_t fHKeycode
Definition: TGButton.h:156
pt SetTextColor(4)
virtual Bool_t IsDown() const
Definition: TGButton.h:316
virtual void SetTopMargin(Int_t val)
Definition: TGButton.h:213
Handle_t GContext_t
Definition: GuiTypes.h:39
virtual void SetToggleButton(Bool_t)
Definition: TGButton.h:89
Basic string class.
Definition: TString.h:137
const TGPicture * fOn
Definition: TGButton.h:334
Bool_t fStateOn
Definition: TGButton.h:160
virtual UInt_t GetStyle() const
Definition: TGButton.h:129
Bool_t fKeyNavigate
Definition: TGButton.h:408
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
static const TGGC & GetDefaultGC()
Return default graphics context.
Definition: TGButton.cxx:420
const Bool_t kFALSE
Definition: Rtypes.h:92
EButtonState fPrevState
Definition: TGButton.h:333
TGButtonGroup * GetGroup() const
Definition: TGButton.h:119
virtual void SetLeftMargin(Int_t val)
Definition: TGButton.h:211
Bool_t fSplit
Definition: TGButton.h:400
Int_t fMRight
Definition: TGButton.h:151
const TGPicture * GetPicture() const
Definition: TGButton.h:260
EButtonState
Definition: TGButton.h:56
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Definition: TGButton.cxx:354
virtual void SetTitle(const char *label)
Definition: TGButton.h:200
TString GetString() const
Definition: TGButton.h:195
TGButtonGroup * fGroup
Definition: TGButton.h:84
TGTextLayout * fTLayout
Definition: TGButton.h:157
Int_t fMLeft
Definition: TGButton.h:150
virtual Bool_t IsDown() const
Definition: TGButton.h:375
const TGPicture * fDisOn
Definition: TGButton.h:279
virtual void SetGroup(TGButtonGroup *gr)
Sets new button-group for this button.
Definition: TGButton.cxx:272
const char * Data() const
Definition: TString.h:349
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:412
virtual TGToolTip * GetToolTip() const
Definition: TGButton.h:114
virtual void SetForegroundColor(Pixel_t fore)
Definition: TGButton.h:204
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
Definition: TGButton.cxx:280
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.cxx:566
ULong_t Pixel_t
Definition: GuiTypes.h:41
TGButton & operator=(const TGButton &)
Cursor_t fDefaultCursor
Definition: TGButton.h:407
UInt_t fTBWidth
Definition: TGButton.h:402
virtual void MBClicked()
Definition: TGButton.h:443
virtual Bool_t IsDown() const
Definition: TGButton.cxx:251
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:119
virtual void ItemClicked(Int_t id)
Definition: TGButton.h:444
virtual Bool_t IsToggleButton() const
Definition: TGButton.h:125
virtual void SetBottomMargin(Int_t val)
Definition: TGButton.h:214
TGHotString * fLabel
Definition: TGButton.h:149
virtual void Layout()
Definition: TGFrame.h:262
static FontStruct_t GetDefaultFontStruct()
Return the default font structure in use.
Definition: TGMenu.cxx:1984
Bool_t fHasOwnFont
Definition: TGButton.h:159
const TGPicture * fPic
Definition: TGButton.h:235
void SetMargins(Int_t left=0, Int_t right=0, Int_t top=0, Int_t bottom=0)
Definition: TGButton.h:208
Int_t fMBottom
Definition: TGButton.h:153
EButtonState fPrevState
Definition: TGButton.h:276
void Emit(const char *signal)
Acitvate signal without args.
Definition: TQObject.cxx:561
Bool_t fOwnDisabledPic
Definition: TGButton.h:237
const TGPicture * fOff
Definition: TGButton.h:335
static const TGGC * fgDefaultGC
Definition: TGButton.h:92
virtual void SetStyle(UInt_t newstyle)
Set the button style (modern or classic).
Definition: TGButton.cxx:221
static const TGFont * fgDefaultFont
Definition: TGButton.h:344
virtual void MBReleased()
Definition: TGButton.h:442
Int_t GetTopMargin() const
Definition: TGButton.h:218
const TGPicture * fPicD
Definition: TGButton.h:236
virtual EButtonState GetState() const
Definition: TGButton.h:116
UInt_t fTHeight
Definition: TGButton.h:78
Int_t GetLeftMargin() const
Definition: TGButton.h:216
virtual void Toggle(Bool_t emit=kFALSE)
Definition: TGButton.h:127
virtual Bool_t HandleMotion(Event_t *)
Definition: TGFrame.h:227
static const TGGC * fgHibckgndGC
Definition: TGButton.h:93
Pixel_t fHighColor
Definition: TGButton.h:86
Int_t GetTextJustify() const
Definition: TGButton.h:197
Int_t fEntryId
Definition: TGButton.h:405
virtual void AllowStayDown(Bool_t a)
Definition: TGButton.h:117
unsigned int UInt_t
Definition: RtypesCore.h:42
GContext_t fNormGC
Definition: TGButton.h:81
virtual Bool_t IsOn() const
Definition: TGButton.h:123
virtual Bool_t IsOn() const
Definition: TGButton.h:315
TGToolTip * fTip
Definition: TGButton.h:83
TGraphErrors * gr
Definition: legend1.C:25
const TGPicture * fOff
Definition: TGButton.h:278
virtual void Clicked()
Definition: TGButton.h:139
TGString fHeighestLabel
Definition: TGButton.h:410
long Long_t
Definition: RtypesCore.h:50
static const TGFont * fgDefaultFont
Definition: TGButton.h:288
virtual void SetUserData(void *userData)
Definition: TGButton.h:111
FontStruct_t GetFontStruct() const
Definition: TGButton.h:223
static const TGGC * fgDefaultGC
Definition: TGButton.h:345
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition: TGButton.cxx:409
TText * text
virtual Bool_t IsToggleButton() const
Definition: TGButton.h:314
static Window_t fgReleaseBtn
Definition: TGButton.h:95
UInt_t fMBWidth
Definition: TGButton.h:403
Definition: TGFont.h:155
UInt_t fTWidth
Definition: TGButton.h:77
Int_t fWrapLength
Definition: TGButton.h:155
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
TGButton(const TGButton &)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
virtual void SetOn(Bool_t on=kTRUE, Bool_t emit=kFALSE)
Definition: TGButton.h:124
virtual Bool_t IsDisabledAndSelected() const
Definition: TGButton.h:317
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a button widget as a C++ statement(s) on output stream out.
Definition: TGButton.cxx:1829
const TGPicture * fDisOn
Definition: TGButton.h:336
virtual Bool_t IsExclusiveToggle() const
Definition: TGButton.h:373
Handle_t Window_t
Definition: GuiTypes.h:30
const TGPicture * GetDisabledPicture() const
Definition: TGButton.h:261
virtual void SetDown(Bool_t on=kTRUE, Bool_t emit=kFALSE)
Definition: TGButton.cxx:260
virtual const char * GetTitle() const
Returns title of object.
Definition: TGButton.h:194
static const TGFont * fgDefaultFont
Definition: TGButton.h:163
UInt_t fStyle
Definition: TGButton.h:87
Int_t GetBottomMargin() const
Definition: TGButton.h:219
EButtonState fState
Definition: TGButton.h:79
static const TGGC & GetHibckgndGC()
Return graphics context for highlighted frame background.
Definition: TGButton.cxx:430
const char * GetString() const
Definition: TGString.h:44
Int_t fMTop
Definition: TGButton.h:152
EButtonState fMBState
Definition: TGButton.h:401
const TGHotString * GetText() const
Definition: TGButton.h:193
Pixel_t fBgndColor
Definition: TGButton.h:85
const TGPicture * fDisOff
Definition: TGButton.h:337
const Bool_t kTRUE
Definition: Rtypes.h:91
TGString fWidestLabel
Definition: TGButton.h:409
friend class TGSplitButton
Definition: TGMenu.h:135
virtual Bool_t IsToggleButton() const
Definition: TGButton.h:372
TGHotString * fMenuLabel
Definition: TGButton.h:406
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:395
Definition: TGGC.h:35
Bool_t fStayDown
Definition: TGButton.h:80
FontStruct_t fFontStruct
Definition: TGButton.h:158
GContext_t GetNormGC() const
Definition: TGButton.h:135
void SetWrapLength(Int_t wl)
Definition: TGButton.h:206
virtual Bool_t IsDisabledAndSelected() const
Definition: TGButton.h:376
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:185
virtual ~TGButton()
Delete button.
Definition: TGButton.cxx:171
virtual Bool_t IsExclusiveToggle() const
Definition: TGButton.h:126