104 ((
TGFrame *)
main)->Connect(
"ProcessedConfigure(Event_t*)",
105 "TGMdiMainFrame",
this,
"UpdateMdiButtons()");
136 if (
main &&
main->InheritsFrom(
"TGMainFrame")) {
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;
1173 TGFrame(p->GetViewPort(), w,
h, options, back)
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;
1246 out <<
" " <<
GetName() <<
"->ArrangeFrames(";
1250 out <<
"kMdiTileHorizontal);" << std::endl;
1254 out <<
"kMdiTileVertical);" << std::endl;
1258 out <<
"kMdiCascade);" << std::endl;
1263 out <<
" " <<
GetName() <<
"->SetResizeMode(kMdiNonOpaque);" << std::endl;
1267 <<
");" << std::endl;
const Mask_t kPointerMotionMask
const Mask_t kKeyShiftMask
const Mask_t kKeyControlMask
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
virtual void SetContainer(TGFrame *f)
virtual void MapSubwindows()
Map all canvas sub windows.
TGViewPort * GetViewPort() const
virtual void Layout()
Create layout for canvas.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle message generated by the canvas scrollbars.
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.
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
virtual void Layout()
Layout the elements of the composite frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual UInt_t GetDefaultHeight() const
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Int_t GetBorderWidth() const
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
const TGResourcePool * GetResourcePool() const
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
virtual void UnmapWindow()
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).
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handle configure notify events for MDI container.
virtual TGDimension GetDefaultSize() const
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.
const TGMdiMainFrame * fMain
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.
TGMdiFrame * GetMdiFrame() const
TGMdiHorizontalWinResizer * GetLeftVR() const
Int_t GetMinimizedY() const
virtual void Layout()
Recalculates the postion and the size of all decor frame components.
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 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
virtual Int_t CloseWindow()
virtual void Move(Int_t x, Int_t y)
Move the MDI window at position x, y.
Int_t GetPreResizeY() const
TGMdiVerticalWinResizer * GetUpperHR() const
Int_t GetPreResizeHeight() const
TGMdiVerticalWinResizer * GetLowerHR() const
void SetPreResizeHeight(Int_t h)
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)
TGMdiFrameList * GetCycleNext() const
TGMdiDecorFrame * GetDecorFrame() const
TGMdiFrameList * GetNext() const
TGMdiFrameList * GetPrev() const
void SetCycleNext(TGMdiFrameList *next)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a MDIframe as a C++ statement(s) on output stream out.
TGMdiMenuBar * GetMenu() const
virtual void ArrangeFrames(Int_t mode)
Automatic repositionning and resizing of every MDI child window.
virtual void FramesArranged(Int_t mode)
TGMdiGeometry GetWindowGeometry(TGMdiFrame *f) const
Get MDI geometry of MDI child window f.
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)
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).
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.
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).
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 ~TGMdiMainFrame()
MDI main frame destructor.
virtual void FrameClosed(Int_t id)
TGPopupMenu * fWinListMenu
TGMdiFrame * GetCurrent() const
Return pointer on current (active) MDI child window.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
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
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages MDI main frame.
TGRectangle GetMinimizedBBox() const
Return minimized box (rectangle) for current MDI child.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboards events into MDI main frame.
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
virtual void FreeSize(TGMdiFrame *frame)
Allow to resize MDI child window mdiframe.
virtual void Layout()
Recalculates the postion and the size of all MDI child windows.
TGMdiDecorFrame * GetDecorFrame(UInt_t id) const
Return decor frame of MDI child window (by id).
void UpdateWinListMenu()
Update MDI menu entries with current list of MDI child windows.
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.
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
virtual Bool_t HandleButton(Event_t *event)
Handle button events in resizer (grab button and resize).
TGPosition LeftTop() const
void Merge(const TGRectangle &r)
TGPosition RightBottom() const
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.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void LowerWindow()
virtual Int_t MustCleanup() const
virtual void RaiseWindow()
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
@ kNotDeleted
object has not been deleted
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.
int main(int argc, char **argv)
double dist(Rotation3D const &r1, Rotation3D const &r2)
static constexpr double s
Short_t Max(Short_t a, Short_t b)