#ifndef ROOT_TGSplitFrame
#define ROOT_TGSplitFrame
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TMap
#include "TMap.h"
#endif
class TGSplitter;
class TContextMenu;
class TGRectMap : public TObject {
private:
TGRectMap(const TGRectMap&);
TGRectMap& operator=(const TGRectMap&);
public:
Int_t fX;
Int_t fY;
UInt_t fW;
UInt_t fH;
TGRectMap(Int_t rx, Int_t ry, UInt_t rw, UInt_t rh):
fX(rx), fY(ry), fW(rw), fH(rh) { }
virtual ~TGRectMap() { }
Bool_t Contains(Int_t px, Int_t py) const
{ return ((px >= fX) && (px < fX + (Int_t) fW) &&
(py >= fY) && (py < fY + (Int_t) fH)); }
ClassDef(TGRectMap, 0)
};
class TGSplitTool : public TGCompositeFrame {
private:
const TGFrame *fWindow;
TGGC fRectGC;
TMap fMap;
TContextMenu *fContextMenu;
Int_t fX;
Int_t fY;
TGSplitTool(const TGSplitTool&);
TGSplitTool& operator=(const TGSplitTool&);
public:
TGSplitTool(const TGWindow *p = 0, const TGFrame *f = 0);
virtual ~TGSplitTool();
void AddRectangle(TGFrame *frm, Int_t x, Int_t y, Int_t w, Int_t h);
void DoRedraw();
void DrawBorder();
Bool_t HandleButton(Event_t *event);
Bool_t HandleMotion(Event_t *event);
void Show(Int_t x, Int_t y);
void Hide();
void Reset();
void SetPosition(Int_t x, Int_t y);
ClassDef(TGSplitTool, 0)
};
class TGSplitFrame : public TGCompositeFrame {
private:
TGSplitFrame(const TGSplitFrame&);
TGSplitFrame& operator=(const TGSplitFrame&);
protected:
TGFrame *fFrame;
TGTransientFrame *fUndocked;
TGSplitter *fSplitter;
TGSplitFrame *fFirst;
TGSplitFrame *fSecond;
TGSplitTool *fSplitTool;
Float_t fWRatio;
Float_t fHRatio;
public:
TGSplitFrame(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
UInt_t options = 0);
virtual ~TGSplitFrame();
virtual void AddFrame(TGFrame *f, TGLayoutHints *l = 0);
virtual void Cleanup();
virtual Bool_t HandleConfigureNotify(Event_t *);
virtual void HSplit(UInt_t h = 0);
virtual void VSplit(UInt_t w = 0);
virtual void RemoveFrame(TGFrame *f);
TGSplitFrame *GetFirst() const { return fFirst; }
TGFrame *GetFrame() const { return fFrame; }
TGSplitFrame *GetSecond() const { return fSecond; }
TGSplitter *GetSplitter() const { return fSplitter; }
TGSplitTool *GetSplitTool() const { return fSplitTool; }
TGSplitFrame *GetTopFrame();
TGFrame *GetUndocked() const { return fUndocked; }
Float_t GetHRatio() const { return fHRatio; }
Float_t GetWRatio() const { return fWRatio; }
void MapToSPlitTool(TGSplitFrame *top);
void OnSplitterClicked(Event_t *event);
void SetHRatio(Float_t r) { fHRatio = r; }
void SetWRatio(Float_t r) { fWRatio = r; }
void SplitHorizontal(const char *side = "top");
void SplitVertical(const char *side = "left");
void UnSplit(const char *which);
void Close();
void CloseAndCollapse();
void ExtractFrame();
void SwallowBack();
void SwitchToMain();
void SplitHor();
void SplitVer();
void Docked(TGFrame* frame);
void Undocked(TGFrame* frame);
static void SwitchFrames(TGFrame *frame, TGCompositeFrame *dest,
TGFrame *prev);
virtual void SavePrimitive(ostream &out, Option_t *option = "");
ClassDef(TGSplitFrame, 0)
};
#endif
Last change: Tue Aug 26 17:16:28 2008
Last generated: 2008-08-26 17:16
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.