Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/gui/gui/display.hh

Go to the documentation of this file.
00001 /* $Id: display.hh,v 1.6 2003/07/24 05:18:26 tetron Exp $ */
00002 
00003 
00004 /*
00005     Copyright (C) 2002 Reed Hedges
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 */
00021 
00022 #ifndef _VOSGUI_DISPLAY_HH_
00023 #define _VOSGUI_DISPLAY_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 <vos/corelibs/vos/vos.hh>
00036 #include "container.hh"
00037 
00038 namespace VOSGUI
00039 {
00040 
00041     class VOSGUI_API Display : public virtual MetaObject
00042     {
00043 
00044     protected:
00045         PropertyAccessControl* accessControl;
00046 
00047     public:
00048 
00049         /** Constructor */
00050         Display(MetaObject* superobject);
00051 
00052         /*** Destructor */
00053         virtual ~Display();
00054 
00055         /** Set default access control policy */
00056         virtual void setPropertyAccessControl(PropertyAccessControl* ac);
00057 
00058         /** Get default access control policy */
00059         virtual PropertyAccessControl* getPropertyAccessControl();
00060 
00061         /** Initialize required subproperties and set given access control as 
00062             default. */
00063         virtual void initialize(PropertyAccessControl* ac);
00064 
00065         /** Initialize required subproperties. If access control has been
00066             previously set with initialize(PropertyAccessControl*) or
00067             setPropertyAccessControl(), then that policy will be used. Otherwise,
00068             NoPropertyAccessControl will be used.
00069         */
00070         virtual void initialize();
00071 
00072         /** Return type string ("gui:display") */
00073         virtual const string getType();
00074 
00075         /** Register Extenders */
00076         static void registerExtenders();
00077 
00078         /** Name of display application, etc. */
00079         //@{
00080         string getAppInfo();    ///< @throw NoSuchObjectError
00081         void setAppInfo(const string& value, PropertyAccessControl* ac = 0);
00082         //@}
00083 
00084         /** User of this display ("user" or "user@host") */
00085         //@{
00086         string getUserId();   ///< @throw NoSuchObjectError
00087         void setUserId(const string& value, PropertyAccessControl* ac = 0);
00088         //@}
00089 
00090         /** Whether or not this display object is run by a GUI display client.
00091             (Some applications may use display objects but not actually
00092             display a GUI) */
00093         //@{
00094         bool getAppDedicated(); ///< @throw NoSuchObjectError
00095         void setAppDedicated(bool value, PropertyAccessControl* ac = 0);
00096         //@}
00097 
00098         /** Add c to the display as a new window. If it already exists
00099             in the display, a "show" message is sent instead. 
00100             @param c The container to add to the display.
00101             @param contextName Contextual name of c in the display object. If
00102                 omitted or "" (empty string), then c's site name is used.
00103         */
00104         virtual void addWindow(Container* c, const string& contextName = "");
00105 
00106         /** Alternative to addWondow */
00107         inline void addContainer(Container* c, const string& contextName="") {
00108             addWindow(c, contextName);
00109         }
00110 
00111         /** Remove c from the display. 
00112             @throw Vobject::NoSuchObjectError if c is not in the display.
00113         */
00114         virtual void removeWindow(Container* c);
00115 
00116         /** Alternative to removeWindow */
00117         inline void removeContainer(Container* c) {
00118             removeWindow(c);
00119         }
00120 
00121         /** Add a secondary display object to this display */
00122         virtual void addSubDisplay(Display* d, const string& cname = "");
00123         
00124         /** Remove a secondary display object from this display */
00125         virtual void removeSubDisplay(Display* d);
00126     };
00127 
00128 
00129 
00130     class VOSGUI_API LocalDisplay : public virtual Display
00131     {
00132 
00133     public:
00134 
00135         /** Constructor */
00136         LocalDisplay(MetaObject* superobject);
00137 
00138         /** Static generator, for factory. */
00139         static MetaObject* new_LocalDisplay(MetaObject* superobject, const string& type);
00140 
00141     };
00142 
00143 
00144 /** Remote version of Display. */
00145     class VOSGUI_API RemoteDisplay : public virtual Display
00146     {
00147     public:
00148 
00149         /** Constructor */
00150         RemoteDisplay(MetaObject* superobject);
00151 
00152         /** Static generator, for factory. */
00153         static MetaObject* new_RemoteDisplay(MetaObject* superobject, const string& type);
00154 
00155     };
00156 }
00157 
00158 #endif // #ifdef _VOSGUI_DISPLAY_HH_
00159 

Generated on Tue Aug 12 03:55:43 2003 for Interreality Project - VOS by doxygen 1.3.2