GWToolbarItem

Associates a GWCommand object with a toolbar item. When a C3PO adds items to the toolbar, the GWToolbar maintains a reference to the GWCommand object placed onto the toolbar. When the toolbar is destroyed, the GWCommand object is released.

Properties

The following table lists the properties for this class, along with access and descriptions.

Property

Access

Description

GWCommand

R/W

GWCommand. For pre-built items, CommandFactory in the ClientState object is used to build the value of this property. Otherwise, GWCommand is NULL for pre-built items. A client can implement the GWCommand factory, but still return NULL for certain toolbar items. Hence, C3POServers should never assume they will receive non-NULL GWCommand objects for each toolbar item.

Parent

R/O

GWToolbarItems.

ToolbarID

R/O

Long. The actual ID assigned to the toolbar item. When GWToolbarItems::Add is invoked, the new GWToolbarItem is automatically assigned an ID number. This property can be queried by the C3PO to retrieve the ID.

Methods

Delete( )
  • Deletes the toolbar item (which removes the item from the toolbar) and releases AddRef on the GWCommand object that is associated with the toolbar item.
SetBitmap( String Filename, Variant ResID )
  • Sets the bitmap image for the toolbar item. When GWToolbarItems::Add is called, the returned GWToolbarItem has been assigned a default image. Calling this method will change that image. In GroupWise 5.x and 6.x, the new item is not displayed on the toolbar by default; you must call SetBitmap to display the item on the toolbar.
  • Filename is the name of the file that contains the bitmap.
  • ResID can be either a resource ID (long) or a resource name (string).
  • GroupWise client bitmaps are associated with a color map which a C3PO can use for transparency and highlight effects. The map is as follows:

Table 4-1 GroupWise Color Map

Color Mapped From

Color Effect

RGB( 0, 255, 0 )

Transparent

RGB( 192, 192, 192 )

COLOR_3DLIGHT (Win32 color)

RGB( 255, 255, 255 )

COLOR_3DHILITE (Win32 color)

RGB( 128, 128, 128)

COLOR_3DSHADOW (Win32 color)

  • In GroupWise, color mapping is only functional when specifying a bitmap by its resource ID (a number). Resource strings are not mapped.

Remarks

None.