Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGFrame.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 03/01/98
3
4/*************************************************************************
5 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGFrame
13#define ROOT_TGFrame
14
15
16#include "TGWindow.h"
17#include "TQObject.h"
18#include "TGDimension.h"
19#include "TGGC.h"
20#include "TGFont.h"
21#include "TGLayout.h"
22#include "TGString.h"
23
24class TGResourcePool;
25class TGTextButton;
26class TGVFileSplitter;
27class TDNDData;
28class TList;
29
30//---- frame states
31
35 kIsArranged = BIT(1)
36};
37
38//---- frame cleanup
42 kDeepCleanup = -1
43};
44
45//---- MWM hints stuff
46
48 // functions
55
56 // input mode
61
62 // decorations
70};
71
72//---- drag and drop
73
76 kIsDNDTarget = BIT(1)
77};
78
79
80class TGFrame : public TGWindow, public TQObject {
81
82protected:
83 enum { kDeleteWindowCalled = BIT(15) };
84
85 Int_t fX; ///< frame x position
86 Int_t fY; ///< frame y position
87 UInt_t fWidth; ///< frame width
88 UInt_t fHeight; ///< frame height
89 UInt_t fMinWidth; ///< minimal frame width
90 UInt_t fMinHeight; ///< minimal frame height
91 UInt_t fMaxWidth; ///< maximal frame width
92 UInt_t fMaxHeight; ///< maximal frame height
93 Int_t fBorderWidth; ///< frame border width
94 UInt_t fOptions; ///< frame options
95 Pixel_t fBackground; ///< frame background color
96 UInt_t fEventMask; ///< currently active event mask
97 Int_t fDNDState; ///< EDNDFlags
98 TGFrameElement *fFE; ///< pointer to frame element
99
105 static const TGGC *fgBlackGC;
106 static const TGGC *fgWhiteGC;
107 static const TGGC *fgHilightGC;
108 static const TGGC *fgShadowGC;
109 static const TGGC *fgBckgndGC;
115
116 static Time_t GetLastClick();
117
118 void *GetSender() override { return this; } //used to set gTQSender
119 virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
120 UInt_t w, UInt_t h);
121 void DoRedraw() override;
122
124 { return fClient->GetResourcePool(); }
125
126 TString GetOptionString() const; //used in SavePrimitive()
127
128 // some protected methods use in gui builder
129 virtual void StartGuiBuilding(Bool_t on = kTRUE);
130
131private:
132 TGFrame(const TGFrame&) = delete;
133 TGFrame& operator=(const TGFrame&) = delete;
134
135public:
136 // Default colors and graphics contexts
139 static Pixel_t GetWhitePixel();
140 static Pixel_t GetBlackPixel();
141 static const TGGC &GetBlackGC();
142 static const TGGC &GetWhiteGC();
143 static const TGGC &GetHilightGC();
144 static const TGGC &GetShadowGC();
145 static const TGGC &GetBckgndGC();
146
147 TGFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
148 UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground());
149 TGFrame(TGClient *c, Window_t id, const TGWindow *parent = nullptr);
150 ~TGFrame() override;
151
152 virtual void DeleteWindow();
153 virtual void ReallyDelete() { delete this; }
154
155 UInt_t GetEventMask() const { return fEventMask; }
156 void AddInput(UInt_t emask);
157 void RemoveInput(UInt_t emask);
158
159 Bool_t HandleEvent(Event_t *event) override;
160 virtual Bool_t HandleConfigureNotify(Event_t *event);
161 virtual Bool_t HandleButton(Event_t *) { return kFALSE; }
162 virtual Bool_t HandleDoubleClick(Event_t *) { return kFALSE; }
163 virtual Bool_t HandleCrossing(Event_t *) { return kFALSE; }
164 virtual Bool_t HandleMotion(Event_t *) { return kFALSE; }
165 virtual Bool_t HandleKey(Event_t *) { return kFALSE; }
166 virtual Bool_t HandleFocusChange(Event_t *) { return kFALSE; }
167 virtual Bool_t HandleClientMessage(Event_t *event);
168 virtual Bool_t HandleSelection(Event_t *) { return kFALSE; }
172 virtual Bool_t HandleDragEnter(TGFrame *) { return kFALSE; }
173 virtual Bool_t HandleDragLeave(TGFrame *) { return kFALSE; }
174 virtual Bool_t HandleDragMotion(TGFrame *) { return kFALSE; }
176 { return kFALSE; }
177 virtual void ProcessedConfigure(Event_t *event)
178 { Emit("ProcessedConfigure(Event_t*)", (Longptr_t)event); } //*SIGNAL*
179 virtual void ProcessedEvent(Event_t *event)
180 { Emit("ProcessedEvent(Event_t*)", (Longptr_t)event); } //*SIGNAL*
181
182 virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
184
185 virtual TGDimension GetDefaultSize() const ;
186 void Move(Int_t x, Int_t y) override;
187 void Resize(UInt_t w = 0, UInt_t h = 0) override;
188 virtual void Resize(TGDimension size);
189 void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0) override;
190 virtual UInt_t GetDefaultWidth() const { return GetDefaultSize().fWidth; }
191 virtual UInt_t GetDefaultHeight() const { return GetDefaultSize().fHeight; }
192 virtual Pixel_t GetBackground() const { return fBackground; }
193 virtual void ChangeBackground(Pixel_t back);
194 void SetBackgroundColor(Pixel_t back) override;
195 virtual Pixel_t GetForeground() const;
196 virtual void SetForegroundColor(Pixel_t /*fore*/) { }
197 virtual UInt_t GetOptions() const { return fOptions; }
198 virtual void ChangeOptions(UInt_t options);
199 virtual void Layout() { }
200 void MapSubwindows() override {} // Simple frames do not have subwindows
201 // Redefine this in TGCompositeFrame!
202 void ReparentWindow(const TGWindow *p, Int_t x = 0, Int_t y = 0) override
203 { TGWindow::ReparentWindow(p, x, y); Move(x, y); }
204 void MapWindow() override { TGWindow::MapWindow(); if (fFE) fFE->fState |= kIsVisible; }
205 void MapRaised() override { TGWindow::MapRaised(); if (fFE) fFE->fState |= kIsVisible; }
206 void UnmapWindow() override { TGWindow::UnmapWindow(); if (fFE) fFE->fState &= ~kIsVisible; }
207
208 virtual void DrawBorder();
209 virtual void DrawCopy(Handle_t /*id*/, Int_t /*x*/, Int_t /*y*/) { }
210 virtual void Activate(Bool_t) { }
211 virtual Bool_t IsActive() const { return kFALSE; }
212 virtual Bool_t IsComposite() const { return kFALSE; }
213 Bool_t IsEditable() const override { return kFALSE; }
214 void SetEditable(Bool_t) override {}
215 virtual void SetLayoutBroken(Bool_t = kTRUE) {}
216 virtual Bool_t IsLayoutBroken() const { return kFALSE; }
217 virtual void SetCleanup(Int_t = kLocalCleanup) { /* backward compatibility */ }
218
219 virtual void SetDragType(Int_t type);
220 virtual void SetDropType(Int_t type);
221 virtual Int_t GetDragType() const;
222 virtual Int_t GetDropType() const;
223
224 UInt_t GetWidth() const { return fWidth; }
225 UInt_t GetHeight() const { return fHeight; }
226 UInt_t GetMinWidth() const { return fMinWidth; }
227 UInt_t GetMinHeight() const { return fMinHeight; }
228 UInt_t GetMaxWidth() const { return fMaxWidth; }
229 UInt_t GetMaxHeight() const { return fMaxHeight; }
231 Int_t GetX() const { return fX; }
232 Int_t GetY() const { return fY; }
234
235 TGFrameElement *GetFrameElement() const { return fFE; }
237
239 { return ((x >= 0) && (x < (Int_t)fWidth) && (y >= 0) && (y < (Int_t)fHeight)); }
241 { return Contains(x, y) ? this : nullptr; }
242
243 // Modifiers (without graphic update)
244 virtual void SetX(Int_t x) { fX = x; }
245 virtual void SetY(Int_t y) { fY = y; }
246 virtual void SetWidth(UInt_t w) { fWidth = w; }
247 virtual void SetHeight(UInt_t h) { fHeight = h; }
248 virtual void SetMinWidth(UInt_t w) { fMinWidth = w; }
249 virtual void SetMinHeight(UInt_t h) { fMinHeight = h; }
250 virtual void SetMaxWidth(UInt_t w) { fMaxWidth = w; }
251 virtual void SetMaxHeight(UInt_t h) { fMaxHeight = h; }
252 virtual void SetSize(const TGDimension &s) { fWidth = s.fWidth; fHeight = s.fHeight; }
253
254 // Printing and saving
255 void Print(Option_t *option="") const override;
256 void SaveUserColor(std::ostream &out, Option_t *);
257 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
258
259 // dummy to remove from context menu
260 void Delete(Option_t * /*option*/ ="") override {}
261 TObject *DrawClone(Option_t * /*option */="") const override { return nullptr; }
262 void DrawClass() const override {}
263 void Dump() const override {}
264 void Inspect() const override {}
265 void SetDrawOption(Option_t * /*option*/="") override {}
266
267 // drag and drop...
269 { if (onoff) fDNDState |= kIsDNDSource; else fDNDState &= ~kIsDNDSource; }
271 { if (onoff) fDNDState |= kIsDNDTarget; else fDNDState &= ~kIsDNDTarget; }
274
275 virtual TDNDData *GetDNDData(Atom_t /*dataType*/) { return nullptr; }
276 virtual Bool_t HandleDNDDrop(TDNDData * /*DNDData*/) { return kFALSE; }
277 virtual Atom_t HandleDNDPosition(Int_t /*x*/, Int_t /*y*/, Atom_t /*action*/,
278 Int_t /*xroot*/, Int_t /*yroot*/) { return kNone; }
279 virtual Atom_t HandleDNDEnter(Atom_t * /*typelist*/) { return kNone; }
280 virtual Bool_t HandleDNDLeave() { return kFALSE; }
281 virtual Bool_t HandleDNDFinished() { return kFALSE; }
282
283 ClassDefOverride(TGFrame,0) // Base class for simple widgets (button, etc.)
284};
285
286
287class TGCompositeFrame : public TGFrame {
288
289
290protected:
291 TGLayoutManager *fLayoutManager; ///< layout manager
292 TList *fList; ///< container of frame elements
293 Bool_t fLayoutBroken; ///< no layout manager is used
294 Int_t fMustCleanup; ///< cleanup mode (see EFrameCleanup)
295 Bool_t fMapSubwindows; ///< kTRUE - map subwindows
296
297 static TGLayoutHints *fgDefaultHints; // default hints used by AddFrame()
298
299private:
302
303public:
304 TGCompositeFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
305 UInt_t options = 0,
307 TGCompositeFrame(TGClient *c, Window_t id, const TGWindow *parent = nullptr);
308 ~TGCompositeFrame() override;
309
310 virtual TList *GetList() const { return fList; }
311
312 UInt_t GetDefaultWidth() const override
313 { return GetDefaultSize().fWidth; }
314 UInt_t GetDefaultHeight() const override
315 { return GetDefaultSize().fHeight; }
317 { return (IsLayoutBroken() ? TGDimension(fWidth, fHeight) :
321 Int_t &fx, Int_t &fy);
322 void MapSubwindows() override;
323 void Layout() override;
324 Bool_t HandleButton(Event_t *) override { return kFALSE; }
325 Bool_t HandleDoubleClick(Event_t *) override { return kFALSE; }
326 Bool_t HandleCrossing(Event_t *) override { return kFALSE; }
327 Bool_t HandleMotion(Event_t *) override { return kFALSE; }
328 Bool_t HandleKey(Event_t *) override { return kFALSE; }
329 Bool_t HandleFocusChange(Event_t *) override { return kFALSE; }
330 Bool_t HandleSelection(Event_t *) override { return kFALSE; }
331 Bool_t HandleDragEnter(TGFrame *) override;
332 Bool_t HandleDragLeave(TGFrame *) override;
333 Bool_t HandleDragMotion(TGFrame *) override;
334 Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo) override;
335 void ChangeOptions(UInt_t options) override;
337
339 virtual void SetLayoutManager(TGLayoutManager *l);
340
341 virtual TGFrameElement* FindFrameElement(TGFrame *f) const;
342
343 virtual void AddFrame(TGFrame *f, TGLayoutHints *l = nullptr);
344 virtual void RemoveAll();
345 virtual void RemoveFrame(TGFrame *f);
346 virtual void ShowFrame(TGFrame *f);
347 virtual void HideFrame(TGFrame *f);
348 Int_t GetState(TGFrame *f) const;
349 Bool_t IsVisible(TGFrame *f) const;
350 Bool_t IsVisible(TGFrameElement *ptr) const { return (ptr->fState & kIsVisible); }
351 Bool_t IsArranged(TGFrame *f) const;
352 Bool_t IsArranged(TGFrameElement *ptr) const { return (ptr->fState & kIsArranged); }
353 Bool_t IsComposite() const override { return kTRUE; }
354 Bool_t IsEditable() const override;
355 void SetEditable(Bool_t on = kTRUE) override;
356 void SetLayoutBroken(Bool_t on = kTRUE) override;
357 Bool_t IsLayoutBroken() const override { return fLayoutBroken || !fLayoutManager; }
358 void SetEditDisabled(UInt_t on = 1) override;
359 void SetCleanup(Int_t mode = kLocalCleanup) override;
360 Int_t MustCleanup() const override { return fMustCleanup; }
361 virtual void Cleanup();
363 Bool_t IsMapSubwindows() const override { return fMapSubwindows; }
364
365 void Print(Option_t *option="") const override;
366 virtual void ChangeSubframesBackground(Pixel_t back);
367 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
368 virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option = "");
369
370 ClassDefOverride(TGCompositeFrame,0) // Base class for composite widgets (menubars, etc.)
371};
372
373
375public:
376 TGVerticalFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
377 UInt_t options = kChildFrame,
379 TGCompositeFrame(p, w, h, options | kVerticalFrame, back) { SetWindowName(); }
380 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
381
382 ClassDefOverride(TGVerticalFrame,0) // Composite frame with vertical child layout
383};
384
386public:
387 TGHorizontalFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
388 UInt_t options = kChildFrame,
390 TGCompositeFrame(p, w, h, options | kHorizontalFrame, back) { SetWindowName(); }
391 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
392
393 ClassDefOverride(TGHorizontalFrame,0) // Composite frame with horizontal child layout
394};
395
396
398
399protected:
400 enum { kDontCallClose = BIT(14) };
401
402 // mapping between key and window
403 class TGMapKey : public TObject {
404 private:
407 public:
410 TGMapKey(UInt_t keycode, TGWindow *w): fKeyCode(keycode), fWindow(w) { }
411 };
412
413 Atom_t *fDNDTypeList; ///< handles DND types
414 TList *fBindList; ///< list with key bindings
415 TString fWindowName; ///< window name
416 TString fIconName; ///< icon name
417 TString fIconPixmap; ///< icon pixmap name
418 TString fClassName; ///< WM class name
419 TString fResourceName; ///< WM resource name
420 UInt_t fMWMValue; ///< MWM decoration hints
421 UInt_t fMWMFuncs; ///< MWM functions
422 UInt_t fMWMInput; ///< MWM input modes
423 Int_t fWMX; ///< WM x position
424 Int_t fWMY; ///< WM y position
425 UInt_t fWMWidth; ///< WM width
426 UInt_t fWMHeight; ///< WM height
427 UInt_t fWMMinWidth; ///< WM min width
428 UInt_t fWMMinHeight; ///< WM min height
429 UInt_t fWMMaxWidth; ///< WM max width
430 UInt_t fWMMaxHeight; ///< WM max height
431 UInt_t fWMWidthInc; ///< WM width increments
432 UInt_t fWMHeightInc; ///< WM height increments
433 EInitialState fWMInitState; ///< WM initial state
434
435 TString GetMWMvalueString() const; ///< used in SaveSource()
436 TString GetMWMfuncString() const; ///< used in SaveSource()
437 TString GetMWMinpString() const; ///< used in SaveSource()
438
439private:
440 TGMainFrame(const TGMainFrame&) = delete;
442
443public:
444 TGMainFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
445 UInt_t options = kVerticalFrame);
446 ~TGMainFrame() override;
447
448 Bool_t HandleKey(Event_t *event) override;
449 Bool_t HandleClientMessage(Event_t *event) override;
450 Bool_t HandleSelection(Event_t *event) override;
451 Bool_t HandleSelectionRequest(Event_t *event) override;
452 Bool_t HandleButton(Event_t *event) override;
453 Bool_t HandleMotion(Event_t *event) override;
455 virtual Bool_t SaveFrameAsCodeOrImage(const TString &fileName);
456 virtual void SendCloseMessage();
457 virtual void CloseWindow(); //*SIGNAL*
458
459 void DontCallClose();
460 void SetWindowName(const char *name = nullptr) override;
461 void SetIconName(const char *name);
462 const TGPicture *SetIconPixmap(const char *iconName);
463 void SetIconPixmap(char **xpm_array);
464 void SetClassHints(const char *className, const char *resourceName);
466 void SetWMPosition(Int_t x, Int_t y);
467 void SetWMSize(UInt_t w, UInt_t h);
470 void SetWMState(EInitialState state);
471
472 virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const;
473 virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const;
474 TList *GetBindList() const { return fBindList; }
475
476 const char *GetWindowName() const { return fWindowName; }
477 const char *GetIconName() const override { return fIconName; }
478 const char *GetIconPixmap() const { return fIconPixmap; }
479 void GetClassHints(const char *&className, const char *&resourceName) const
480 { className = fClassName.Data(); resourceName = fResourceName.Data(); }
483 void GetWMPosition(Int_t &x, Int_t &y) const { x = fWMX; y = fWMY; }
484 void GetWMSize(UInt_t &w, UInt_t &h) const { w = fWMWidth; h = fWMHeight; }
486 UInt_t &winc, UInt_t &hinc) const
490
491 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
492 virtual void SaveSource(const char *filename = "Rootappl.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
493
494 ClassDefOverride(TGMainFrame,0) // Top level window frame
495};
496
497
499
500protected:
501 const TGWindow *fMain; // window over which to popup dialog
502
503private:
506
507public:
508 TGTransientFrame(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
509 UInt_t options = kVerticalFrame);
510
513 virtual void CenterOnParent(Bool_t croot = kTRUE, EPlacement pos = kCenter);
514 const TGWindow *GetMain() const { return fMain; }
515 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
516 void SaveSource(const char *filename = "Rootdlog.C", Option_t *option = "") override; // *MENU*icon=bld_save.png*
517
518 ClassDefOverride(TGTransientFrame,0) // Frame for dialog (transient) windows
519};
520
521
523
524protected:
525 TGString *fText; ///< title text
526 FontStruct_t fFontStruct; ///< title fontstruct
527 GContext_t fNormGC; ///< title graphics context
528 Int_t fTitlePos; ///< *OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",1="Right")}*
529 Bool_t fHasOwnFont; ///< kTRUE - font defined locally, kFALSE - globally
530
531 void DoRedraw() override;
532
533 static const TGFont *fgDefaultFont;
534 static const TGGC *fgDefaultGC;
535
536private:
537 TGGroupFrame(const TGGroupFrame&) = delete;
539
540public:
541 enum ETitlePos { kLeft = -1, kCenter = 0, kRight = 1 };
542
544 static const TGGC &GetDefaultGC();
545
546 TGGroupFrame(const TGWindow *p, TGString *title,
547 UInt_t options = kVerticalFrame,
548 GContext_t norm = GetDefaultGC()(),
551 TGGroupFrame(const TGWindow *p = nullptr, const char *title = nullptr,
552 UInt_t options = kVerticalFrame,
553 GContext_t norm = GetDefaultGC()(),
556 ~TGGroupFrame() override;
557
558 TGDimension GetDefaultSize() const override;
559 void DrawBorder() override;
560 virtual void SetTitle(TGString *title);
561 virtual void SetTitle(const char *title);
562 virtual void Rename(const char *title) { SetTitle(title); } //*MENU*icon=bld_rename.png*
563 Int_t GetTitlePos() const { return fTitlePos; }
564 virtual void SetTitlePos(ETitlePos pos = kLeft) { fTitlePos = pos; } //*SUBMENU*
565 virtual void SetTextColor(Pixel_t color, Bool_t local = kTRUE);
566 virtual void SetTextFont(const char *fontName, Bool_t local = kTRUE);
567 virtual void SetTextFont(FontStruct_t font, Bool_t local = kTRUE);
568 GContext_t GetNormGC() const { return fNormGC; }
570
571 const char *GetTitle() const override { return fText->GetString(); }
572 Bool_t HasOwnFont() const;
573
574 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
575
576 ClassDefOverride(TGGroupFrame,0) // A composite frame with border and title
577};
578
579
581private:
582 TGHeaderFrame(const TGHeaderFrame&) = delete;
584
585protected:
586 Int_t fNColumns; ///< number of columns
587 TGTextButton **fColHeader; ///< column headers for in detailed mode
588 TGVFileSplitter **fSplitHeader; ///< column splitters
589 Cursor_t fSplitCursor; ///< split cursor;
590 Bool_t fOverSplitter; ///< Indicates if the cursor is over a splitter
591 Int_t fOverButton; ///< Indicates over which button the mouse is
592 Int_t fLastButton; ///< Indicates the last button clicked if any
593
594public:
595 TGHeaderFrame(const TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
596 UInt_t options = kChildFrame,
598
599 Bool_t HandleButton(Event_t* event) override;
600 Bool_t HandleMotion(Event_t* event) override;
601 Bool_t HandleDoubleClick(Event_t *event) override;
602
603 void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader);
604
605 ClassDefOverride(TGHeaderFrame,0) // Header frame with buttons and splitters
606};
607
608
609#endif
Handle_t Atom_t
WM token.
Definition GuiTypes.h:37
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
ULong_t Time_t
Event time.
Definition GuiTypes.h:42
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
EInitialState
Initial window mapping state.
Definition GuiTypes.h:345
@ kChildFrame
Definition GuiTypes.h:379
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
Handle_t Cursor_t
Cursor handle.
Definition GuiTypes.h:34
const Handle_t kNone
Definition GuiTypes.h:88
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
ULongptr_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:39
int main()
Definition Prototype.cxx:12
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
double fy() const
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long Longptr_t
Definition RtypesCore.h:82
unsigned int UInt_t
Definition RtypesCore.h:46
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
EMWMHints
Definition TGFrame.h:47
@ kMWMDecorResizeH
Definition TGFrame.h:65
@ kMWMFuncAll
Definition TGFrame.h:49
@ kMWMInputPrimaryApplicationModal
Definition TGFrame.h:58
@ kMWMInputSystemModal
Definition TGFrame.h:59
@ kMWMFuncMove
Definition TGFrame.h:51
@ kMWMDecorBorder
Definition TGFrame.h:64
@ kMWMFuncResize
Definition TGFrame.h:50
@ kMWMDecorMaximize
Definition TGFrame.h:69
@ kMWMDecorTitle
Definition TGFrame.h:66
@ kMWMDecorMinimize
Definition TGFrame.h:68
@ kMWMDecorMenu
Definition TGFrame.h:67
@ kMWMDecorAll
Definition TGFrame.h:63
@ kMWMInputFullApplicationModal
Definition TGFrame.h:60
@ kMWMFuncMaximize
Definition TGFrame.h:53
@ kMWMInputModeless
Definition TGFrame.h:57
@ kMWMFuncClose
Definition TGFrame.h:54
@ kMWMFuncMinimize
Definition TGFrame.h:52
EFrameCleanup
Definition TGFrame.h:39
@ kNoCleanup
Definition TGFrame.h:40
@ kLocalCleanup
Definition TGFrame.h:41
@ kDeepCleanup
Definition TGFrame.h:42
EFrameState
Definition TGFrame.h:32
@ kIsArranged
Definition TGFrame.h:35
@ kIsVisible
Definition TGFrame.h:33
@ kIsMapped
Definition TGFrame.h:34
EDNDFlags
Definition TGFrame.h:74
@ kIsDNDTarget
Definition TGFrame.h:76
@ kIsDNDSource
Definition TGFrame.h:75
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetIconPixmap
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t TranslateCoordinates
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmax
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t SetTextFont
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void funcs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetMWMHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetWMPosition
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t winc
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t modifier
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hinc
char name[80]
Definition TGX11.cxx:110
Drag and drop data container.
Window client.
Definition TGClient.h:37
const TGResourcePool * GetResourcePool() const
Definition TGClient.h:124
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo) override
Handle drop event.
Definition TGFrame.cxx:1421
void SetMapSubwindows(Bool_t on) override
Definition TGFrame.h:362
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
Definition TGFrame.h:316
~TGCompositeFrame() override
Delete a composite frame.
Definition TGFrame.cxx:904
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
Definition TGFrame.cxx:1094
TGLayoutManager * fLayoutManager
layout manager
Definition TGFrame.h:291
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
Definition TGFrame.cxx:1288
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition TGFrame.cxx:1000
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
Bool_t HandleKey(Event_t *) override
Definition TGFrame.h:328
Bool_t HandleCrossing(Event_t *) override
Definition TGFrame.h:326
virtual TList * GetList() const
Definition TGFrame.h:310
UInt_t GetDefaultWidth() const override
Definition TGFrame.h:312
TGFrame * GetFrameFromPoint(Int_t x, Int_t y) override
Get frame located at specified point.
Definition TGFrame.cxx:1308
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1218
void Print(Option_t *option="") const override
Print all frames in this composite frame.
Definition TGFrame.cxx:1266
Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t) override
Definition TGFrame.h:336
Bool_t HandleDragMotion(TGFrame *) override
Handle drag motion event.
Definition TGFrame.cxx:1413
virtual TGLayoutManager * GetLayoutManager() const
Definition TGFrame.h:338
Int_t MustCleanup() const override
Definition TGFrame.h:360
Bool_t HandleSelection(Event_t *) override
Definition TGFrame.h:330
Bool_t HandleDragEnter(TGFrame *) override
Handle drag enter event.
Definition TGFrame.cxx:1365
Bool_t IsComposite() const override
Definition TGFrame.h:353
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:967
Bool_t HandleDragLeave(TGFrame *) override
Handle drag leave event.
Definition TGFrame.cxx:1395
Int_t fMustCleanup
cleanup mode (see EFrameCleanup)
Definition TGFrame.h:294
Bool_t HandleDoubleClick(Event_t *) override
Definition TGFrame.h:325
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
Definition TGFrame.cxx:2667
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1164
Bool_t IsVisible(TGFrameElement *ptr) const
Definition TGFrame.h:350
UInt_t GetDefaultHeight() const override
Definition TGFrame.h:314
TGCompositeFrame(const TGCompositeFrame &)=delete
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
Bool_t HandleMotion(Event_t *) override
Definition TGFrame.h:327
Bool_t fLayoutBroken
no layout manager is used
Definition TGFrame.h:293
Bool_t fMapSubwindows
kTRUE - map subwindows
Definition TGFrame.h:295
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition TGFrame.cxx:1204
TList * fList
container of frame elements
Definition TGFrame.h:292
Bool_t IsEditable() const override
Return kTRUE if frame is being edited.
Definition TGFrame.cxx:927
Bool_t IsArranged(TGFrameElement *ptr) const
Definition TGFrame.h:352
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
Bool_t IsLayoutBroken() const override
Definition TGFrame.h:357
Bool_t HandleButton(Event_t *) override
Definition TGFrame.h:324
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1244
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition TGFrame.cxx:1149
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
Definition TGFrame.cxx:948
static TGLayoutHints * fgDefaultHints
Definition TGFrame.h:297
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a composite frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:2769
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
Definition TGFrame.cxx:1022
virtual void RemoveAll()
Remove all frames from composite frame.
Definition TGFrame.cxx:1131
Bool_t HandleFocusChange(Event_t *) override
Definition TGFrame.h:329
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:1043
Bool_t IsMapSubwindows() const override
Definition TGFrame.h:363
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition TGFrame.cxx:1190
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1231
TGCompositeFrame & operator=(const TGCompositeFrame &)=delete
void SetLayoutBroken(Bool_t on=kTRUE) override
Set broken layout. No Layout method is called.
Definition TGFrame.cxx:1012
UInt_t fHeight
Definition TGDimension.h:21
UInt_t fWidth
Definition TGDimension.h:20
Encapsulate fonts used in the GUI system.
Definition TGFont.h:140
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:321
virtual Atom_t HandleDNDEnter(Atom_t *)
Definition TGFrame.h:279
virtual void SetSize(const TGDimension &s)
Definition TGFrame.h:252
virtual void DrawCopy(Handle_t, Int_t, Int_t)
Definition TGFrame.h:209
virtual Bool_t HandleSelectionClear(Event_t *)
Definition TGFrame.h:170
void Delete(Option_t *="") override
Delete this object.
Definition TGFrame.h:260
TObject * DrawClone(Option_t *="") const override
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
Definition TGFrame.h:261
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition TGFrame.cxx:584
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
Definition TGFrame.cxx:696
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition TGFrame.cxx:339
static const TGGC * fgWhiteGC
Definition TGFrame.h:106
virtual Int_t GetDragType() const
Returns drag source type.
Definition TGFrame.cxx:824
~TGFrame() override
Destructor.
Definition TGFrame.cxx:266
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
Definition TGFrame.cxx:841
Bool_t IsEditable() const override
Definition TGFrame.h:213
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
Definition TGFrame.cxx:629
virtual Bool_t IsLayoutBroken() const
Definition TGFrame.h:216
static const TGGC & GetBlackGC()
Get black graphics context.
Definition TGFrame.cxx:735
static Pixel_t GetBlackPixel()
Get black pixel value.
Definition TGFrame.cxx:722
UInt_t fOptions
frame options
Definition TGFrame.h:94
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
Definition TGFrame.cxx:443
Int_t fX
frame x position
Definition TGFrame.h:85
virtual Bool_t HandleDoubleClick(Event_t *)
Definition TGFrame.h:162
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
UInt_t fMinHeight
minimal frame height
Definition TGFrame.h:90
virtual Atom_t HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
Definition TGFrame.h:277
Int_t GetBorderWidth() const
Definition TGFrame.h:233
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
Definition TGFrame.cxx:348
virtual Bool_t HandleDragEnter(TGFrame *)
Definition TGFrame.h:172
virtual Bool_t HandleDragLeave(TGFrame *)
Definition TGFrame.h:173
UInt_t GetEventMask() const
Definition TGFrame.h:155
virtual Bool_t HandleDNDDrop(TDNDData *)
Definition TGFrame.h:276
virtual void SetX(Int_t x)
Definition TGFrame.h:244
UInt_t GetMinWidth() const
Definition TGFrame.h:226
virtual void SetForegroundColor(Pixel_t)
Definition TGFrame.h:196
virtual Bool_t IsActive() const
Definition TGFrame.h:211
static Bool_t fgInit
Definition TGFrame.h:100
virtual Bool_t HandleKey(Event_t *)
Definition TGFrame.h:165
TGFrame(const TGFrame &)=delete
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition TGFrame.cxx:709
virtual void SetMinWidth(UInt_t w)
Definition TGFrame.h:248
UInt_t fHeight
frame height
Definition TGFrame.h:88
virtual UInt_t GetDefaultWidth() const
Definition TGFrame.h:190
static Int_t fgDby
Definition TGFrame.h:112
virtual Bool_t HandleColormapChange(Event_t *)
Definition TGFrame.h:171
virtual void ReallyDelete()
Definition TGFrame.h:153
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
virtual void SetDropType(Int_t type)
SetDropType.
Definition TGFrame.cxx:816
virtual void SetDragType(Int_t type)
SetDragType.
Definition TGFrame.cxx:809
UInt_t GetMaxHeight() const
Definition TGFrame.h:229
void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0) override
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition TGFrame.h:202
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3230
virtual void DrawBorder()
Draw frame border.
Definition TGFrame.cxx:421
static const TGGC * fgBckgndGC
Definition TGFrame.h:109
virtual Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t)
Definition TGFrame.h:183
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:357
Int_t fBorderWidth
frame border width
Definition TGFrame.h:93
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
Definition TGFrame.cxx:312
void SetDrawOption(Option_t *="") override
Set drawing option for object.
Definition TGFrame.h:265
static const TGGC * fgShadowGC
Definition TGFrame.h:108
Bool_t HandleEvent(Event_t *event) override
Handle all frame events.
Definition TGFrame.cxx:457
TGDimension GetSize() const
Definition TGFrame.h:230
static Pixel_t fgDefaultSelectedBackground
Definition TGFrame.h:102
void DrawClass() const override
Draw class inheritance tree of the class to which this object belongs.
Definition TGFrame.h:262
UInt_t fMinWidth
minimal frame width
Definition TGFrame.h:89
virtual void Activate(Bool_t)
Definition TGFrame.h:210
void DoRedraw() override
Redraw the frame.
Definition TGFrame.cxx:430
void MapWindow() override
map window
Definition TGFrame.h:204
@ kDeleteWindowCalled
Definition TGFrame.h:83
virtual Pixel_t GetForeground() const
Return frame foreground color.
Definition TGFrame.cxx:303
TGFrameElement * GetFrameElement() const
Definition TGFrame.h:235
Bool_t IsDNDTarget() const
Definition TGFrame.h:273
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition TGFrame.cxx:755
virtual void SetLayoutBroken(Bool_t=kTRUE)
Definition TGFrame.h:215
virtual Bool_t HandleDragMotion(TGFrame *)
Definition TGFrame.h:174
virtual Bool_t HandleDNDFinished()
Definition TGFrame.h:281
static UInt_t fgLastButton
Definition TGFrame.h:111
TGFrameElement * fFE
pointer to frame element
Definition TGFrame.h:98
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
virtual Int_t GetDropType() const
Returns drop target type.
Definition TGFrame.cxx:833
Int_t fDNDState
EDNDFlags.
Definition TGFrame.h:97
virtual void SetMaxHeight(UInt_t h)
Definition TGFrame.h:251
static Time_t GetLastClick()
Get time of last mouse click.
Definition TGFrame.cxx:785
void Move(Int_t x, Int_t y) override
Move frame.
Definition TGFrame.cxx:593
static const TGGC * fgBlackGC
Definition TGFrame.h:105
Int_t GetX() const
Definition TGFrame.h:231
void Dump() const override
Dump contents of object on stdout.
Definition TGFrame.h:263
static Int_t fgDbx
Definition TGFrame.h:112
static UInt_t fgUserColor
Definition TGFrame.h:114
virtual void DeleteWindow()
Delete window.
Definition TGFrame.cxx:276
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Definition TGFrame.h:240
virtual UInt_t GetOptions() const
Definition TGFrame.h:197
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition TGFrame.cxx:2506
void SetDNDSource(Bool_t onoff)
Definition TGFrame.h:268
static Time_t fgLastClick
Definition TGFrame.h:110
Int_t fY
frame y position
Definition TGFrame.h:86
virtual Bool_t HandleFocusChange(Event_t *)
Definition TGFrame.h:166
virtual Bool_t IsComposite() const
Definition TGFrame.h:212
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition TGFrame.cxx:293
UInt_t fMaxWidth
maximal frame width
Definition TGFrame.h:91
void UnmapWindow() override
unmap window
Definition TGFrame.h:206
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
Definition TGFrame.cxx:645
UInt_t GetMaxWidth() const
Definition TGFrame.h:228
virtual void ProcessedConfigure(Event_t *event)
Definition TGFrame.h:177
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition TGFrame.cxx:765
virtual void SetMaxWidth(UInt_t w)
Definition TGFrame.h:250
const TGResourcePool * GetResourcePool() const
Definition TGFrame.h:123
virtual Bool_t HandleDNDLeave()
Definition TGFrame.h:280
virtual TDNDData * GetDNDData(Atom_t)
Definition TGFrame.h:275
virtual Bool_t HandleSelectionRequest(Event_t *)
Definition TGFrame.h:169
virtual Bool_t HandleSelection(Event_t *)
Definition TGFrame.h:168
void Print(Option_t *option="") const override
Print window id.
Definition TGFrame.cxx:793
UInt_t fWidth
frame width
Definition TGFrame.h:87
virtual Bool_t HandleButton(Event_t *)
Definition TGFrame.h:161
UInt_t GetMinHeight() const
Definition TGFrame.h:227
virtual Bool_t HandleMotion(Event_t *)
Definition TGFrame.h:164
void SetFrameElement(TGFrameElement *fe)
Definition TGFrame.h:236
UInt_t GetHeight() const
Definition TGFrame.h:225
virtual void SetCleanup(Int_t=kLocalCleanup)
Definition TGFrame.h:217
void MapSubwindows() override
map sub windows
Definition TGFrame.h:200
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
Definition TGFrame.cxx:669
virtual void SetMinHeight(UInt_t h)
Definition TGFrame.h:249
Bool_t IsDNDSource() const
Definition TGFrame.h:272
Int_t GetY() const
Definition TGFrame.h:232
virtual void Layout()
Definition TGFrame.h:199
virtual Pixel_t GetBackground() const
Definition TGFrame.h:192
UInt_t fEventMask
currently active event mask
Definition TGFrame.h:96
UInt_t fMaxHeight
maximal frame height
Definition TGFrame.h:92
virtual void SetWidth(UInt_t w)
Definition TGFrame.h:246
void SetDNDTarget(Bool_t onoff)
Definition TGFrame.h:270
virtual Bool_t HandleCrossing(Event_t *)
Definition TGFrame.h:163
virtual void ProcessedEvent(Event_t *event)
Definition TGFrame.h:179
static Window_t fgDbw
Definition TGFrame.h:113
Bool_t Contains(Int_t x, Int_t y) const
Definition TGFrame.h:238
virtual void SetY(Int_t y)
Definition TGFrame.h:245
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
Definition TGFrame.h:175
static const TGGC & GetWhiteGC()
Get white graphics context.
Definition TGFrame.cxx:745
static Pixel_t fgWhitePixel
Definition TGFrame.h:103
UInt_t GetWidth() const
Definition TGFrame.h:224
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition TGFrame.cxx:2479
void * GetSender() override
Definition TGFrame.h:118
virtual void SetHeight(UInt_t h)
Definition TGFrame.h:247
void SetEditable(Bool_t) override
Definition TGFrame.h:214
void Inspect() const override
Dump contents of this object in a graphics canvas.
Definition TGFrame.h:264
Pixel_t fBackground
frame background color
Definition TGFrame.h:95
TGFrame & operator=(const TGFrame &)=delete
static Pixel_t fgBlackPixel
Definition TGFrame.h:104
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition TGFrame.cxx:775
static const TGGC * fgHilightGC
Definition TGFrame.h:107
void MapRaised() override
map raised
Definition TGFrame.h:205
static Pixel_t fgDefaultFrameBackground
Definition TGFrame.h:101
Encapsulate a graphics context used in the low level graphics.
Definition TGGC.h:22
A composite frame with a border and a title.
Definition TGFrame.h:522
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a group frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3254
TGString * fText
title text
Definition TGFrame.h:525
Bool_t fHasOwnFont
kTRUE - font defined locally, kFALSE - globally
Definition TGFrame.h:529
TGGroupFrame & operator=(const TGGroupFrame &)=delete
FontStruct_t GetFontStruct() const
Definition TGFrame.h:569
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Definition TGFrame.cxx:2347
static const TGGC * fgDefaultGC
Definition TGFrame.h:534
TGGroupFrame(const TGGroupFrame &)=delete
GContext_t GetNormGC() const
Definition TGFrame.h:568
Int_t fTitlePos
OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",...
Definition TGFrame.h:528
static const TGFont * fgDefaultFont
Definition TGFrame.h:533
void DrawBorder() override
Draw border of around the group frame.
Definition TGFrame.cxx:2226
TGDimension GetDefaultSize() const override
Returns default size.
Definition TGFrame.cxx:2131
virtual void SetTitlePos(ETitlePos pos=kLeft)
Definition TGFrame.h:564
void DoRedraw() override
Redraw the group frame.
Definition TGFrame.cxx:2145
virtual void Rename(const char *title)
Definition TGFrame.h:562
FontStruct_t fFontStruct
title fontstruct
Definition TGFrame.h:526
GContext_t fNormGC
title graphics context
Definition TGFrame.h:527
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition TGFrame.cxx:2337
~TGGroupFrame() override
Delete a group frame.
Definition TGFrame.cxx:2118
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
Definition TGFrame.cxx:2215
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Definition TGFrame.cxx:2157
Int_t GetTitlePos() const
Definition TGFrame.h:563
const char * GetTitle() const override
Returns title of object.
Definition TGFrame.h:571
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
Definition TGFrame.cxx:2308
Horizontal Frame used to contain header buttons and splitters in a list view.
Definition TGFrame.h:580
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click mouse event in header frame.
Definition TGFrame.cxx:2422
Int_t fLastButton
Indicates the last button clicked if any.
Definition TGFrame.h:592
void SetColumnsInfo(Int_t nColumns, TGTextButton **colHeader, TGVFileSplitter **splitHeader)
Set columns information in the header frame.
Definition TGFrame.cxx:2379
TGVFileSplitter ** fSplitHeader
column splitters
Definition TGFrame.h:588
Bool_t fOverSplitter
Indicates if the cursor is over a splitter.
Definition TGFrame.h:590
TGHeaderFrame(const TGHeaderFrame &)=delete
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion events in header frame.
Definition TGFrame.cxx:2449
TGTextButton ** fColHeader
column headers for in detailed mode
Definition TGFrame.h:587
Cursor_t fSplitCursor
split cursor;
Definition TGFrame.h:589
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in header frame.
Definition TGFrame.cxx:2390
Int_t fNColumns
number of columns
Definition TGFrame.h:586
TGHeaderFrame & operator=(const TGHeaderFrame &)=delete
Int_t fOverButton
Indicates over which button the mouse is.
Definition TGFrame.h:591
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a horizontal frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3144
TGHorizontalFrame(const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition TGFrame.h:387
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Frame layout manager.
Definition TGLayout.h:135
virtual TGDimension GetDefaultSize() const =0
TGMapKey & operator=(const TGMapKey &)
TGMapKey(UInt_t keycode, TGWindow *w)
Definition TGFrame.h:410
TGWindow * fWindow
Definition TGFrame.h:409
TGMapKey(const TGMapKey &)
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax, UInt_t &winc, UInt_t &hinc) const
Definition TGFrame.h:485
TGMainFrame(const TGMainFrame &)=delete
UInt_t fWMWidthInc
WM width increments.
Definition TGFrame.h:431
UInt_t fWMHeightInc
WM height increments.
Definition TGFrame.h:432
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion events.
Definition TGFrame.cxx:1691
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:1527
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:2817
TList * GetBindList() const
Definition TGFrame.h:474
TString GetMWMfuncString() const
used in SaveSource()
Definition TGFrame.cxx:2612
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Definition TGFrame.cxx:1780
UInt_t fWMWidth
WM width.
Definition TGFrame.h:425
UInt_t fWMMinHeight
WM min height.
Definition TGFrame.h:428
void GetWMPosition(Int_t &x, Int_t &y) const
Definition TGFrame.h:483
Int_t fWMY
WM y position.
Definition TGFrame.h:424
EInitialState GetWMState() const
Definition TGFrame.h:489
UInt_t fWMMinWidth
WM min width.
Definition TGFrame.h:427
TString fResourceName
WM resource name.
Definition TGFrame.h:419
UInt_t fMWMValue
MWM decoration hints.
Definition TGFrame.h:420
void GetWMSize(UInt_t &w, UInt_t &h) const
Definition TGFrame.h:484
Atom_t * fDNDTypeList
handles DND types
Definition TGFrame.h:413
virtual void SendCloseMessage()
Send close message to self.
Definition TGFrame.cxx:1744
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
Definition TGFrame.h:481
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition TGFrame.cxx:1858
Int_t fWMX
WM x position.
Definition TGFrame.h:423
virtual void CloseWindow()
Close and delete main frame.
Definition TGFrame.cxx:1770
TString fIconPixmap
icon pixmap name
Definition TGFrame.h:417
UInt_t fWMMaxWidth
WM max width.
Definition TGFrame.h:429
~TGMainFrame() override
TGMainFrame destructor.
Definition TGFrame.cxx:1507
Bool_t HandleButton(Event_t *event) override
Handle mouse button events.
Definition TGFrame.cxx:1679
Bool_t HandleClientMessage(Event_t *event) override
Handle client messages sent to this frame.
Definition TGFrame.cxx:1727
TString fWindowName
window name
Definition TGFrame.h:415
@ kDontCallClose
Definition TGFrame.h:400
UInt_t fWMHeight
WM height.
Definition TGFrame.h:426
TList * fBindList
list with key bindings
Definition TGFrame.h:414
UInt_t fWMMaxHeight
WM max height.
Definition TGFrame.h:430
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
Definition TGFrame.cxx:1924
TGMainFrame & operator=(const TGMainFrame &)=delete
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
Definition TGFrame.cxx:1637
UInt_t fMWMFuncs
MWM functions.
Definition TGFrame.h:421
EInitialState fWMInitState
WM initial state.
Definition TGFrame.h:433
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition TGFrame.cxx:1801
TString GetMWMinpString() const
used in SaveSource()
Definition TGFrame.cxx:2649
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
Definition TGFrame.cxx:1893
TString fClassName
WM class name.
Definition TGFrame.h:418
TString fIconName
icon name
Definition TGFrame.h:416
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1788
TString GetMWMvalueString() const
used in SaveSource()
Definition TGFrame.cxx:2572
Bool_t HandleKey(Event_t *event) override
Handle keyboard events.
Definition TGFrame.cxx:1606
const char * GetWindowName() const
Definition TGFrame.h:476
Bool_t HandleSelection(Event_t *event) override
Handle primary selection event.
Definition TGFrame.cxx:1703
const char * GetIconPixmap() const
Definition TGFrame.h:478
const char * GetIconName() const override
Returns mime type name of object.
Definition TGFrame.h:477
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a main frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3092
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
Definition TGFrame.cxx:1660
void GetClassHints(const char *&className, const char *&resourceName) const
Definition TGFrame.h:479
Bool_t HandleSelectionRequest(Event_t *event) override
Handle selection request event.
Definition TGFrame.cxx:1715
UInt_t fMWMInput
MWM input modes.
Definition TGFrame.h:422
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition TGPicture.h:25
This class implements a pool for the default GUI resource set, like GC's, colors, fonts,...
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition TGString.h:20
const char * GetString() const
Definition TGString.h:30
Yield an action as soon as it is clicked.
Definition TGButton.h:142
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:498
TGTransientFrame & operator=(const TGTransientFrame &)=delete
void SaveSource(const char *filename="Rootdlog.C", Option_t *option="") override
Save the GUI transient frame widget in a C++ macro file.
Definition TGFrame.cxx:3333
const TGWindow * GetMain() const
Definition TGFrame.h:514
TGTransientFrame(const TGTransientFrame &)=delete
const TGWindow * fMain
Definition TGFrame.h:501
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition TGFrame.cxx:1957
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a transient frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3604
A composite frame that layout their children in vertical way.
Definition TGFrame.h:374
TGVerticalFrame(const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Definition TGFrame.h:376
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a vertical frame widget as a C++ statement(s) on output stream out.
Definition TGFrame.cxx:3187
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual void MapRaised()
map raised
Definition TGWindow.cxx:176
virtual void MapWindow()
map window
Definition TGWindow.cxx:160
virtual void UnmapWindow()
unmap window
Definition TGWindow.cxx:184
virtual void SetWindowName(const char *name=nullptr)
Set window name.
Definition TGWindow.cxx:129
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:257
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
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:139
const char * Data() const
Definition TString.h:376
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Event structure.
Definition GuiTypes.h:174
TLine l
Definition textangle.C:4