SUToolBar Class Reference

Handles a plug-in defined toolbar. More...

#include <ShapeUpAPI.h>

Inheritance diagram for SUToolBar:

SUObject List of all members.

Public Member Functions

 SUToolBar ()
void Create (HINSTANCE hInstance, LPCTSTR lpszResourceName, const char *name)
void Create (HINSTANCE hInstance, UINT nID, const char *name)
bool IsVisible ()
size_t GetButtonCount ()
void SetButtonEnabled (UINT nID, bool bEnable)
void SetButtonChecked (UINT nID, bool bChecked)

Detailed Description

An SUToolBar object should be created by the plug-in if it wants to supply an extra toolbar. A plug-in can have more than one toolbar if necessary. ShapeUp does not currently expose its own toolbars.

To get toolbar button notifications, the ShapeUp_AddToolBarButtonHook() must have been called, and the plug-in hook function, set in fnInit(), must handle HOOKTYPE_TOOLBARBUTTON notifications.

Examples:

example_sutoolbar.cpp.


Constructor & Destructor Documentation

SUToolBar::SUToolBar (  )  [inline]

Default constructor.


Member Function Documentation

void SUToolBar::Create ( HINSTANCE  hInstance,
LPCTSTR  lpszResourceName,
const char *  name 
) [inline]

Creates a new ShapeUp toolbar.

Parameters:
hInstance = handle to the module containing the toolbar resource.
lpszResourceName = name of the toolbar resource.
name = name of the toolbar used in ShapeUp. (Displayed to users)
Examples:
example_sutoolbar.cpp.

void SUToolBar::Create ( HINSTANCE  hInstance,
UINT  nID,
const char *  name 
) [inline]

Creates a new ShapeUp toolbar.

Parameters:
hInstance = handle to the module containing the toolbar resource.
nID = id of the toolbar resource.
name = name of the toolbar used in ShapeUp. (Displayed to users)

bool SUToolBar::IsVisible (  )  [inline]

Checks if this toolbar is visible or not.

Returns:
true if the toolbar is visible, and false otherwise.
See also:
ToolBar_IsVisible()

size_t SUToolBar::GetButtonCount (  )  [inline]

Retrieves the number of buttons in this toolbar.

Returns:
The button count.
See also:
ToolBar_GetButtonCount()

void SUToolBar::SetButtonEnabled ( UINT  nID,
bool  bEnable 
) [inline]

Enables or disables a button in this toolbar.

Parameters:
nID = id of the toolbar button defined in the toolbar resource.
bEnable = true enables and false disables the button.
See also:
ToolBar_SetButtonEnabled()
Examples:
example_sutoolbar.cpp.

void SUToolBar::SetButtonChecked ( UINT  nID,
bool  bChecked 
) [inline]

Checks or unchecks a button in this toolbar.

Parameters:
nID = id of the toolbar button defined in the toolbar resource.
bChecked = true checks and false unchecks the button.
See also:
ToolBar_SetButtonChecked()
Examples:
example_sutoolbar.cpp.


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 10:55:35 2010 for ShapeUp API by  doxygen 1.5.2