#ifndef ROOT_TEveWindow
#define ROOT_TEveWindow
#include "TEveElement.h"
#include "TGFrame.h"
class TEveWindow;
class TEveWindowSlot;
class TEveWindowFrame;
class TEveWindowMainFrame;
class TEveWindowPack;
class TEveWindowTab;
class TContextMenu;
class TGButton;
class TGSplitButton;
class TGTextButton;
class TGPack;
class TGTab;
class TEveCompositeFrame : public TGCompositeFrame
{
   friend class TEveWindow;
   friend class TEveWindowManager;
private:
   TEveCompositeFrame(const TEveCompositeFrame&);            
   TEveCompositeFrame& operator=(const TEveCompositeFrame&); 
protected:
   TGCompositeFrame  *fTopFrame;
   TGTextButton      *fToggleBar;
   TGTextButton      *fTitleBar;
   TGTextButton      *fIconBar;
   TGLayoutHints     *fEveWindowLH;
   TGButton          *fMiniBar;
   TEveElement       *fEveParent;
   TEveWindow        *fEveWindow;
   Bool_t             fShowInSync;
   static TContextMenu *fgCtxMenu;
   static const TString fgkEmptyFrameName;
   static TList        *fgFrameList;
public:
   TEveCompositeFrame(TGCompositeFrame* gui_parent, TEveWindow* eve_parent);
   virtual ~TEveCompositeFrame();
   virtual void WindowNameChanged(const TString& name);
   virtual void Destroy() = 0;
   virtual void        AcquireEveWindow(TEveWindow* ew);
   virtual TEveWindow* RelinquishEveWindow(Bool_t reparent=kTRUE);
   TEveWindow* GetEveWindow() const { return fEveWindow; }
   TEveWindow* GetEveParentAsWindow() const;
   virtual void SetCurrent(Bool_t curr);
   virtual void SetShowTitleBar(Bool_t show);
   virtual void HideAllDecorations();
   virtual void ShowNormalDecorations();
   void ReplaceIconBox(TGFrame* icon_box);
   void ActionPressed();
   void FlipTitleBarState();
   void TitleBarClicked();
   ClassDef(TEveCompositeFrame, 0); 
};
class TEveCompositeFrameInMainFrame : public TEveCompositeFrame
{
private:
   TEveCompositeFrameInMainFrame(const TEveCompositeFrameInMainFrame&);            
   TEveCompositeFrameInMainFrame& operator=(const TEveCompositeFrameInMainFrame&); 
protected:
   TGMainFrame      *fMainFrame;
   TEveWindow       *fOriginalSlot;
   TEveWindow       *fOriginalContainer;
public:
   TEveCompositeFrameInMainFrame(TGCompositeFrame* parent, TEveWindow* eve_parent,
                                 TGMainFrame* mf);
   virtual ~TEveCompositeFrameInMainFrame();
   virtual void WindowNameChanged(const TString& name);
   virtual void Destroy();
   void SetOriginalSlotAndContainer(TEveWindow* slot, TEveWindow* container);
   void SomeWindowClosed(TEveWindow* w);
   void MainFrameClosed();
   ClassDef(TEveCompositeFrameInMainFrame, 0); 
};
class TEveCompositeFrameInPack : public TEveCompositeFrame
{
private:
   TEveCompositeFrameInPack(const TEveCompositeFrameInPack&);            
   TEveCompositeFrameInPack& operator=(const TEveCompositeFrameInPack&); 
protected:
   TGPack        *fPack;
public:
   TEveCompositeFrameInPack(TGCompositeFrame* parent, TEveWindow* eve_parent,
                            TGPack* pack);
   virtual ~TEveCompositeFrameInPack();
   virtual void Destroy();
   ClassDef(TEveCompositeFrameInPack, 0); 
};
class TEveCompositeFrameInTab : public TEveCompositeFrame
{
private:
   TEveCompositeFrameInTab(const TEveCompositeFrameInTab&);            
   TEveCompositeFrameInTab& operator=(const TEveCompositeFrameInTab&); 
protected:
   TGTab            *fTab;
   TGCompositeFrame *fParentInTab;
   Int_t FindTabIndex();
public:
   TEveCompositeFrameInTab(TGCompositeFrame* parent, TEveWindow* eve_parent,
                           TGTab* tab);
   virtual ~TEveCompositeFrameInTab();
   virtual void WindowNameChanged(const TString& name);
   virtual void Destroy();
   virtual void SetCurrent(Bool_t curr);
   ClassDef(TEveCompositeFrameInTab, 0); 
};
class TEveWindow : public TEveElementList
{
   friend class TEveWindowManager;
private:
   TEveWindow(const TEveWindow&);            
   TEveWindow& operator=(const TEveWindow&); 
protected:
   TEveCompositeFrame  *fEveFrame;
   Bool_t               fShowTitleBar;
   virtual void SetCurrent(Bool_t curr);
   static UInt_t        fgMainFrameDefWidth;
   static UInt_t        fgMainFrameDefHeight;
   static Pixel_t       fgCurrentBackgroundColor;
   static Pixel_t       fgMiniBarBackgroundColor;
   virtual void PreDeleteElement();
public:
   TEveWindow(const Text_t* n="TEveWindow", const Text_t* t="");
   virtual ~TEveWindow();
   virtual void NameTitleChanged();
   virtual TGFrame*        GetGUIFrame() = 0;
   virtual void            PreUndock();
   virtual void            PostDock();
   virtual Bool_t          CanMakeNewSlots() const { return kFALSE; }
   virtual TEveWindowSlot* NewSlot() { return 0; }
   void PopulateEmptyFrame(TEveCompositeFrame* ef); 
   void SwapWindow(TEveWindow* w);
   void SwapWindowWithCurrent();        
   void UndockWindow();                 
   void UndockWindowDestroySlot();      
   void ReplaceWindow(TEveWindow* w);
   virtual void DestroyWindow();        
   virtual void DestroyWindowAndSlot(); 
   TEveCompositeFrame* GetEveFrame()  { return fEveFrame; }
   void                ClearEveFrame();
   void   FlipShowTitleBar()      { SetShowTitleBar(!fShowTitleBar); }
   Bool_t GetShowTitleBar() const { return fShowTitleBar; }
   void   SetShowTitleBar(Bool_t x);
   Bool_t IsCurrent() const;
   void   MakeCurrent();
   Bool_t IsAncestorOf(TEveWindow* win);
   void   TitleBarClicked();
   
   static TEveWindowSlot* CreateDefaultWindowSlot();
   static TEveWindowSlot* CreateWindowMainFrame(TEveWindow* eve_parent=0);
   static TEveWindowSlot* CreateWindowInTab(TGTab* tab, TEveWindow* eve_parent=0);
   static void            SwapWindows(TEveWindow* w1, TEveWindow* w2);
   
   static UInt_t  GetMainFrameDefWidth()  { return fgMainFrameDefWidth;  }
   static UInt_t  GetMainFrameDefHeight() { return fgMainFrameDefHeight; }
   static void SetMainFrameDefWidth (UInt_t x) { fgMainFrameDefWidth  = x; }
   static void SetMainFrameDefHeight(UInt_t x) { fgMainFrameDefHeight = x; }
   static Pixel_t GetCurrentBackgroundColor() { return fgCurrentBackgroundColor; }
   static Pixel_t GetMiniBarBackgroundColor() { return fgMiniBarBackgroundColor; }
   static void SetCurrentBackgroundColor(Pixel_t p) { fgCurrentBackgroundColor = p; }
   static void SetMiniBarBackgroundColor(Pixel_t p) { fgMiniBarBackgroundColor = p; }
   ClassDef(TEveWindow, 0); 
};
class TEveWindowSlot : public TEveWindow
{
private:
   TEveWindowSlot(const TEveWindowSlot&);            
   TEveWindowSlot& operator=(const TEveWindowSlot&); 
protected:
   TGTextButton      *fEmptyButt;
   TGCompositeFrame  *fEmbedBuffer;
   virtual void SetCurrent(Bool_t curr);
public:
   TEveWindowSlot(const Text_t* n="TEveWindowSlot", const Text_t* t="");
   virtual ~TEveWindowSlot();
   virtual TGFrame* GetGUIFrame();
   TEveWindowPack*   MakePack(); 
   TEveWindowTab*    MakeTab();  
   TEveWindowFrame*  MakeFrame(TGFrame* frame=0);
   TGCompositeFrame* StartEmbedding();
   TEveWindowFrame*  StopEmbedding(const Text_t* name=0);
   ClassDef(TEveWindowSlot, 0); 
};
class TEveWindowFrame : public TEveWindow
{
private:
   TEveWindowFrame(const TEveWindowFrame&);            
   TEveWindowFrame& operator=(const TEveWindowFrame&); 
protected:
   TGFrame         *fGUIFrame;
public:
   TEveWindowFrame(TGFrame* frame, const Text_t* n="TEveWindowFrame", const Text_t* t="");
   virtual ~TEveWindowFrame();
   virtual TGFrame* GetGUIFrame() { return fGUIFrame; }
   TGCompositeFrame* GetGUICompositeFrame();
   ClassDef(TEveWindowFrame, 0); 
};
class TEveWindowPack : public TEveWindow
{
private:
   TEveWindowPack(const TEveWindowPack&);            
   TEveWindowPack& operator=(const TEveWindowPack&); 
protected:
   TGPack          *fPack;
public:
   TEveWindowPack(TGPack* p, const Text_t* n="TEveWindowPack", const Text_t* t="");
   virtual ~TEveWindowPack();
   virtual TGFrame*        GetGUIFrame();
   virtual Bool_t          CanMakeNewSlots() const { return kTRUE; }
   virtual TEveWindowSlot* NewSlot(); 
   void FlipOrientation(); 
   void SetVertical(Bool_t x=kTRUE);
   void SetHorizontal() { SetVertical(kFALSE); }
   void EqualizeFrames();  
   TGPack* GetPack() const { return fPack; }
   ClassDef(TEveWindowPack, 0); 
};
class TEveWindowTab : public TEveWindow
{
private:
   TEveWindowTab(const TEveWindowTab&);            
   TEveWindowTab& operator=(const TEveWindowTab&); 
protected:
   TGTab           *fTab;
public:
   TEveWindowTab(TGTab* tab, const Text_t* n="TEveWindowTab", const Text_t* t="");
   virtual ~TEveWindowTab();
   virtual TGFrame*        GetGUIFrame();
   virtual Bool_t          CanMakeNewSlots() const { return kTRUE; }
   virtual TEveWindowSlot* NewSlot(); 
   TGTab* GetTab() const { return fTab; }
   ClassDef(TEveWindowTab, 0); 
};
#endif
Last change: Mon Dec 15 13:02:59 2008
Last generated: 2008-12-15 13:02
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.