SDK:SWidgetDefinition

From Vectorworks Developer
Jump to: navigation, search

.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

Description

This structure is used with SDK:IWidgetsProvider interface.

Defines an Object's Info Pane widget.

struct SWidgetDefinition
{
  Sint32        fWidgetID;
  EWidgetType   fWidgetType;
  TXString      fWidgetText;
  bool          fWidgedVisible;
  bool          fWidgetEnabled;
  bool          fWidgetRed;

  IWidgetData*  fpWidgetData;

  // data support
  TXString      fRecordName;
  Sint16        fRecordParamIndex;
};

Members

fWidgetID Sint32 Identifier for that widget.
fWidgetType EWidgetType Type of that widget. See remarks.
fWidgetText TXString Text that appears next to the widget.
fWidgedVisible bool true if the widget is visible on the page; false -- invisible.
fWidgetEnabled bool true if the widget is enabled on the page; false -- disabled.
fWidgetRed bool Determines if this widget is to be shown red in color.
fpWidgetData IWidgetData* This widget's data provider. The actual interface that this pointer refers depends on the widget type. See remarks.
fRecordName TXString Record name which is used as source for the data for this widget. If empty then the main record of the parametric object is used (the one that stores the parameters)
fRecordParamIndex Sint16 Index of the field in the record specified by 'fRecordName' that supplies the data for this widget.

Remarks

The widget type is determined by EWidgetType enumeration, which can have the following values.

Also in the table you can see what interface is used as 'fpWidgetData' parameter.

You should cast 'fpWidgetData' parameter to the correct interface according to the type before accessing the correct widget data.

EWidgetType constant Constant value Description Data Interface Appearance on the Info Palette
kWidgetLongInt 1 integer value IWidgetData KWidgetLongInt.jpg
kWidgetBoolean 2 boolean value IWidgetData KWidgetBoolean.jpg
kWidgetReal 3 real value IWidgetData KWidgetReal.jpg
kWidgetText 4 text value IWidgetData KWidgetText.jpg
kWidgetCalculation 5 Not implemented!
kWidgetHandle 6 Not implemented!
kWidgetCoordDisp 7 world length coordinate IWidgetDataPopup KWidgetCoordDisp.jpg
kWidgetPopUp 8 popup list IWidgetDataPopup KWidgetPopUp.jpg
kWidgetRadio 9 radio buttons IWidgetDataPopup KWidgetRadio.jpg
kWidgetCoordLocX 10 no info!
kWidgetCoordLocY 11 no info!
kWidgetButton 12 button IWidgetDataPopup KWidgetButton.jpg
kWidgetStaticText 13 static text without value IWidgetDataPopup KWidgetStaticText.jpg
kWidgetStaticTextParam 14 static text with value IWidgetDataPopup KWidgetStaticTextParam.jpg
kWidgetDimStdPopUp 16 standard dimensions popup IWidgetDataPopup KWidgetDimStdPopUp.jpg
kWidgetPrecisionPopUp 17 precision popup IWidgetDataPopup KWidgetPrecisionPopUp.jpg

Version

Available from: VectorWorks 2009

See Also

VCOM:VCOMPtr | SDK:IWidgetsProvider | VCOM:VectorWorks:PluginSupport:IWidgetsEditProvider | VCOM:VectorWorks:PluginSupport:IExtendedProps
[[VCOM:VCOMPtr]] | [[SDK:IWidgetsProvider]] | [[VCOM:VectorWorks:PluginSupport:IWidgetsEditProvider]] | [[VCOM:VectorWorks:PluginSupport:IExtendedProps]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox