12 #ifndef ROOT_TGDockableFrame
13 #define ROOT_TGDockableFrame
36 class TGDockableFrame;
39 class TGDockButton :
public TGButton {
45 virtual void DrawBorder();
46 virtual void DoRedraw();
49 TGDockButton(
const TGCompositeFrame *p = 0, Int_t
id = 1);
50 virtual ~TGDockButton();
52 virtual Bool_t HandleCrossing(Event_t *event);
54 ClassDef(TGDockButton,0)
58 class TGDockHideButton :
public TGDockButton {
62 virtual void DoRedraw();
65 TGDockHideButton(
const TGCompositeFrame *p = 0);
67 void SetAspectRatio(Int_t a) { fAspectRatio = a; DoRedraw(); }
69 ClassDef(TGDockHideButton,0)
73 class TGUndockedFrame :
public TGTransientFrame {
76 TGUndockedFrame(
const TGUndockedFrame&);
77 TGUndockedFrame& operator=(
const TGUndockedFrame&);
80 TGDockableFrame *fDockable;
83 TGUndockedFrame(
const TGWindow *p = 0, TGDockableFrame *dockable = 0);
84 virtual ~TGUndockedFrame();
89 ClassDef(TGUndockedFrame,0)
93 class TGDockableFrame :
public TGCompositeFrame,
public TGWidget {
94 friend class TGUndockedFrame;
97 TGDockableFrame(
const TGDockableFrame&);
98 TGDockableFrame& operator=(
const TGDockableFrame&);
103 Bool_t fEnableUndock;
107 TGCompositeFrame *fContainer;
108 TGCompositeFrame *fButtons;
109 TGDockButton *fDockButton;
110 TGDockHideButton *fHideButton;
111 TGUndockedFrame *fFrame;
112 TGLayoutHints *fHints;
113 TGLayoutHints *fLb, *fLc;
116 TGDockableFrame(
const TGWindow *p = 0, Int_t
id = -1,
117 UInt_t options = kHorizontalFrame);
118 virtual ~TGDockableFrame();
120 virtual void AddFrame(TGFrame *f, TGLayoutHints *hints);
122 virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t);
123 virtual void Docked() { Emit(
"Docked()"); }
124 virtual void Undocked() { Emit(
"Undocked()"); }
126 void UndockContainer();
127 void DockContainer(Int_t del = kTRUE);
129 void HideContainer();
130 void ShowContainer();
132 void EnableUndock(Bool_t onoff);
133 Bool_t EnableUndock()
const {
return fEnableUndock; }
134 void EnableHide(Bool_t onoff);
135 Bool_t EnableHide()
const {
return fEnableHide; }
137 void SetWindowName(
const char *name);
139 Bool_t IsUndocked()
const {
return (fFrame != 0); }
140 Bool_t IsHidden()
const {
return fHidden; }
142 Bool_t IsFixedSize()
const {
return fFixedSize; }
143 void SetFixedSize(Bool_t fixed) { fFixedSize = fixed; }
145 TGCompositeFrame *GetContainer()
const {
return fContainer; }
146 TGUndockedFrame *GetUndocked()
const {
return fFrame; }
148 virtual void SavePrimitive(std::ostream &out, Option_t *option =
"");
150 ClassDef(TGDockableFrame,0)