9 #include "cviewcontainer.h" 12 #include "controls/icontrollistener.h" 36 kAlignTop = kAlignLeft,
37 kAlignBottom = kAlignRight
40 CTabView (
const CRect& size,
CBitmap* tabBitmap,
CBitmap* background =
nullptr, TabPosition tabPosition = kPositionTop, int32_t style = 0);
41 CTabView (
const CRect& size,
const CRect& tabSize,
CBitmap* background =
nullptr, TabPosition tabPosition = kPositionTop, int32_t style = 0);
47 virtual bool addTab (
CView* view, UTF8StringPtr name =
nullptr,
CBitmap* tabBitmap =
nullptr);
58 virtual void alignTabs (TabAlignment alignment = kAlignCenter);
60 virtual void setTabViewInsets (
const CPoint& inset);
64 void valueChanged (
CControl *pControl)
override;
71 void setCurrentChild (CTabChildView* childView);
73 int32_t numberOfChilds;
75 TabPosition tabPosition;
80 CTabChildView* firstChild;
81 CTabChildView* lastChild;
82 CTabChildView* currentChild;
void invalid() override
mark whole view as invalid
Definition: cviewcontainer.cpp:618
void drawBackgroundRect(CDrawContext *pContext, const CRect &_updateRect) override
draw the background
Definition: ctabview.cpp:357
Container Class of CView objects.
Definition: cviewcontainer.h:52
font class
Definition: cfont.h:31
Rect structure.
Definition: crect.h:17
virtual bool removeTab(CView *view)
remove a tab
Definition: ctabview.cpp:257
a tab view
Definition: ctabview.h:19
void setViewSize(const CRect &rect, bool invalid=true) override
set views size
Definition: ctabview.cpp:471
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
RGBA Color structure.
Definition: ccolor.h:15
virtual void setTabFontStyle(const CFontRef font, CCoord fontSize=12, CColor selectedColor=kBlackCColor, CColor deselectedColor=kWhiteCColor)
call this after the tabs are added. Tabs added after this call will have the default font style...
Definition: ctabview.cpp:406
void setAutosizeFlags(int32_t flags) override
set autosize flags
Definition: ctabview.cpp:153
virtual void alignTabs(TabAlignment alignment=kAlignCenter)
call this after you have added all tabs to align them according to alignment
Definition: ctabview.cpp:425
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
virtual bool selectTab(int32_t index)
select tab at index
Definition: ctabview.cpp:309
base class of all VSTGUI controls
Definition: ccontrol.h:76
virtual int32_t getCurrentSelectedTab() const
get current index of selected tab
Definition: ctabview.h:52
Base Class of all view objects.
Definition: cview.h:44
virtual CRect & getTabViewSize(CRect &rect) const
the size of one tab
Definition: ctabview.cpp:386
virtual bool removeAllTabs()
remove all tabs
Definition: ctabview.cpp:291
Point structure.
Definition: cpoint.h:17
Definition: icontrollistener.h:14
virtual bool addTab(CView *view, UTF8StringPtr name=nullptr, CBitmap *tabBitmap=nullptr)
add a tab
Definition: ctabview.cpp:159