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 Mart Raudsepp
00023     leio (at) dustbite [dot] net
00024 */
00025 
00026 #ifndef OMGUI_GTK2_WINDOW_H
00027 #define OMGUI_GTK2_WINDOW_H
00028 
00029 #include <omgui/gtk2/gtk.h>
00030 
00031 #include <omgui/common/window.h>
00032 #include <omgui/gtk2/widget.h>
00033 #include <omgui/window.h>
00034 
00035 namespace omgui {
00036     class Panel;
00037     namespace gtk2 {
00038         
00039 class Window : public virtual omgui::gtk2::Widget, public virtual omgui::common::Window
00040 {
00041 public:
00042     Window(omgui::Window *wrapper = 0);
00043 
00044     void create(const omgui::initializer::WindowData &params);
00045 
00046     // object interface
00047     virtual void set_size(const omgui::Size&);
00048     virtual void set_min_size(const omgui::Size&);
00049     virtual void set_max_size(const omgui::Size&);
00050     virtual void set_position(const omgui::Point&);
00051     virtual omgui::Size get_size() const;
00052     virtual omgui::Size get_min_size() const;
00053     virtual omgui::Size get_max_size() const;
00054     virtual omgui::Point get_position() const;
00055 
00056     // widget interface
00057 
00058     // Overridden to use gtk_window_set_focus_on_map
00059     // instead of gtk_widget_grab_focus
00060     virtual void show(bool show, bool activate);
00061 
00062     // toplevel interface
00063     virtual void set_title(const string&);
00064     virtual string get_title();
00065 
00066     virtual void set_content_size(const omgui::Size&);
00067     virtual omgui::Size get_content_size();
00068 
00069     // window interface
00070     virtual void set_min_content_size(const omgui::Size&);
00071     virtual void set_max_content_size(const omgui::Size&);
00072     virtual omgui::Size get_min_content_size() const;
00073     virtual omgui::Size get_max_content_size() const;
00074     virtual omgui::Panel *set_content_panel(omgui::api::Panel *p);
00075     virtual omgui::Panel *get_content_panel() const;
00076 
00077     string get_window_placement() const;
00078     void set_window_placement(const string &placement);
00079 
00080     virtual void set_menu_bar(const Pointer<omgui::MenuBar> &menubar);
00081     virtual Pointer<omgui::MenuBar> get_menu_bar() const;
00082 };
00083 
00084     } // gtk2
00085 } // omgui
00086 
00087 #endif // OMGUI_GTK2_WINDOW_H

doxygen SourceForge.net Logo