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     Copyright (C) 2005 Robin McNeill
00023 */
00024 
00025 #ifndef OMGUI_WIN32_NOTEBOOK_H
00026 #define OMGUI_WIN32_NOTEBOOK_H
00027 
00028 #include <omgui/win32/panel.h>
00029 #include <omgui/common/notebook.h>
00030 #include <omgui/notebook.h>
00031 #include <map>
00032 
00033 namespace omgui {
00034     namespace win32 {
00035 
00036 class Notebook : public virtual omgui::win32::Panel, public virtual omgui::common::Notebook
00037 {
00038 public:
00039     Notebook(omgui::Notebook *wrapper = 0);
00040 
00041     void create(const omgui::initializer::NotebookData &params);
00042 
00043     void append_page(NotebookPage page, const string &name);
00044     void insert_page(int where, NotebookPage page, const string &name);
00045     NotebookPage remove_page(NotebookPage page);
00046     NotebookPage get_selected_page() const;
00047     bool set_selected_page(NotebookPage page);
00048     void set_page_name(NotebookPage page, const string &name);
00049     string get_page_name(NotebookPage page) const;
00050 
00051     int get_page_index(NotebookPage page) const;
00052     NotebookPage get_page(int index) const;
00053 
00054     bool select_next_page();
00055     bool select_previous_page();
00056 
00057     int get_page_count() const;
00058 
00059     int process_message(HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param);
00060 
00067     void get_screen_display_rect(RECT *rect) const;
00068 
00075     void get_display_rect(RECT *rect) const;
00076 
00077     Size get_min_size() const;
00078 
00079 private:
00085     bool send_changing();
00086 
00090     void send_changed();
00091 
00092     void select_page(Panel *page);
00093 
00094     Panel *get_win32_page(int index) const;
00095 
00096     void update_page_indexes();
00097 
00098     HWND m_tabs;
00099     Panel *m_current_page;
00100     typedef std::map<Panel*, int> PageIndexes;
00101     PageIndexes m_indexes;
00102 };
00103 
00104     } // win32
00105 } // omgui
00106 
00107 #endif // OMGUI_WIN32_NOTEBOOK_H

doxygen SourceForge.net Logo