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

Sub-class of ui_extension::button, for buttons that implement their own command. More...

#include <buttons.h>

Inheritance diagram for ui_extension::custom_button:
ui_extension::button

Public Member Functions

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 void execute (const pfc::list_base_const_t< metadb_handle_ptr > &p_items)=0
 Executes the custom button's command. More...
 
virtual void get_name (pfc::string_base &p_out) const =0
 Gets the name of the custom button. More...
 
virtual bool get_description (pfc::string_base &p_out) const
 Gets the description of the custom button. More...
 
 FB2K_MAKE_SERVICE_INTERFACE (custom_button, button)
 
- Public Member Functions inherited from ui_extension::button
virtual const GUID & get_item_guid () const =0
 Get the identifier of the button. 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)
 

Static Public Member Functions

static bool g_button_get_name (const GUID &p_guid, pfc::string_base &p_out)
 

Detailed Description

Sub-class of ui_extension::button, for buttons that implement their own command.

Member Function Documentation

virtual void ui_extension::custom_button::execute ( const pfc::list_base_const_t< metadb_handle_ptr > &  p_items)
pure virtual

Executes the custom button's command.

Parameters
[in]p_itemsItems to perform the command on
ui_extension::custom_button::FB2K_MAKE_SERVICE_INTERFACE ( custom_button  ,
button   
)
static bool ui_extension::custom_button::g_button_get_name ( const GUID &  p_guid,
pfc::string_base &  p_out 
)
inlinestatic
virtual bool ui_extension::custom_button::get_description ( pfc::string_base &  p_out) const
inlinevirtual

Gets the description of the custom button.

Parameters
[out]p_outRecieves the description of the button, UTF-8 encoded
Returns
true iff the button has a description
virtual t_button_guid ui_extension::custom_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 from ui_extension::button.

virtual void ui_extension::custom_button::get_name ( pfc::string_base &  p_out) const
pure virtual

Gets the name of the custom button.

Parameters
[out]p_outRecieves the name of the button, UTF-8 encoded

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