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-2006 Thomas Steinacher 00023 http://www.eggdrop.ch/ 00024 tom (at) eggdrop [dot] ch 00025 */ 00026 00027 #ifndef OMGUI_COCOA_WINDOW_H 00028 #define OMGUI_COCOA_WINDOW_H 00029 00030 #include <omgui/common/window.h> 00031 #include <omgui/cocoa/widget.h> 00032 #include <omgui/cocoa/panel.h> 00033 00034 namespace omgui { 00035 namespace cocoa { 00036 00037 class Window : public virtual omgui::cocoa::Widget, public virtual omgui::common::Window 00038 { 00039 private: 00040 Pointer<omgui::Panel> m_root_panel; 00041 00042 public: 00043 Window(omgui::Window *wrapper = 0); 00044 00045 void create(const omgui::initializer::WindowData ¶ms); 00046 00047 // object interface 00048 virtual void set_size(const omgui::Size&); 00049 virtual void set_min_size(const omgui::Size&); 00050 virtual void set_max_size(const omgui::Size&); 00051 virtual void set_position(const omgui::Point&); 00052 virtual omgui::Size get_size() const; 00053 virtual omgui::Point get_position() const; 00054 00055 // widget interface 00056 virtual void enable(bool sensitive); 00057 virtual bool is_enabled() const; 00058 virtual bool is_shown() const; 00059 virtual void show(bool show, bool activate); 00060 00061 // toplevel interface 00062 virtual void set_title(const string&); 00063 virtual string get_title(); 00064 00065 virtual void set_content_size(const omgui::Size&); 00066 virtual omgui::Size get_content_size(); 00067 00068 // window interface 00069 virtual void set_min_content_size(const omgui::Size&); 00070 virtual void set_max_content_size(const omgui::Size&); 00071 virtual omgui::Size get_min_content_size() const; 00072 virtual omgui::Size get_max_content_size() const; 00073 virtual Pointer<omgui::Panel> set_content_panel(const Pointer<omgui::Panel> &p); 00074 virtual Pointer<omgui::Panel> get_content_panel() const; 00075 00076 string get_window_placement() const; 00077 void set_window_placement(const string &placement); 00078 00079 virtual void set_menu_bar(const Pointer<omgui::MenuBar> &menubar); 00080 virtual Pointer<omgui::MenuBar> get_menu_bar() const; 00081 }; 00082 00083 } // cocoa 00084 } // omgui 00085 00086 #endif // OMGUI_COCOA_WINDOW_H