VCOM:VectorWorks:UI:IInfoBar

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

namespace VectorWorks::UI

This interface allows you to show messages in the info bar of VectorWorks or show progress on the Info bar.

Normal text message in the Info bar:

Red text message in the Info bar:

Progress message in the Info bar:

Interface

// ----------------------------------------------------------------------------------------------------
// {46A01702-34B4-41b5-B434-AC92D807731E}
static const VWIID IID_InfoBar = { 0x46A01702, 0x34B4, 0x41b5, { 0xB4, 0x34, 0xAC, 0x92, 0xD8, 0x07, 0x73, 0x1E } };

class IInfoBar : public IVWUnknown
{
public:
  virtual VCOMError VCOM_CALLTYPE SetMinorAlert(const TXString& strAlert, EInfoMsgBackColor backClr) = 0;

  virtual VCOMError VCOM_CALLTYPE StartProgressIndicator(const TXString& strProgressLabel, Uint16 nMaxProgress)	= 0;
  virtual VCOMError VCOM_CALLTYPE SetProgressIndicator(Uint16 nProgress) = 0;
  virtual VCOMError VCOM_CALLTYPE SetProgressIndicator(Uint16 nProgress, const TXString& strProgressLabel)		= 0;
  virtual VCOMError VCOM_CALLTYPE IncrementProgressIndicator(Uint16 nProgress) = 0;
  virtual VCOMError VCOM_CALLTYPE IncrementProgressIndicator(Uint16 nProgress, const TXString& strProgressLabel)	= 0;
  virtual VCOMError VCOM_CALLTYPE EndProgressIndicator() = 0;
};

Members

SetMinorAlert Set minor alert message.
StartProgressIndicator Start progress indicated message.
SetProgressIndicator Updates progress indicated message.
IncrementProgressIndicator Increments progress indicated message.
EndProgressIndicator Closed progress indicated message.

Remarks

There is predefined type for smart VCOM pointer VCOMPtr to IInfoBar interface:

typedef VCOMPtr<IInfoBar>  IInfoBarPtr;

The info message color is described by the enumeration:

enum EInfoMsgBackColor {
  kInfoMsgBackColor_Standard,
  kInfoMsgBackColor_Blue,
  kInfoMsgBackColor_Red
};

Example

Minor alert text:

VCOMPtr<IInfoBar>	pInfoBar( IID_InfoBar );
pInfoBar->SetMinorAlert( "label", false );

Progress text:

VCOMPtr<IInfoBar>	pInfoBar( IID_InfoBar );
pInfoBar->StartProgressIndicator( "progress label", 100 );
for(int i=0; i<100; i++) {
   // ,,,

   Sleep( 1000 );
   pInfoBar->IncrementProgressIndicator( 1 );
}
pInfoBar->EndProgressIndicator();

Version

Available from: VectorWorks 12

See Also

VCOM:VCOMPtr

[[VCOM:VCOMPtr]]