TGTab


class description - source file - inheritance tree

class TGTab : public TGCompositeFrame, public TGWidget


    protected:
void ChangeTab(Int_t tabIndex) public:
TGTab TGTab(const TGWindow* p, UInt_t w, UInt_t h, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t options = kChildFrame, ULong_t back = GetDefaultFrameBackground()) TGTab TGTab(const TGTab&) virtual void ~TGTab() virtual TGCompositeFrame* AddTab(TGString* text) virtual TGCompositeFrame* AddTab(const char* text) static TClass* Class() virtual void DrawBorder() TGCompositeFrame* GetContainer() const Int_t GetCurrent() const TGCompositeFrame* GetCurrentContainer() const TGTabElement* GetCurrentTab() const static FontStruct_t GetDefaultFontStruct() static const TGGC& GetDefaultGC() const Int_t GetNumberOfTabs() const TGCompositeFrame* GetTabContainer(Int_t tabIndex) const UInt_t GetTabHeight() const TGTabElement* GetTabTab(Int_t tabIndex) const virtual Bool_t HandleButton(Event_t* event) virtual TClass* IsA() const virtual void RemoveTab(Int_t tabIndex) virtual void Selected(Int_t id) virtual Bool_t SetTab(Int_t tabIndex) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Int_t fCurrent index of current tab UInt_t fTabh tab height TGCompositeFrame* fContainer main container TList* fRemoved list of removed tabs FontStruct_t fFontStruct font GContext_t fNormGC drawing context static FontStruct_t fgDefaultFontStruct static TGGC fgDefaultGC

Class Description

                                                                      
 TGTab, TGTabElement, TGTabLayout                                     
                                                                      
 A tab widget contains a set of composite frames each with a little   
 tab with a name (like a set of folders with tabs).                   
                                                                      
 The TGTab is user callable. The TGTabElement and TGTabLayout are     
 service classes of the tab widget.                                   
                                                                      
 Clicking on a tab will bring the associated composite frame to the   
 front and generate the following event:                              
 kC_COMMAND, kCM_TAB, tab id, 0.                                      
                                                                      


TGTab(const TGWindow *p, UInt_t w, UInt_t h, GContext_t norm, FontStruct_t font, UInt_t options, ULong_t back) : TGCompositeFrame(p, w, h, options, back)
 Create tab widget.

~TGTab()
 Delete tab widget. This deletes the tab windows and the containers.
 The tab string is deleted by the TGTabElement dtor.

TGCompositeFrame* AddTab(TGString *text)
 Add a tab to the tab widget. Returns the new container, which
 is owned by the tab widget. The text is adopted by the tab widget.

TGCompositeFrame* AddTab(const char *text)
 Add a tab to the tab widget. Returns the new container. The container
 is owned by the tab widget.

void RemoveTab(Int_t tabIndex)
 Remove container and tab of tab with index tabIndex.
 Does NOT remove the container contents!

void ChangeTab(Int_t tabIndex)
 Make tabIdx the current tab. Utility method called by SetTab and
 HandleButton().

Bool_t SetTab(Int_t tabIndex)
 Brings the composite frame with the index tabIndex to the
 front and generate the following event if the front tab has changed:
 kC_COMMAND, kCM_TAB, tab id, 0.
 Returns kFALSE if tabIndex is a not valid index

Bool_t HandleButton(Event_t *event)
 Handle button event in the tab widget. Basically we only handle
 button events in the small tabs.

TGCompositeFrame* GetTabContainer(Int_t tabIndex) const
 Return container of tab with index tabIndex.
 Returns 0 in case tabIndex is out of range.

TGTabElement* GetTabTab(Int_t tabIndex) const
 Return container of tab with index tabIndex.
 Returns 0 in case tabIndex is out of range.

Int_t GetNumberOfTabs() const
 Return number of tabs.

FontStruct_t GetDefaultFontStruct()

const TGGC GetDefaultGC()



Inline Functions


                     void DrawBorder()
        TGCompositeFrame* GetContainer() const
                    Int_t GetCurrent() const
        TGCompositeFrame* GetCurrentContainer() const
            TGTabElement* GetCurrentTab() const
                   UInt_t GetTabHeight() const
                     void Selected(Int_t id)
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
                    TGTab TGTab(const TGTab&)


Author: Fons Rademakers 13/01/98
Last update: root/gui:$Name: $:$Id: TGTab.cxx,v 1.6 2003/02/07 18:20:17 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

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.