notebook.h

Go to the documentation of this file.
00001 
00007 /*
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with this library; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 */
00022 
00023 #ifndef OMGUI_H
00024 #define OMGUI_H
00025 
00026 #include <omgui/panel.h>
00027 #include <omgui/initializer/notebook.h>
00028 
00029 namespace omgui {
00030 
00053 class OMGUI_API Notebook : public Panel
00054 {
00055 public:
00056     typedef omgui::api::Notebook api_type;
00057     typedef NotebookInitializer Initializer;
00058     typedef omgui::event_traits<Window> event_traits;
00059 
00065     static Pointer<Notebook> create(const Initializer &initializer, object_id id = OBJECT_ID_ANY);
00066 
00078     void append_page(NotebookPage page, const string &name);
00079 
00092     void insert_page(int where, NotebookPage page, const string &name);
00093 
00106     NotebookPage remove_page(NotebookPage page);
00107 
00112     NotebookPage get_selected_page() const;
00113 
00129     bool set_selected_page(NotebookPage page);
00130 
00138     bool select_next_page();
00139 
00147     bool select_previous_page();
00148 
00155     void set_page_name(NotebookPage page, const string &name);
00156 
00160     string get_page_name(NotebookPage page) const;
00161 
00170     int get_page_index(NotebookPage page) const;
00171 
00179     NotebookPage get_page(int index) const;
00180 
00184     int get_page_count() const;
00185 
00186 private:
00187     api_type *m_impl;
00188 
00189 protected:
00190     Notebook(object_id id);
00191     Notebook(object_id id, api_type *impl);
00192 
00196     void initialize(const Initializer &initializer);
00197 
00198 public:
00199     api_type *get_impl() const;
00200 };
00201 
00202 } // omgui
00203 
00204 #endif // OMGUI_H

doxygen SourceForge.net Logo