Kandinsky: Simplistic drawing for the TabView

Change-Id: I3c3ade5da2d7f55a305811de071fb6bba5c2b37d
This commit is contained in:
Romain Goyet
2016-06-15 13:34:41 +02:00
parent 80ceb51171
commit 8108512fe9
2 changed files with 8 additions and 0 deletions

View File

@@ -9,6 +9,9 @@ class TabViewController;
class TabView : public View {
public:
TabView();
// View
void drawRect(KDRect rect) const override;
int numberOfSubviews() const override;
View * subview(int index) override;
void layoutSubviews() override;

View File

@@ -11,6 +11,11 @@ TabView::TabView() :
{
}
/* View */
void TabView::drawRect(KDRect rect) const {
KDFillRect(rect, KDColorRGB(0xb5, 0x1d, 0xab));
}
void TabView::addTabNamed(const char * name) {
assert(m_numberOfTabs < k_maxNumberOfTabs);
uint8_t tabIndex = m_numberOfTabs;