104 ((
TGFrame *)main)->Connect(
"ProcessedConfigure(Event_t*)",
105 "TGMdiMainFrame",
this,
"UpdateMdiButtons()");
168 gVirtualX->LookupString(event, input,
sizeof(input), keysym);
236 if (!frame)
return kFALSE;
242 if (!travel)
return kFALSE;
298 if (!travel)
return kFALSE;
319 if (!travel)
return kFALSE;
449 if (!travel)
return 0;
460 if (!travel)
return 0;
470 if (!frame)
return 0;
510 if (first) rect = wrect;
511 else rect.
Merge(wrect);
543 if (scut == (
'9' + 1)) scut =
'A';
592 Int_t num_mapped = 0;
617 if (num_mapped == 0)
return;
624 factor_y = h / num_mapped;
634 factor_x = w / num_mapped;
647 factor_y = (h * 2) / 3;
648 factor_x = (w * 2) / 3;
660 }
while (travel != tmp);
708 if (!closest || (dist < cdist)) {
918 if ((x <= p.fX + (
Int_t)
s.fWidth - 1) && (x + w - 1 >= p.fX) &&
919 (y <= p.fY + (
Int_t)
s.fHeight - 1) && (y + h - 1 >= p.fY)) {
958 if (!mdiframe)
return kFALSE;
962 mdiframe->
Emit(
"CloseWindow()");
1018 event.fXRoot = xroot;
1019 event.fYRoot = yroot;
1037 return mdiframe->
Help();
1087 Int_t mh = th + 2 * bw;
1222 out << std::endl <<
" // MDI main frame" << std::endl;
1223 out <<
" TGMdiMainFrame *";
1229 out <<
");" << std::endl;
1236 if (option && strstr(option,
"keep_names"))
1237 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
1241 for (travel = fChildren; travel; travel = travel->
GetNext()) {
1245 if (fArrangementMode) {
1246 out <<
" " <<
GetName() <<
"->ArrangeFrames(";
1247 switch (fArrangementMode) {
1250 out <<
"kMdiTileHorizontal);" << std::endl;
1254 out <<
"kMdiTileVertical);" << std::endl;
1258 out <<
"kMdiCascade);" << std::endl;
1263 out <<
" " <<
GetName() <<
"->SetResizeMode(kMdiNonOpaque);" << std::endl;
1266 out <<
" " <<
GetName() <<
"->SetCurrent(" << GetCurrent()->GetName()
1267 <<
");" << std::endl;
void SetMinUserPlacement(Bool_t place=kTRUE)
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual Bool_t HandleButton(Event_t *event)
Handle button events in resizer (grab button and resize).
void SetPreResizeHeight(Int_t h)
double dist(Rotation3D const &r1, Rotation3D const &r2)
TGMdiCornerWinResizer * GetLowerLeftCR() const
virtual void CloseAll()
Close all MDI child windows.
void Maximize(Bool_t max=kTRUE)
Int_t GetBorderWidth() const
TGPopupMenu * fWinListMenu
Int_t GetPreResizeY() const
virtual void FreeSize(TGMdiFrame *frame)
Allow to resize MDI child window mdiframe.
virtual UInt_t GetOptions() const
void SetDecorFrame(TGMdiDecorFrame *decor)
virtual Int_t Close(TGMdiFrame *frame)
Close MDI child window mdiframe.
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.
const Mask_t kKeyShiftMask
void Merge(const TGRectangle &r)
virtual Int_t ContextHelp(TGMdiFrame *frame)
Calls Help() method of MDI child window mdiframe.
void SetDecorBorderWidth(Int_t bw)
Set border width of the decor.
virtual void Minimize(TGMdiFrame *frame)
Minimize MDI child window mdiframe.
Pixel_t GetFrameBgndColor() const
virtual void Maximize(TGMdiFrame *frame)
Maximize MDI child window mdiframe.
void SetForeground(Pixel_t v)
Set foreground color.
void SetLeftButPressed(Bool_t press=kTRUE)
virtual void FrameCreated(Int_t id)
virtual void SetVPos(Int_t ypos)
Moves content of container frame in vertical direction.
void AddMdiFrame(TGMdiFrame *f)
Add new MDI child window.
TGRectangle GetMinimizedBBox() const
Return minimized box (rectangle) for current MDI child.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handle configure notify events for MDI container.
Pixel_t GetShadow(Pixel_t base_color) const
Return pixel value of shadow color based on base_color.
virtual void SetContainer(TGFrame *f)
Bool_t RemoveMdiFrame(TGMdiFrame *f)
Remove MDI child window.
virtual void FrameRestored(Int_t id)
const TGResourcePool * GetResourcePool() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
TGPosition LeftTop() const
virtual Int_t CloseWindow()
Int_t GetMinimizedX() const
virtual void FrameClosed(Int_t id)
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual UInt_t GetDefaultHeight() const
void SetTitleBarColors(UInt_t fore, UInt_t back, TGFont *f)
Set title bar color (blue or grey, depends on active state).
void SetCycleNext(TGMdiFrameList *next)
virtual void ArrangeMinimized()
This is an attempt to an "smart" minimized window re-arrangement.
virtual void Layout()
Layout the elements of the composite frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetFunction(EGraphicsFunction v)
Set graphics context drawing function.
void Minimize(Bool_t min=kTRUE)
const Mask_t kPointerMotionMask
Bool_t IsMaximized(TGMdiFrame *f)
Check if MDI child window f is maximized;.
const TGMdiMainFrame * fMain
virtual void Restore(TGMdiFrame *frame)
Restore size of MDI child window mdiframe.
void SetMinimizedY(Int_t y)
void SetBackground(Pixel_t v)
Set background color.
virtual Int_t MustCleanup() const
virtual void LowerWindow()
virtual ~TGMdiMainFrame()
MDI main frame destructor.
TGMdiGeometry GetWindowGeometry(TGMdiFrame *f) const
Get MDI geometry of MDI child window f.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual TGDimension GetDefaultSize() const
Return dimension of MDI container.
virtual void Move(Int_t x, Int_t y)
Move the MDI window at position x, y.
Int_t GetMinimizedY() const
Bool_t IsMinimized() const
Pixel_t GetSelectedFgndColor() const
void UpdateWinListMenu()
Update MDI menu entries with current list of MDI child windows.
void SetPreResizeX(Int_t x)
void SetNext(TGMdiFrameList *next)
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages MDI main frame.
int main(int argc, char **argv)
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a MDIframe as a C++ statement(s) on output stream out.
TGMdiDecorFrame * GetDecorFrame(UInt_t id) const
Return decor frame of MDI child window (by id).
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void FreeMove(TGMdiFrame *frame)
Allow to move MDI child window mdiframe.
void SetFrameId(UInt_t id)
TGMdiVerticalWinResizer * GetUpperHR() const
TGMdiContainer(const TGMdiMainFrame *p, Int_t w, Int_t h, UInt_t options=0, ULong_t back=GetDefaultFrameBackground())
TGMdiContainer constructor.
TGViewPort * GetViewPort() const
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
void UpdateMdiButtons()
Update the status of MDI buttons in the decor frame of all children.
object has not been deleted
Bool_t IsMinimized(TGMdiFrame *f)
Check if MDI child window f is minimized;.
TGMdiFrameList * fCurrent
virtual Bool_t HandleKey(Event_t *event)
Handle keyboards events into MDI main frame.
virtual void FrameMinimized(Int_t id)
TGMdiHorizontalWinResizer * GetRightVR() const
ULong_t GetMdiButtons() const
virtual void FrameMaximized(Int_t id)
Int_t GetPreResizeX() const
TGMdiVerticalWinResizer * GetLowerHR() const
Int_t GetPreResizeHeight() const
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.
void SetPreResizeY(Int_t y)
virtual void CirculateUp()
Bring the lowest window to the top.
TGMdiFrameList * fChildren
Pixel_t GetFrameShadowColor() const
void FreeFont(const TGFont *font)
Free a font.
Pixel_t GetSelectedBgndColor() const
TGMdiFrameList * GetCycleNext() const
TGMdiFrame * GetCurrent() const
Return pointer on current (active) MDI child window.
Bool_t SetCurrent(TGMdiFrameList *newcurrent)
Set current (active) MDI child window (by frame list).
void RemoveFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Maximize().
virtual void MapSubwindows()
Map all canvas sub windows.
void SetPrev(TGMdiFrameList *prev)
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
const TGFont * GetMenuFont() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
TGMdiTitleIcon * GetWinIcon() const
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.
TGMdiCornerWinResizer * GetLowerRightCR() const
TGMdiHorizontalWinResizer * GetLeftVR() const
TGMdiFrameList * GetNext() const
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle message generated by the canvas scrollbars.
TGMdiFrameList * GetCyclePrev() const
virtual void Layout()
Recalculates the postion and the size of all MDI child windows.
const TGPicture * GetWindowIcon()
void ConfigureWindow(TGMdiFrame *f, TGMdiGeometry &geom)
Set MDI geometry for MDI child window f.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a MDI main frame as a C++ statement(s) on output stream out.
Bool_t IsMaximized() const
TGRectangle GetBBox() const
Return resizing box (rectangle) for current MDI child.
virtual void CirculateDown()
Send the highest window to the bottom.
const Mask_t kStructureNotifyMask
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
Int_t GetPreResizeWidth() const
const Mask_t kButtonReleaseMask
virtual void RaiseWindow()
TGMdiCornerWinResizer * GetUpperRightCR() const
const char * GetWindowName()
static constexpr double s
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
TGPosition RightBottom() const
void SetMinimizedX(Int_t x)
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set MDI windows resize mode (opaque or transparent).
Pixmap_t GetCheckeredBitmap() const
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
TGMdiTitleBar * GetTitleBar() const
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
void LayoutButtons(UInt_t buttonmask, Bool_t isMinimized, Bool_t isMaximized)
Recalculates the position of every enabled (displayed) buttons.
virtual void UnmapWindow()
virtual void Layout()
Create layout for canvas.
virtual void SetHPos(Int_t xpos)
Moves content of container frame in horizontal direction.
Short_t Max(Short_t a, Short_t b)
void SetPreResizeWidth(Int_t w)
TGMdiFrame * GetMdiFrame(UInt_t id) const
Return frame of MDI child window (by id).
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
void SetLineWidth(Int_t v)
Set line width.
TGMdiDecorFrame * GetDecorFrame() const
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
virtual void Layout()
Recalculates the postion and the size of all decor frame components.
void AddFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
This is called from TGMdiMainFrame on Restore().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
UInt_t GetFrameId() const
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
TGMdiFrameList * GetPrev() const
const Mask_t kKeyControlMask
void SetCyclePrev(TGMdiFrameList *prev)
TGMdiCornerWinResizer * GetUpperLeftCR() const
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
const TGResourcePool * GetResourcePool() const
Bool_t GetMinUserPlacement() const
void SetSubwindowMode(Int_t v)
Set sub window mode (kClipByChildren, kIncludeInferiors).
void SetResizeMode(Int_t mode=kMdiDefaultResizeMode)
Set resize mode (opaque or transparent)
virtual void FramesArranged(Int_t mode)
TGMdiButtons * GetButtons() const
virtual void SetWindowName(const char *name=0)
Set window name.
TGMdiFrame * GetMdiFrame() const
virtual void ArrangeFrames(Int_t mode)
Automatic repositionning and resizing of every MDI child window.
const char * Data() const