2
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; version 2 of the
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21
using namespace mforms;
24
TabView::TabView(TabViewType tabType)
26
_tabview_impl= &ControlFactory::get_instance()->_tabview_impl;
28
_tabview_impl->create(this, tabType);
32
void TabView::set_active_tab(int index)
34
_tabview_impl->set_active_tab(this, index);
38
int TabView::get_active_tab()
40
return _tabview_impl->get_active_tab(this);
44
int TabView::add_page(View *page, const std::string& caption)
48
page->set_parent(this);
49
return _tabview_impl->add_page(this, page, caption);
53
void TabView::remove_page(View *page)
56
_tabview_impl->remove_page(this, page);
62
int TabView::get_page_index(View *page)
64
return get_subview_index(page);
68
View *TabView::get_page(int index)
70
return get_subview_at_index(index);
73
void TabView::set_tab_title(int page, const std::string& caption)
75
_tabview_impl->set_tab_title(this, page, caption);