Columns UI SDK  6.5
Public Member Functions | List of all members
ui_extension::button Class Referenceabstract

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

#include <buttons.h>

Inheritance diagram for ui_extension::button:
ui_extension::button_v2 ui_extension::custom_button ui_extension::menu_button

Public Member Functions

virtual const GUID & get_item_guid () const =0
 Get the identifier of the button. More...
 
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. More...
 
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. More...
 
virtual t_button_type get_button_type () const
 Get type of button. More...
 
virtual void get_menu_items (menu_hook_t &p_out)
 Gets menu items for drop-down buttons. More...
 
virtual unsigned get_button_state () const
 Gets buttons state. More...
 
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. More...
 
virtual unsigned get_command_state_count () const
 Gets total count of possible command states. More...
 
virtual void get_command_state_name (unsigned index, pfc::string_base &p_out) const
 Gets name of specified command state. More...
 
virtual void register_callback (button_callback &p_callback)
 Registers a button_callback class to receive callbacks. More...
 
virtual void deregister_callback (button_callback &p_callback)
 Deregisters a button_callback class to stop receiving callbacks. More...
 
 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (button)
 

Detailed Description

Service that provides buttons for a toolbar.

Member Function Documentation

virtual void ui_extension::button::deregister_callback ( button_callback p_callback)
inlinevirtual

Deregisters a button_callback class to stop receiving callbacks.

Parameters
[in]p_callbackReference to callback object being deregistered. The object implementing this method must not keep any references to the specified callback object after this method returns
ui_extension::button::FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT ( button  )
virtual unsigned ui_extension::button::get_button_state ( ) const
inlinevirtual

Gets buttons state.

Returns
Button state
See also
t_button_state
virtual t_button_type ui_extension::button::get_button_type ( ) const
inlinevirtual

Get type of button.

Returns
Type of button
See also
t_button_type
virtual unsigned ui_extension::button::get_command_state_count ( ) const
inlinevirtual

Gets total count of possible command states.

Returns
Total count of possible command states
virtual unsigned ui_extension::button::get_command_state_index ( ) const
inlinevirtual

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
inlinevirtual

Gets name of specified command state.

Parameters
[in]indexIndex of command state's name to retrieve
[out]p_outReceieves command state name
virtual t_button_guid ui_extension::button::get_guid_type ( ) const
inlinevirtual

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

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_btntextColour to use for text/foreground
[out]bm_maskHBITMAP 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

Implemented in ui_extension::button_v2.

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)
inlinevirtual

Gets menu items for drop-down buttons.

Parameters
[out]p_outReceives menu items
virtual void ui_extension::button::register_callback ( button_callback p_callback)
inlinevirtual

Registers a button_callback class to receive callbacks.

Parameters
[in]p_callbackReference to callback object requesting callbacks

The documentation for this class was generated from the following file: