library: libGui
#include "TGTab.h"

TGTab


class description - header file - source file - inheritance tree (.pdf)

class TGTab : public TGCompositeFrame, public TGWidget

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
<-
TGCompositeFrame
TGWidget
<-
TGTab

    protected:
TGTab(const TGTab&) void ChangeTab(Int_t tabIndex) TGTab& operator=(const TGTab&) public:
TGTab(const TGWindow* p = 0, UInt_t w = 1, UInt_t h = 1, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground()) virtual ~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() virtual TGLayoutManager* GetLayoutManager() const Int_t GetNumberOfTabs() const TGCompositeFrame* GetTabContainer(Int_t tabIndex) const TGCompositeFrame* GetTabContainer(const char* name) const UInt_t GetTabHeight() const TGTabElement* GetTabTab(Int_t tabIndex) const TGTabElement* GetTabTab(const char* name) const virtual TClass* IsA() const Bool_t IsEnabled(Int_t tabIndex) const virtual void NewTab(const char* text = "tab") virtual void RemoveTab(Int_t tabIndex = -1) virtual void SavePrimitive(ostream& out, Option_t* option = "") virtual void Selected(Int_t id) virtual void SetEnabled(Int_t tabIndex, Bool_t on = kTRUE) virtual Bool_t SetTab(Int_t tabIndex) virtual Bool_t SetTab(const char* name) virtual void SetText(const char* text = "tab") 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 const TGFont* fgDefaultFont static const 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)
 Create tab widget.
TGTab(const TGTab& gt)
copy constructor
TGTab& operator=(const TGTab& gt)
assignment operator
~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 SetEnabled(Int_t tabIndex, Bool_t on)
 Enable or disable tab.
Bool_t IsEnabled(Int_t tabIndex)
 Returns true if tab is enabled.
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 SetTab(const char *name)
 Brings the composite frame with the name to the
 front and generate the following event if the front tab has changed:
 kC_COMMAND, kCM_TAB, tab id, 0.
 Returns kFALSE if tab with name does not exist.
TGCompositeFrame * GetTabContainer(Int_t tabIndex)
 Return container of tab with index tabIndex.
 Return 0 in case tabIndex is out of range.
TGCompositeFrame * GetTabContainer(const char *name)
 Return the tab container of tab with string name.
 Returns 0 in case name is not found.
TGTabElement * GetTabTab(Int_t tabIndex)
 Return the tab element of tab with index tabIndex.
 Returns 0 in case tabIndex is out of range.
TGTabElement * GetTabTab(const char *name)
 Return the tab element of tab with string name.
 Returns 0 in case name is not found.
Int_t GetNumberOfTabs()
 Return number of tabs.
FontStruct_t GetDefaultFontStruct()
 Return default font structure in use.
const TGGC & GetDefaultGC()
 Return default graphics context in use.
void NewTab(const char *text)
 Create new tab. Used in context menu.
void SetText(const char *text)
 Set text to current tab.
TGLayoutManager * GetLayoutManager()
 Return layout manager.
void SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 Save a tab widget as a C++ statement(s) on output stream out.
void DrawBorder()
Int_t GetCurrent()
UInt_t GetTabHeight()
void Selected(Int_t id)

Author: Fons Rademakers 13/01/98
Last update: root/gui:$Name: $:$Id: TGTab.cxx,v 1.37 2006/07/09 05:27:54 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - 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.