widget.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_API_WIDGET_H
00024 #define OMGUI_API_WIDGET_H
00025 
00026 #include <omgui/api/object.h>
00027 #include <omgui/initializer/widget.h>
00028 
00029 namespace omgui {
00030     class Panel;
00031     class Window;
00032     namespace api {
00033         
00034 class Widget : public virtual Object
00035 {
00036 public:
00037     typedef omgui::initializer::WidgetData data_type; 
00038     typedef omgui::Widget wrapper_type;
00039 
00040     virtual void set_size(const omgui::Size&) = 0;
00041     virtual void set_min_size(const omgui::Size&) = 0;
00042     virtual void set_max_size(const omgui::Size&) = 0;
00043     virtual void set_natural_size(const omgui::Size&) = 0;
00044     virtual void set_position(const omgui::Point&) = 0;
00045     virtual void set_rect(const omgui::Rect&) = 0;
00046     virtual omgui::Size get_size() const = 0;
00047     virtual omgui::Size get_min_size() const = 0;
00048     virtual omgui::Size get_max_size() const = 0;
00049     virtual omgui::Size get_natural_size() const = 0;
00050     virtual omgui::Point get_position() const = 0;
00051     virtual omgui::Rect get_rect() const = 0;
00052 
00053     virtual void *get_handle() const = 0;
00054     virtual void enable(bool e) = 0;
00055     virtual void show(bool show, bool focus) = 0;
00056     virtual bool is_enabled() const = 0;
00057     virtual bool is_shown() const = 0;
00058     virtual bool is_hidden() const = 0;
00059     virtual void destroy() = 0;
00060 
00061     virtual Pointer<omgui::Panel> get_parent() const = 0;
00062     virtual Pointer<omgui::Window> get_parent_window() const = 0;
00063 };
00064 
00065     } // api
00066 } // omgui
00067 
00068 #endif // OMGUI_API_WIDGET_H

doxygen SourceForge.net Logo