Boost.UI
User Interface Boost library
notebook.hpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Kolya Kosenko
2 
3 // Distributed under the Boost Software License, Version 1.0.
4 // See http://www.boost.org/LICENSE_1_0.txt
5 
7 
8 #ifndef BOOST_UI_NOTEBOOK_HPP
9 #define BOOST_UI_NOTEBOOK_HPP
10 
11 #include <boost/ui/config.hpp>
12 
13 #ifdef BOOST_HAS_PRAGMA_ONCE
14 #pragma once
15 #endif
16 
17 #include <boost/ui/widget.hpp>
18 
19 namespace boost {
20 namespace ui {
21 
25 
26 class BOOST_UI_DECL notebook : public widget
27 {
28 public:
31 
32  notebook() {}
33 
35  explicit notebook(widget& parent)
36  { create(parent); }
37  notebook& create(widget& parent);
39 
41  void append_page(widget& page, const uistring& label);
42 
44  void current_page(size_type index);
45 
47  size_type current_page_index() const;
48 
50  static const size_type npos = nindex;
51 
52 private:
53  class detail_impl;
54  detail_impl* get_impl();
55  const detail_impl* get_impl() const;
56 };
57 
58 } // namespace ui
59 } // namespace boost
60 
61 #endif // BOOST_UI_NOTEBOOK_HPP
boost::ui::label
Widget that displays static text.
Definition: label.hpp:26
boost::ui::uistring
Helper class to convert string between UI and application logic only.
Definition: string.hpp:49
config.hpp
Configuration options.
widget.hpp
Widget class.
boost
Boost C++ libraries namespace.
Definition: window.hpp:19
boost::ui::nindex
const index_type nindex
Invalid index value.
Definition: event.hpp:50
boost::ui::notebook
Widget that is an array of tabbed widgets.
Definition: notebook.hpp:26
boost::ui::notebook::size_type
index_type size_type
Unsigned integral type.
Definition: notebook.hpp:30
boost::ui::notebook::notebook
notebook(widget &parent)
Creates notebook widget.
Definition: notebook.hpp:35
boost::ui::widget
Base class for all widgets.
Definition: widget.hpp:45
boost::ui::index_type
int index_type
Integral type for indexing items.
Definition: event.hpp:45