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/button.hh File Reference

Defines MetaObject class for Button type (revision 0). More...

Go to the source code of this file.

Namespaces

Defines


Detailed Description

Defines MetaObject class for Button type (revision 0).

Definition in file button.hh.


Define Documentation

#define VOSGUI_API
 

Definition at line 28 of file button.hh.

#define VOSGUI_CREATE_BUTTON CLASS,
PARENT,
SITE,
DATA   ) 
 

Value:

{ \
    LocalSite::addLocalObjectExtension(typeid(CLASS).name(), &CLASS::new_##CLASS); \
    vRef<MetaObject> o = (SITE)->createMetaObject(#CLASS, typeid(CLASS).name(), 0); \
    vRef<CLASS> b = MetaObject::meta_cast<CLASS*>(&o); \
    assert(&b); \
    b->initialize(&NoPropertyAccessControl::static_); \
    b->setup(DATA); \
    (PARENT)->insertChild(-1, #CLASS, &o); \
}
Deprecated:
Don't use this, use a ButtonListener on a LocalButton object. This macro registers a local metaobject extension for CLASS and then creates a MetaObject instantiation of CLASS on site SITE (a pointer or a vRef) and inserts it into the Vobject PARENT (a pointer or a vRef). DATA should be an object whose class you passed to VOSGUI_DEFINE_BUTTON. The button's name will be the same as its CLASS name.

Definition at line 192 of file button.hh.

#define VOSGUI_DEFINE_BUTTON CLASS,
DATA,
LABEL   ) 
 

Value:

class CLASS : public virtual VOSGUI::LocalButton { \
    protected: \
        vRef<DATA> data; \
    public: \
        CLASS(MetaObject* super) : VOSGUI::LocalButton(super), VOSGUI::Button(super), VOSGUI::LocalWidget(super), VOSGUI::Widget(super), MetaObject(super) {  \
        }\
        static MetaObject* new_##CLASS (MetaObject* super, const string& type) { \
            return new CLASS(super); \
        }\
        void setup(DATA* data_p = 0) { \
            data = data_p; \
            setLabel(LABEL); \
        }\
        virtual void push(const string& userid = ""); \
    };
Deprecated:
Don't use this, use a ButtonListener with a LocalButton object This macro defines a subclass of VOSGUI::Button named CLASS. The button will have label LABEL. The push() method is left undefined; you must define a method void CLASS::push() somewhere. You may supply a class DATA, and a member object of that class will be declared (protected)named data. DATA must be a subclass of RefCounted.

Definition at line 166 of file button.hh.


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