00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 #ifndef _WIDGET_HH_
00024 #define _WIDGET_HH_
00025 
00026 #if defined(_WIN32) && defined(_MSC_VER)
00027 # ifdef VOSGUI_EXPORTS
00028 #  define VOSGUI_API __declspec(dllexport)
00029 # else
00030 #  define VOSGUI_API __declspec(dllimport)
00031 # endif
00032 #else
00033 # define VOSGUI_API
00034 #endif
00035 
00036 #include <vos/corelibs/vos/vos.hh>
00037 #include <vos/metaobjects/property/property.hh>
00038 
00039 
00040 namespace VOSGUI
00041 {
00042 
00043 
00044 
00045     class VOSGUI_API Widget : public virtual MetaObject
00046     {
00047 
00048     protected:
00049         PropertyAccessControl* accessControl;
00050 
00051 
00052     public:
00053 
00054 
00055         Widget(MetaObject* superobject);
00056 
00057 
00058         virtual const string getType();
00059 
00060 
00061         virtual ~Widget();
00062 
00063 
00064         static void registerExtenders();
00065 
00066 
00067         virtual void setPropertyAccessControl(PropertyAccessControl* ac);
00068 
00069 
00070         virtual PropertyAccessControl* getPropertyAccessControl();
00071 
00072 
00073 
00074 
00075         virtual void initialize(PropertyAccessControl* ac);
00076 
00077 
00078 
00079 
00080 
00081 
00082         virtual void initialize();
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090         virtual string getAlignment();
00091 
00092 
00093         virtual int getPadding();
00094 
00095 
00096         virtual int getProportion();
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112         virtual void setAlignment(const string& value, PropertyAccessControl* ac = 0);
00113 
00114 
00115 
00116 
00117 
00118         virtual void setPadding(int value, PropertyAccessControl* ac = 0);
00119 
00120 
00121 
00122 
00123 
00124 
00125         virtual void setProportion(int value, PropertyAccessControl* ac = 0);
00126 
00127 
00128 
00129 
00130 
00131         virtual string getLabel();
00132         
00133 
00134         virtual void setLabel(const string& value, const string& datatype = "text/plain", PropertyAccessControl* ac = 0);
00135 
00136 
00137         virtual void setLabelObj(Property* newobj);
00138 
00139 
00140         virtual string getLabelDatatype();
00141             
00142 
00143 
00144 
00145 
00146         virtual Property* getLabelObj();
00147 
00148 
00149         virtual void setEnabled(bool q = true, PropertyAccessControl* defaultAC = &NoPropertyAccessControl::static_);
00150 
00151 
00152         virtual bool getEnabled();
00153 
00154 
00155         virtual void setEnabledObj(Property* obj);
00156 
00157 
00158         virtual Property* getEnabledObj();
00159 
00160 
00161         virtual void setVisible(bool q = true, PropertyAccessControl* defaultAC = &NoPropertyAccessControl::static_);
00162 
00163 
00164         virtual bool getVisible();
00165 
00166 
00167         virtual void setVisibleObj(Property* obj);
00168 
00169 
00170         virtual Property* getVisibleObj();
00171         
00172         
00173 
00174         
00175 
00176 
00177     protected:
00178         void setOrInsertChild(const string& name, Vobject* obj);
00179 
00180 
00181     };
00182 
00183 
00184 
00185 
00186     class VOSGUI_API LocalWidget : public virtual Widget
00187     {
00188 
00189     public:
00190 
00191 
00192         LocalWidget(MetaObject* superobject);
00193 
00194 
00195         static MetaObject* new_LocalWidget(MetaObject* superobject, const string& type);
00196 
00197     };
00198 
00199 
00200 
00201     class VOSGUI_API RemoteWidget : public virtual Widget
00202     {
00203     public:
00204 
00205 
00206         RemoteWidget(MetaObject* superobject);
00207 
00208 
00209         static MetaObject* new_RemoteWidget(MetaObject* superobject, const string& type);
00210 
00211     };
00212 }
00213 
00214 #endif // #ifdef _WIDGET_HH_
00215