00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef CONTAINER_H
00024 #define CONTAINER_H
00025
00026 #include "widget.h"
00027
00028 namespace cwidget
00029 {
00030 namespace widgets
00031 {
00032 class container : public widget
00033 {
00034 public:
00035 container() : widget() {}
00036 ~container();
00037
00038 virtual void add_widget(const widget_ref &)=0;
00039 void add_visible_widget(const widget_ref &, bool visible);
00040 virtual void rem_widget(const widget_ref &)=0;
00041
00042
00043
00044 void add_widget_bare(widget &w)
00045 {
00046 add_widget(widget_ref(&w));
00047 }
00048
00049 void add_visible_widget_bare(widget &w, bool visible)
00050 {
00051 add_visible_widget(widget_ref(&w), visible);
00052 }
00053
00054 void rem_widget_bare(widget &w)
00055 {
00056 rem_widget(widget_ref(&w));
00057 }
00058
00060 virtual widget_ref get_active_widget() = 0;
00061
00063 virtual void show_all()=0;
00064 };
00065 }
00066 }
00067
00068 #endif