124 {
return fClient->GetResourcePool(); }
466 void SetClassHints(
const char *className,
const char *resourceName);
515#if defined(__clang__) && __clang_major__ < 20
516#pragma clang diagnostic push
517#pragma clang diagnostic ignored "-Wshadow"
520#if defined(__clang__) && __clang_major__ < 20
521#pragma clang diagnostic pop
571 virtual void SetTitle(
const char *title);
Handle_t Cursor_t
Cursor handle.
ULong_t Time_t
Event time.
EInitialState
Initial window mapping state.
Handle_t GContext_t
Graphics context handle.
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
ULongptr_t Handle_t
Generic resource handle.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
@ kMWMInputPrimaryApplicationModal
@ kMWMInputFullApplicationModal
Drag and drop data container.
Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo) override
Handle drop event.
void SetMapSubwindows(Bool_t on) override
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
~TGCompositeFrame() override
Delete a composite frame.
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
TGLayoutManager * fLayoutManager
layout manager
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Bool_t HandleKey(Event_t *) override
Bool_t HandleCrossing(Event_t *) override
virtual TList * GetList() const
UInt_t GetDefaultWidth() const override
TGFrame * GetFrameFromPoint(Int_t x, Int_t y) override
Get frame located at specified point.
Int_t GetState(TGFrame *f) const
Get state of sub frame.
void Print(Option_t *option="") const override
Print all frames in this composite frame.
Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t) override
Bool_t HandleDragMotion(TGFrame *) override
Handle drag motion event.
virtual TGLayoutManager * GetLayoutManager() const
Int_t MustCleanup() const override
Bool_t HandleSelection(Event_t *) override
Bool_t HandleDragEnter(TGFrame *) override
Handle drag enter event.
Bool_t IsComposite() const override
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Bool_t HandleDragLeave(TGFrame *) override
Handle drag leave event.
Int_t fMustCleanup
cleanup mode (see EFrameCleanup)
Bool_t HandleDoubleClick(Event_t *) override
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Bool_t IsVisible(TGFrameElement *ptr) const
UInt_t GetDefaultHeight() const override
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
void Layout() override
Layout the elements of the composite frame.
Bool_t HandleMotion(Event_t *) override
Bool_t fLayoutBroken
no layout manager is used
Bool_t fMapSubwindows
kTRUE - map subwindows
virtual void ShowFrame(TGFrame *f)
Show sub frame.
TList * fList
container of frame elements
Bool_t IsEditable() const override
Return kTRUE if frame is being edited.
Bool_t IsArranged(TGFrameElement *ptr) const
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Bool_t IsLayoutBroken() const override
Bool_t HandleButton(Event_t *) override
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
static TGLayoutHints * fgDefaultHints
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a composite frame widget as a C++ statement(s) on output stream out.
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
virtual void RemoveAll()
Remove all frames from composite frame.
Bool_t HandleFocusChange(Event_t *) override
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
Bool_t IsMapSubwindows() const override
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
TGCompositeFrame & operator=(const TGCompositeFrame &)=delete
void SetLayoutBroken(Bool_t on=kTRUE) override
Set broken layout. No Layout method is called.
Encapsulate fonts used in the GUI system.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual Atom_t HandleDNDEnter(Atom_t *)
virtual void SetSize(const TGDimension &s)
virtual void DrawCopy(Handle_t, Int_t, Int_t)
virtual Bool_t HandleSelectionClear(Event_t *)
void Delete(Option_t *="") override
Delete this object.
TObject * DrawClone(Option_t *="") const override
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
static const TGGC * fgWhiteGC
virtual Int_t GetDragType() const
Returns drag source type.
~TGFrame() override
Destructor.
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
Bool_t IsEditable() const override
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
virtual Bool_t IsLayoutBroken() const
static const TGGC & GetBlackGC()
Get black graphics context.
static Pixel_t GetBlackPixel()
Get black pixel value.
UInt_t fOptions
frame options
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
virtual Bool_t HandleDoubleClick(Event_t *)
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
UInt_t fMinHeight
minimal frame height
virtual Atom_t HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
Int_t GetBorderWidth() const
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
virtual Bool_t HandleDragEnter(TGFrame *)
virtual Bool_t HandleDragLeave(TGFrame *)
UInt_t GetEventMask() const
virtual Bool_t HandleDNDDrop(TDNDData *)
virtual void SetX(Int_t x)
UInt_t GetMinWidth() const
virtual void SetForegroundColor(Pixel_t)
virtual Bool_t IsActive() const
virtual Bool_t HandleKey(Event_t *)
TGFrame(const TGFrame &)=delete
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual void SetMinWidth(UInt_t w)
UInt_t fHeight
frame height
virtual UInt_t GetDefaultWidth() const
virtual Bool_t HandleColormapChange(Event_t *)
virtual void ReallyDelete()
virtual UInt_t GetDefaultHeight() const
virtual void SetDropType(Int_t type)
SetDropType.
virtual void SetDragType(Int_t type)
SetDragType.
UInt_t GetMaxHeight() const
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.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a frame widget as a C++ statement(s) on output stream out.
virtual void DrawBorder()
Draw frame border.
static const TGGC * fgBckgndGC
virtual Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t)
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.
Int_t fBorderWidth
frame border width
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
void SetDrawOption(Option_t *="") override
Set drawing option for object.
static const TGGC * fgShadowGC
Bool_t HandleEvent(Event_t *event) override
Handle all frame events.
TGDimension GetSize() const
static Pixel_t fgDefaultSelectedBackground
void DrawClass() const override
Draw class inheritance tree of the class to which this object belongs.
UInt_t fMinWidth
minimal frame width
virtual void Activate(Bool_t)
void DoRedraw() override
Redraw the frame.
void MapWindow() override
map window
virtual Pixel_t GetForeground() const
Return frame foreground color.
TGFrameElement * GetFrameElement() const
Bool_t IsDNDTarget() const
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SetLayoutBroken(Bool_t=kTRUE)
virtual Bool_t HandleDragMotion(TGFrame *)
virtual Bool_t HandleDNDFinished()
static UInt_t fgLastButton
TGFrameElement * fFE
pointer to frame element
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual Int_t GetDropType() const
Returns drop target type.
Int_t fDNDState
EDNDFlags.
virtual void SetMaxHeight(UInt_t h)
static Time_t GetLastClick()
Get time of last mouse click.
void Move(Int_t x, Int_t y) override
Move frame.
static const TGGC * fgBlackGC
void Dump() const override
Dump contents of object on stdout.
static UInt_t fgUserColor
virtual void DeleteWindow()
Delete window.
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
void SetDNDSource(Bool_t onoff)
static Time_t fgLastClick
virtual Bool_t HandleFocusChange(Event_t *)
virtual Bool_t IsComposite() const
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
UInt_t fMaxWidth
maximal frame width
void UnmapWindow() override
unmap window
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
UInt_t GetMaxWidth() const
virtual void ProcessedConfigure(Event_t *event)
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void SetMaxWidth(UInt_t w)
const TGResourcePool * GetResourcePool() const
virtual Bool_t HandleDNDLeave()
virtual TDNDData * GetDNDData(Atom_t)
virtual Bool_t HandleSelectionRequest(Event_t *)
virtual Bool_t HandleSelection(Event_t *)
void Print(Option_t *option="") const override
Print window id.
virtual Bool_t HandleButton(Event_t *)
UInt_t GetMinHeight() const
virtual Bool_t HandleMotion(Event_t *)
void SetFrameElement(TGFrameElement *fe)
virtual void SetCleanup(Int_t=kLocalCleanup)
void MapSubwindows() override
map sub windows
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
virtual void SetMinHeight(UInt_t h)
TString SaveCtorArgs(std::ostream &out, UInt_t dflt_options=kChildFrame, Bool_t check_white_pixel=kFALSE)
Return options and custom color as constructor args Used in the SavePrimitive methods,...
Bool_t IsDNDSource() const
virtual Pixel_t GetBackground() const
UInt_t fEventMask
currently active event mask
UInt_t fMaxHeight
maximal frame height
virtual void SetWidth(UInt_t w)
void SetDNDTarget(Bool_t onoff)
virtual Bool_t HandleCrossing(Event_t *)
virtual void ProcessedEvent(Event_t *event)
Bool_t Contains(Int_t x, Int_t y) const
virtual void SetY(Int_t y)
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
static const TGGC & GetWhiteGC()
Get white graphics context.
static Pixel_t fgWhitePixel
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
void * GetSender() override
virtual void SetHeight(UInt_t h)
void SetEditable(Bool_t) override
void Inspect() const override
Dump contents of this object in a graphics canvas.
Pixel_t fBackground
frame background color
TGFrame & operator=(const TGFrame &)=delete
static Pixel_t fgBlackPixel
static const TGGC & GetBckgndGC()
Get background color graphics context.
static const TGGC * fgHilightGC
void MapRaised() override
map raised
static Pixel_t fgDefaultFrameBackground
Encapsulate a graphics context used in the low level graphics.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a group frame widget as a C++ statement(s) on output stream out.
TGString * fText
title text
Bool_t fHasOwnFont
kTRUE - font defined locally, kFALSE - globally
TGGroupFrame & operator=(const TGGroupFrame &)=delete
FontStruct_t GetFontStruct() const
static const TGGC & GetDefaultGC()
Return default graphics context in use.
static const TGGC * fgDefaultGC
TGGroupFrame(const TGGroupFrame &)=delete
GContext_t GetNormGC() const
Int_t fTitlePos
OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",...
static const TGFont * fgDefaultFont
void DrawBorder() override
Draw border of around the group frame.
TGDimension GetDefaultSize() const override
Returns default size.
virtual void SetTitlePos(ETitlePos pos=kLeft)
void DoRedraw() override
Redraw the group frame.
virtual void Rename(const char *title)
FontStruct_t fFontStruct
title fontstruct
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
GContext_t fNormGC
title graphics context
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
~TGGroupFrame() override
Delete a group frame.
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Int_t GetTitlePos() const
const char * GetTitle() const override
Returns title of object.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a horizontal frame widget as a C++ statement(s) on output stream out.
TGHorizontalFrame(const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
This class describes layout hints used by the layout classes.
TGMapKey & operator=(const TGMapKey &)
TGMapKey(UInt_t keycode, TGWindow *w)
TGMapKey(const TGMapKey &)
void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax, UInt_t &winc, UInt_t &hinc) const
TGMainFrame(const TGMainFrame &)=delete
UInt_t fWMWidthInc
WM width increments.
UInt_t fWMHeightInc
WM height increments.
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion events.
virtual Bool_t SaveFrameAsCodeOrImage()
Opens dialog window allowing user to save the frame contents as a ROOT macro or as an image.
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
TList * GetBindList() const
TString GetMWMfuncString() const
used in SaveSource()
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
UInt_t fWMMinHeight
WM min height.
void GetWMPosition(Int_t &x, Int_t &y) const
EInitialState GetWMState() const
UInt_t fWMMinWidth
WM min width.
TString fResourceName
WM resource name.
UInt_t fMWMValue
MWM decoration hints.
void GetWMSize(UInt_t &w, UInt_t &h) const
Atom_t * fDNDTypeList
handles DND types
virtual void SendCloseMessage()
Send close message to self.
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
virtual void CloseWindow()
Close and delete main frame.
TString fIconPixmap
icon pixmap name
UInt_t fWMMaxWidth
WM max width.
~TGMainFrame() override
TGMainFrame destructor.
Bool_t HandleButton(Event_t *event) override
Handle mouse button events.
Bool_t HandleClientMessage(Event_t *event) override
Handle client messages sent to this frame.
TString fWindowName
window name
UInt_t fWMHeight
WM height.
TList * fBindList
list with key bindings
UInt_t fWMMaxHeight
WM max height.
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
TGMainFrame & operator=(const TGMainFrame &)=delete
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
UInt_t fMWMFuncs
MWM functions.
EInitialState fWMInitState
WM initial state.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
TString GetMWMinpString() const
used in SaveSource()
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
TString fClassName
WM class name.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
TString fIconName
icon name
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
TString GetMWMvalueString() const
used in SaveSource()
Bool_t HandleKey(Event_t *event) override
Handle keyboard events.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
const char * GetWindowName() const
Bool_t HandleSelection(Event_t *event) override
Handle primary selection event.
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.
const char * GetIconPixmap() const
const char * GetIconName() const override
Returns mime type name of object.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a main frame widget as a C++ statement(s) on output stream out.
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
void GetClassHints(const char *&className, const char *&resourceName) const
Bool_t HandleSelectionRequest(Event_t *event) override
Handle selection request event.
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
UInt_t fMWMInput
MWM input modes.
TGClient * fClient
Connection to display server.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
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...
Yield an action as soon as it is clicked.
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.
const TGWindow * GetMain() const
TGTransientFrame(const TGTransientFrame &)=delete
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a transient frame widget as a C++ statement(s) on output stream out.
TGVerticalFrame(const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a vertical frame widget as a C++ statement(s) on output stream out.
ROOT GUI Window base class.
virtual void MapRaised()
map raised
virtual void MapWindow()
map window
virtual void UnmapWindow()
unmap window
virtual void SetWindowName(const char *name=nullptr)
Set window name.
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.
TObject()
TObject constructor.
TQObject(const TQObject &)=delete
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
int main(int argc, char **argv)