window.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_WINDOW_H
00026 #define OMGUI_WIN32_WINDOW_H
00027 
00028 #include <omgui/win32/widget.h>
00029 #include <omgui/win32/panel.h>
00030 #include <omgui/common/window.h>
00031 #include <omgui/window.h>
00032 
00033 namespace omgui {
00034     namespace win32 {
00035         
00036 class Window : public virtual omgui::win32::Widget, public virtual omgui::common::Window
00037 {
00038     friend LRESULT CALLBACK window_wndproc(HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param);
00039 
00040 private:
00041     Pointer<omgui::Panel> m_content_panel;
00042     Pointer<omgui::MenuBar> m_menubar;
00043 
00044 public:
00045     Window(omgui::Window *wrapper = 0);
00046     
00047     void create(const omgui::initializer::WindowData &params);
00048 
00049     int process_message(HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param);
00050 
00051     omgui::Size client_size_to_absolute(const omgui::Size &size);
00052 
00053     // window interface
00054     virtual void set_min_content_size(const omgui::Size&);
00055     virtual void set_max_content_size(const omgui::Size&);
00056     virtual omgui::Size get_min_content_size() const;
00057     virtual omgui::Size get_max_content_size() const;
00058     virtual Pointer<omgui::Panel> set_content_panel(const Pointer<omgui::Panel> &p);
00059     virtual Pointer<omgui::Panel> get_content_panel() const;
00060 
00061     // toplevel interface
00062     virtual void set_title(const string &t);
00063     virtual string get_title();
00064 
00065     virtual void set_content_size(const omgui::Size &s);
00066     virtual omgui::Size get_content_size() { return omgui::Size(); }
00067 
00068     string get_window_placement() const;
00069     void set_window_placement(const string &placement);
00070 
00071     void set_menu_bar(const Pointer<omgui::MenuBar> &menubar);
00072     Pointer<omgui::MenuBar> get_menu_bar() const;
00073 };
00074 
00075     } // win32
00076 } // omgui
00077 
00078 #endif // OMGUI_WIN32_WINDOW_H

doxygen SourceForge.net Logo