107 ((
TGFrame *)
main)->Connect(
"ProcessedConfigure(Event_t*)",
108 "TGMdiMainFrame",
this,
"UpdateMdiButtons()");
139 if (
main &&
main->InheritsFrom(
"TGMainFrame")) {
239 if (!frame)
return kFALSE;
245 if (!travel)
return kFALSE;
301 if (!travel)
return kFALSE;
322 if (!travel)
return kFALSE;
452 if (!travel)
return 0;
463 if (!travel)
return 0;
473 if (!frame)
return 0;
513 if (first)
rect = wrect;
514 else rect.Merge(wrect);
546 if (scut == (
'9' + 1)) scut =
'A';
595 Int_t num_mapped = 0;
620 if (num_mapped == 0)
return;
627 factor_y =
h / num_mapped;
637 factor_x =
w / num_mapped;
650 factor_y = (
h * 2) / 3;
651 factor_x = (
w * 2) / 3;
663 }
while (travel != tmp);
710 Int_t dist = dx * dx + dy * dy;
711 if (!closest || (dist < cdist)) {
961 if (!mdiframe)
return kFALSE;
965 mdiframe->
Emit(
"CloseWindow()");
1021 event.fXRoot = xroot;
1022 event.fYRoot = yroot;
1040 return mdiframe->
Help();
1090 Int_t mh = th + 2 * bw;
1176 TGFrame(
p->GetViewPort(),
w,
h, options, back)
1225 out << std::endl <<
" // MDI main frame" << std::endl;
1226 out <<
" TGMdiMainFrame *";
1232 out <<
");" << std::endl;
1240 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
1249 out <<
" " <<
GetName() <<
"->ArrangeFrames(";
1253 out <<
"kMdiTileHorizontal);" << std::endl;
1257 out <<
"kMdiTileVertical);" << std::endl;
1261 out <<
"kMdiCascade);" << std::endl;
1266 out <<
" " <<
GetName() <<
"->SetResizeMode(kMdiNonOpaque);" << std::endl;
1270 <<
");" << std::endl;
Handle_t Window_t
Window handle.
const Mask_t kPointerMotionMask
const Mask_t kKeyShiftMask
Handle_t Cursor_t
Cursor handle.
const Mask_t kKeyControlMask
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 input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
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 rect
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 win
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
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 ypos
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
virtual void SetContainer(TGFrame *f)
TGViewPort * GetViewPort() const
void MapSubwindows() override
Map all canvas sub windows.
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Handle message generated by the canvas scrollbars.
void Layout() override
Create layout for canvas.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
const TGResourcePool * GetResourcePool() const
void FreeFont(const TGFont *font)
Free a font.
Pixel_t GetShadow(Pixel_t base_color) const
Return pixel value of shadow color based on base_color.
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.
Bool_t IsEditable() const override
Return kTRUE if frame is being edited.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
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.
Int_t GetBorderWidth() const
UInt_t fHeight
frame height
Int_t fBorderWidth
frame border width
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
void MapWindow() override
map window
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
void UnmapWindow() override
unmap window
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
const TGResourcePool * GetResourcePool() const
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
Encapsulate a graphics context used in the low level graphics.
void SetLineWidth(Int_t v)
Set line width.
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
void SetForeground(Pixel_t v)
Set foreground color.
void SetBackground(Pixel_t v)
Set background color.
void SetFunction(EGraphicsFunction v)
Set graphics context drawing function.
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
void SetSubwindowMode(Int_t v)
Set sub window mode (kClipByChildren, kIncludeInferiors).
TGHotString is a string with a "hot" character underlined.
Defines top level windows that interact with the system Window Manager.
TGDimension GetDefaultSize() const override
Return dimension of MDI container.
TGMdiContainer(const TGMdiMainFrame *p, Int_t w, Int_t h, UInt_t options=0, ULong_t back=GetDefaultFrameBackground())
TGMdiContainer constructor.
Bool_t HandleConfigureNotify(Event_t *event) override
Handle configure notify events for MDI container.
const TGMdiMainFrame * fMain
This file contains all different MDI frame decoration classes.
TGMdiFrame * GetMdiFrame() const
TGMdiHorizontalWinResizer * GetLeftVR() const
Int_t GetMinimizedY() const
Int_t GetMinimizedX() const
Bool_t IsMaximized() const
Bool_t IsMinimized() const
void SetMinimizedX(Int_t x)
const char * GetWindowName()
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set resize mode (opaque or transparent)
void Layout() override
Recalculates the postion and the size of all decor frame components.
void Maximize(Bool_t max=kTRUE)
TGMdiCornerWinResizer * GetLowerRightCR() const
Int_t GetPreResizeWidth() const
void Minimize(Bool_t min=kTRUE)
const TGPicture * GetWindowIcon()
void SetPreResizeX(Int_t x)
Int_t GetPreResizeX() const
ULong_t GetMdiButtons() const
TGMdiHorizontalWinResizer * GetRightVR() const
void SetPreResizeWidth(Int_t w)
void SetMinimizedY(Int_t y)
void SetPreResizeY(Int_t y)
void SetMinUserPlacement(Bool_t place=kTRUE)
TGMdiTitleBar * GetTitleBar() const
TGMdiCornerWinResizer * GetLowerLeftCR() const
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.
virtual Int_t CloseWindow()
Int_t GetPreResizeY() const
TGMdiVerticalWinResizer * GetUpperHR() const
Int_t GetPreResizeHeight() const
TGMdiVerticalWinResizer * GetLowerHR() const
void SetPreResizeHeight(Int_t h)
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 * GetUpperRightCR() const
Bool_t GetMinUserPlacement() const
TGMdiCornerWinResizer * GetUpperLeftCR() const
void SetDecorBorderWidth(Int_t bw)
Set border width of the decor.
void SetCyclePrev(TGMdiFrameList *prev)
UInt_t GetFrameId() const
void SetFrameId(UInt_t id)
void SetDecorFrame(TGMdiDecorFrame *decor)
TGMdiFrameList * GetCyclePrev() const
void SetPrev(TGMdiFrameList *prev)
void SetNext(TGMdiFrameList *next)
TGMdiDecorFrame * fDecor
MDI decor frame.
TGMdiFrameList * GetCycleNext() const
TGMdiDecorFrame * GetDecorFrame() const
TGMdiFrameList * GetNext() const
TGMdiFrameList * GetPrev() const
void SetCycleNext(TGMdiFrameList *next)
This file contains the TGMdiFrame class.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a MDIframe as a C++ statement(s) on output stream out.
TGRectangle fIcon
client, decoration and icon rectangles
Int_t fValueMask
MDI hints mask.
This file contains the TGMdiMainFrame class.
TGMdiMenuBar * GetMenu() const
virtual void ArrangeFrames(Int_t mode)
Automatic repositioning and resizing of every MDI child window.
virtual void FramesArranged(Int_t mode)
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process messages MDI main frame.
TGMdiGeometry GetWindowGeometry(TGMdiFrame *f) const
Get MDI geometry of MDI child window f.
~TGMdiMainFrame() override
MDI main frame destructor.
void AddMdiFrame(TGMdiFrame *f)
Add new MDI child window.
virtual void Restore(TGMdiFrame *frame)
Restore size of MDI child window mdiframe.
virtual void FrameMinimized(Int_t id)
TGMdiMenuBar * fMenuBar
menu bar
virtual void FreeMove(TGMdiFrame *frame)
Allow to move MDI child window mdiframe.
Bool_t SetCurrent(TGMdiFrameList *newcurrent)
Set current (active) MDI child window (by frame list).
TGFont * fFontNotCurrent
fonts for active and inactive MDI children
Bool_t IsMinimized(TGMdiFrame *f)
Check if MDI child window f is minimized;.
virtual void FrameCreated(Int_t id)
TGMdiMainFrame(const TGWindow *p, TGMdiMenuBar *menu, Int_t w, Int_t h, UInt_t options=0, Pixel_t back=GetDefaultFrameBackground())
Create a MDI main frame.
TGFrame * fContainer
MDI container.
TGGC * fBoxGC
GC used to draw resizing box (rectangle)
virtual void CirculateDown()
Send the highest window to the bottom.
TGRectangle GetBBox() const
Return resizing box (rectangle) for current MDI child.
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set MDI windows resize mode (opaque or transparent).
TGMdiFrame * GetMdiFrame(UInt_t id) const
Return frame of MDI child window (by id).
Pixel_t fForeCurrent
back and fore colors for active MDI children
Long_t fNumberOfFrames
number of MDI child windows
Bool_t RemoveMdiFrame(TGMdiFrame *f)
Remove MDI child window.
virtual void FrameRestored(Int_t id)
virtual void Minimize(TGMdiFrame *frame)
Minimize MDI child window mdiframe.
virtual void CloseAll()
Close all MDI child windows.
virtual void CirculateUp()
Bring the lowest window to the top.
virtual void FrameClosed(Int_t id)
TGPopupMenu * fWinListMenu
popup menu with list of MDI child windows
TGMdiFrame * GetCurrent() const
Return pointer on current (active) MDI child window.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a MDI main frame as a C++ statement(s) on output stream out.
virtual void ArrangeMinimized()
This is an attempt to an "smart" minimized window re-arrangement.
Bool_t IsMaximized(TGMdiFrame *f)
Check if MDI child window f is maximized;.
virtual void FrameMaximized(Int_t id)
virtual void Maximize(TGMdiFrame *frame)
Maximize MDI child window mdiframe.
TGMdiFrameList * fChildren
list of MDI child windows
Int_t fResizeMode
current MDI child XY position and resize mode
Bool_t HandleKey(Event_t *event) override
Handle keyboards events into MDI main frame.
TGRectangle GetMinimizedBBox() const
Return minimized box (rectangle) for current MDI child.
void ConfigureWindow(TGMdiFrame *f, TGMdiGeometry &geom)
Set MDI geometry for MDI child window f.
virtual Int_t Close(TGMdiFrame *frame)
Close MDI child window mdiframe.
TGMdiFrameList * fCurrent
current list of MDI child windows
virtual void FreeSize(TGMdiFrame *frame)
Allow to resize MDI child window mdiframe.
TGMdiDecorFrame * GetDecorFrame(UInt_t id) const
Return decor frame of MDI child window (by id).
void Layout() override
Recalculates the postion and the size of all MDI child windows.
void UpdateWinListMenu()
Update MDI menu entries with current list of MDI child windows.
Pixel_t fForeNotCurrent
back and fore colors for inactive MDI children
virtual Int_t ContextHelp(TGMdiFrame *frame)
Calls Help() method of MDI child window mdiframe.
void UpdateMdiButtons()
Update the status of MDI buttons in the decor frame of all children.
Int_t fArrangementMode
MDI children arrangement mode.
void LayoutButtons(UInt_t buttonmask, Bool_t isMinimized, Bool_t isMaximized)
Recalculates the position of every enabled (displayed) buttons.
TGMdiTitleIcon * GetWinIcon() const
void SetTitleBarColors(UInt_t fore, UInt_t back, TGFont *f)
Set title bar color (blue or grey, depends on active state).
void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Maximize().
void SetLeftButPressed(Bool_t press=kTRUE)
void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Restore().
TGMdiButtons * GetButtons() const
Bool_t HandleButton(Event_t *event) override
Handle button events in resizer (grab button and resize).
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.
This class implements a pool for the default GUI resource set, like GC's, colors, fonts,...
const TGFont * GetMenuFont() const
Pixmap_t GetCheckeredBitmap() const
Pixel_t GetSelectedBgndColor() const
Pixel_t GetSelectedFgndColor() const
Pixel_t GetFrameShadowColor() const
Pixel_t GetFrameBgndColor() const
virtual void SetHPos(Int_t xpos)
Moves content of container frame in horizontal direction.
virtual void SetVPos(Int_t ypos)
Moves content of container frame in vertical direction.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
const TGWindow * fParent
Parent window.
virtual Int_t MustCleanup() const
virtual void LowerWindow()
lower window
virtual void SetWindowName(const char *name=nullptr)
Set window name.
virtual void RaiseWindow()
raise window
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
EGEventType fType
of event (see EGEventType)
Window_t fWindow
window reported event is relative to
UInt_t fState
key or button mask