C4 Engine
C4 Engine API Documentation

class WidgetReg

Defined in:  C4Widgets.h
The WidgetReg class represents a custom widget type.
Definition

template <class classType> class WidgetReg : public WidgetRegistration

Template Parameters
classType The custom widget class.
Constructor

WidgetReg(WidgetType type, const char *name, const char *image, uint32 flags = 0);

Parameters
type The widget type.
name The widget name.
image The resource name for the image texture used to represent the widget in the Panel Editor.
flags The widget registration flags.
Description
The WidgetReg template class is used to advertise the existence of a custom widget type. The Interface Manager uses a widget registration to construct a custom widget. The act of instantiating a WidgetReg object automatically registers the corresponding widget type. The widget type is unregistered when the WidgetReg object is destroyed.

The flags parameter is optional and assigns special properties to the widget registration. It can be a combination (through logical OR) of the following constants.
kWidgetPanelOnly The widget can appear only in a panel effect.
No more than one widget registration should be created for each distinct widget type.
Base Classes
WidgetRegistration All specific widget registration classes share the common base class WidgetRegistration.
See Also

Widget