Logo ROOT  
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//---- MWM hints stuff
55
57 // functions
64
65 // input mode
70
71 // decorations
79};
80
81//---- drag and drop
82
85 kIsDNDTarget = BIT(1)
86};
87
88
89
90//////////////////////////////////////////////////////////////////////////
91// //
92// TGFrame //
93// //
94// This class subclasses TGWindow, used as base class for some simple //
95// widgets (buttons, labels, etc.). //
96// It provides: //
97// - position & dimension fields //
98// - an 'options' attribute (see constant above) //
99// - a generic event handler //
100// - a generic layout mechanism //
101// - a generic border //
102// //
103//////////////////////////////////////////////////////////////////////////
104
105class TGFrame : public TGWindow, public TQObject {
106
107protected:
108 enum { kDeleteWindowCalled = BIT(15) };
109
110 Int_t fX; // frame x position
111 Int_t fY; // frame y position
112 UInt_t fWidth; // frame width
113 UInt_t fHeight; // frame height
114 UInt_t fMinWidth; // minimal frame width
115 UInt_t fMinHeight; // minimal frame height
116 UInt_t fMaxWidth; // maximal frame width
117 UInt_t fMaxHeight; // maximal frame height
118 Int_t fBorderWidth; // frame border width
119 UInt_t fOptions; // frame options
120 Pixel_t fBackground; // frame background color
121 UInt_t fEventMask; // currenty active event mask
122 Int_t fDNDState; // EDNDFlags
123 TGFrameElement *fFE; // pointer to frame element
124
130 static const TGGC *fgBlackGC;
131 static const TGGC *fgWhiteGC;
132 static const TGGC *fgHilightGC;
133 static const TGGC *fgShadowGC;
134 static const TGGC *fgBckgndGC;
140
141 static Time_t GetLastClick();
142
143 virtual void *GetSender() { return this; } //used to set gTQSender
144 virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
145 UInt_t w, UInt_t h);
146 virtual void DoRedraw();
147
149 { return fClient->GetResourcePool(); }
150
151 TString GetOptionString() const; //used in SavePrimitive()
152
153 // some protected methods use in gui builder
154 virtual void StartGuiBuilding(Bool_t on = kTRUE);
155
156private:
157 TGFrame(const TGFrame&); // not implemented
158 TGFrame& operator=(const TGFrame&); // not implemented
159
160public:
161 // Default colors and graphics contexts
164 static Pixel_t GetWhitePixel();
165 static Pixel_t GetBlackPixel();
166 static const TGGC &GetBlackGC();
167 static const TGGC &GetWhiteGC();
168 static const TGGC &GetHilightGC();
169 static const TGGC &GetShadowGC();
170 static const TGGC &GetBckgndGC();
171
172 TGFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
173 UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground());
174 TGFrame(TGClient *c, Window_t id, const TGWindow *parent = 0);
175 virtual ~TGFrame();
176
177 virtual void DeleteWindow();
178 virtual void ReallyDelete() { delete this; }
179
180 UInt_t GetEventMask() const { return fEventMask; }
181 void AddInput(UInt_t emask);
182 void RemoveInput(UInt_t emask);
183
184 virtual Bool_t HandleEvent(Event_t *event);
185 virtual Bool_t HandleConfigureNotify(Event_t *event);
186 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
187 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
188 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
189 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
190 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
191 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
192 virtual Bool_t HandleClientMessage(Event_t *event);
193 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
197 virtual Bool_t HandleDragEnter(TGFrame *) { return kFALSE; }
198 virtual Bool_t HandleDragLeave(TGFrame *) { return kFALSE; }
199 virtual Bool_t HandleDragMotion(TGFrame *) { return kFALSE; }
201 { return kFALSE; }
202 virtual void ProcessedConfigure(Event_t *event)
203 { Emit("ProcessedConfigure(Event_t*)", (Long_t)event); } //*SIGNAL*
204 virtual void ProcessedEvent(Event_t *event)
205 { Emit("ProcessedEvent(Event_t*)", (Long_t)event); } //*SIGNAL*
206
207 virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2);
209
210 virtual TGDimension GetDefaultSize() const ;
211 virtual void Move(Int_t x, Int_t y);
212 virtual void Resize(UInt_t w = 0, UInt_t h = 0);
213 virtual void Resize(TGDimension size);
214 virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
215 virtual UInt_t GetDefaultWidth() const { return GetDefaultSize().fWidth; }
216 virtual UInt_t GetDefaultHeight() const { return GetDefaultSize().fHeight; }
217 virtual Pixel_t GetBackground() const { return fBackground; }
218 virtual void ChangeBackground(Pixel_t back);
219 virtual void SetBackgroundColor(Pixel_t back);
220 virtual Pixel_t GetForeground() const;
221 virtual void SetForegroundColor(Pixel_t /*fore*/) { }
222 virtual UInt_t GetOptions() const { return fOptions; }
223 virtual void ChangeOptions(UInt_t options);
224 virtual void Layout() { }
225 virtual void MapSubwindows() { } // Simple frames do not have subwindows
226 // Redefine this in TGCompositeFrame!
227 virtual void ReparentWindow(const TGWindow *p, Int_t x = 0, Int_t y = 0)
228 { TGWindow::ReparentWindow(p, x, y); Move(x, y); }
229 virtual void MapWindow() { TGWindow::MapWindow(); if (fFE) fFE->fState |= kIsVisible; }
230 virtual void MapRaised() { TGWindow::MapRaised(); if (fFE) fFE->fState |= kIsVisible; }
231 virtual void UnmapWindow() { TGWindow::UnmapWindow(); if (fFE) fFE->fState &= ~kIsVisible; }
232
233 virtual void DrawBorder();
234 virtual void DrawCopy(Handle_t /*id*/, Int_t /*x*/, Int_t /*y*/) { }
235 virtual void Activate(Bool_t) { }
236 virtual Bool_t IsActive() const { return kFALSE; }
237 virtual Bool_t IsComposite() const { return kFALSE; }
238 virtual Bool_t IsEditable() const { return kFALSE; }
239 virtual void SetEditable(Bool_t) {}
240 virtual void SetLayoutBroken(Bool_t = kTRUE) {}
241 virtual Bool_t IsLayoutBroken() const { return kFALSE; }
242 virtual void SetCleanup(Int_t = kLocalCleanup) { /* backward compatebility */ }
243
244 virtual void SetDragType(Int_t type);
245 virtual void SetDropType(Int_t type);
246 virtual Int_t GetDragType() const;
247 virtual Int_t GetDropType() const;
248
249 UInt_t GetWidth() const { return fWidth; }
250 UInt_t GetHeight() const { return fHeight; }
251 UInt_t GetMinWidth() const { return fMinWidth; }
252 UInt_t GetMinHeight() const { return fMinHeight; }
253 UInt_t GetMaxWidth() const { return fMaxWidth; }
254 UInt_t GetMaxHeight() const { return fMaxHeight; }
256 Int_t GetX() const { return fX; }
257 Int_t GetY() const { return fY; }
259
260 TGFrameElement *GetFrameElement() const { return fFE; }
262
264 { return ((x >= 0) && (x < (Int_t)fWidth) && (y >= 0) && (y < (Int_t)fHeight)); }
266 { return (Contains(x, y) ? this : 0); }
267
268 // Modifiers (without graphic update)
269 virtual void SetX(Int_t x) { fX = x; }
270 virtual void SetY(Int_t y) { fY = y; }
271 virtual void SetWidth(UInt_t w) { fWidth = w; }
272 virtual void SetHeight(UInt_t h) { fHeight = h; }
273 virtual void SetMinWidth(UInt_t w) { fMinWidth = w; }
274 virtual void SetMinHeight(UInt_t h) { fMinHeight = h; }
275 virtual void SetMaxWidth(UInt_t w) { fMaxWidth = w; }
276 virtual void SetMaxHeight(UInt_t h) { fMaxHeight = h; }
277 virtual void SetSize(const TGDimension &s) { fWidth = s.fWidth; fHeight = s.fHeight; }
278
279 // Printing and saving
280 virtual void Print(Option_t *option="") const;
281 void SaveUserColor(std::ostream &out, Option_t *);
282 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
283
284 // dummy to remove from context menu
285 virtual void Delete(Option_t * /*option*/ ="") { }
286 virtual TObject *DrawClone(Option_t * /*option */="") const { return 0; }
287 virtual void DrawClass() const { }
288 virtual void Dump() const { }
289 virtual void Inspect() const { }
290 virtual void SetDrawOption(Option_t * /*option*/="") { }
291
292 // drag and drop...
294 { if (onoff) fDNDState |= kIsDNDSource; else fDNDState &= ~kIsDNDSource; }
296 { if (onoff) fDNDState |= kIsDNDTarget; else fDNDState &= ~kIsDNDTarget; }
299
300 virtual TDNDData *GetDNDData(Atom_t /*dataType*/) { return 0; }
301 virtual Bool_t HandleDNDDrop(TDNDData * /*DNDData*/) { return kFALSE; }
302 virtual Atom_t HandleDNDPosition(Int_t /*x*/, Int_t /*y*/, Atom_t /*action*/,
303 Int_t /*xroot*/, Int_t /*yroot*/) { return kNone; }
304 virtual Atom_t HandleDNDEnter(Atom_t * /*typelist*/) { return kNone; }
305 virtual Bool_t HandleDNDLeave() { return kFALSE; }
306 virtual Bool_t HandleDNDFinished() { return kFALSE; }
307
308 ClassDef(TGFrame,0) // Base class for simple widgets (button, etc.)
309};
310
311//////////////////////////////////////////////////////////////////////////
312// //
313// TGCompositeFrame //
314// //
315// This class is the base class for composite widgets //
316// (menu bars, list boxes, etc.). //
317// //
318// It provides: //
319// - a layout manager //
320// - a frame container (TList *) //
321// //
322//////////////////////////////////////////////////////////////////////////
323
324class TGCompositeFrame : public TGFrame {
325
326
327protected:
328 TGLayoutManager *fLayoutManager; // layout manager
329 TList *fList; // container of frame elements
330 Bool_t fLayoutBroken; // no layout manager is used
331 Int_t fMustCleanup; // cleanup mode (see EFrameCleanup)
332 Bool_t fMapSubwindows; // kTRUE - map subwindows
333
334 static TGLayoutHints *fgDefaultHints; // default hints used by AddFrame()
335
336private:
337 TGCompositeFrame(const TGCompositeFrame&); // not implemented
338 TGCompositeFrame& operator=(const TGCompositeFrame&); // not implemented
339
340public:
341 TGCompositeFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
342 UInt_t options = 0,
344 TGCompositeFrame(TGClient *c, Window_t id, const TGWindow *parent = 0);
345 virtual ~TGCompositeFrame();
346
347 virtual TList *GetList() const { return fList; }
348
349 virtual UInt_t GetDefaultWidth() const
350 { return GetDefaultSize().fWidth; }
351 virtual UInt_t GetDefaultHeight() const
352 { return GetDefaultSize().fHeight; }
354 { return (IsLayoutBroken() ? TGDimension(fWidth, fHeight) :
358 Int_t &fx, Int_t &fy);
359 virtual void MapSubwindows();
360 virtual void Layout();
361 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
362 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
363 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
364 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
365 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
366 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
367 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
368 virtual Bool_t HandleDragEnter(TGFrame *);
369 virtual Bool_t HandleDragLeave(TGFrame *);
371 virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo);
372 virtual void ChangeOptions(UInt_t options);
374
376 virtual void SetLayoutManager(TGLayoutManager *l);
377
378 virtual TGFrameElement* FindFrameElement(TGFrame *f) const;
379
380 virtual void AddFrame(TGFrame *f, TGLayoutHints *l = 0);
381 virtual void RemoveAll();
382 virtual void RemoveFrame(TGFrame *f);
383 virtual void ShowFrame(TGFrame *f);
384 virtual void HideFrame(TGFrame *f);
385 Int_t GetState(TGFrame *f) const;
386 Bool_t IsVisible(TGFrame *f) const;
387 Bool_t IsVisible(TGFrameElement *ptr) const { return (ptr->fState & kIsVisible); }
388 Bool_t IsArranged(TGFrame *f) const;
389 Bool_t IsArranged(TGFrameElement *ptr) const { return (ptr->fState & kIsArranged); }
390 Bool_t IsComposite() const { return kTRUE; }
391 virtual Bool_t IsEditable() const;
392 virtual void SetEditable(Bool_t on = kTRUE);
393 virtual void SetLayoutBroken(Bool_t on = kTRUE);
394 virtual Bool_t IsLayoutBroken() const
395 { return fLayoutBroken || !fLayoutManager; }
396 virtual void SetEditDisabled(UInt_t on = 1);
397 virtual void SetCleanup(Int_t mode = kLocalCleanup);
398 virtual Int_t MustCleanup() const { return fMustCleanup; }
399 virtual void Cleanup();
400 virtual void SetMapSubwindows(Bool_t on) { fMapSubwindows = on; }
401 virtual Bool_t IsMapSubwindows() const { return fMapSubwindows; }
402
403 virtual void Print(Option_t *option="") const;
404 virtual void ChangeSubframesBackground(Pixel_t back);
405 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
406 virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option = "");
407
408 ClassDef(TGCompositeFrame,0) // Base class for composite widgets (menubars, etc.)
409};
410
411
413public:
414 TGVerticalFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
415 UInt_t options = kChildFrame,
417 TGCompositeFrame(p, w, h, options | kVerticalFrame, back) { SetWindowName(); }
418 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
419
420 ClassDef(TGVerticalFrame,0) // Composite frame with vertical child layout
421};
422
424public:
425 TGHorizontalFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
426 UInt_t options = kChildFrame,
428 TGCompositeFrame(p, w, h, options | kHorizontalFrame, back) { SetWindowName(); }
429 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
430
431 ClassDef(TGHorizontalFrame,0) // Composite frame with horizontal child layout
432};
433
434
435//////////////////////////////////////////////////////////////////////////
436// //
437// TGMainFrame //
438// //
439// This class defines top level windows that interact with the system //
440// Window Manager (WM or MWM for Motif Window Manager). //
441// //
442//////////////////////////////////////////////////////////////////////////
443
445
446protected:
447 enum { kDontCallClose = BIT(14) };
448
449 // mapping between key and window
450 class TGMapKey : public TObject {
451 private:
454 public:
457 TGMapKey(UInt_t keycode, TGWindow *w): fKeyCode(keycode), fWindow(w) { }
458 };
459
460 Atom_t *fDNDTypeList; // handles DND types
461 TList *fBindList; // list with key bindings
462 TString fWindowName; // window name
463 TString fIconName; // icon name
464 TString fIconPixmap; // icon pixmap name
465 TString fClassName; // WM class name
466 TString fResourceName; // WM resource name
467 UInt_t fMWMValue; // MWM decoration hints
468 UInt_t fMWMFuncs; // MWM functions
469 UInt_t fMWMInput; // MWM input modes
470 Int_t fWMX; // WM x position
471 Int_t fWMY; // WM y position
472 UInt_t fWMWidth; // WM width
473 UInt_t fWMHeight; // WM height
474 UInt_t fWMMinWidth; // WM min width
475 UInt_t fWMMinHeight; // WM min height
476 UInt_t fWMMaxWidth; // WM max width
477 UInt_t fWMMaxHeight; // WM max height
478 UInt_t fWMWidthInc; // WM width increments
479 UInt_t fWMHeightInc; // WM height increments
480 EInitialState fWMInitState; // WM initial state
481
482 TString GetMWMvalueString() const; //used in SaveSource()
483 TString GetMWMfuncString() const; //used in SaveSource()
484 TString GetMWMinpString() const; //used in SaveSource()
485
486private:
487 TGMainFrame(const TGMainFrame&); // not implemented
488 TGMainFrame& operator=(const TGMainFrame&); // not implemented
489
490public:
491 TGMainFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
492 UInt_t options = kVerticalFrame);
493 virtual ~TGMainFrame();
494
495 virtual Bool_t HandleKey(Event_t *event);
496 virtual Bool_t HandleClientMessage(Event_t *event);
497 virtual Bool_t HandleSelection(Event_t *event);
498 virtual Bool_t HandleSelectionRequest(Event_t *event);
499 virtual Bool_t HandleButton(Event_t *event);
500 virtual Bool_t HandleMotion(Event_t *event);
502 virtual void SendCloseMessage();
503 virtual void CloseWindow(); //*SIGNAL*
504
505 void DontCallClose();
506 void SetWindowName(const char *name = 0);
507 void SetIconName(const char *name);
508 const TGPicture *SetIconPixmap(const char *iconName);
509 void SetIconPixmap(char **xpm_array);
510 void SetClassHints(const char *className, const char *resourceName);
511 void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input);
512 void SetWMPosition(Int_t x, Int_t y);
513 void SetWMSize(UInt_t w, UInt_t h);
514 void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax,
515 UInt_t winc, UInt_t hinc);
516 void SetWMState(EInitialState state);
517
518 virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const;
519 virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const;
520 TList *GetBindList() const { return fBindList; }
521
522 const char *GetWindowName() const { return fWindowName; }
523 const char *GetIconName() const { return fIconName; }
524 const char *GetIconPixmap() const { return fIconPixmap; }
525 void GetClassHints(const char *&className, const char *&resourceName) const
526 { className = fClassName.Data(); resourceName = fResourceName.Data(); }
527 void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
528 { value = fMWMValue; funcs = fMWMFuncs; input = fMWMInput; }
529 void GetWMPosition(Int_t &x, Int_t &y) const { x = fWMX; y = fWMY; }
530 void GetWMSize(UInt_t &w, UInt_t &h) const { w = fWMWidth; h = fWMHeight; }
531 void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax,
532 UInt_t &winc, UInt_t &hinc) const
533 { wmin = fWMMinWidth; hmin = fWMMinHeight; wmax = fWMMaxWidth;
534 hmax = fWMMaxHeight; winc = fWMWidthInc; hinc = fWMHeightInc; }
536
537 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
538 virtual void SaveSource(const char *filename = "Rootappl.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
539
540 ClassDef(TGMainFrame,0) // Top level window frame
541};
542
543
544//////////////////////////////////////////////////////////////////////////
545// //
546// TGTransientFrame //
547// //
548// This class defines transient windows that typically are used for //
549// dialogs. //
550// //
551//////////////////////////////////////////////////////////////////////////
552
554
555protected:
556 const TGWindow *fMain; // window over which to popup dialog
557
558private:
559 TGTransientFrame(const TGTransientFrame&); // not implemented
560 TGTransientFrame& operator=(const TGTransientFrame&); // not implemented
561
562public:
563 TGTransientFrame(const TGWindow *p = 0, const TGWindow *main = 0, UInt_t w = 1, UInt_t h = 1,
564 UInt_t options = kVerticalFrame);
565
568 virtual void CenterOnParent(Bool_t croot = kTRUE, EPlacement pos = kCenter);
569 const TGWindow *GetMain() const { return fMain; }
570 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
571 virtual void SaveSource(const char *filename = "Rootdlog.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
572
573 ClassDef(TGTransientFrame,0) // Frame for dialog (transient) windows
574};
575
576
577//////////////////////////////////////////////////////////////////////////
578// //
579// TGGroupFrame //
580// //
581// A group frame is a composite frame with a border and a title. //
582// It is typically used to group a number of logically related widgets //
583// visually together. //
584// //
585//////////////////////////////////////////////////////////////////////////
586
588
589protected:
590 TGString *fText; // title text
591 FontStruct_t fFontStruct; // title fontstruct
592 GContext_t fNormGC; // title graphics context
593 Int_t fTitlePos; // *OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",1="Right")}*
594 Bool_t fHasOwnFont; // kTRUE - font defined locally, kFALSE - globally
595
596 virtual void DoRedraw();
597
598 static const TGFont *fgDefaultFont;
599 static const TGGC *fgDefaultGC;
600
601private:
602 TGGroupFrame(const TGGroupFrame&); // not implemented
603 TGGroupFrame& operator=(const TGGroupFrame&); // not implemented
604
605public:
606 enum ETitlePos { kLeft = -1, kCenter = 0, kRight = 1 };
607
609 static const TGGC &GetDefaultGC();
610
611 TGGroupFrame(const TGWindow *p, TGString *title,
612 UInt_t options = kVerticalFrame,
613 GContext_t norm = GetDefaultGC()(),
616 TGGroupFrame(const TGWindow *p = 0, const char *title = 0,
617 UInt_t options = kVerticalFrame,
618 GContext_t norm = GetDefaultGC()(),
621 virtual ~TGGroupFrame();
622
623 virtual TGDimension GetDefaultSize() const;
624 virtual void DrawBorder();
625 virtual void SetTitle(TGString *title);
626 virtual void SetTitle(const char *title);
627 virtual void Rename(const char *title) { SetTitle(title); } //*MENU*icon=bld_rename.png*
628 Int_t GetTitlePos() const { return fTitlePos; }
629 virtual void SetTitlePos(ETitlePos pos = kLeft) { fTitlePos = pos; } //*SUBMENU*
630 virtual void SetTextColor(Pixel_t color, Bool_t local = kTRUE);
631 virtual void SetTextFont(const char *fontName, Bool_t local = kTRUE);
632 virtual void SetTextFont(FontStruct_t font, Bool_t local = kTRUE);
633 GContext_t GetNormGC() const { return fNormGC; }
635
636 virtual const char *GetTitle() const { return fText->GetString(); }
637 Bool_t HasOwnFont() const;
638
639 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
640
641 ClassDef(TGGroupFrame,0) // A composite frame with border and title
642};
643
644//////////////////////////////////////////////////////////////////////////
645// //
646// TGHeaderFrame //
647// //
648// Horizontal Frame used to contain header buttons and splitters //
649// in a list view. Used to have resizable column headers. //
650// //
651//////////////////////////////////////////////////////////////////////////
652
654private:
655 TGHeaderFrame(const TGHeaderFrame&); // Not implemented
656 TGHeaderFrame& operator=(const TGHeaderFrame&); // Not implemented
657
658protected:
659 Int_t fNColumns; // number of columns
660 TGTextButton **fColHeader; // column headers for in detailed mode
661 TGVFileSplitter **fSplitHeader; // column splitters
662 Cursor_t fSplitCursor; // split cursor;
663 Bool_t fOverSplitter; // Indicates if the cursor is over a splitter
664 Int_t fOverButton; // Indicates over which button the mouse is
665 Int_t fLastButton; // Indicates the last button clicked if any
666
667public:
668 TGHeaderFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
669 UInt_t options = kChildFrame,
671
672 virtual Bool_t HandleButton(Event_t* event);
673 virtual Bool_t HandleMotion(Event_t* event);
674 virtual Bool_t HandleDoubleClick(Event_t *event);
675
676 void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader);
677
678 ClassDef(TGHeaderFrame,0) // Header frame with buttons and splitters
679};
680
681
682#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
@ kChildFrame
Definition: GuiTypes.h:379
@ kVerticalFrame
Definition: GuiTypes.h:381
@ kHorizontalFrame
Definition: GuiTypes.h:382
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:43
unsigned int UInt_t
Definition: RtypesCore.h:44
const Bool_t kFALSE
Definition: RtypesCore.h:90
long Long_t
Definition: RtypesCore.h:52
bool Bool_t
Definition: RtypesCore.h:61
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
#define BIT(n)
Definition: Rtypes.h:83
EMWMHints
Definition: TGFrame.h:56
@ kMWMDecorResizeH
Definition: TGFrame.h:74
@ kMWMFuncAll
Definition: TGFrame.h:58
@ kMWMInputPrimaryApplicationModal
Definition: TGFrame.h:67
@ kMWMInputSystemModal
Definition: TGFrame.h:68
@ kMWMFuncMove
Definition: TGFrame.h:60
@ kMWMDecorBorder
Definition: TGFrame.h:73
@ kMWMFuncResize
Definition: TGFrame.h:59
@ kMWMDecorMaximize
Definition: TGFrame.h:78
@ kMWMDecorTitle
Definition: TGFrame.h:75
@ kMWMDecorMinimize
Definition: TGFrame.h:77
@ kMWMDecorMenu
Definition: TGFrame.h:76
@ kMWMDecorAll
Definition: TGFrame.h:72
@ kMWMInputFullApplicationModal
Definition: TGFrame.h:69
@ kMWMFuncMaximize
Definition: TGFrame.h:62
@ kMWMInputModeless
Definition: TGFrame.h:66
@ kMWMFuncClose
Definition: TGFrame.h:63
@ kMWMFuncMinimize
Definition: TGFrame.h:61
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
EDNDFlags
Definition: TGFrame.h:83
@ kIsDNDTarget
Definition: TGFrame.h:85
@ kIsDNDSource
Definition: TGFrame.h:84
char name[80]
Definition: TGX11.cxx:109
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:1078
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
Definition: TGFrame.cxx:1349
TGLayoutManager * fLayoutManager
Definition: TGFrame.h:328
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
Definition: TGFrame.cxx:996
TGCompositeFrame & operator=(const TGCompositeFrame &)
virtual void SetMapSubwindows(Bool_t on)
Definition: TGFrame.h:400
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
Definition: TGFrame.cxx:1272
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition: TGFrame.cxx:984
virtual Bool_t HandleDragMotion(TGFrame *)
Handle drag motion event.
Definition: TGFrame.cxx:1397
virtual TList * GetList() const
Definition: TGFrame.h:347
virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo)
Handle drop event.
Definition: TGFrame.cxx:1405
virtual Bool_t HandleCrossing(Event_t *)
Definition: TGFrame.h:363
virtual Bool_t HandleButton(Event_t *)
Definition: TGFrame.h:361
Bool_t IsComposite() const
Definition: TGFrame.h:390
TGCompositeFrame(const TGCompositeFrame &)
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1202
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
Definition: TGFrame.cxx:1292
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1101
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:349
virtual TGLayoutManager * GetLayoutManager() const
Definition: TGFrame.h:375
virtual Bool_t HandleSelection(Event_t *)
Definition: TGFrame.h:367
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
Definition: TGFrame.cxx:932
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:951
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1241
virtual Bool_t IsLayoutBroken() const
Definition: TGFrame.h:394
Int_t fMustCleanup
Definition: TGFrame.h:331
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxilary protected method used to save subframes.
Definition: TGFrame.cxx:2625
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1027
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1056
Bool_t IsVisible(TGFrameElement *ptr) const
Definition: TGFrame.h:387
virtual Bool_t IsMapSubwindows() const
Definition: TGFrame.h:401
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:353
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:1316
virtual Int_t MustCleanup() const
Definition: TGFrame.h:398
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1148
Bool_t fLayoutBroken
Definition: TGFrame.h:330
Bool_t fMapSubwindows
Definition: TGFrame.h:332
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1188
TList * fList
Definition: TGFrame.h:329
Bool_t IsArranged(TGFrameElement *ptr) const
Definition: TGFrame.h:389
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:351
virtual Bool_t HandleFocusChange(Event_t *)
Definition: TGFrame.h:366
virtual ~TGCompositeFrame()
Delete a composite frame.
Definition: TGFrame.cxx:888
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition: TGFrame.cxx:1006
virtual Bool_t HandleDoubleClick(Event_t *)
Definition: TGFrame.h:362
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:2727
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1228
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Definition: TGFrame.h:373
virtual Bool_t HandleMotion(Event_t *)
Definition: TGFrame.h:364
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1133
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
Definition: TGFrame.cxx:911
static TGLayoutHints * fgDefaultHints
Definition: TGFrame.h:334
virtual void Print(Option_t *option="") const
Print all frames in this composite frame.
Definition: TGFrame.cxx:1250
virtual void RemoveAll()
Remove all frames from composite frame.
Definition: TGFrame.cxx:1115
virtual Bool_t HandleDragLeave(TGFrame *)
Handle drag leave event.
Definition: TGFrame.cxx:1379
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1174
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1215
virtual Bool_t HandleKey(Event_t *)
Definition: TGFrame.h:365
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:305
virtual Atom_t HandleDNDEnter(Atom_t *)
Definition: TGFrame.h:304
virtual void SetSize(const TGDimension &s)
Definition: TGFrame.h:277
virtual void DrawCopy(Handle_t, Int_t, Int_t)
Definition: TGFrame.h:234
virtual Bool_t HandleSelectionClear(Event_t *)
Definition: TGFrame.h:195
virtual void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
Definition: TGFrame.h:287
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.cxx:568
virtual void Dump() const
Dump contents of object on stdout.
Definition: TGFrame.h:288
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
Definition: TGFrame.cxx:680
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:323
static const TGGC * fgWhiteGC
Definition: TGFrame.h:131
virtual Int_t GetDragType() const
Returns drag source type.
Definition: TGFrame.cxx:808
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
Definition: TGFrame.cxx:825
TGFrame & operator=(const TGFrame &)
virtual Bool_t IsLayoutBroken() const
Definition: TGFrame.h:241
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:414
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:719
static Pixel_t GetBlackPixel()
Get black pixel value.
Definition: TGFrame.cxx:706
UInt_t fOptions
Definition: TGFrame.h:119
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
Definition: TGFrame.cxx:427
Int_t fX
Definition: TGFrame.h:110
virtual Bool_t HandleDoubleClick(Event_t *)
Definition: TGFrame.h:187
UInt_t fMinHeight
Definition: TGFrame.h:115
virtual Atom_t HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
Definition: TGFrame.h:302
Int_t GetBorderWidth() const
Definition: TGFrame.h:258
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
Definition: TGFrame.cxx:332
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:227
virtual Bool_t HandleDragEnter(TGFrame *)
Definition: TGFrame.h:197
virtual Bool_t HandleDragLeave(TGFrame *)
Definition: TGFrame.h:198
UInt_t GetEventMask() const
Definition: TGFrame.h:180
virtual Bool_t HandleDNDDrop(TDNDData *)
Definition: TGFrame.h:301
virtual void SetX(Int_t x)
Definition: TGFrame.h:269
UInt_t GetMinWidth() const
Definition: TGFrame.h:251
virtual void SetForegroundColor(Pixel_t)
Definition: TGFrame.h:221
virtual Bool_t IsActive() const
Definition: TGFrame.h:236
static Bool_t fgInit
Definition: TGFrame.h:125
virtual void MapRaised()
map raised
Definition: TGFrame.h:230
virtual Bool_t HandleKey(Event_t *)
Definition: TGFrame.h:190
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:693
virtual void SetMinWidth(UInt_t w)
Definition: TGFrame.h:273
UInt_t fHeight
Definition: TGFrame.h:113
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:215
static Int_t fgDby
Definition: TGFrame.h:137
virtual Bool_t HandleColormapChange(Event_t *)
Definition: TGFrame.h:196
virtual void ReallyDelete()
Definition: TGFrame.h:178
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:216
virtual void SetDropType(Int_t type)
SetDropType.
Definition: TGFrame.cxx:800
virtual void SetDragType(Int_t type)
SetDragType.
Definition: TGFrame.cxx:793
UInt_t GetMaxHeight() const
Definition: TGFrame.h:254
virtual void DrawBorder()
Draw frame border.
Definition: TGFrame.cxx:405
virtual void Print(Option_t *option="") const
Print window id.
Definition: TGFrame.cxx:777
static const TGGC * fgBckgndGC
Definition: TGFrame.h:134
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:341
Int_t fBorderWidth
Definition: TGFrame.h:118
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:3191
static const TGGC * fgShadowGC
Definition: TGFrame.h:133
TGDimension GetSize() const
Definition: TGFrame.h:255
static Pixel_t fgDefaultSelectedBackground
Definition: TGFrame.h:127
UInt_t fMinWidth
Definition: TGFrame.h:114
virtual void Activate(Bool_t)
Definition: TGFrame.h:235
virtual ~TGFrame()
Destructor.
Definition: TGFrame.cxx:250
virtual Pixel_t GetForeground() const
Return frame foreground color.
Definition: TGFrame.cxx:287
TGFrameElement * GetFrameElement() const
Definition: TGFrame.h:260
Bool_t IsDNDTarget() const
Definition: TGFrame.h:298
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:739
virtual void SetLayoutBroken(Bool_t=kTRUE)
Definition: TGFrame.h:240
virtual Bool_t HandleDragMotion(TGFrame *)
Definition: TGFrame.h:199
virtual Bool_t HandleDNDFinished()
Definition: TGFrame.h:306
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:296
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:629
static UInt_t fgLastButton
Definition: TGFrame.h:136
TGFrameElement * fFE
Definition: TGFrame.h:123
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:667
virtual Int_t GetDropType() const
Returns drop target type.
Definition: TGFrame.cxx:817
Int_t fDNDState
Definition: TGFrame.h:122
virtual void SetMaxHeight(UInt_t h)
Definition: TGFrame.h:276
static Time_t GetLastClick()
Get time of last mouse click.
Definition: TGFrame.cxx:769
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:286
static const TGGC * fgBlackGC
Definition: TGFrame.h:130
Int_t GetX() const
Definition: TGFrame.h:256
static Int_t fgDbx
Definition: TGFrame.h:137
static UInt_t fgUserColor
Definition: TGFrame.h:139
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:260
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Definition: TGFrame.h:265
virtual void Delete(Option_t *="")
Delete this object.
Definition: TGFrame.h:285
virtual UInt_t GetOptions() const
Definition: TGFrame.h:222
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2464
void SetDNDSource(Bool_t onoff)
Definition: TGFrame.h:293
static Time_t fgLastClick
Definition: TGFrame.h:135
Int_t fY
Definition: TGFrame.h:111
virtual Bool_t HandleFocusChange(Event_t *)
Definition: TGFrame.h:191
virtual Bool_t IsComposite() const
Definition: TGFrame.h:237
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition: TGFrame.cxx:277
virtual void SetDrawOption(Option_t *="")
Set drawing option for object.
Definition: TGFrame.h:290
UInt_t fMaxWidth
Definition: TGFrame.h:116
@ kDeleteWindowCalled
Definition: TGFrame.h:108
UInt_t GetMaxWidth() const
Definition: TGFrame.h:253
virtual void ProcessedConfigure(Event_t *event)
Definition: TGFrame.h:202
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:749
virtual void SetMaxWidth(UInt_t w)
Definition: TGFrame.h:275
const TGResourcePool * GetResourcePool() const
Definition: TGFrame.h:148
virtual Bool_t HandleDNDLeave()
Definition: TGFrame.h:305
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:577
virtual TDNDData * GetDNDData(Atom_t)
Definition: TGFrame.h:300
virtual Bool_t HandleSelectionRequest(Event_t *)
Definition: TGFrame.h:194
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:589
virtual Bool_t HandleSelection(Event_t *)
Definition: TGFrame.h:193
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Definition: TGFrame.h:208
UInt_t fWidth
Definition: TGFrame.h:112
virtual Bool_t HandleButton(Event_t *)
Definition: TGFrame.h:186
UInt_t GetMinHeight() const
Definition: TGFrame.h:252
virtual Bool_t HandleMotion(Event_t *)
Definition: TGFrame.h:189
virtual void SetEditable(Bool_t)
Definition: TGFrame.h:239
void SetFrameElement(TGFrameElement *fe)
Definition: TGFrame.h:261
UInt_t GetHeight() const
Definition: TGFrame.h:250
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition: TGFrame.h:242
virtual Bool_t IsEditable() const
Definition: TGFrame.h:238
virtual void * GetSender()
Definition: TGFrame.h:143
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
Definition: TGFrame.cxx:653
virtual void SetMinHeight(UInt_t h)
Definition: TGFrame.h:274
Bool_t IsDNDSource() const
Definition: TGFrame.h:297
Int_t GetY() const
Definition: TGFrame.h:257
virtual void Layout()
Definition: TGFrame.h:224
virtual Pixel_t GetBackground() const
Definition: TGFrame.h:217
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:613
UInt_t fEventMask
Definition: TGFrame.h:121
UInt_t fMaxHeight
Definition: TGFrame.h:117
virtual void SetWidth(UInt_t w)
Definition: TGFrame.h:271
void SetDNDTarget(Bool_t onoff)
Definition: TGFrame.h:295
virtual Bool_t HandleCrossing(Event_t *)
Definition: TGFrame.h:188
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
Definition: TGFrame.h:289
virtual void ProcessedEvent(Event_t *event)
Definition: TGFrame.h:204
static Window_t fgDbw
Definition: TGFrame.h:138
virtual Bool_t HandleEvent(Event_t *event)
Handle all frame events.
Definition: TGFrame.cxx:441
Bool_t Contains(Int_t x, Int_t y) const
Definition: TGFrame.h:263
virtual void SetY(Int_t y)
Definition: TGFrame.h:270
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
Definition: TGFrame.h:200
virtual void MapWindow()
map window
Definition: TGFrame.h:229
static const TGGC & GetWhiteGC()
Get white graphics context.
Definition: TGFrame.cxx:729
TGFrame(const TGFrame &)
static Pixel_t fgWhitePixel
Definition: TGFrame.h:128
UInt_t GetWidth() const
Definition: TGFrame.h:249
virtual void MapSubwindows()
map sub windows
Definition: TGFrame.h:225
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition: TGFrame.cxx:2437
virtual void SetHeight(UInt_t h)
Definition: TGFrame.h:272
Pixel_t fBackground
Definition: TGFrame.h:120
static Pixel_t fgBlackPixel
Definition: TGFrame.h:129
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:759
static const TGGC * fgHilightGC
Definition: TGFrame.h:132
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:231
static Pixel_t fgDefaultFrameBackground
Definition: TGFrame.h:126
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:3215
TGString * fText
Definition: TGFrame.h:590
Bool_t fHasOwnFont
Definition: TGFrame.h:594
FontStruct_t GetFontStruct() const
Definition: TGFrame.h:634
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Definition: TGFrame.cxx:2305
virtual ~TGGroupFrame()
Delete a group frame.
Definition: TGFrame.cxx:2076
static const TGGC * fgDefaultGC
Definition: TGFrame.h:599
GContext_t GetNormGC() const
Definition: TGFrame.h:633
virtual void DoRedraw()
Redraw the group frame.
Definition: TGFrame.cxx:2103
Int_t fTitlePos
Definition: TGFrame.h:593
static const TGFont * fgDefaultFont
Definition: TGFrame.h:598
virtual const char * GetTitle() const
Returns title of object.
Definition: TGFrame.h:636
virtual TGDimension GetDefaultSize() const
Returns default size.
Definition: TGFrame.cxx:2089
TGGroupFrame(const TGGroupFrame &)
virtual void SetTitlePos(ETitlePos pos=kLeft)
Definition: TGFrame.h:629
TGGroupFrame & operator=(const TGGroupFrame &)
virtual void DrawBorder()
Draw border of around the group frame.
Definition: TGFrame.cxx:2184
virtual void Rename(const char *title)
Definition: TGFrame.h:627
FontStruct_t fFontStruct
Definition: TGFrame.h:591
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
Definition: TGFrame.cxx:2160
GContext_t fNormGC
Definition: TGFrame.h:592
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition: TGFrame.cxx:2295
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
Definition: TGFrame.cxx:2173
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Definition: TGFrame.cxx:2115
Int_t GetTitlePos() const
Definition: TGFrame.h:628
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
Definition: TGFrame.cxx:2266
Int_t fLastButton
Definition: TGFrame.h:665
void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader)
Set columns information in the header frame.
Definition: TGFrame.cxx:2337
TGVFileSplitter ** fSplitHeader
Definition: TGFrame.h:661
Bool_t fOverSplitter
Definition: TGFrame.h:663
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in header frame.
Definition: TGFrame.cxx:2348
TGHeaderFrame(const TGHeaderFrame &)
TGTextButton ** fColHeader
Definition: TGFrame.h:660
TGHeaderFrame & operator=(const TGHeaderFrame &)
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in header frame.
Definition: TGFrame.cxx:2407
Cursor_t fSplitCursor
Definition: TGFrame.h:662
Int_t fNColumns
Definition: TGFrame.h:659
Int_t fOverButton
Definition: TGFrame.h:664
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click mouse event in header frame.
Definition: TGFrame.cxx:2380
TGHorizontalFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition: TGFrame.h:425
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:3105
virtual TGDimension GetDefaultSize() const =0
TGMapKey & operator=(const TGMapKey &)
TGMapKey(UInt_t keycode, TGWindow *w)
Definition: TGFrame.h:457
TGWindow * fWindow
Definition: TGFrame.h:456
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:531
UInt_t fWMWidthInc
Definition: TGFrame.h:478
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
Definition: TGFrame.cxx:1675
UInt_t fWMHeightInc
Definition: TGFrame.h:479
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:1505
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:2775
virtual Bool_t HandleClientMessage(Event_t *event)
Handle client messages sent to this frame.
Definition: TGFrame.cxx:1687
TList * GetBindList() const
Definition: TGFrame.h:520
TString GetMWMfuncString() const
Returns MWM function hints as a string - used in SavePrimitive().
Definition: TGFrame.cxx:2570
const char * GetIconName() const
Returns mime type name of object.
Definition: TGFrame.h:523
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Definition: TGFrame.cxx:1740
UInt_t fWMWidth
Definition: TGFrame.h:472
UInt_t fWMMinHeight
Definition: TGFrame.h:475
void GetWMPosition(Int_t &x, Int_t &y) const
Definition: TGFrame.h:529
Int_t fWMY
Definition: TGFrame.h:471
EInitialState GetWMState() const
Definition: TGFrame.h:535
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
Definition: TGFrame.cxx:1639
UInt_t fWMMinWidth
Definition: TGFrame.h:474
TString fResourceName
Definition: TGFrame.h:466
UInt_t fMWMValue
Definition: TGFrame.h:467
void GetWMSize(UInt_t &w, UInt_t &h) const
Definition: TGFrame.h:530
Atom_t * fDNDTypeList
Definition: TGFrame.h:460
virtual void SendCloseMessage()
Send close message to self.
Definition: TGFrame.cxx:1704
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
Definition: TGFrame.h:527
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition: TGFrame.cxx:1816
Int_t fWMX
Definition: TGFrame.h:470
virtual void CloseWindow()
Close and delete main frame.
Definition: TGFrame.cxx:1730
TString fIconPixmap
Definition: TGFrame.h:464
UInt_t fWMMaxWidth
Definition: TGFrame.h:476
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:3053
TGMainFrame & operator=(const TGMainFrame &)
TString fWindowName
Definition: TGFrame.h:462
virtual Bool_t HandleSelection(Event_t *event)
Handle primary selection event.
Definition: TGFrame.cxx:1663
UInt_t fWMHeight
Definition: TGFrame.h:473
TList * fBindList
Definition: TGFrame.h:461
virtual ~TGMainFrame()
TGMainFrame destructor.
Definition: TGFrame.cxx:1489
UInt_t fWMMaxHeight
Definition: TGFrame.h:477
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
Definition: TGFrame.cxx:1882
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
Definition: TGFrame.cxx:1597
UInt_t fMWMFuncs
Definition: TGFrame.h:468
EInitialState fWMInitState
Definition: TGFrame.h:480
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition: TGFrame.cxx:1761
TString GetMWMinpString() const
Returns MWM input mode hints as a string - used in SavePrimitive().
Definition: TGFrame.cxx:2607
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
Definition: TGFrame.cxx:1566
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition: TGFrame.cxx:1851
TString fClassName
Definition: TGFrame.h:465
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1839
TString fIconName
Definition: TGFrame.h:463
TString GetMWMvalueString() const
Returns MWM decoration hints as a string - used in SavePrimitive().
Definition: TGFrame.cxx:2530
@ kDontCallClose
Definition: TGFrame.h:447
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1826
const char * GetWindowName() const
Definition: TGFrame.h:522
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:1864
const char * GetIconPixmap() const
Definition: TGFrame.h:524
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
Definition: TGFrame.cxx:1651
TGMainFrame(const TGMainFrame &)
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
Definition: TGFrame.cxx:1620
void GetClassHints(const char *&className, const char *&resourceName) const
Definition: TGFrame.h:525
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1748
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
Definition: TGFrame.cxx:1776
UInt_t fMWMInput
Definition: TGFrame.h:469
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:3568
const TGWindow * GetMain() const
Definition: TGFrame.h:569
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:3294
const TGWindow * fMain
Definition: TGFrame.h:556
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition: TGFrame.cxx:1915
TGVerticalFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition: TGFrame.h:414
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:3148
virtual void SetWindowName(const char *name=0)
Set window name.
Definition: TGWindow.cxx:119
virtual void MapRaised()
map raised
Definition: TGWindow.cxx:166
virtual void MapWindow()
map window
Definition: TGWindow.cxx:150
virtual void UnmapWindow()
unmap window
Definition: TGWindow.cxx:174
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:247
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: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