Logo ROOT   6.16/01
Reference Guide
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-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_TGFrame
13#define ROOT_TGFrame
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TGFrame, TGCompositeFrame, TGVerticalFrame, TGHorizontalFrame, //
19// TGMainFrame, TGTransientFrame and TGGroupFrame //
20// //
21// This header contains all different Frame classes. //
22// //
23//////////////////////////////////////////////////////////////////////////
24
25#include "TGWindow.h"
26#include "TQObject.h"
27#include "TGDimension.h"
28#include "TGGC.h"
29#include "TGFont.h"
30#include "TGLayout.h"
31#include "TGString.h"
32#include "TList.h"
33
34class TGResourcePool;
35class TGTextButton;
36class TGVFileSplitter;
37class TDNDData;
38
39//---- frame states
40
44 kIsArranged = BIT(1)
45};
46
47//---- frame cleanup
51 kDeepCleanup = -1
52};
53
54//---- types of frames (and borders)
55
73 kMdiFrame = BIT(14)
74};
75
76//---- MWM hints stuff
77
79 // functions
86
87 // input mode
92
93 // decorations
102
103//---- drag and drop
104
107 kIsDNDTarget = BIT(1)
109
110
111
112//////////////////////////////////////////////////////////////////////////
113// //
114// TGFrame //
115// //
116// This class subclasses TGWindow, used as base class for some simple //
117// widgets (buttons, labels, etc.). //
118// It provides: //
119// - position & dimension fields //
120// - an 'options' attribute (see constant above) //
121// - a generic event handler //
122// - a generic layout mechanism //
123// - a generic border //
124// //
125//////////////////////////////////////////////////////////////////////////
126
127class TGFrame : public TGWindow, public TQObject {
128
129protected:
130 enum { kDeleteWindowCalled = BIT(15) };
131
132 Int_t fX; // frame x position
133 Int_t fY; // frame y position
134 UInt_t fWidth; // frame width
135 UInt_t fHeight; // frame height
136 UInt_t fMinWidth; // minimal frame width
137 UInt_t fMinHeight; // minimal frame height
138 UInt_t fMaxWidth; // maximal frame width
139 UInt_t fMaxHeight; // maximal frame height
140 Int_t fBorderWidth; // frame border width
141 UInt_t fOptions; // frame options
142 Pixel_t fBackground; // frame background color
143 UInt_t fEventMask; // currenty active event mask
144 Int_t fDNDState; // EDNDFlags
145 TGFrameElement *fFE; // pointer to frame element
146
152 static const TGGC *fgBlackGC;
153 static const TGGC *fgWhiteGC;
154 static const TGGC *fgHilightGC;
155 static const TGGC *fgShadowGC;
156 static const TGGC *fgBckgndGC;
162
163 static Time_t GetLastClick();
164
165 virtual void *GetSender() { return this; } //used to set gTQSender
166 virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
167 UInt_t w, UInt_t h);
168 virtual void DoRedraw();
169
171 { return fClient->GetResourcePool(); }
172
173 TString GetOptionString() const; //used in SavePrimitive()
174
175 // some protected methods use in gui builder
176 virtual void StartGuiBuilding(Bool_t on = kTRUE);
177
178private:
179 TGFrame(const TGFrame&); // not implemented
180 TGFrame& operator=(const TGFrame&); // not implemented
181
182public:
183 // Default colors and graphics contexts
186 static Pixel_t GetWhitePixel();
187 static Pixel_t GetBlackPixel();
188 static const TGGC &GetBlackGC();
189 static const TGGC &GetWhiteGC();
190 static const TGGC &GetHilightGC();
191 static const TGGC &GetShadowGC();
192 static const TGGC &GetBckgndGC();
193
194 TGFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
195 UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground());
196 TGFrame(TGClient *c, Window_t id, const TGWindow *parent = 0);
197 virtual ~TGFrame();
198
199 virtual void DeleteWindow();
200 virtual void ReallyDelete() { delete this; }
201
202 UInt_t GetEventMask() const { return fEventMask; }
203 void AddInput(UInt_t emask);
204 void RemoveInput(UInt_t emask);
205
206 virtual Bool_t HandleEvent(Event_t *event);
207 virtual Bool_t HandleConfigureNotify(Event_t *event);
208 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
209 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
210 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
211 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
212 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
213 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
214 virtual Bool_t HandleClientMessage(Event_t *event);
215 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
219 virtual Bool_t HandleDragEnter(TGFrame *) { return kFALSE; }
220 virtual Bool_t HandleDragLeave(TGFrame *) { return kFALSE; }
221 virtual Bool_t HandleDragMotion(TGFrame *) { return kFALSE; }
223 { return kFALSE; }
224 virtual void ProcessedConfigure(Event_t *event)
225 { Emit("ProcessedConfigure(Event_t*)", (Long_t)event); } //*SIGNAL*
226 virtual void ProcessedEvent(Event_t *event)
227 { Emit("ProcessedEvent(Event_t*)", (Long_t)event); } //*SIGNAL*
228
229 virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2);
231
232 virtual TGDimension GetDefaultSize() const ;
233 virtual void Move(Int_t x, Int_t y);
234 virtual void Resize(UInt_t w = 0, UInt_t h = 0);
235 virtual void Resize(TGDimension size);
236 virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
237 virtual UInt_t GetDefaultWidth() const { return GetDefaultSize().fWidth; }
238 virtual UInt_t GetDefaultHeight() const { return GetDefaultSize().fHeight; }
239 virtual Pixel_t GetBackground() const { return fBackground; }
240 virtual void ChangeBackground(Pixel_t back);
241 virtual void SetBackgroundColor(Pixel_t back);
242 virtual Pixel_t GetForeground() const;
243 virtual void SetForegroundColor(Pixel_t /*fore*/) { }
244 virtual UInt_t GetOptions() const { return fOptions; }
245 virtual void ChangeOptions(UInt_t options);
246 virtual void Layout() { }
247 virtual void MapSubwindows() { } // Simple frames do not have subwindows
248 // Redefine this in TGCompositeFrame!
249 virtual void ReparentWindow(const TGWindow *p, Int_t x = 0, Int_t y = 0)
250 { TGWindow::ReparentWindow(p, x, y); Move(x, y); }
251 virtual void MapWindow() { TGWindow::MapWindow(); if (fFE) fFE->fState |= kIsVisible; }
252 virtual void MapRaised() { TGWindow::MapRaised(); if (fFE) fFE->fState |= kIsVisible; }
253 virtual void UnmapWindow() { TGWindow::UnmapWindow(); if (fFE) fFE->fState &= ~kIsVisible; }
254
255 virtual void DrawBorder();
256 virtual void DrawCopy(Handle_t /*id*/, Int_t /*x*/, Int_t /*y*/) { }
257 virtual void Activate(Bool_t) { }
258 virtual Bool_t IsActive() const { return kFALSE; }
259 virtual Bool_t IsComposite() const { return kFALSE; }
260 virtual Bool_t IsEditable() const { return kFALSE; }
261 virtual void SetEditable(Bool_t) {}
262 virtual void SetLayoutBroken(Bool_t = kTRUE) {}
263 virtual Bool_t IsLayoutBroken() const { return kFALSE; }
264 virtual void SetCleanup(Int_t = kLocalCleanup) { /* backward compatebility */ }
265
266 virtual void SetDragType(Int_t type);
267 virtual void SetDropType(Int_t type);
268 virtual Int_t GetDragType() const;
269 virtual Int_t GetDropType() const;
270
271 UInt_t GetWidth() const { return fWidth; }
272 UInt_t GetHeight() const { return fHeight; }
273 UInt_t GetMinWidth() const { return fMinWidth; }
274 UInt_t GetMinHeight() const { return fMinHeight; }
275 UInt_t GetMaxWidth() const { return fMaxWidth; }
276 UInt_t GetMaxHeight() const { return fMaxHeight; }
278 Int_t GetX() const { return fX; }
279 Int_t GetY() const { return fY; }
281
282 TGFrameElement *GetFrameElement() const { return fFE; }
284
286 { return ((x >= 0) && (x < (Int_t)fWidth) && (y >= 0) && (y < (Int_t)fHeight)); }
288 { return (Contains(x, y) ? this : 0); }
289
290 // Modifiers (without graphic update)
291 virtual void SetX(Int_t x) { fX = x; }
292 virtual void SetY(Int_t y) { fY = y; }
293 virtual void SetWidth(UInt_t w) { fWidth = w; }
294 virtual void SetHeight(UInt_t h) { fHeight = h; }
295 virtual void SetMinWidth(UInt_t w) { fMinWidth = w; }
296 virtual void SetMinHeight(UInt_t h) { fMinHeight = h; }
297 virtual void SetMaxWidth(UInt_t w) { fMaxWidth = w; }
298 virtual void SetMaxHeight(UInt_t h) { fMaxHeight = h; }
299 virtual void SetSize(const TGDimension &s) { fWidth = s.fWidth; fHeight = s.fHeight; }
300
301 // Printing and saving
302 virtual void Print(Option_t *option="") const;
303 void SaveUserColor(std::ostream &out, Option_t *);
304 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
305
306 // dummy to remove from context menu
307 virtual void Delete(Option_t * /*option*/ ="") { }
308 virtual TObject *DrawClone(Option_t * /*option */="") const { return 0; }
309 virtual void DrawClass() const { }
310 virtual void Dump() const { }
311 virtual void Inspect() const { }
312 virtual void SetDrawOption(Option_t * /*option*/="") { }
313
314 // drag and drop...
316 { if (onoff) fDNDState |= kIsDNDSource; else fDNDState &= ~kIsDNDSource; }
318 { if (onoff) fDNDState |= kIsDNDTarget; else fDNDState &= ~kIsDNDTarget; }
321
322 virtual TDNDData *GetDNDData(Atom_t /*dataType*/) { return 0; }
323 virtual Bool_t HandleDNDDrop(TDNDData * /*DNDData*/) { return kFALSE; }
324 virtual Atom_t HandleDNDPosition(Int_t /*x*/, Int_t /*y*/, Atom_t /*action*/,
325 Int_t /*xroot*/, Int_t /*yroot*/) { return kNone; }
326 virtual Atom_t HandleDNDEnter(Atom_t * /*typelist*/) { return kNone; }
327 virtual Bool_t HandleDNDLeave() { return kFALSE; }
328 virtual Bool_t HandleDNDFinished() { return kFALSE; }
329
330 ClassDef(TGFrame,0) // Base class for simple widgets (button, etc.)
331};
332
333//////////////////////////////////////////////////////////////////////////
334// //
335// TGCompositeFrame //
336// //
337// This class is the base class for composite widgets //
338// (menu bars, list boxes, etc.). //
339// //
340// It provides: //
341// - a layout manager //
342// - a frame container (TList *) //
343// //
344//////////////////////////////////////////////////////////////////////////
345
346class TGCompositeFrame : public TGFrame {
347
348
349protected:
350 TGLayoutManager *fLayoutManager; // layout manager
351 TList *fList; // container of frame elements
352 Bool_t fLayoutBroken; // no layout manager is used
353 Int_t fMustCleanup; // cleanup mode (see EFrameCleanup)
354 Bool_t fMapSubwindows; // kTRUE - map subwindows
355
356 static TGLayoutHints *fgDefaultHints; // default hints used by AddFrame()
357
358private:
359 TGCompositeFrame(const TGCompositeFrame&); // not implemented
360 TGCompositeFrame& operator=(const TGCompositeFrame&); // not implemented
361
362public:
363 TGCompositeFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
364 UInt_t options = 0,
366 TGCompositeFrame(TGClient *c, Window_t id, const TGWindow *parent = 0);
367 virtual ~TGCompositeFrame();
368
369 virtual TList *GetList() const { return fList; }
370
371 virtual UInt_t GetDefaultWidth() const
372 { return GetDefaultSize().fWidth; }
373 virtual UInt_t GetDefaultHeight() const
374 { return GetDefaultSize().fHeight; }
376 { return (IsLayoutBroken() ? TGDimension(fWidth, fHeight) :
380 Int_t &fx, Int_t &fy);
381 virtual void MapSubwindows();
382 virtual void Layout();
383 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
384 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
385 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
386 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
387 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
388 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
389 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
390 virtual Bool_t HandleDragEnter(TGFrame *);
391 virtual Bool_t HandleDragLeave(TGFrame *);
393 virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo);
394 virtual void ChangeOptions(UInt_t options);
396
398 virtual void SetLayoutManager(TGLayoutManager *l);
399
400 virtual TGFrameElement* FindFrameElement(TGFrame *f) const;
401
402 virtual void AddFrame(TGFrame *f, TGLayoutHints *l = 0);
403 virtual void RemoveAll();
404 virtual void RemoveFrame(TGFrame *f);
405 virtual void ShowFrame(TGFrame *f);
406 virtual void HideFrame(TGFrame *f);
407 Int_t GetState(TGFrame *f) const;
408 Bool_t IsVisible(TGFrame *f) const;
409 Bool_t IsVisible(TGFrameElement *ptr) const { return (ptr->fState & kIsVisible); }
410 Bool_t IsArranged(TGFrame *f) const;
411 Bool_t IsArranged(TGFrameElement *ptr) const { return (ptr->fState & kIsArranged); }
412 Bool_t IsComposite() const { return kTRUE; }
413 virtual Bool_t IsEditable() const;
414 virtual void SetEditable(Bool_t on = kTRUE);
415 virtual void SetLayoutBroken(Bool_t on = kTRUE);
416 virtual Bool_t IsLayoutBroken() const
417 { return fLayoutBroken || !fLayoutManager; }
418 virtual void SetEditDisabled(UInt_t on = 1);
419 virtual void SetCleanup(Int_t mode = kLocalCleanup);
420 virtual Int_t MustCleanup() const { return fMustCleanup; }
421 virtual void Cleanup();
422 virtual void SetMapSubwindows(Bool_t on) { fMapSubwindows = on; }
423 virtual Bool_t IsMapSubwindows() const { return fMapSubwindows; }
424
425 virtual void Print(Option_t *option="") const;
426 virtual void ChangeSubframesBackground(Pixel_t back);
427 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
428 virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option = "");
429
430 ClassDef(TGCompositeFrame,0) // Base class for composite widgets (menubars, etc.)
431};
432
433
435public:
436 TGVerticalFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
437 UInt_t options = kChildFrame,
439 TGCompositeFrame(p, w, h, options | kVerticalFrame, back) { SetWindowName(); }
440 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
441
442 ClassDef(TGVerticalFrame,0) // Composite frame with vertical child layout
443};
444
446public:
447 TGHorizontalFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
448 UInt_t options = kChildFrame,
450 TGCompositeFrame(p, w, h, options | kHorizontalFrame, back) { SetWindowName(); }
451 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
452
453 ClassDef(TGHorizontalFrame,0) // Composite frame with horizontal child layout
454};
455
456
457//////////////////////////////////////////////////////////////////////////
458// //
459// TGMainFrame //
460// //
461// This class defines top level windows that interact with the system //
462// Window Manager (WM or MWM for Motif Window Manager). //
463// //
464//////////////////////////////////////////////////////////////////////////
465
467
468protected:
469 enum { kDontCallClose = BIT(14) };
470
471 // mapping between key and window
472 class TGMapKey : public TObject {
473 private:
476 public:
479 TGMapKey(UInt_t keycode, TGWindow *w): fKeyCode(keycode), fWindow(w) { }
480 };
481
482 Atom_t *fDNDTypeList; // handles DND types
483 TList *fBindList; // list with key bindings
484 TString fWindowName; // window name
485 TString fIconName; // icon name
486 TString fIconPixmap; // icon pixmap name
487 TString fClassName; // WM class name
488 TString fResourceName; // WM resource name
489 UInt_t fMWMValue; // MWM decoration hints
490 UInt_t fMWMFuncs; // MWM functions
491 UInt_t fMWMInput; // MWM input modes
492 Int_t fWMX; // WM x position
493 Int_t fWMY; // WM y position
494 UInt_t fWMWidth; // WM width
495 UInt_t fWMHeight; // WM height
496 UInt_t fWMMinWidth; // WM min width
497 UInt_t fWMMinHeight; // WM min height
498 UInt_t fWMMaxWidth; // WM max width
499 UInt_t fWMMaxHeight; // WM max height
500 UInt_t fWMWidthInc; // WM width increments
501 UInt_t fWMHeightInc; // WM height increments
502 EInitialState fWMInitState; // WM initial state
503
504 TString GetMWMvalueString() const; //used in SaveSource()
505 TString GetMWMfuncString() const; //used in SaveSource()
506 TString GetMWMinpString() const; //used in SaveSource()
507
508private:
509 TGMainFrame(const TGMainFrame&); // not implemented
510 TGMainFrame& operator=(const TGMainFrame&); // not implemented
511
512public:
513 TGMainFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
514 UInt_t options = kVerticalFrame);
515 virtual ~TGMainFrame();
516
517 virtual Bool_t HandleKey(Event_t *event);
518 virtual Bool_t HandleClientMessage(Event_t *event);
519 virtual Bool_t HandleSelection(Event_t *event);
520 virtual Bool_t HandleSelectionRequest(Event_t *event);
521 virtual Bool_t HandleButton(Event_t *event);
522 virtual Bool_t HandleMotion(Event_t *event);
524 virtual void SendCloseMessage();
525 virtual void CloseWindow(); //*SIGNAL*
526
527 void DontCallClose();
528 void SetWindowName(const char *name = 0);
529 void SetIconName(const char *name);
530 const TGPicture *SetIconPixmap(const char *iconName);
531 void SetIconPixmap(char **xpm_array);
532 void SetClassHints(const char *className, const char *resourceName);
533 void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input);
534 void SetWMPosition(Int_t x, Int_t y);
535 void SetWMSize(UInt_t w, UInt_t h);
536 void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax,
537 UInt_t winc, UInt_t hinc);
538 void SetWMState(EInitialState state);
539
540 virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const;
541 virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const;
542 TList *GetBindList() const { return fBindList; }
543
544 const char *GetWindowName() const { return fWindowName; }
545 const char *GetIconName() const { return fIconName; }
546 const char *GetIconPixmap() const { return fIconPixmap; }
547 void GetClassHints(const char *&className, const char *&resourceName) const
548 { className = fClassName.Data(); resourceName = fResourceName.Data(); }
549 void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
550 { value = fMWMValue; funcs = fMWMFuncs; input = fMWMInput; }
551 void GetWMPosition(Int_t &x, Int_t &y) const { x = fWMX; y = fWMY; }
552 void GetWMSize(UInt_t &w, UInt_t &h) const { w = fWMWidth; h = fWMHeight; }
553 void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax,
554 UInt_t &winc, UInt_t &hinc) const
555 { wmin = fWMMinWidth; hmin = fWMMinHeight; wmax = fWMMaxWidth;
556 hmax = fWMMaxHeight; winc = fWMWidthInc; hinc = fWMHeightInc; }
558
559 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
560 virtual void SaveSource(const char *filename = "Rootappl.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
561
562 ClassDef(TGMainFrame,0) // Top level window frame
563};
564
565
566//////////////////////////////////////////////////////////////////////////
567// //
568// TGTransientFrame //
569// //
570// This class defines transient windows that typically are used for //
571// dialogs. //
572// //
573//////////////////////////////////////////////////////////////////////////
574
576
577protected:
578 const TGWindow *fMain; // window over which to popup dialog
579
580private:
581 TGTransientFrame(const TGTransientFrame&); // not implemented
582 TGTransientFrame& operator=(const TGTransientFrame&); // not implemented
583
584public:
585 TGTransientFrame(const TGWindow *p = 0, const TGWindow *main = 0, UInt_t w = 1, UInt_t h = 1,
586 UInt_t options = kVerticalFrame);
587
590 virtual void CenterOnParent(Bool_t croot = kTRUE, EPlacement pos = kCenter);
591 const TGWindow *GetMain() const { return fMain; }
592 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
593 virtual void SaveSource(const char *filename = "Rootdlog.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
594
595 ClassDef(TGTransientFrame,0) // Frame for dialog (transient) windows
596};
597
598
599//////////////////////////////////////////////////////////////////////////
600// //
601// TGGroupFrame //
602// //
603// A group frame is a composite frame with a border and a title. //
604// It is typically used to group a number of logically related widgets //
605// visually together. //
606// //
607//////////////////////////////////////////////////////////////////////////
608
610
611protected:
612 TGString *fText; // title text
613 FontStruct_t fFontStruct; // title fontstruct
614 GContext_t fNormGC; // title graphics context
615 Int_t fTitlePos; // *OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",1="Right")}*
616 Bool_t fHasOwnFont; // kTRUE - font defined locally, kFALSE - globally
617
618 virtual void DoRedraw();
619
620 static const TGFont *fgDefaultFont;
621 static const TGGC *fgDefaultGC;
622
623private:
624 TGGroupFrame(const TGGroupFrame&); // not implemented
625 TGGroupFrame& operator=(const TGGroupFrame&); // not implemented
626
627public:
628 enum ETitlePos { kLeft = -1, kCenter = 0, kRight = 1 };
629
631 static const TGGC &GetDefaultGC();
632
633 TGGroupFrame(const TGWindow *p, TGString *title,
634 UInt_t options = kVerticalFrame,
635 GContext_t norm = GetDefaultGC()(),
638 TGGroupFrame(const TGWindow *p = 0, const char *title = 0,
639 UInt_t options = kVerticalFrame,
640 GContext_t norm = GetDefaultGC()(),
643 virtual ~TGGroupFrame();
644
645 virtual TGDimension GetDefaultSize() const;
646 virtual void DrawBorder();
647 virtual void SetTitle(TGString *title);
648 virtual void SetTitle(const char *title);
649 virtual void Rename(const char *title) { SetTitle(title); } //*MENU*icon=bld_rename.png*
650 Int_t GetTitlePos() const { return fTitlePos; }
651 virtual void SetTitlePos(ETitlePos pos = kLeft) { fTitlePos = pos; } //*SUBMENU*
652 virtual void SetTextColor(Pixel_t color, Bool_t local = kTRUE);
653 virtual void SetTextFont(const char *fontName, Bool_t local = kTRUE);
654 virtual void SetTextFont(FontStruct_t font, Bool_t local = kTRUE);
655 GContext_t GetNormGC() const { return fNormGC; }
657
658 virtual const char *GetTitle() const { return fText->GetString(); }
659 Bool_t HasOwnFont() const;
660
661 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
662
663 ClassDef(TGGroupFrame,0) // A composite frame with border and title
664};
665
666//////////////////////////////////////////////////////////////////////////
667// //
668// TGHeaderFrame //
669// //
670// Horizontal Frame used to contain header buttons and splitters //
671// in a list view. Used to have resizable column headers. //
672// //
673//////////////////////////////////////////////////////////////////////////
674
676private:
677 TGHeaderFrame(const TGHeaderFrame&); // Not implemented
678 TGHeaderFrame& operator=(const TGHeaderFrame&); // Not implemented
679
680protected:
681 Int_t fNColumns; // number of columns
682 TGTextButton **fColHeader; // column headers for in detailed mode
683 TGVFileSplitter **fSplitHeader; // column splitters
684 Cursor_t fSplitCursor; // split cursor;
685 Bool_t fOverSplitter; // Indicates if the cursor is over a splitter
686 Int_t fOverButton; // Indicates over which button the mouse is
687 Int_t fLastButton; // Indicates the last button clicked if any
688
689public:
690 TGHeaderFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
691 UInt_t options = kChildFrame,
693
694 virtual Bool_t HandleButton(Event_t* event);
695 virtual Bool_t HandleMotion(Event_t* event);
696 virtual Bool_t HandleDoubleClick(Event_t *event);
697
698 void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader);
699
700 ClassDef(TGHeaderFrame,0) // Header frame with buttons and splitters
701};
702
703
704#endif
Handle_t Cursor_t
Definition: GuiTypes.h:33
ULong_t Handle_t
Definition: GuiTypes.h:25
ULong_t Time_t
Definition: GuiTypes.h:41
EInitialState
Definition: GuiTypes.h:344
Handle_t Atom_t
Definition: GuiTypes.h:36
const Handle_t kNone
Definition: GuiTypes.h:87
Handle_t GContext_t
Definition: GuiTypes.h:37
Handle_t FontStruct_t
Definition: GuiTypes.h:38
ULong_t Pixel_t
Definition: GuiTypes.h:39
Handle_t Window_t
Definition: GuiTypes.h:28
#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:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
#define BIT(n)
Definition: Rtypes.h:82
EMWMHints
Definition: TGFrame.h:78
@ kMWMDecorResizeH
Definition: TGFrame.h:96
@ kMWMFuncAll
Definition: TGFrame.h:80
@ kMWMInputPrimaryApplicationModal
Definition: TGFrame.h:89
@ kMWMInputSystemModal
Definition: TGFrame.h:90
@ kMWMFuncMove
Definition: TGFrame.h:82
@ kMWMDecorBorder
Definition: TGFrame.h:95
@ kMWMFuncResize
Definition: TGFrame.h:81
@ kMWMDecorMaximize
Definition: TGFrame.h:100
@ kMWMDecorTitle
Definition: TGFrame.h:97
@ kMWMDecorMinimize
Definition: TGFrame.h:99
@ kMWMDecorMenu
Definition: TGFrame.h:98
@ kMWMDecorAll
Definition: TGFrame.h:94
@ kMWMInputFullApplicationModal
Definition: TGFrame.h:91
@ kMWMFuncMaximize
Definition: TGFrame.h:84
@ kMWMInputModeless
Definition: TGFrame.h:88
@ kMWMFuncClose
Definition: TGFrame.h:85
@ kMWMFuncMinimize
Definition: TGFrame.h:83
EFrameCleanup
Definition: TGFrame.h:48
@ kNoCleanup
Definition: TGFrame.h:49
@ kLocalCleanup
Definition: TGFrame.h:50
@ kDeepCleanup
Definition: TGFrame.h:51
EFrameState
Definition: TGFrame.h:41
@ kIsArranged
Definition: TGFrame.h:44
@ kIsVisible
Definition: TGFrame.h:42
@ kIsMapped
Definition: TGFrame.h:43
EFrameType
Definition: TGFrame.h:56
@ kFitHeight
Definition: TGFrame.h:66
@ kChildFrame
Definition: TGFrame.h:57
@ kRaisedFrame
Definition: TGFrame.h:62
@ kTempFrame
Definition: TGFrame.h:71
@ kSunkenFrame
Definition: TGFrame.h:61
@ kVerticalFrame
Definition: TGFrame.h:59
@ kDoubleBorder
Definition: TGFrame.h:63
@ kFixedWidth
Definition: TGFrame.h:65
@ kFitWidth
Definition: TGFrame.h:64
@ kHorizontalFrame
Definition: TGFrame.h:60
@ kFixedHeight
Definition: TGFrame.h:67
@ kMdiMainFrame
Definition: TGFrame.h:72
@ kFixedSize
Definition: TGFrame.h:68
@ kMdiFrame
Definition: TGFrame.h:73
@ kOwnBackground
Definition: TGFrame.h:69
@ kTransientFrame
Definition: TGFrame.h:70
@ kMainFrame
Definition: TGFrame.h:58
EDNDFlags
Definition: TGFrame.h:105
@ kIsDNDTarget
Definition: TGFrame.h:107
@ kIsDNDSource
Definition: TGFrame.h:106
int type
Definition: TGX11.cxx:120
const TGResourcePool * GetResourcePool() const
Definition: TGClient.h:133
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
Definition: TGFrame.cxx:1076
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
Definition: TGFrame.cxx:1347
TGLayoutManager * fLayoutManager
Definition: TGFrame.h:350
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
Definition: TGFrame.cxx:994
TGCompositeFrame & operator=(const TGCompositeFrame &)
virtual void SetMapSubwindows(Bool_t on)
Definition: TGFrame.h:422
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
Definition: TGFrame.cxx:1270
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition: TGFrame.cxx:982
virtual Bool_t HandleDragMotion(TGFrame *)
Handle drag motion event.
Definition: TGFrame.cxx:1395
virtual TList * GetList() const
Definition: TGFrame.h:369
virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo)
Handle drop event.
Definition: TGFrame.cxx:1403
virtual Bool_t HandleCrossing(Event_t *)
Definition: TGFrame.h:385
virtual Bool_t HandleButton(Event_t *)
Definition: TGFrame.h:383
Bool_t IsComposite() const
Definition: TGFrame.h:412
TGCompositeFrame(const TGCompositeFrame &)
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1200
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
Definition: TGFrame.cxx:1290
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:371
virtual TGLayoutManager * GetLayoutManager() const
Definition: TGFrame.h:397
virtual Bool_t HandleSelection(Event_t *)
Definition: TGFrame.h:389
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
Definition: TGFrame.cxx:930
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
virtual Bool_t IsLayoutBroken() const
Definition: TGFrame.h:416
Int_t fMustCleanup
Definition: TGFrame.h:353
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxilary protected method used to save subframes.
Definition: TGFrame.cxx:2621
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1025
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1054
Bool_t IsVisible(TGFrameElement *ptr) const
Definition: TGFrame.h:409
virtual Bool_t IsMapSubwindows() const
Definition: TGFrame.h:423
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:375
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:1314
virtual Int_t MustCleanup() const
Definition: TGFrame.h:420
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
Bool_t fLayoutBroken
Definition: TGFrame.h:352
Bool_t fMapSubwindows
Definition: TGFrame.h:354
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1186
TList * fList
Definition: TGFrame.h:351
Bool_t IsArranged(TGFrameElement *ptr) const
Definition: TGFrame.h:411
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:373
virtual Bool_t HandleFocusChange(Event_t *)
Definition: TGFrame.h:388
virtual ~TGCompositeFrame()
Delete a composite frame.
Definition: TGFrame.cxx:886
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition: TGFrame.cxx:1004
virtual Bool_t HandleDoubleClick(Event_t *)
Definition: TGFrame.h:384
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:2723
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1226
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Definition: TGFrame.h:395
virtual Bool_t HandleMotion(Event_t *)
Definition: TGFrame.h:386
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1131
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
Definition: TGFrame.cxx:909
static TGLayoutHints * fgDefaultHints
Definition: TGFrame.h:356
virtual void Print(Option_t *option="") const
Print all frames in this composite frame.
Definition: TGFrame.cxx:1248
virtual void RemoveAll()
Remove all frames from composite frame.
Definition: TGFrame.cxx:1113
virtual Bool_t HandleDragLeave(TGFrame *)
Handle drag leave event.
Definition: TGFrame.cxx:1377
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1172
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1213
virtual Bool_t HandleKey(Event_t *)
Definition: TGFrame.h:387
UInt_t fHeight
Definition: TGDimension.h:30
UInt_t fWidth
Definition: TGDimension.h:29
Definition: TGFont.h:149
Int_t fState
Definition: TGLayout.h:120
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:303
virtual Atom_t HandleDNDEnter(Atom_t *)
Definition: TGFrame.h:326
virtual void SetSize(const TGDimension &s)
Definition: TGFrame.h:299
virtual void DrawCopy(Handle_t, Int_t, Int_t)
Definition: TGFrame.h:256
virtual Bool_t HandleSelectionClear(Event_t *)
Definition: TGFrame.h:217
virtual void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
Definition: TGFrame.h:309
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.cxx:566
virtual void Dump() const
Dump contents of object on stdout.
Definition: TGFrame.h:310
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
Definition: TGFrame.cxx:678
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:321
static const TGGC * fgWhiteGC
Definition: TGFrame.h:153
virtual Int_t GetDragType() const
Returns drag source type.
Definition: TGFrame.cxx:806
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
Definition: TGFrame.cxx:823
TGFrame & operator=(const TGFrame &)
virtual Bool_t IsLayoutBroken() const
Definition: TGFrame.h:263
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:412
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:717
static Pixel_t GetBlackPixel()
Get black pixel value.
Definition: TGFrame.cxx:704
UInt_t fOptions
Definition: TGFrame.h:141
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
Definition: TGFrame.cxx:425
Int_t fX
Definition: TGFrame.h:132
virtual Bool_t HandleDoubleClick(Event_t *)
Definition: TGFrame.h:209
UInt_t fMinHeight
Definition: TGFrame.h:137
virtual Atom_t HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
Definition: TGFrame.h:324
Int_t GetBorderWidth() const
Definition: TGFrame.h:280
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
Definition: TGFrame.cxx:330
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:249
virtual Bool_t HandleDragEnter(TGFrame *)
Definition: TGFrame.h:219
virtual Bool_t HandleDragLeave(TGFrame *)
Definition: TGFrame.h:220
UInt_t GetEventMask() const
Definition: TGFrame.h:202
virtual Bool_t HandleDNDDrop(TDNDData *)
Definition: TGFrame.h:323
virtual void SetX(Int_t x)
Definition: TGFrame.h:291
UInt_t GetMinWidth() const
Definition: TGFrame.h:273
virtual void SetForegroundColor(Pixel_t)
Definition: TGFrame.h:243
virtual Bool_t IsActive() const
Definition: TGFrame.h:258
static Bool_t fgInit
Definition: TGFrame.h:147
virtual void MapRaised()
Definition: TGFrame.h:252
virtual Bool_t HandleKey(Event_t *)
Definition: TGFrame.h:212
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:691
virtual void SetMinWidth(UInt_t w)
Definition: TGFrame.h:295
UInt_t fHeight
Definition: TGFrame.h:135
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:237
static Int_t fgDby
Definition: TGFrame.h:159
virtual Bool_t HandleColormapChange(Event_t *)
Definition: TGFrame.h:218
virtual void ReallyDelete()
Definition: TGFrame.h:200
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
virtual void SetDropType(Int_t type)
SetDropType.
Definition: TGFrame.cxx:798
virtual void SetDragType(Int_t type)
SetDragType.
Definition: TGFrame.cxx:791
UInt_t GetMaxHeight() const
Definition: TGFrame.h:276
virtual void DrawBorder()
Draw frame border.
Definition: TGFrame.cxx:403
virtual void Print(Option_t *option="") const
Print window id.
Definition: TGFrame.cxx:775
static const TGGC * fgBckgndGC
Definition: TGFrame.h:156
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:339
Int_t fBorderWidth
Definition: TGFrame.h:140
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:3187
static const TGGC * fgShadowGC
Definition: TGFrame.h:155
TGDimension GetSize() const
Definition: TGFrame.h:277
static Pixel_t fgDefaultSelectedBackground
Definition: TGFrame.h:149
UInt_t fMinWidth
Definition: TGFrame.h:136
virtual void Activate(Bool_t)
Definition: TGFrame.h:257
virtual ~TGFrame()
Destructor.
Definition: TGFrame.cxx:248
virtual Pixel_t GetForeground() const
Return frame foreground color.
Definition: TGFrame.cxx:285
TGFrameElement * GetFrameElement() const
Definition: TGFrame.h:282
Bool_t IsDNDTarget() const
Definition: TGFrame.h:320
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:737
virtual void SetLayoutBroken(Bool_t=kTRUE)
Definition: TGFrame.h:262
virtual Bool_t HandleDragMotion(TGFrame *)
Definition: TGFrame.h:221
virtual Bool_t HandleDNDFinished()
Definition: TGFrame.h:328
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:294
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:627
static UInt_t fgLastButton
Definition: TGFrame.h:158
TGFrameElement * fFE
Definition: TGFrame.h:145
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
virtual Int_t GetDropType() const
Returns drop target type.
Definition: TGFrame.cxx:815
Int_t fDNDState
Definition: TGFrame.h:144
virtual void SetMaxHeight(UInt_t h)
Definition: TGFrame.h:298
static Time_t GetLastClick()
Get time of last mouse click.
Definition: TGFrame.cxx:767
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:308
static const TGGC * fgBlackGC
Definition: TGFrame.h:152
Int_t GetX() const
Definition: TGFrame.h:278
static Int_t fgDbx
Definition: TGFrame.h:159
static UInt_t fgUserColor
Definition: TGFrame.h:161
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:258
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Definition: TGFrame.h:287
virtual void Delete(Option_t *="")
Delete this object.
Definition: TGFrame.h:307
virtual UInt_t GetOptions() const
Definition: TGFrame.h:244
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2460
void SetDNDSource(Bool_t onoff)
Definition: TGFrame.h:315
static Time_t fgLastClick
Definition: TGFrame.h:157
Int_t fY
Definition: TGFrame.h:133
virtual Bool_t HandleFocusChange(Event_t *)
Definition: TGFrame.h:213
virtual Bool_t IsComposite() const
Definition: TGFrame.h:259
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition: TGFrame.cxx:275
virtual void SetDrawOption(Option_t *="")
Set drawing option for object.
Definition: TGFrame.h:312
UInt_t fMaxWidth
Definition: TGFrame.h:138
UInt_t GetMaxWidth() const
Definition: TGFrame.h:275
@ kDeleteWindowCalled
Definition: TGFrame.h:130
virtual void ProcessedConfigure(Event_t *event)
Definition: TGFrame.h:224
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:747
virtual void SetMaxWidth(UInt_t w)
Definition: TGFrame.h:297
const TGResourcePool * GetResourcePool() const
Definition: TGFrame.h:170
virtual Bool_t HandleDNDLeave()
Definition: TGFrame.h:327
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:575
virtual TDNDData * GetDNDData(Atom_t)
Definition: TGFrame.h:322
virtual Bool_t HandleSelectionRequest(Event_t *)
Definition: TGFrame.h:216
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual Bool_t HandleSelection(Event_t *)
Definition: TGFrame.h:215
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Definition: TGFrame.h:230
UInt_t fWidth
Definition: TGFrame.h:134
virtual Bool_t HandleButton(Event_t *)
Definition: TGFrame.h:208
UInt_t GetMinHeight() const
Definition: TGFrame.h:274
virtual Bool_t HandleMotion(Event_t *)
Definition: TGFrame.h:211
virtual void SetEditable(Bool_t)
Definition: TGFrame.h:261
void SetFrameElement(TGFrameElement *fe)
Definition: TGFrame.h:283
UInt_t GetHeight() const
Definition: TGFrame.h:272
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition: TGFrame.h:264
virtual Bool_t IsEditable() const
Definition: TGFrame.h:260
virtual void * GetSender()
Definition: TGFrame.h:165
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
Definition: TGFrame.cxx:651
virtual void SetMinHeight(UInt_t h)
Definition: TGFrame.h:296
Bool_t IsDNDSource() const
Definition: TGFrame.h:319
Int_t GetY() const
Definition: TGFrame.h:279
virtual void Layout()
Definition: TGFrame.h:246
virtual Pixel_t GetBackground() const
Definition: TGFrame.h:239
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:611
UInt_t fEventMask
Definition: TGFrame.h:143
UInt_t fMaxHeight
Definition: TGFrame.h:139
virtual void SetWidth(UInt_t w)
Definition: TGFrame.h:293
void SetDNDTarget(Bool_t onoff)
Definition: TGFrame.h:317
virtual Bool_t HandleCrossing(Event_t *)
Definition: TGFrame.h:210
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
Definition: TGFrame.h:311
virtual void ProcessedEvent(Event_t *event)
Definition: TGFrame.h:226
static Window_t fgDbw
Definition: TGFrame.h:160
virtual Bool_t HandleEvent(Event_t *event)
Handle all frame events.
Definition: TGFrame.cxx:439
Bool_t Contains(Int_t x, Int_t y) const
Definition: TGFrame.h:285
virtual void SetY(Int_t y)
Definition: TGFrame.h:292
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
Definition: TGFrame.h:222
virtual void MapWindow()
Definition: TGFrame.h:251
static const TGGC & GetWhiteGC()
Get white graphics context.
Definition: TGFrame.cxx:727
TGFrame(const TGFrame &)
static Pixel_t fgWhitePixel
Definition: TGFrame.h:150
UInt_t GetWidth() const
Definition: TGFrame.h:271
virtual void MapSubwindows()
Definition: TGFrame.h:247
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition: TGFrame.cxx:2433
virtual void SetHeight(UInt_t h)
Definition: TGFrame.h:294
Pixel_t fBackground
Definition: TGFrame.h:142
static Pixel_t fgBlackPixel
Definition: TGFrame.h:151
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:757
static const TGGC * fgHilightGC
Definition: TGFrame.h:154
virtual void UnmapWindow()
Definition: TGFrame.h:253
static Pixel_t fgDefaultFrameBackground
Definition: TGFrame.h:148
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:3211
TGString * fText
Definition: TGFrame.h:612
Bool_t fHasOwnFont
Definition: TGFrame.h:616
FontStruct_t GetFontStruct() const
Definition: TGFrame.h:656
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Definition: TGFrame.cxx:2301
virtual ~TGGroupFrame()
Delete a group frame.
Definition: TGFrame.cxx:2072
static const TGGC * fgDefaultGC
Definition: TGFrame.h:621
GContext_t GetNormGC() const
Definition: TGFrame.h:655
virtual void DoRedraw()
Redraw the group frame.
Definition: TGFrame.cxx:2099
Int_t fTitlePos
Definition: TGFrame.h:615
static const TGFont * fgDefaultFont
Definition: TGFrame.h:620
virtual const char * GetTitle() const
Returns title of object.
Definition: TGFrame.h:658
virtual TGDimension GetDefaultSize() const
Returns default size.
Definition: TGFrame.cxx:2085
TGGroupFrame(const TGGroupFrame &)
virtual void SetTitlePos(ETitlePos pos=kLeft)
Definition: TGFrame.h:651
TGGroupFrame & operator=(const TGGroupFrame &)
virtual void DrawBorder()
Draw border of around the group frame.
Definition: TGFrame.cxx:2180
virtual void Rename(const char *title)
Definition: TGFrame.h:649
FontStruct_t fFontStruct
Definition: TGFrame.h:613
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
Definition: TGFrame.cxx:2156
GContext_t fNormGC
Definition: TGFrame.h:614
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition: TGFrame.cxx:2291
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
Definition: TGFrame.cxx:2169
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Definition: TGFrame.cxx:2111
Int_t GetTitlePos() const
Definition: TGFrame.h:650
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
Definition: TGFrame.cxx:2262
Int_t fLastButton
Definition: TGFrame.h:687
void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader)
Set columns information in the header frame.
Definition: TGFrame.cxx:2333
TGVFileSplitter ** fSplitHeader
Definition: TGFrame.h:683
Bool_t fOverSplitter
Definition: TGFrame.h:685
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in header frame.
Definition: TGFrame.cxx:2344
TGHeaderFrame(const TGHeaderFrame &)
TGTextButton ** fColHeader
Definition: TGFrame.h:682
TGHeaderFrame & operator=(const TGHeaderFrame &)
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in header frame.
Definition: TGFrame.cxx:2403
Cursor_t fSplitCursor
Definition: TGFrame.h:684
Int_t fNColumns
Definition: TGFrame.h:681
Int_t fOverButton
Definition: TGFrame.h:686
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event in header frame.
Definition: TGFrame.cxx:2376
TGHorizontalFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition: TGFrame.h:447
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:3101
virtual TGDimension GetDefaultSize() const =0
TGMapKey & operator=(const TGMapKey &)
TGMapKey(UInt_t keycode, TGWindow *w)
Definition: TGFrame.h:479
TGWindow * fWindow
Definition: TGFrame.h:478
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:553
UInt_t fWMWidthInc
Definition: TGFrame.h:500
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
Definition: TGFrame.cxx:1673
UInt_t fWMHeightInc
Definition: TGFrame.h:501
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:1503
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:2771
virtual Bool_t HandleClientMessage(Event_t *event)
Handle client messages sent to this frame.
Definition: TGFrame.cxx:1685
TList * GetBindList() const
Definition: TGFrame.h:542
TString GetMWMfuncString() const
Returns MWM function hints as a string - used in SavePrimitive().
Definition: TGFrame.cxx:2566
const char * GetIconName() const
Returns mime type name of object.
Definition: TGFrame.h:545
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Definition: TGFrame.cxx:1738
UInt_t fWMWidth
Definition: TGFrame.h:494
UInt_t fWMMinHeight
Definition: TGFrame.h:497
void GetWMPosition(Int_t &x, Int_t &y) const
Definition: TGFrame.h:551
Int_t fWMY
Definition: TGFrame.h:493
EInitialState GetWMState() const
Definition: TGFrame.h:557
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
Definition: TGFrame.cxx:1637
UInt_t fWMMinWidth
Definition: TGFrame.h:496
TString fResourceName
Definition: TGFrame.h:488
UInt_t fMWMValue
Definition: TGFrame.h:489
void GetWMSize(UInt_t &w, UInt_t &h) const
Definition: TGFrame.h:552
Atom_t * fDNDTypeList
Definition: TGFrame.h:482
virtual void SendCloseMessage()
Send close message to self.
Definition: TGFrame.cxx:1702
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
Definition: TGFrame.h:549
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition: TGFrame.cxx:1814
Int_t fWMX
Definition: TGFrame.h:492
virtual void CloseWindow()
Close and delete main frame.
Definition: TGFrame.cxx:1728
TString fIconPixmap
Definition: TGFrame.h:486
UInt_t fWMMaxWidth
Definition: TGFrame.h:498
@ kDontCallClose
Definition: TGFrame.h:469
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:3049
TGMainFrame & operator=(const TGMainFrame &)
TString fWindowName
Definition: TGFrame.h:484
virtual Bool_t HandleSelection(Event_t *event)
Handle primary selection event.
Definition: TGFrame.cxx:1661
UInt_t fWMHeight
Definition: TGFrame.h:495
TList * fBindList
Definition: TGFrame.h:483
virtual ~TGMainFrame()
TGMainFrame destructor.
Definition: TGFrame.cxx:1487
UInt_t fWMMaxHeight
Definition: TGFrame.h:499
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
Definition: TGFrame.cxx:1880
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
Definition: TGFrame.cxx:1595
UInt_t fMWMFuncs
Definition: TGFrame.h:490
EInitialState fWMInitState
Definition: TGFrame.h:502
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition: TGFrame.cxx:1759
TString GetMWMinpString() const
Returns MWM input mode hints as a string - used in SavePrimitive().
Definition: TGFrame.cxx:2603
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
Definition: TGFrame.cxx:1564
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition: TGFrame.cxx:1849
TString fClassName
Definition: TGFrame.h:487
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1837
TString fIconName
Definition: TGFrame.h:485
TString GetMWMvalueString() const
Returns MWM decoration hints as a string - used in SavePrimitive().
Definition: TGFrame.cxx:2526
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1824
const char * GetWindowName() const
Definition: TGFrame.h:544
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:1862
const char * GetIconPixmap() const
Definition: TGFrame.h:546
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
Definition: TGFrame.cxx:1649
TGMainFrame(const TGMainFrame &)
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
Definition: TGFrame.cxx:1618
void GetClassHints(const char *&className, const char *&resourceName) const
Definition: TGFrame.h:547
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1746
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
Definition: TGFrame.cxx:1774
UInt_t fMWMInput
Definition: TGFrame.h:491
TGClient * fClient
Definition: TGObject.h:37
const char * GetString() const
Definition: TGString.h:40
TGTransientFrame(const TGTransientFrame &)
TGTransientFrame & operator=(const TGTransientFrame &)
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:3564
const TGWindow * GetMain() const
Definition: TGFrame.h:591
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:3290
const TGWindow * fMain
Definition: TGFrame.h:578
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition: TGFrame.cxx:1913
TGVerticalFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition: TGFrame.h:436
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:3144
virtual void MapWindow()
Definition: TGWindow.h:88
virtual void SetWindowName(const char *name=0)
Set window name.
Definition: TGWindow.cxx:118
virtual void MapRaised()
Definition: TGWindow.h:90
virtual void UnmapWindow()
Definition: TGWindow.h:91
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:142
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:49
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:165
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
int main(int argc, char **argv)
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
static constexpr double s
auto * l
Definition: textangle.C:4