79 fIsMinimized = fIsMaximized =
kFALSE;
80 fMinimizedX = fMinimizedY = 0;
81 fMinimizedUserPlacement =
kFALSE;
85 SetDecorBorderWidth(kMdiBorderWidth);
92 AddFrame(fTitlebar, fLHint);
96 boxGC, kMdiBorderWidth);
98 boxGC, kMdiBorderWidth);
100 boxGC, kMdiBorderWidth);
102 boxGC, kMdiBorderWidth);
106 boxGC, kMdiBorderWidth);
109 boxGC, kMdiBorderWidth);
112 boxGC, kMdiBorderWidth);
115 boxGC, kMdiBorderWidth);
117 fUpperHR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
118 fLowerHR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
119 fLeftVR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
120 fRightVR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
121 fUpperLeftCR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
122 fLowerLeftCR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
123 fUpperRightCR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
124 fLowerRightCR->SetMinSize(50, fTitlebar->GetDefaultHeight() + 2 * fBorderWidth);
128 fFrame->ReparentWindow(
this, fBorderWidth, fTitlebar->GetDefaultHeight());
129 fFrame->fParent =
this;
130 AddFrame(fFrame, fExpandHint);
133 Resize(GetDefaultSize());
139 fFrame->RaiseWindow();
140 fTitlebar->RaiseWindow();
300 if ((event->
fX < 0) || (event->
fY < 0) ||
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) {
1014 if (fWinH - dy < fMinH) dy = fWinH -
fMinH;
1022 if (fWinW + dx < fMinW) dx = fMinW -
fWinW;
1023 if (fWinH + dy < fMinH) dy = fMinH -
fWinH;
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual Bool_t HandleButton(Event_t *event)
Handle button events in resizer (grab button and resize).
virtual const char * GetName() const
Returns name of object.
TGMdiCornerWinResizer * fUpperLeftCR
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
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.
TGCompositeFrame * fRFrame
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
TGMdiVerticalWinResizer * fUpperHR
TGCompositeFrame * fMFrame
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void SetMdiButtons(ULong_t buttons)
Set-up MDI buttons.
virtual Bool_t HandleMotion(Event_t *event)
Handle motion events in resizer (resize associated MDI window).
TGMdiTitleIcon(const TGWindow *p, const TGWindow *titlebar, const TGPicture *pic, Int_t w, Int_t h)
TGMdiTitleIcon constructor.
void SetDecorBorderWidth(Int_t bw)
Set border width of the decor.
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
TGMdiTitleIcon * fWinIcon
const Mask_t kButtonMotionMask
TGMdiVerticalWinResizer * fLowerHR
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events in title bar (used to move MDI window).
virtual void DoRedraw()
Redraw icon.
virtual ~TGMdiTitleIcon()
TGMdiTitleIcon destructor.
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
TGCompositeFrame * fLFrame
TGLayoutHints * fMiddleHint
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual UInt_t GetDefaultHeight() const
Bool_t fMinimizedUserPlacement
virtual void DrawBorder()
Draw corner resizer frame border.
void SetTitleBarColors(UInt_t fore, UInt_t back, TGFont *f)
Set title bar color (blue or grey, depends on active state).
virtual void SetTextFont(TGFont *font, Bool_t global=kFALSE)
Changes text font specified by pointer to TGFont object.
virtual void DrawBorder()
Draw vertical resizer frame border.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse click on title bar.
virtual void Layout()
Layout the elements of the composite frame.
TGPopupMenu * GetPopup() const
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for title bar.
virtual ~TGMdiTitleBar()
TGMdiTitleBar destructor.
const Mask_t kPointerMotionMask
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual void SetText(TGString *newText)
Set new text in label.
virtual void Move(Int_t x, Int_t y)
Move the MDI window at position x, y.
Bool_t IsMinimized() const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
void DrawBox(Int_t x, Int_t y, UInt_t width, UInt_t height)
Draw resize box (rectangle).
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...
TGCompositeFrame(const TGCompositeFrame &)
TGMdiCornerWinResizer * fLowerLeftCR
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual void Activate(Bool_t)
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
TGLayoutHints * fRightHint
TGLabel * GetWinName() const
TGViewPort * GetViewPort() const
virtual Bool_t HandleMotion(Event_t *event)
Handle motion events in resizer (resize associated MDI window).
virtual Bool_t HandleMotion(Event_t *event)
Handle motion events in resizer (resize associated MDI window).
const Mask_t kButtonPressMask
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move the MDI window at position x, y and set size to w, h.
TGMdiTitleBar(const TGWindow *p, const TGWindow *mdiwin, const char *name="Untitled")
TGMdiTitleBar constructor.
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Maximize().
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
TGMdiTitleBar * fTitlebar
TGMdiTitleIcon * GetWinIcon() const
TGMdiCornerWinResizer * fLowerRightCR
virtual void Layout()
Recalculates the postion and the size of all MDI child windows.
TGMdiHorizontalWinResizer * fRightVR
static const TGGC & GetBlackGC()
Get black graphics context.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handle configure notify event.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click in title bar (maximize window)
Bool_t IsMaximized() const
virtual void Move(Int_t x, Int_t y)
Move frame.
void SetWindowIcon(const TGPicture *pic)
Set Window icon (appearing in the title bar)
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
virtual Bool_t HandleButton(Event_t *)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual ~TGMdiDecorFrame()
TGMdiDecorFrame destructor.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click event on MDI icon (close the window)
virtual void DoRedraw()
Redraw picture.
TGFrame * GetContainer() const
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.
TGLayoutHints * fLeftHint
void LayoutButtons(UInt_t buttonmask, Bool_t isMinimized, Bool_t isMaximized)
Recalculates the position of every enabled (displayed) buttons.
RooCmdArg Layout(Double_t xmin, Double_t xmax=0.99, Double_t ymin=0.95)
void SetTextJustify(Int_t tmode)
Set text justification.
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.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
TGMdiCornerWinResizer * fUpperRightCR
virtual void Layout()
Recalculates the postion and the size of all decor frame components.
virtual void SetHsbPosition(Int_t newPos)
Set position of horizontal scrollbar.
void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Restore().
TGMdiHorizontalWinResizer * fLeftVR
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.
void MoveResizeIt()
Move (resize) parent MDI window.
TGMdiMainFrame * fMdiMainFrame
const Mask_t kAnyModifier
void SetWindowName(const char *name)
Set MDI Window name (appearing in the title bar)
virtual void DrawBorder()
Draw horizontal resizer frame border.
const TGWindow * fMsgWindow
virtual void SetPicture(const TGPicture *pic)
Set icon picture.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set resize mode (opaque or transparent)
int main(int argc, char **argv)
virtual void DestroyWindow()
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
void SetResizeMode(Int_t mode)
virtual void SetWindowName(const char *name=0)
Set window name.
virtual Bool_t HandleButton(Event_t *event)
Handle button event on MDI icon (popup menu)
virtual Int_t MustCleanup() const