438 if (isMinimized | isMaximized) {
502 switch (
event->fCode) {
522 switch (
event->fCode) {
539 if (
f && (
f !=
this)) {
804 switch (
event->fCode) {
833 switch (
event->fCode) {
const Mask_t kButtonMotionMask
const Mask_t kButtonPressMask
const Mask_t kAnyModifier
const Mask_t kPointerMotionMask
Handle_t Cursor_t
Cursor handle.
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
ULong_t Pixel_t
Pixel value.
winID h TVirtualViewer3D TVirtualGLPainter p
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 mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
virtual void SetHsbPosition(Int_t newPos)
Set position of horizontal scrollbar.
TGViewPort * GetViewPort() const
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
The base class for composite widgets (menu bars, list boxes, etc.).
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
TGFrame * GetFrameFromPoint(Int_t x, Int_t y) override
Get frame located at specified point.
Int_t MustCleanup() const override
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
void Layout() override
Layout the elements of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Encapsulate fonts used in the GUI system.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
static const TGGC & GetBlackGC()
Get black graphics context.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
UInt_t fHeight
frame height
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.
Int_t fBorderWidth
frame border width
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
virtual void Activate(Bool_t)
void MapWindow() override
map window
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
void Move(Int_t x, Int_t y) override
Move frame.
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Encapsulate a graphics context used in the low level graphics.
TGHotString is a string with a "hot" character underlined.
This class handles GUI icons.
virtual void SetPicture(const TGPicture *pic)
Set icon picture.
void DoRedraw() override
Redraw picture.
This class handles GUI labels.
void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void SetText(TGString *newText)
Set new text in label.
virtual void SetTextFont(TGFont *font, Bool_t global=kFALSE)
Changes text font specified by pointer to TGFont object.
This class describes layout hints used by the layout classes.
Bool_t HandleMotion(Event_t *event) override
Handle motion events in resizer (resize associated MDI window).
void DrawBorder() override
Draw corner resizer frame border.
TGMdiCornerWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=20, Int_t h=20)
TGMdiCornerWinResizer constructor.
This file contains all different MDI frame decoration classes.
Bool_t HandleConfigureNotify(Event_t *event) override
Handle configure notify event.
TGMdiTitleBar * fTitlebar
MDI window title bar.
~TGMdiDecorFrame() override
TGMdiDecorFrame destructor.
TGMdiVerticalWinResizer * fUpperHR
Bool_t IsMaximized() const
Bool_t IsMinimized() const
TGLayoutHints * fExpandHint
layout hints
TGMdiVerticalWinResizer * fLowerHR
upper and lower vertical resizers
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set resize mode (opaque or transparent)
ULong_t fButtonMask
mask used to display/hide buttons
TGMdiCornerWinResizer * fUpperLeftCR
void Layout() override
Recalculates the postion and the size of all decor frame components.
TGMdiHorizontalWinResizer * fLeftVR
Bool_t fIsMaximized
minimized and maximized flags
Bool_t fMinimizedUserPlacement
user placement flag
TGMdiMainFrame * fMdiMainFrame
MDI main frame.
void SetWindowName(const char *name) override
Set MDI Window name (appearing in the title bar)
void SetWindowIcon(const TGPicture *pic)
Set Window icon (appearing in the title bar)
TGMdiFrame * fFrame
parent (owner) MDI frame
TGMdiDecorFrame(TGMdiMainFrame *main, TGMdiFrame *frame, Int_t w, Int_t h, const TGGC *boxGC, UInt_t options=0, Pixel_t back=GetDefaultFrameBackground())
TGMdiDecorFrame constructor.
void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h) override
Move the MDI window at position x, y and set size to w, h.
Int_t fMinimizedY
minimized position
void Move(Int_t x, Int_t y) override
Move the MDI window at position x, y.
void SetMdiButtons(ULong_t buttons)
Set-up MDI buttons.
TGMdiCornerWinResizer * fLowerRightCR
upper right and lower right resizers
TGMdiCornerWinResizer * fUpperRightCR
Bool_t HandleButton(Event_t *event) override
Handle mouse button events.
void SetDecorBorderWidth(Int_t bw)
Set border width of the decor.
TGMdiCornerWinResizer * fLowerLeftCR
upper left and lower left resizers
TGMdiHorizontalWinResizer * fRightVR
left and right horizontal resizers
This file contains the TGMdiFrame class.
void DrawBorder() override
Draw horizontal resizer frame border.
TGMdiHorizontalWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=5, Int_t h=4)
TGMdiHorizontalWinResizer constructor.
Bool_t HandleMotion(Event_t *event) override
Handle motion events in resizer (resize associated MDI window).
This file contains the TGMdiMainFrame class.
void Layout() override
Recalculates the postion and the size of all MDI child windows.
Bool_t HandleButton(Event_t *event) override
Handle mouse click on title bar.
void LayoutButtons(UInt_t buttonmask, Bool_t isMinimized, Bool_t isMaximized)
Recalculates the position of every enabled (displayed) buttons.
TGMdiTitleIcon * GetWinIcon() const
TGLayoutHints * fLeftHint
void SetTitleBarColors(UInt_t fore, UInt_t back, TGFont *f)
Set title bar color (blue or grey, depends on active state).
TGLabel * GetWinName() const
TGLayoutHints * fMiddleHint
TGMdiTitleBar(const TGWindow *p, const TGWindow *mdiwin, const char *name="Untitled")
TGMdiTitleBar constructor.
void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Maximize().
TGCompositeFrame * fLFrame
Int_t fY0
initial position of the mouse click
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process messages for title bar.
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click in title bar (maximize window)
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion events in title bar (used to move MDI window).
Bool_t fMidButPressed
mouse button pressed
void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Restore().
TGLabel * fWinName
window name label
const TGWindow * fMdiWin
owner MDI window
~TGMdiTitleBar() override
TGMdiTitleBar destructor.
TGCompositeFrame * fMFrame
TGMdiTitleIcon * fWinIcon
title icon
TGMdiButtons * fButtons
MDI buttons.
TGCompositeFrame * fRFrame
the three parts of the title bar
TGLayoutHints * fRightHint
layout hints
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click event on MDI icon (close the window)
TGMdiTitleIcon(const TGWindow *p, const TGWindow *titlebar, const TGPicture *pic, Int_t w, Int_t h)
TGMdiTitleIcon constructor.
Bool_t HandleButton(Event_t *event) override
Handle button event on MDI icon (popup menu)
TGPopupMenu * GetPopup() const
void DoRedraw() override
Redraw icon.
~TGMdiTitleIcon() override
TGMdiTitleIcon destructor.
const TGWindow * fMsgWindow
window handling container messages
TGPopupMenu * fPopup
Popup menu associated to the title icon.
TGMdiVerticalWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=4, Int_t h=5)
TGMdiVerticalWinResizer constructor.
void DrawBorder() override
Draw vertical resizer frame border.
Bool_t HandleMotion(Event_t *event) override
Handle motion events in resizer (resize associated MDI window).
Int_t fPos
position of the resizer
const TGGC * fBoxGC
GC used for resizing rectangle.
TGMdiWinResizer(const TGWindow *p, const TGWindow *mdiwin, Int_t pos, const TGGC *boxGC, Int_t linew, Int_t mdioptions=kMdiDefaultResizeMode, Int_t w=1, Int_t h=1, UInt_t options=kOwnBackground)
TGMdiWinResizer constructor.
Int_t fNewH
new MDI win position and dimension
Bool_t HandleButton(Event_t *event) override
Handle button events in resizer (grab button and resize).
Int_t fMdiOptions
MDI options.
Int_t fLineW
line width of resizing rectangle
const TGWindow * fMdiWin
owner MDI Window
void MoveResizeIt()
Move (resize) parent MDI window.
void SetResizeMode(Int_t mode)
Int_t fY0
initial position of the mouse click
Bool_t fMidButPressed
mouse buttons flags
void SetMinSize(Int_t w=50, Int_t h=20)
void DrawBox(Int_t x, Int_t y, UInt_t width, UInt_t height)
Draw resize box (rectangle).
Int_t fWinH
MDI win position and dimension.
Int_t fOldH
old MDI win position and dimension
Int_t fMinH
Min width and height of the MDI Win.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
ROOT GUI Window base class.
const TGWindow * fParent
Parent window.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the window.
virtual void DestroyWindow()
destroy window
virtual void SetWindowName(const char *name=nullptr)
Set window name.
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
virtual void RaiseWindow()
raise window
UInt_t fEditDisabled
flags used for "guibuilding"
const char * GetName() const override
Returns name of object.