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/menubar.cc

Go to the documentation of this file.
00001 /* $Id: menubar.cc,v 1.6 2003/07/23 00:17:21 reed Exp $ */
00002 
00003 
00004 /* 
00005 
00006 
00007     Copyright (C) 2002 Reed Hedges
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public
00020     License along with this library; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00022 
00023 */
00024 
00025 /** @file menubar.cc Code: a MetaObject for Menubar object types. */
00026 
00027 #include <vos/corelibs/vos/vos.hh>
00028 #include <vos/metaobjects/property/property.hh>
00029 #include "menubar.hh"
00030 
00031 using namespace VOSGUI;
00032 
00033 /* Constructor */
00034 Menubar::Menubar(MetaObject* s) : MetaObject(s)
00035 {
00036 }
00037 
00038 /* Destructor */
00039 Menubar::~Menubar() {
00040 }
00041 
00042 
00043 /* Initialize required subproperties with given access control. */
00044 void LocalMenubar::initialize(PropertyAccessControl* ac) {
00045     accessControl = ac;
00046 }
00047 
00048 /* Initialize required subproperties. */
00049 void LocalMenubar::initialize() {
00050     initialize(&NoPropertyAccessControl::static_);
00051 }
00052 
00053 /* Access control */
00054 
00055 void Menubar::setPropertyAccessControl(PropertyAccessControl* ac) {
00056     accessControl = ac;
00057 }
00058 
00059 PropertyAccessControl* Menubar::getPropertyAccessControl() {
00060     return accessControl;
00061 }
00062 LocalMenubar::LocalMenubar(MetaObject* s) : Menubar(s), MetaObject(s)
00063 {
00064 }
00065 
00066 LocalMenubar::~LocalMenubar() {
00067 }
00068 
00069 
00070 RemoteMenubar::RemoteMenubar(MetaObject* s) : Menubar(s), MetaObject(s)
00071 {
00072 }
00073 
00074 RemoteMenubar::~RemoteMenubar() {
00075 }
00076 
00077 
00078 /* Return type string ("gui:menubar") */
00079 
00080 const string Menubar::getType() {
00081     return string("gui:menubar");
00082 }
00083 
00084 /* Register extenders with libvos MetaFactory */
00085 void Menubar::registerExtenders() {
00086     LocalSite::addLocalObjectExtension(typeid(LocalMenubar).name(), &LocalMenubar::new_LocalMenubar);
00087     LocalSite::addLocalObjectExtension(typeid(Menubar).name(), &LocalMenubar::new_LocalMenubar);
00088     LocalSite::addLocalObjectExtension("gui:menubar", &LocalMenubar::new_LocalMenubar);
00089     RemoteSite::addRemoteObjectExtension(typeid(RemoteMenubar).name(), &RemoteMenubar::new_RemoteMenubar);
00090     RemoteSite::addRemoteObjectExtension(typeid(Menubar).name(), &RemoteMenubar::new_RemoteMenubar);
00091     RemoteSite::addRemoteObjectExtension("gui:menubar", &RemoteMenubar::new_RemoteMenubar);
00092 }
00093 
00094 /* Get and set Subproperties and other Subobjects */
00095 
00096 
00097 /* Process local object messages */
00098 /* XXX probably not necesary, since handler methods are registered
00099    in the generator (new_*)
00100 */
00101 void LocalMenubar::sendMessage(Message* m) {
00102 
00103     /* Let superclass have message */
00104     Menubar::sendMessage(m);
00105 }
00106 
00107 
00108 
00109 
00110 
00111 /* Process remote update messages */
00112 void RemoteMenubar::sendUpdateMessage(Message* m) {
00113 
00114 
00115     /* branch to update message handlers specific to RemoteMenubar 
00116 
00117     This method is very redundant if handlers have already been registered as 
00118     callbacks, but here is how you would do it: */
00119 
00120     /* let superclass have message... */
00121     Menubar::sendUpdateMessage(m);
00122 }
00123 
00124 /* Local Actuators: */
00125 
00126 /* Message Handlers:  */
00127 
00128 /* Remote Actuators: */
00129 
00130 
00131 /* Generators for factory */
00132 
00133 
00134 MetaObject* LocalMenubar::new_LocalMenubar(MetaObject *s, const string& type) {
00135     LocalMenubar* o = new LocalMenubar(s);
00136     return o;
00137 }
00138 
00139 MetaObject* RemoteMenubar::new_RemoteMenubar(MetaObject *s, const string& type) {
00140     return new RemoteMenubar(s);
00141 }
00142 

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