ui_extension::button Class Reference

Service that provides buttons for a toolbar. More...

#include <buttons.h>

Inheritance diagram for ui_extension::button:

service_base ui_extension::custom_button ui_extension::menu_button List of all members.

Public Member Functions

virtual void deregister_callback (button_callback &p_callback)
 Deregisters a button_callback class to stop receiving callbacks.
virtual unsigned get_button_state () const
 Gets buttons state.
virtual t_button_type get_button_type () const
 Get type of button.
virtual unsigned get_command_state_count () const
 Gets total count of possible command states.
virtual unsigned get_command_state_index () const
 Gets current state of the command. For example, in a "Play or pause" command this would indicate the play or pause state.
virtual void get_command_state_name (unsigned index, pfc::string_base &p_out) const
 Gets name of specified command state.
virtual t_button_guid get_guid_type () const
 Get whether get_item_guid() specifies a main menu item, a context menu, or a custom button command.
virtual HBITMAP get_item_bitmap (unsigned command_state_index, COLORREF cr_btntext, t_mask &p_mask_type, COLORREF &cr_mask, HBITMAP &bm_mask) const =0
 Get a handle to a bitmap and its transparency mask of the menu item.
virtual const GUID & get_item_guid () const =0
 Get the identifier of the button.
virtual void get_menu_items (menu_hook_t &p_out)
 Gets menu items for drop-down buttons.
virtual void register_callback (button_callback &p_callback)
 Registers a button_callback class to receive callbacks.

Public Attributes

 button

Detailed Description

Service that provides buttons for a toolbar.


Member Function Documentation

virtual void ui_extension::button::deregister_callback button_callback p_callback  )  [inline, virtual]
 

Deregisters a button_callback class to stop receiving callbacks.

Parameters:
[in] p_callback Reference to callback object being deregistered. The object implementing this method must not keep any references to the specified callback object after this method returns

virtual unsigned ui_extension::button::get_button_state  )  const [inline, virtual]
 

Gets buttons state.

Returns:
Button state
See also:
t_button_state

virtual t_button_type ui_extension::button::get_button_type  )  const [inline, virtual]
 

Get type of button.

Returns:
Type of button
See also:
t_button_type

virtual unsigned ui_extension::button::get_command_state_count  )  const [inline, virtual]
 

Gets total count of possible command states.

Returns:
Total count of possible command states

virtual unsigned ui_extension::button::get_command_state_index  )  const [inline, virtual]
 

Gets current state of the command. For example, in a "Play or pause" command this would indicate the play or pause state.

Returns:
Index of current command state

virtual void ui_extension::button::get_command_state_name unsigned  index,
pfc::string_base &  p_out
const [inline, virtual]
 

Gets name of specified command state.

Parameters:
[in] index Index of command state's name to retrieve
[out] p_out Receieves command state name

virtual t_button_guid ui_extension::button::get_guid_type  )  const [inline, virtual]
 

Get whether get_item_guid() specifies a main menu item, a context menu, or a custom button command.

Note:
Only recommended use of button-only buttons are dropdown-only buttons
Returns:
type of command represnted by this class
See also:
t_button_guid

Reimplemented in ui_extension::custom_button.

virtual HBITMAP ui_extension::button::get_item_bitmap unsigned  command_state_index,
COLORREF  cr_btntext,
t_mask p_mask_type,
COLORREF &  cr_mask,
HBITMAP &  bm_mask
const [pure virtual]
 

Get a handle to a bitmap and its transparency mask of the menu item.

Caller presumes ownership of bitmap.

Parameters:
[in] cr_btntext Colour to use for text/foreground
[out] bm_mask HBITMAP of transparency mask. This is a monochrome bitmap.
Note:
In the toolbar control, transparency masks are supported on all versions of windows; where as 32 bpp bitmaps with 8bpp alpha channel are supported only under common controls version 6.

Ensure you do not create a mask bitmap if you fail to create main bitmap

Remarks:
Masks generated from a colour are only supported on bitmaps with a colour depth less than or equal too 8bpp.
Returns:
HBITMAP of menu item

virtual const GUID& ui_extension::button::get_item_guid  )  const [pure virtual]
 

Get the identifier of the button.

Use get_type_guid() to determine what the GUID repreesnts.

Returns:
GUID identifying the command represented by the class

virtual void ui_extension::button::get_menu_items menu_hook_t &  p_out  )  [inline, virtual]
 

Gets menu items for drop-down buttons.

Parameters:
[out] p_out Receives menu items

virtual void ui_extension::button::register_callback button_callback p_callback  )  [inline, virtual]
 

Registers a button_callback class to receive callbacks.

Parameters:
[in] p_callback Reference to callback object requesting callbacks


The documentation for this class was generated from the following file:
Generated on Fri Apr 28 15:02:30 2006 for Columns UI SDK by  doxygen 1.4.6-NO