00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef _CONTAINER_HH_
00023 #define _CONTAINER_HH_
00024 
00025 #if defined(_WIN32) && defined(_MSC_VER)
00026 # ifdef VOSGUI_EXPORTS
00027 #  define VOSGUI_API __declspec(dllexport)
00028 # else
00029 #  define VOSGUI_API __declspec(dllimport)
00030 # endif
00031 #else
00032 # define VOSGUI_API
00033 #endif
00034 
00035 #include <vector>
00036 
00037 #include <vos/corelibs/vos/vos.hh>
00038 #include <vos/metaobjects/property/property.hh>
00039 #include <vos/gui/gui/widget.hh>
00040 
00041 
00042 namespace VOSGUI
00043 {
00044 
00045 
00046 
00047     class VOSGUI_API Container : public virtual Widget
00048     {
00049 
00050     public:
00051 
00052 
00053         Container(MetaObject* superobject);
00054 
00055         
00056         virtual ~Container();
00057 
00058 
00059         virtual const string getType();
00060 
00061 
00062         static void registerExtenders();
00063 
00064 
00065 
00066 
00067         string getLayout();
00068         void setLayout(const string& value, PropertyAccessControl* ac = 0);
00069         bool getBorder();
00070         void setBorder(bool value = true, PropertyAccessControl* ac = 0);
00071 
00072         bool getCompact();
00073         void setCompact(bool val = true, PropertyAccessControl* ac = 0);
00074         void setCompactObject(Property* obj);
00075         Property* getCompactObject();
00076 
00077 
00078 
00079 
00080 
00081         virtual void raise() = 0;
00082 
00083 #if 0
00084        virtual void hide() = 0;
00085 
00086 
00087 
00088         virtual void hidden() = 0;
00089 #endif
00090 
00091 
00092     };
00093 
00094 
00095 
00096 
00097 
00098     class VOSGUI_API LocalContainer : public virtual Container, public virtual LocalWidget
00099     {
00100     private:
00101 
00102 
00103 
00104 
00105 
00106   
00107         vector<Vobject*> remoteWindows;
00108 
00109     public:
00110 
00111 
00112         LocalContainer(MetaObject* superobject);
00113 
00114 
00115         static MetaObject* new_LocalContainer(MetaObject* superobject, const string& type);
00116 
00117 
00118 
00119         virtual void raise();
00120 
00121 
00122 
00123         
00124  
00125 
00126     private:
00127 
00128          virtual void handleStartListening(Message* m);
00129 
00130     };
00131 
00132 
00133 
00134     class VOSGUI_API RemoteContainer : public virtual Container, public virtual RemoteWidget
00135     {
00136     public:
00137 
00138 
00139         RemoteContainer(MetaObject* superobject);
00140 
00141 
00142         static MetaObject* new_RemoteContainer(MetaObject* superobject, const string& type);
00143 
00144 
00145         virtual void raise();
00146 
00147 #if 0
00148         virtual void hide();
00149 
00150 
00151 
00152         void hidden();
00153 
00154 
00155 
00156 
00157 
00158         void startListeningForShow(); 
00159     
00160  
00161 #endif
00162     protected:
00163 
00164         virtual void handleRaise(Message* m);
00165 
00166 
00167     };
00168 }
00169 
00170 #endif // #ifdef _CONTAINER_HH_
00171