C4 Engine Terathon Software C4 Engine API Documentation

• Interface Manager

API Links
Developer Links

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 *icon, unsigned long flags = 0);

Parameters
type The widget type.
name The widget name.
icon The resource name for the icon 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 values.
kWidgetPanelOnly The widget can only appear 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