Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGFrame.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 03/01/98
3
4/*************************************************************************
5 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGFrame
13#define ROOT_TGFrame
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TGFrame, TGCompositeFrame, TGVerticalFrame, TGHorizontalFrame, //
18// TGMainFrame, TGTransientFrame and TGGroupFrame //
19// //
20// This header contains all different Frame classes. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TGWindow.h"
25#include "TQObject.h"
26#include "TGDimension.h"
27#include "TGGC.h"
28#include "TGFont.h"
29#include "TGLayout.h"
30#include "TGString.h"
31
32class TGResourcePool;
33class TGTextButton;
34class TGVFileSplitter;
35class TDNDData;
36class TList;
37
38//---- frame states
39
43 kIsArranged = BIT(1)
44};
45
46//---- frame cleanup
50 kDeepCleanup = -1
51};
52
53//---- MWM hints stuff
54
56 // functions
63
64 // input mode
69
70 // decorations
78};
79
80//---- drag and drop
81
84 kIsDNDTarget = BIT(1)
85};
86
87
88
89//////////////////////////////////////////////////////////////////////////
90// //
91// TGFrame //
92// //
93// This class subclasses TGWindow, used as base class for some simple //
94// widgets (buttons, labels, etc.). //
95// It provides: //
96// - position & dimension fields //
97// - an 'options' attribute (see constant above) //
98// - a generic event handler //
99// - a generic layout mechanism //
100// - a generic border //
101// //
102//////////////////////////////////////////////////////////////////////////
103
104class TGFrame : public TGWindow, public TQObject {
105
106protected:
107 enum { kDeleteWindowCalled = BIT(15) };
108
109 Int_t fX; // frame x position
110 Int_t fY; // frame y position
111 UInt_t fWidth; // frame width
112 UInt_t fHeight; // frame height
113 UInt_t fMinWidth; // minimal frame width
114 UInt_t fMinHeight; // minimal frame height
115 UInt_t fMaxWidth; // maximal frame width
116 UInt_t fMaxHeight; // maximal frame height
117 Int_t fBorderWidth; // frame border width
118 UInt_t fOptions; // frame options
119 Pixel_t fBackground; // frame background color
120 UInt_t fEventMask; // currenty active event mask
121 Int_t fDNDState; // EDNDFlags
122 TGFrameElement *fFE; // pointer to frame element
123
129 static const TGGC *fgBlackGC;
130 static const TGGC *fgWhiteGC;
131 static const TGGC *fgHilightGC;
132 static const TGGC *fgShadowGC;
133 static const TGGC *fgBckgndGC;
139
140 static Time_t GetLastClick();
141
142 virtual void *GetSender() { return this; } //used to set gTQSender
143 virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
144 UInt_t w, UInt_t h);
145 virtual void DoRedraw();
146
148 { return fClient->GetResourcePool(); }
149
150 TString GetOptionString() const; //used in SavePrimitive()
151
152 // some protected methods use in gui builder
153 virtual void StartGuiBuilding(Bool_t on = kTRUE);
154
155private:
156 TGFrame(const TGFrame&) = delete;
157 TGFrame& operator=(const TGFrame&) = delete;
158
159public:
160 // Default colors and graphics contexts
163 static Pixel_t GetWhitePixel();
164 static Pixel_t GetBlackPixel();
165 static const TGGC &GetBlackGC();
166 static const TGGC &GetWhiteGC();
167 static const TGGC &GetHilightGC();
168 static const TGGC &GetShadowGC();
169 static const TGGC &GetBckgndGC();
170
171 TGFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
172 UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground());
173 TGFrame(TGClient *c, Window_t id, const TGWindow *parent = nullptr);
174 virtual ~TGFrame();
175
176 virtual void DeleteWindow();
177 virtual void ReallyDelete() { delete this; }
178
179 UInt_t GetEventMask() const { return fEventMask; }
180 void AddInput(UInt_t emask);
181 void RemoveInput(UInt_t emask);
182
183 virtual Bool_t HandleEvent(Event_t *event);
184 virtual Bool_t HandleConfigureNotify(Event_t *event);
185 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
186 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
187 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
188 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
189 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
190 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
191 virtual Bool_t HandleClientMessage(Event_t *event);
192 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
196 virtual Bool_t HandleDragEnter(TGFrame *) { return kFALSE; }
197 virtual Bool_t HandleDragLeave(TGFrame *) { return kFALSE; }
198 virtual Bool_t HandleDragMotion(TGFrame *) { return kFALSE; }
200 { return kFALSE; }
201 virtual void ProcessedConfigure(Event_t *event)
202 { Emit("ProcessedConfigure(Event_t*)", (Long_t)event); } //*SIGNAL*
203 virtual void ProcessedEvent(Event_t *event)
204 { Emit("ProcessedEvent(Event_t*)", (Long_t)event); } //*SIGNAL*
205
206 virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2);
208
209 virtual TGDimension GetDefaultSize() const ;
210 virtual void Move(Int_t x, Int_t y);
211 virtual void Resize(UInt_t w = 0, UInt_t h = 0);
212 virtual void Resize(TGDimension size);
213 virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
214 virtual UInt_t GetDefaultWidth() const { return GetDefaultSize().fWidth; }
215 virtual UInt_t GetDefaultHeight() const { return GetDefaultSize().fHeight; }
216 virtual Pixel_t GetBackground() const { return fBackground; }
217 virtual void ChangeBackground(Pixel_t back);
218 virtual void SetBackgroundColor(Pixel_t back);
219 virtual Pixel_t GetForeground() const;
220 virtual void SetForegroundColor(Pixel_t /*fore*/) { }
221 virtual UInt_t GetOptions() const { return fOptions; }
222 virtual void ChangeOptions(UInt_t options);
223 virtual void Layout() { }
224 virtual void MapSubwindows() { } // Simple frames do not have subwindows
225 // Redefine this in TGCompositeFrame!
226 virtual void ReparentWindow(const TGWindow *p, Int_t x = 0, Int_t y = 0)
227 { TGWindow::ReparentWindow(p, x, y); Move(x, y); }
228 virtual void MapWindow() { TGWindow::MapWindow(); if (fFE) fFE->fState |= kIsVisible; }
229 virtual void MapRaised() { TGWindow::MapRaised(); if (fFE) fFE->fState |= kIsVisible; }
230 virtual void UnmapWindow() { TGWindow::UnmapWindow(); if (fFE) fFE->fState &= ~kIsVisible; }
231
232 virtual void DrawBorder();
233 virtual void DrawCopy(Handle_t /*id*/, Int_t /*x*/, Int_t /*y*/) { }
234 virtual void Activate(Bool_t) { }
235 virtual Bool_t IsActive() const { return kFALSE; }
236 virtual Bool_t IsComposite() const { return kFALSE; }
237 virtual Bool_t IsEditable() const { return kFALSE; }
238 virtual void SetEditable(Bool_t) {}
239 virtual void SetLayoutBroken(Bool_t = kTRUE) {}
240 virtual Bool_t IsLayoutBroken() const { return kFALSE; }
241 virtual void SetCleanup(Int_t = kLocalCleanup) { /* backward compatebility */ }
242
243 virtual void SetDragType(Int_t type);
244 virtual void SetDropType(Int_t type);
245 virtual Int_t GetDragType() const;
246 virtual Int_t GetDropType() const;
247
248 UInt_t GetWidth() const { return fWidth; }
249 UInt_t GetHeight() const { return fHeight; }
250 UInt_t GetMinWidth() const { return fMinWidth; }
251 UInt_t GetMinHeight() const { return fMinHeight; }
252 UInt_t GetMaxWidth() const { return fMaxWidth; }
253 UInt_t GetMaxHeight() const { return fMaxHeight; }
255 Int_t GetX() const { return fX; }
256 Int_t GetY() const { return fY; }
258
259 TGFrameElement *GetFrameElement() const { return fFE; }
261
263 { return ((x >= 0) && (x < (Int_t)fWidth) && (y >= 0) && (y < (Int_t)fHeight)); }
265 { return (Contains(x, y) ? this : 0); }
266
267 // Modifiers (without graphic update)
268 virtual void SetX(Int_t x) { fX = x; }
269 virtual void SetY(Int_t y) { fY = y; }
270 virtual void SetWidth(UInt_t w) { fWidth = w; }
271 virtual void SetHeight(UInt_t h) { fHeight = h; }
272 virtual void SetMinWidth(UInt_t w) { fMinWidth = w; }
273 virtual void SetMinHeight(UInt_t h) { fMinHeight = h; }
274 virtual void SetMaxWidth(UInt_t w) { fMaxWidth = w; }
275 virtual void SetMaxHeight(UInt_t h) { fMaxHeight = h; }
276 virtual void SetSize(const TGDimension &s) { fWidth = s.fWidth; fHeight = s.fHeight; }
277
278 // Printing and saving
279 virtual void Print(Option_t *option="") const;
280 void SaveUserColor(std::ostream &out, Option_t *);
281 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
282
283 // dummy to remove from context menu
284 virtual void Delete(Option_t * /*option*/ ="") { }
285 virtual TObject *DrawClone(Option_t * /*option */="") const { return 0; }
286 virtual void DrawClass() const { }
287 virtual void Dump() const { }
288 virtual void Inspect() const { }
289 virtual void SetDrawOption(Option_t * /*option*/="") { }
290
291 // drag and drop...
293 { if (onoff) fDNDState |= kIsDNDSource; else fDNDState &= ~kIsDNDSource; }
295 { if (onoff) fDNDState |= kIsDNDTarget; else fDNDState &= ~kIsDNDTarget; }
298
299 virtual TDNDData *GetDNDData(Atom_t /*dataType*/) { return 0; }
300 virtual Bool_t HandleDNDDrop(TDNDData * /*DNDData*/) { return kFALSE; }
301 virtual Atom_t HandleDNDPosition(Int_t /*x*/, Int_t /*y*/, Atom_t /*action*/,
302 Int_t /*xroot*/, Int_t /*yroot*/) { return kNone; }
303 virtual Atom_t HandleDNDEnter(Atom_t * /*typelist*/) { return kNone; }
304 virtual Bool_t HandleDNDLeave() { return kFALSE; }
305 virtual Bool_t HandleDNDFinished() { return kFALSE; }
306
307 ClassDef(TGFrame,0) // Base class for simple widgets (button, etc.)
308};
309
310//////////////////////////////////////////////////////////////////////////
311// //
312// TGCompositeFrame //
313// //
314// This class is the base class for composite widgets //
315// (menu bars, list boxes, etc.). //
316// //
317// It provides: //
318// - a layout manager //
319// - a frame container (TList *) //
320// //
321//////////////////////////////////////////////////////////////////////////
322
323class TGCompositeFrame : public TGFrame {
324
325
326protected:
327 TGLayoutManager *fLayoutManager; // layout manager
328 TList *fList; // container of frame elements
329 Bool_t fLayoutBroken; // no layout manager is used
330 Int_t fMustCleanup; // cleanup mode (see EFrameCleanup)
331 Bool_t fMapSubwindows; // kTRUE - map subwindows
332
333 static TGLayoutHints *fgDefaultHints; // default hints used by AddFrame()
334
335private:
338
339public:
340 TGCompositeFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
341 UInt_t options = 0,
343 TGCompositeFrame(TGClient *c, Window_t id, const TGWindow *parent = nullptr);
344 virtual ~TGCompositeFrame();
345
346 virtual TList *GetList() const { return fList; }
347
348 virtual UInt_t GetDefaultWidth() const
349 { return GetDefaultSize().fWidth; }
350 virtual UInt_t GetDefaultHeight() const
351 { return GetDefaultSize().fHeight; }
353 { return (IsLayoutBroken() ? TGDimension(fWidth, fHeight) :
357 Int_t &fx, Int_t &fy);
358 virtual void MapSubwindows();
359 virtual void Layout();
360 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
361 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
362 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
363 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
364 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
365 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
366 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
367 virtual Bool_t HandleDragEnter(TGFrame *);
368 virtual Bool_t HandleDragLeave(TGFrame *);
370 virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo);
371 virtual void ChangeOptions(UInt_t options);
373
375 virtual void SetLayoutManager(TGLayoutManager *l);
376
377 virtual TGFrameElement* FindFrameElement(TGFrame *f) const;
378
379 virtual void AddFrame(TGFrame *f, TGLayoutHints *l = 0);
380 virtual void RemoveAll();
381 virtual void RemoveFrame(TGFrame *f);
382 virtual void ShowFrame(TGFrame *f);
383 virtual void HideFrame(TGFrame *f);
384 Int_t GetState(TGFrame *f) const;
385 Bool_t IsVisible(TGFrame *f) const;
386 Bool_t IsVisible(TGFrameElement *ptr) const { return (ptr->fState & kIsVisible); }
387 Bool_t IsArranged(TGFrame *f) const;
388 Bool_t IsArranged(TGFrameElement *ptr) const { return (ptr->fState & kIsArranged); }
389 Bool_t IsComposite() const { return kTRUE; }
390 virtual Bool_t IsEditable() const;
391 virtual void SetEditable(Bool_t on = kTRUE);
392 virtual void SetLayoutBroken(Bool_t on = kTRUE);
393 virtual Bool_t IsLayoutBroken() const
394 { return fLayoutBroken || !fLayoutManager; }
395 virtual void SetEditDisabled(UInt_t on = 1);
396 virtual void SetCleanup(Int_t mode = kLocalCleanup);
397 virtual Int_t MustCleanup() const { return fMustCleanup; }
398 virtual void Cleanup();
399 virtual void SetMapSubwindows(Bool_t on) { fMapSubwindows = on; }
400 virtual Bool_t IsMapSubwindows() const { return fMapSubwindows; }
401
402 virtual void Print(Option_t *option="") const;
403 virtual void ChangeSubframesBackground(Pixel_t back);
404 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
405 virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option = "");
406
407 ClassDef(TGCompositeFrame,0) // Base class for composite widgets (menubars, etc.)
408};
409
410
412public:
413 TGVerticalFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
414 UInt_t options = kChildFrame,
416 TGCompositeFrame(p, w, h, options | kVerticalFrame, back) { SetWindowName(); }
417 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
418
419 ClassDef(TGVerticalFrame,0) // Composite frame with vertical child layout
420};
421
423public:
424 TGHorizontalFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
425 UInt_t options = kChildFrame,
427 TGCompositeFrame(p, w, h, options | kHorizontalFrame, back) { SetWindowName(); }
428 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
429
430 ClassDef(TGHorizontalFrame,0) // Composite frame with horizontal child layout
431};
432
433
434//////////////////////////////////////////////////////////////////////////
435// //
436// TGMainFrame //
437// //
438// This class defines top level windows that interact with the system //
439// Window Manager (WM or MWM for Motif Window Manager). //
440// //
441//////////////////////////////////////////////////////////////////////////
442
444
445protected:
446 enum { kDontCallClose = BIT(14) };
447
448 // mapping between key and window
449 class TGMapKey : public TObject {
450 private:
453 public:
456 TGMapKey(UInt_t keycode, TGWindow *w): fKeyCode(keycode), fWindow(w) { }
457 };
458
459 Atom_t *fDNDTypeList; // handles DND types
460 TList *fBindList; // list with key bindings
461 TString fWindowName; // window name
462 TString fIconName; // icon name
463 TString fIconPixmap; // icon pixmap name
464 TString fClassName; // WM class name
465 TString fResourceName; // WM resource name
466 UInt_t fMWMValue; // MWM decoration hints
467 UInt_t fMWMFuncs; // MWM functions
468 UInt_t fMWMInput; // MWM input modes
469 Int_t fWMX; // WM x position
470 Int_t fWMY; // WM y position
471 UInt_t fWMWidth; // WM width
472 UInt_t fWMHeight; // WM height
473 UInt_t fWMMinWidth; // WM min width
474 UInt_t fWMMinHeight; // WM min height
475 UInt_t fWMMaxWidth; // WM max width
476 UInt_t fWMMaxHeight; // WM max height
477 UInt_t fWMWidthInc; // WM width increments
478 UInt_t fWMHeightInc; // WM height increments
479 EInitialState fWMInitState; // WM initial state
480
481 TString GetMWMvalueString() const; //used in SaveSource()
482 TString GetMWMfuncString() const; //used in SaveSource()
483 TString GetMWMinpString() const; //used in SaveSource()
484
485private:
486 TGMainFrame(const TGMainFrame&) = delete;
488
489public:
490 TGMainFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
491 UInt_t options = kVerticalFrame);
492 virtual ~TGMainFrame();
493
494 virtual Bool_t HandleKey(Event_t *event);
495 virtual Bool_t HandleClientMessage(Event_t *event);
496 virtual Bool_t HandleSelection(Event_t *event);
497 virtual Bool_t HandleSelectionRequest(Event_t *event);
498 virtual Bool_t HandleButton(Event_t *event);
499 virtual Bool_t HandleMotion(Event_t *event);
501 virtual void SendCloseMessage();
502 virtual void CloseWindow(); //*SIGNAL*
503
504 void DontCallClose();
505 void SetWindowName(const char *name = 0);
506 void SetIconName(const char *name);
507 const TGPicture *SetIconPixmap(const char *iconName);
508 void SetIconPixmap(char **xpm_array);
509 void SetClassHints(const char *className, const char *resourceName);
510 void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input);
511 void SetWMPosition(Int_t x, Int_t y);
512 void SetWMSize(UInt_t w, UInt_t h);
513 void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax,
514 UInt_t winc, UInt_t hinc);
515 void SetWMState(EInitialState state);
516
517 virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const;
518 virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const;
519 TList *GetBindList() const { return fBindList; }
520
521 const char *GetWindowName() const { return fWindowName; }
522 const char *GetIconName() const { return fIconName; }
523 const char *GetIconPixmap() const { return fIconPixmap; }
524 void GetClassHints(const char *&className, const char *&resourceName) const
525 { className = fClassName.Data(); resourceName = fResourceName.Data(); }
526 void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
527 { value = fMWMValue; funcs = fMWMFuncs; input = fMWMInput; }
528 void GetWMPosition(Int_t &x, Int_t &y) const { x = fWMX; y = fWMY; }
529 void GetWMSize(UInt_t &w, UInt_t &h) const { w = fWMWidth; h = fWMHeight; }
530 void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax,
531 UInt_t &winc, UInt_t &hinc) const
532 { wmin = fWMMinWidth; hmin = fWMMinHeight; wmax = fWMMaxWidth;
533 hmax = fWMMaxHeight; winc = fWMWidthInc; hinc = fWMHeightInc; }
535
536 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
537 virtual void SaveSource(const char *filename = "Rootappl.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
538
539 ClassDef(TGMainFrame,0) // Top level window frame
540};
541
542
543//////////////////////////////////////////////////////////////////////////
544// //
545// TGTransientFrame //
546// //
547// This class defines transient windows that typically are used for //
548// dialogs. //
549// //
550//////////////////////////////////////////////////////////////////////////
551
553
554protected:
555 const TGWindow *fMain; // window over which to popup dialog
556
557private:
560
561public:
562 TGTransientFrame(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
563 UInt_t options = kVerticalFrame);
564
567 virtual void CenterOnParent(Bool_t croot = kTRUE, EPlacement pos = kCenter);
568 const TGWindow *GetMain() const { return fMain; }
569 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
570 virtual void SaveSource(const char *filename = "Rootdlog.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
571
572 ClassDef(TGTransientFrame,0) // Frame for dialog (transient) windows
573};
574
575
576//////////////////////////////////////////////////////////////////////////
577// //
578// TGGroupFrame //
579// //
580// A group frame is a composite frame with a border and a title. //
581// It is typically used to group a number of logically related widgets //
582// visually together. //
583// //
584//////////////////////////////////////////////////////////////////////////
585
587
588protected:
589 TGString *fText; // title text
590 FontStruct_t fFontStruct; // title fontstruct
591 GContext_t fNormGC; // title graphics context
592 Int_t fTitlePos; // *OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",1="Right")}*
593 Bool_t fHasOwnFont; // kTRUE - font defined locally, kFALSE - globally
594
595 virtual void DoRedraw();
596
597 static const TGFont *fgDefaultFont;
598 static const TGGC *fgDefaultGC;
599
600private:
601 TGGroupFrame(const TGGroupFrame&) = delete;
603
604public:
605 enum ETitlePos { kLeft = -1, kCenter = 0, kRight = 1 };
606
608 static const TGGC &GetDefaultGC();
609
610 TGGroupFrame(const TGWindow *p, TGString *title,
611 UInt_t options = kVerticalFrame,
612 GContext_t norm = GetDefaultGC()(),
615 TGGroupFrame(const TGWindow *p = nullptr, const char *title = nullptr,
616 UInt_t options = kVerticalFrame,
617 GContext_t norm = GetDefaultGC()(),
620 virtual ~TGGroupFrame();
621
622 virtual TGDimension GetDefaultSize() const;
623 virtual void DrawBorder();
624 virtual void SetTitle(TGString *title);
625 virtual void SetTitle(const char *title);
626 virtual void Rename(const char *title) { SetTitle(title); } //*MENU*icon=bld_rename.png*
627 Int_t GetTitlePos() const { return fTitlePos; }
628 virtual void SetTitlePos(ETitlePos pos = kLeft) { fTitlePos = pos; } //*SUBMENU*
629 virtual void SetTextColor(Pixel_t color, Bool_t local = kTRUE);
630 virtual void SetTextFont(const char *fontName, Bool_t local = kTRUE);
631 virtual void SetTextFont(FontStruct_t font, Bool_t local = kTRUE);
632 GContext_t GetNormGC() const { return fNormGC; }
634
635 virtual const char *GetTitle() const { return fText->GetString(); }
636 Bool_t HasOwnFont() const;
637
638 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
639
640 ClassDef(TGGroupFrame,0) // A composite frame with border and title
641};
642
643//////////////////////////////////////////////////////////////////////////
644// //
645// TGHeaderFrame //
646// //
647// Horizontal Frame used to contain header buttons and splitters //
648// in a list view. Used to have resizable column headers. //
649// //
650//////////////////////////////////////////////////////////////////////////
651
653private:
654 TGHeaderFrame(const TGHeaderFrame&) = delete;
656
657protected:
658 Int_t fNColumns; // number of columns
659 TGTextButton **fColHeader; // column headers for in detailed mode
660 TGVFileSplitter **fSplitHeader; // column splitters
661 Cursor_t fSplitCursor; // split cursor;
662 Bool_t fOverSplitter; // Indicates if the cursor is over a splitter
663 Int_t fOverButton; // Indicates over which button the mouse is
664 Int_t fLastButton; // Indicates the last button clicked if any
665
666public:
667 TGHeaderFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
668 UInt_t options = kChildFrame,
670
671 virtual Bool_t HandleButton(Event_t* event);
672 virtual Bool_t HandleMotion(Event_t* event);
673 virtual Bool_t HandleDoubleClick(Event_t *event);
674
675 void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader);
676
677 ClassDef(TGHeaderFrame,0) // Header frame with buttons and splitters
678};
679
680
681#endif
Handle_t Cursor_t
Cursor handle.
Definition GuiTypes.h:34
ULong_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
ULong_t Time_t
Event time.
Definition GuiTypes.h:42
EInitialState
Initial window mapping state.
Definition GuiTypes.h:345
@ kChildFrame
Definition GuiTypes.h:379
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
Handle_t Atom_t
WM token.
Definition GuiTypes.h:37
const Handle_t kNone
Definition GuiTypes.h:88
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:39
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
int Int_t
Definition RtypesCore.h:45
unsigned int UInt_t
Definition RtypesCore.h:46
const Bool_t kFALSE
Definition RtypesCore.h:92
long Long_t
Definition RtypesCore.h:54
bool Bool_t
Definition RtypesCore.h:63
const Bool_t kTRUE
Definition RtypesCore.h:91
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
#define BIT(n)
Definition Rtypes.h:85
EMWMHints
Definition TGFrame.h:55
@ kMWMDecorResizeH
Definition TGFrame.h:73
@ kMWMFuncAll
Definition TGFrame.h:57
@ kMWMInputPrimaryApplicationModal
Definition TGFrame.h:66
@ kMWMInputSystemModal
Definition TGFrame.h:67
@ kMWMFuncMove
Definition TGFrame.h:59
@ kMWMDecorBorder
Definition TGFrame.h:72
@ kMWMFuncResize
Definition TGFrame.h:58
@ kMWMDecorMaximize
Definition TGFrame.h:77
@ kMWMDecorTitle
Definition TGFrame.h:74
@ kMWMDecorMinimize
Definition TGFrame.h:76
@ kMWMDecorMenu
Definition TGFrame.h:75
@ kMWMDecorAll
Definition TGFrame.h:71
@ kMWMInputFullApplicationModal
Definition TGFrame.h:68
@ kMWMFuncMaximize
Definition TGFrame.h:61
@ kMWMInputModeless
Definition TGFrame.h:65
@ kMWMFuncClose
Definition TGFrame.h:62
@ kMWMFuncMinimize
Definition TGFrame.h:60
EFrameCleanup
Definition TGFrame.h:47
@ kNoCleanup
Definition TGFrame.h:48
@ kLocalCleanup
Definition TGFrame.h:49
@ kDeepCleanup
Definition TGFrame.h:50
EFrameState
Definition TGFrame.h:40
@ kIsArranged
Definition TGFrame.h:43
@ kIsVisible
Definition TGFrame.h:41
@ kIsMapped
Definition TGFrame.h:42
EDNDFlags
Definition TGFrame.h:82
@ kIsDNDTarget
Definition TGFrame.h:84
@ kIsDNDSource
Definition TGFrame.h:83
char name[80]
Definition TGX11.cxx:110
int type
Definition TGX11.cxx:121
const TGResourcePool * GetResourcePool() const
Definition TGClient.h:133
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
Definition TGFrame.cxx:1079
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
Definition TGFrame.cxx:1350
TGLayoutManager * fLayoutManager
Definition TGFrame.h:327
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
Definition TGFrame.cxx:997
virtual void SetMapSubwindows(Bool_t on)
Definition TGFrame.h:399
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
Definition TGFrame.cxx:1273
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition TGFrame.cxx:985
virtual Bool_t HandleDragMotion(TGFrame *)
Handle drag motion event.
Definition TGFrame.cxx:1398
virtual TList * GetList() const
Definition TGFrame.h:346
virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo)
Handle drop event.
Definition TGFrame.cxx:1406
virtual Bool_t HandleCrossing(Event_t *)
Definition TGFrame.h:362
virtual Bool_t HandleButton(Event_t *)
Definition TGFrame.h:360
Bool_t IsComposite() const
Definition TGFrame.h:389
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1203
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
Definition TGFrame.cxx:1293
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1102
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:348
virtual TGLayoutManager * GetLayoutManager() const
Definition TGFrame.h:374
virtual Bool_t HandleSelection(Event_t *)
Definition TGFrame.h:366
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
Definition TGFrame.cxx:933
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:952
virtual void Layout()
Layout the elements of the composite frame.
Definition TGFrame.cxx:1242
virtual Bool_t IsLayoutBroken() const
Definition TGFrame.h:393
Int_t fMustCleanup
Definition TGFrame.h:330
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxilary protected method used to save subframes.
Definition TGFrame.cxx:2626
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:1028
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1057
Bool_t IsVisible(TGFrameElement *ptr) const
Definition TGFrame.h:386
virtual Bool_t IsMapSubwindows() const
Definition TGFrame.h:400
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition TGFrame.h:352
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
Definition TGFrame.cxx:1317
virtual Int_t MustCleanup() const
Definition TGFrame.h:397
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1149
Bool_t fLayoutBroken
Definition TGFrame.h:329
Bool_t fMapSubwindows
Definition TGFrame.h:331
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition TGFrame.cxx:1189
TList * fList
Definition TGFrame.h:328
Bool_t IsArranged(TGFrameElement *ptr) const
Definition TGFrame.h:388
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:350
virtual Bool_t HandleFocusChange(Event_t *)
Definition TGFrame.h:365
virtual ~TGCompositeFrame()
Delete a composite frame.
Definition TGFrame.cxx:889
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition TGFrame.cxx:1007
virtual Bool_t HandleDoubleClick(Event_t *)
Definition TGFrame.h:361
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a composite frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:2728
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1229
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Definition TGFrame.h:372
virtual Bool_t HandleMotion(Event_t *)
Definition TGFrame.h:363
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition TGFrame.cxx:1134
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
Definition TGFrame.cxx:912
static TGLayoutHints * fgDefaultHints
Definition TGFrame.h:333
virtual void Print(Option_t *option="") const
Print all frames in this composite frame.
Definition TGFrame.cxx:1251
virtual void RemoveAll()
Remove all frames from composite frame.
Definition TGFrame.cxx:1116
virtual Bool_t HandleDragLeave(TGFrame *)
Handle drag leave event.
Definition TGFrame.cxx:1380
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition TGFrame.cxx:1175
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1216
TGCompositeFrame & operator=(const TGCompositeFrame &)=delete
virtual Bool_t HandleKey(Event_t *)
Definition TGFrame.h:364
UInt_t fHeight
Definition TGDimension.h:30
UInt_t fWidth
Definition TGDimension.h:29
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:306
virtual Atom_t HandleDNDEnter(Atom_t *)
Definition TGFrame.h:303
virtual void SetSize(const TGDimension &s)
Definition TGFrame.h:276
virtual void DrawCopy(Handle_t, Int_t, Int_t)
Definition TGFrame.h:233
virtual Bool_t HandleSelectionClear(Event_t *)
Definition TGFrame.h:194
virtual void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
Definition TGFrame.h:286
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition TGFrame.cxx:569
virtual void Dump() const
Dump contents of object on stdout.
Definition TGFrame.h:287
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
Definition TGFrame.cxx:681
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition TGFrame.cxx:324
static const TGGC * fgWhiteGC
Definition TGFrame.h:130
virtual Int_t GetDragType() const
Returns drag source type.
Definition TGFrame.cxx:809
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
Definition TGFrame.cxx:826
virtual Bool_t IsLayoutBroken() const
Definition TGFrame.h:240
virtual void DoRedraw()
Redraw the frame.
Definition TGFrame.cxx:415
static const TGGC & GetBlackGC()
Get black graphics context.
Definition TGFrame.cxx:720
static Pixel_t GetBlackPixel()
Get black pixel value.
Definition TGFrame.cxx:707
UInt_t fOptions
Definition TGFrame.h:118
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
Definition TGFrame.cxx:428
Int_t fX
Definition TGFrame.h:109
virtual Bool_t HandleDoubleClick(Event_t *)
Definition TGFrame.h:186
UInt_t fMinHeight
Definition TGFrame.h:114
virtual Atom_t HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
Definition TGFrame.h:301
Int_t GetBorderWidth() const
Definition TGFrame.h:257
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
Definition TGFrame.cxx:333
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition TGFrame.h:226
virtual Bool_t HandleDragEnter(TGFrame *)
Definition TGFrame.h:196
virtual Bool_t HandleDragLeave(TGFrame *)
Definition TGFrame.h:197
UInt_t GetEventMask() const
Definition TGFrame.h:179
@ kDeleteWindowCalled
Definition TGFrame.h:107
virtual Bool_t HandleDNDDrop(TDNDData *)
Definition TGFrame.h:300
virtual void SetX(Int_t x)
Definition TGFrame.h:268
UInt_t GetMinWidth() const
Definition TGFrame.h:250
virtual void SetForegroundColor(Pixel_t)
Definition TGFrame.h:220
virtual Bool_t IsActive() const
Definition TGFrame.h:235
static Bool_t fgInit
Definition TGFrame.h:124
virtual void MapRaised()
map raised
Definition TGFrame.h:229
virtual Bool_t HandleKey(Event_t *)
Definition TGFrame.h:189
TGFrame(const TGFrame &)=delete
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition TGFrame.cxx:694
virtual void SetMinWidth(UInt_t w)
Definition TGFrame.h:272
UInt_t fHeight
Definition TGFrame.h:112
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:214
static Int_t fgDby
Definition TGFrame.h:136
virtual Bool_t HandleColormapChange(Event_t *)
Definition TGFrame.h:195
virtual void ReallyDelete()
Definition TGFrame.h:177
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:215
virtual void SetDropType(Int_t type)
SetDropType.
Definition TGFrame.cxx:801
virtual void SetDragType(Int_t type)
SetDragType.
Definition TGFrame.cxx:794
UInt_t GetMaxHeight() const
Definition TGFrame.h:253
virtual void DrawBorder()
Draw frame border.
Definition TGFrame.cxx:406
virtual void Print(Option_t *option="") const
Print window id.
Definition TGFrame.cxx:778
static const TGGC * fgBckgndGC
Definition TGFrame.h:133
virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw 3D rectangle on the frame border.
Definition TGFrame.cxx:342
Int_t fBorderWidth
Definition TGFrame.h:117
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3192
static const TGGC * fgShadowGC
Definition TGFrame.h:132
TGDimension GetSize() const
Definition TGFrame.h:254
static Pixel_t fgDefaultSelectedBackground
Definition TGFrame.h:126
UInt_t fMinWidth
Definition TGFrame.h:113
virtual void Activate(Bool_t)
Definition TGFrame.h:234
virtual ~TGFrame()
Destructor.
Definition TGFrame.cxx:251
virtual Pixel_t GetForeground() const
Return frame foreground color.
Definition TGFrame.cxx:288
TGFrameElement * GetFrameElement() const
Definition TGFrame.h:259
Bool_t IsDNDTarget() const
Definition TGFrame.h:297
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition TGFrame.cxx:740
virtual void SetLayoutBroken(Bool_t=kTRUE)
Definition TGFrame.h:239
virtual Bool_t HandleDragMotion(TGFrame *)
Definition TGFrame.h:198
virtual Bool_t HandleDNDFinished()
Definition TGFrame.h:305
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition TGFrame.cxx:297
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition TGFrame.cxx:630
static UInt_t fgLastButton
Definition TGFrame.h:135
TGFrameElement * fFE
Definition TGFrame.h:122
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:668
virtual Int_t GetDropType() const
Returns drop target type.
Definition TGFrame.cxx:818
Int_t fDNDState
Definition TGFrame.h:121
virtual void SetMaxHeight(UInt_t h)
Definition TGFrame.h:275
static Time_t GetLastClick()
Get time of last mouse click.
Definition TGFrame.cxx:770
virtual TObject * DrawClone(Option_t *="") const
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad...
Definition TGFrame.h:285
static const TGGC * fgBlackGC
Definition TGFrame.h:129
Int_t GetX() const
Definition TGFrame.h:255
static Int_t fgDbx
Definition TGFrame.h:136
static UInt_t fgUserColor
Definition TGFrame.h:138
virtual void DeleteWindow()
Delete window.
Definition TGFrame.cxx:261
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Definition TGFrame.h:264
virtual void Delete(Option_t *="")
Delete this object.
Definition TGFrame.h:284
virtual UInt_t GetOptions() const
Definition TGFrame.h:221
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition TGFrame.cxx:2465
void SetDNDSource(Bool_t onoff)
Definition TGFrame.h:292
static Time_t fgLastClick
Definition TGFrame.h:134
Int_t fY
Definition TGFrame.h:110
virtual Bool_t HandleFocusChange(Event_t *)
Definition TGFrame.h:190
virtual Bool_t IsComposite() const
Definition TGFrame.h:236
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition TGFrame.cxx:278
virtual void SetDrawOption(Option_t *="")
Set drawing option for object.
Definition TGFrame.h:289
UInt_t fMaxWidth
Definition TGFrame.h:115
UInt_t GetMaxWidth() const
Definition TGFrame.h:252
virtual void ProcessedConfigure(Event_t *event)
Definition TGFrame.h:201
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition TGFrame.cxx:750
virtual void SetMaxWidth(UInt_t w)
Definition TGFrame.h:274
const TGResourcePool * GetResourcePool() const
Definition TGFrame.h:147
virtual Bool_t HandleDNDLeave()
Definition TGFrame.h:304
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition TGFrame.cxx:578
virtual TDNDData * GetDNDData(Atom_t)
Definition TGFrame.h:299
virtual Bool_t HandleSelectionRequest(Event_t *)
Definition TGFrame.h:193
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:590
virtual Bool_t HandleSelection(Event_t *)
Definition TGFrame.h:192
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Definition TGFrame.h:207
UInt_t fWidth
Definition TGFrame.h:111
virtual Bool_t HandleButton(Event_t *)
Definition TGFrame.h:185
UInt_t GetMinHeight() const
Definition TGFrame.h:251
virtual Bool_t HandleMotion(Event_t *)
Definition TGFrame.h:188
virtual void SetEditable(Bool_t)
Definition TGFrame.h:238
void SetFrameElement(TGFrameElement *fe)
Definition TGFrame.h:260
UInt_t GetHeight() const
Definition TGFrame.h:249
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition TGFrame.h:241
virtual Bool_t IsEditable() const
Definition TGFrame.h:237
virtual void * GetSender()
Definition TGFrame.h:142
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
Definition TGFrame.cxx:654
virtual void SetMinHeight(UInt_t h)
Definition TGFrame.h:273
Bool_t IsDNDSource() const
Definition TGFrame.h:296
Int_t GetY() const
Definition TGFrame.h:256
virtual void Layout()
Definition TGFrame.h:223
virtual Pixel_t GetBackground() const
Definition TGFrame.h:216
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition TGFrame.cxx:614
UInt_t fEventMask
Definition TGFrame.h:120
UInt_t fMaxHeight
Definition TGFrame.h:116
virtual void SetWidth(UInt_t w)
Definition TGFrame.h:270
void SetDNDTarget(Bool_t onoff)
Definition TGFrame.h:294
virtual Bool_t HandleCrossing(Event_t *)
Definition TGFrame.h:187
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
Definition TGFrame.h:288
virtual void ProcessedEvent(Event_t *event)
Definition TGFrame.h:203
static Window_t fgDbw
Definition TGFrame.h:137
virtual Bool_t HandleEvent(Event_t *event)
Handle all frame events.
Definition TGFrame.cxx:442
Bool_t Contains(Int_t x, Int_t y) const
Definition TGFrame.h:262
virtual void SetY(Int_t y)
Definition TGFrame.h:269
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
Definition TGFrame.h:199
virtual void MapWindow()
map window
Definition TGFrame.h:228
static const TGGC & GetWhiteGC()
Get white graphics context.
Definition TGFrame.cxx:730
static Pixel_t fgWhitePixel
Definition TGFrame.h:127
UInt_t GetWidth() const
Definition TGFrame.h:248
virtual void MapSubwindows()
map sub windows
Definition TGFrame.h:224
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition TGFrame.cxx:2438
virtual void SetHeight(UInt_t h)
Definition TGFrame.h:271
Pixel_t fBackground
Definition TGFrame.h:119
TGFrame & operator=(const TGFrame &)=delete
static Pixel_t fgBlackPixel
Definition TGFrame.h:128
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition TGFrame.cxx:760
static const TGGC * fgHilightGC
Definition TGFrame.h:131
virtual void UnmapWindow()
unmap window
Definition TGFrame.h:230
static Pixel_t fgDefaultFrameBackground
Definition TGFrame.h:125
Definition TGGC.h:31
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a group frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3216
TGString * fText
Definition TGFrame.h:589
Bool_t fHasOwnFont
Definition TGFrame.h:593
TGGroupFrame & operator=(const TGGroupFrame &)=delete
FontStruct_t GetFontStruct() const
Definition TGFrame.h:633
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Definition TGFrame.cxx:2306
virtual ~TGGroupFrame()
Delete a group frame.
Definition TGFrame.cxx:2077
static const TGGC * fgDefaultGC
Definition TGFrame.h:598
TGGroupFrame(const TGGroupFrame &)=delete
GContext_t GetNormGC() const
Definition TGFrame.h:632
virtual void DoRedraw()
Redraw the group frame.
Definition TGFrame.cxx:2104
Int_t fTitlePos
Definition TGFrame.h:592
static const TGFont * fgDefaultFont
Definition TGFrame.h:597
virtual const char * GetTitle() const
Returns title of object.
Definition TGFrame.h:635
virtual TGDimension GetDefaultSize() const
Returns default size.
Definition TGFrame.cxx:2090
virtual void SetTitlePos(ETitlePos pos=kLeft)
Definition TGFrame.h:628
virtual void DrawBorder()
Draw border of around the group frame.
Definition TGFrame.cxx:2185
virtual void Rename(const char *title)
Definition TGFrame.h:626
FontStruct_t fFontStruct
Definition TGFrame.h:590
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
Definition TGFrame.cxx:2161
GContext_t fNormGC
Definition TGFrame.h:591
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition TGFrame.cxx:2296
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
Definition TGFrame.cxx:2174
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Definition TGFrame.cxx:2116
Int_t GetTitlePos() const
Definition TGFrame.h:627
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
Definition TGFrame.cxx:2267
Int_t fLastButton
Definition TGFrame.h:664
void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader)
Set columns information in the header frame.
Definition TGFrame.cxx:2338
TGVFileSplitter ** fSplitHeader
Definition TGFrame.h:660
Bool_t fOverSplitter
Definition TGFrame.h:662
TGHeaderFrame(const TGHeaderFrame &)=delete
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in header frame.
Definition TGFrame.cxx:2349
TGTextButton ** fColHeader
Definition TGFrame.h:659
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in header frame.
Definition TGFrame.cxx:2408
Cursor_t fSplitCursor
Definition TGFrame.h:661
Int_t fNColumns
Definition TGFrame.h:658
TGHeaderFrame & operator=(const TGHeaderFrame &)=delete
Int_t fOverButton
Definition TGFrame.h:663
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event in header frame.
Definition TGFrame.cxx:2381
TGHorizontalFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition TGFrame.h:424
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a horizontal frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3106
virtual TGDimension GetDefaultSize() const =0
TGMapKey & operator=(const TGMapKey &)
TGMapKey(UInt_t keycode, TGWindow *w)
Definition TGFrame.h:456
TGWindow * fWindow
Definition TGFrame.h:455
TGMapKey(const TGMapKey &)
void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax, UInt_t &winc, UInt_t &hinc) const
Definition TGFrame.h:530
TGMainFrame(const TGMainFrame &)=delete
UInt_t fWMWidthInc
Definition TGFrame.h:477
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
Definition TGFrame.cxx:1676
UInt_t fWMHeightInc
Definition TGFrame.h:478
virtual Bool_t SaveFrameAsCodeOrImage()
Opens dialog window allowing user to save the frame contents as a ROOT macro or as an image.
Definition TGFrame.cxx:1506
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
Definition TGFrame.cxx:2776
virtual Bool_t HandleClientMessage(Event_t *event)
Handle client messages sent to this frame.
Definition TGFrame.cxx:1688
TList * GetBindList() const
Definition TGFrame.h:519
TString GetMWMfuncString() const
Returns MWM function hints as a string - used in SavePrimitive().
Definition TGFrame.cxx:2571
const char * GetIconName() const
Returns mime type name of object.
Definition TGFrame.h:522
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Definition TGFrame.cxx:1741
UInt_t fWMWidth
Definition TGFrame.h:471
UInt_t fWMMinHeight
Definition TGFrame.h:474
void GetWMPosition(Int_t &x, Int_t &y) const
Definition TGFrame.h:528
Int_t fWMY
Definition TGFrame.h:470
EInitialState GetWMState() const
Definition TGFrame.h:534
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
Definition TGFrame.cxx:1640
UInt_t fWMMinWidth
Definition TGFrame.h:473
TString fResourceName
Definition TGFrame.h:465
UInt_t fMWMValue
Definition TGFrame.h:466
void GetWMSize(UInt_t &w, UInt_t &h) const
Definition TGFrame.h:529
Atom_t * fDNDTypeList
Definition TGFrame.h:459
virtual void SendCloseMessage()
Send close message to self.
Definition TGFrame.cxx:1705
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
Definition TGFrame.h:526
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition TGFrame.cxx:1817
Int_t fWMX
Definition TGFrame.h:469
virtual void CloseWindow()
Close and delete main frame.
Definition TGFrame.cxx:1731
TString fIconPixmap
Definition TGFrame.h:463
UInt_t fWMMaxWidth
Definition TGFrame.h:475
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a main frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3054
TString fWindowName
Definition TGFrame.h:461
virtual Bool_t HandleSelection(Event_t *event)
Handle primary selection event.
Definition TGFrame.cxx:1664
UInt_t fWMHeight
Definition TGFrame.h:472
@ kDontCallClose
Definition TGFrame.h:446
TList * fBindList
Definition TGFrame.h:460
virtual ~TGMainFrame()
TGMainFrame destructor.
Definition TGFrame.cxx:1490
UInt_t fWMMaxHeight
Definition TGFrame.h:476
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
Definition TGFrame.cxx:1883
TGMainFrame & operator=(const TGMainFrame &)=delete
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
Definition TGFrame.cxx:1598
UInt_t fMWMFuncs
Definition TGFrame.h:467
EInitialState fWMInitState
Definition TGFrame.h:479
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition TGFrame.cxx:1762
TString GetMWMinpString() const
Returns MWM input mode hints as a string - used in SavePrimitive().
Definition TGFrame.cxx:2608
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
Definition TGFrame.cxx:1567
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition TGFrame.cxx:1852
TString fClassName
Definition TGFrame.h:464
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition TGFrame.cxx:1840
TString fIconName
Definition TGFrame.h:462
TString GetMWMvalueString() const
Returns MWM decoration hints as a string - used in SavePrimitive().
Definition TGFrame.cxx:2531
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition TGFrame.cxx:1827
const char * GetWindowName() const
Definition TGFrame.h:521
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
Definition TGFrame.cxx:1865
const char * GetIconPixmap() const
Definition TGFrame.h:523
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
Definition TGFrame.cxx:1652
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
Definition TGFrame.cxx:1621
void GetClassHints(const char *&className, const char *&resourceName) const
Definition TGFrame.h:524
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1749
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
Definition TGFrame.cxx:1777
UInt_t fMWMInput
Definition TGFrame.h:468
TGClient * fClient
Definition TGObject.h:37
const char * GetString() const
Definition TGString.h:40
TGTransientFrame & operator=(const TGTransientFrame &)=delete
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a transient frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3569
const TGWindow * GetMain() const
Definition TGFrame.h:568
TGTransientFrame(const TGTransientFrame &)=delete
virtual void SaveSource(const char *filename="Rootdlog.C", Option_t *option="")
Save the GUI tranzient frame widget in a C++ macro file.
Definition TGFrame.cxx:3295
const TGWindow * fMain
Definition TGFrame.h:555
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition TGFrame.cxx:1916
TGVerticalFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition TGFrame.h:413
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a vertical frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3149
virtual void SetWindowName(const char *name=0)
Set window name.
Definition TGWindow.cxx:128
virtual void MapRaised()
map raised
Definition TGWindow.cxx:175
virtual void MapWindow()
map window
Definition TGWindow.cxx:159
virtual void UnmapWindow()
unmap window
Definition TGWindow.cxx:183
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition TGWindow.cxx:256
A doubly linked list.
Definition TList.h:44
Mother of all ROOT objects.
Definition TObject.h:37
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition TQObject.h:48
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
int main()
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Event structure.
Definition GuiTypes.h:174
auto * l
Definition textangle.C:4