SDK:IWidgetDataPopup

From Vectorworks Developer
Jump to navigation Jump to search

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

Description

Inherit IWidgetData

Provides popup data for SDK:SWidgetDefinition widget. Manages list of values that are used to fill popup like widgets.

The values in the list are stored as <idName, text> pairs of TXString.

Used in SDK:Parametric Custom Shape Pane support.

Interface

//----------------------------------------------------------
class IWidgetData
{
public:
class IWidgetDataPopup : public IWidgetData
{
public:
  virtual void   Clear() = 0;
  virtual void   Add(const TXString& idName, const TXString& text) = 0;

  virtual size_t GetCount() const = 0;
  virtual bool   GetAt(size_t index, TXString& outIdName, TXString& outText) const = 0;
  virtual bool   SetAt(size_t index, const TXString& idName, const TXString& text) = 0;

  virtual void   Insert(size_t beforeIndex, const TXString& idName, const TXString& text) = 0;
  virtual void   RemoveAt(size_t index) = 0;

  virtual bool   IsModified() const = 0;
  virtual void   SetModified(bool bModified) = 0;

  virtual bool   GetTextByIDName(const TXString& idName, TXString& outText) = 0;
  virtual bool   GetIDNameByText(const TXString& text, TXString& outIdName) = 0;
};

Members

Clear Removes all items from the list.
Add Add new item into the list.
GetCount Return the count of the items in the list.
GetAt Return item at specified index in the list.
SetAt Set item at specified index in the list.
Insert Insert an item in the list.
RemoveAt Remove item from the list.
IsModified Manages modification to the list. Any set function will set this flag to 'true'. Use SetModified to manipulate the flag.
SetModified Set the modification flag value.
GetTextByIDName Search for item's <text> by given pair <idName>.
GetIDNameByText Search for item's <idName> by given <text>.

Version

Available from: VectorWorks 2009

See Also

SDK:SWidgetDefinition | VCOM:VectorWorks:PluginSupport:IWidgetsEditProvider | VCOM:VectorWorks:PluginSupport:IExtendedProps

[[SDK:SWidgetDefinition]] | [[VCOM:VectorWorks:PluginSupport:IWidgetsEditProvider]] | [[VCOM:VectorWorks:PluginSupport:IExtendedProps]]