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

Subclass of ui_extension::window, specifically for menubars. More...

#include <window.h>

Inheritance diagram for ui_extension::menu_window:
ui_extension::window ui_extension::extension_base

Public Member Functions

virtual bool on_menuchar (unsigned short chr)=0
 Called by host when a menu accelerator is pressed. More...
 
virtual void set_focus ()=0
 Called by host to indicate you should focus your menu. More...
 
virtual bool is_menu_focused () const =0
 Retrieve whether the menu has the keyboard focus.. More...
 
virtual void show_accelerators ()=0
 Indicates that you should underline menu access keys in your menu. More...
 
virtual void hide_accelerators ()=0
 Indicates that you should stop underlining menu access keys in your menu. More...
 
 FB2K_MAKE_SERVICE_INTERFACE (menu_window, window)
 
- Public Member Functions inherited from ui_extension::window
virtual const bool get_is_single_instance () const =0
 Gets whether the panel is single instance or not. More...
 
virtual void get_category (pfc::string_base &out) const =0
 Gets the category of the extension. More...
 
virtual bool get_short_name (pfc::string_base &out) const
 Gets the short, presumably more user-friendly than the name returned by get_name, name of the panel. More...
 
virtual bool get_description (pfc::string_base &out) const
 Gets the description of the extension. More...
 
virtual unsigned get_type () const =0
 Gets the type of the extension. More...
 
virtual bool get_prefer_multiple_instances () const
 Gets whther the panel prefers to be created in multiple instances. More...
 
virtual bool is_available (const window_host_ptr &p_host) const =0
 Get availability of the extension. More...
 
virtual HWND create_or_transfer_window (HWND wnd_parent, const window_host_ptr &p_host, const ui_helpers::window_position_t &p_position=ui_helpers::window_position_null)=0
 Create or transfer extension window. More...
 
virtual void destroy_window ()=0
 Destroys the extension window. More...
 
virtual HWND get_wnd () const =0
 Gets extension window handle. More...
 
virtual void get_size_limits (size_limit_t &p_out) const
 Gets size limits of the window. More...
 
 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (window)
 
- Public Member Functions inherited from ui_extension::extension_base
virtual const GUID & get_extension_guid () const =0
 Get unique ID of extension. More...
 
virtual void get_name (pfc::string_base &out) const =0
 Get a user-readable name of the extension. More...
 
virtual void set_config (stream_reader *p_reader, t_size p_size, abort_callback &p_abort)
 Set instance configuration data. More...
 
virtual void get_config (stream_writer *p_writer, abort_callback &p_abort) const
 Get instance configuration data. More...
 
virtual void import_config (stream_reader *p_reader, t_size p_size, abort_callback &p_abort)
 Set instance configuration data. This differs from set_config in that the data will be of that returned by export_config. More...
 
virtual void export_config (stream_writer *p_writer, abort_callback &p_abort) const
 Get instance configuration data. This differs from get_config, in that what is written is intended to be transferable between different foobar2000 installations on different computers (i.e. self-contained). More...
 
virtual bool have_config_popup () const
 Gets whether the extension has a modal configuration window. More...
 
virtual bool show_config_popup (HWND wnd_parent)
 Displays a modal configuartion dialog. More...
 
virtual void get_menu_items (menu_hook_t &p_hook)
 Retrieve menu items to be displayed in the host menu. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ui_extension::window
static bool create_by_guid (const GUID &guid, window_ptr &p_out)
 Creates extension by GUID. More...
 
static HWND g_on_tab (HWND wnd_focus)
 Helper function. Activates next or previous window. More...
 
static bool g_process_keydown_keyboard_shortcuts (WPARAM wp)
 Helper function. Processes keyboard shortcuts using keyboard_shortcut_manager_v2::process_keydown_simple(). Requires foobar2000 >= 0.9.5. More...
 

Detailed Description

Subclass of ui_extension::window, specifically for menubars.

Member Function Documentation

ui_extension::menu_window::FB2K_MAKE_SERVICE_INTERFACE ( menu_window  ,
window   
)
virtual void ui_extension::menu_window::hide_accelerators ( )
pure virtual

Indicates that you should stop underlining menu access keys in your menu.

Remarks
Applicable only if your menu underlines menu access keys only when activated by the keyboard. This is typically determined by the SPI_GETKEYBOARDCUES system parameter.
Do not change the state within this function call. Use PostMessage.
Implementation example
BOOL b_showkeyboardcues = TRUE;
SystemParametersInfo(SPI_GETKEYBOARDCUES, 0, &b_showkeyboardcues, 0);
PostMessage(wnd_menu, WM_UPDATEUISTATE, MAKEWPARAM(b_showkeyboardcues ? UIS_CLEAR : UIS_SET , UISF_HIDEACCEL), 0);
virtual bool ui_extension::menu_window::is_menu_focused ( ) const
pure virtual

Retrieve whether the menu has the keyboard focus..

Precondition
May only be called on hosted extensions.
Returns
whether your menu has keyboard focus
virtual bool ui_extension::menu_window::on_menuchar ( unsigned short  chr)
pure virtual

Called by host when a menu accelerator is pressed.

Called by host in its WM_MENUCHAR handler to notify extension that a menu was requested to be opened. You should check whether the accelerator key pressed is one of yours.

Precondition
May only be called on hosted extensions.
Parameters
[in]chrcharacter that was pressed
Returns
whether you claimed the accelerator key, and showed/will show your menu
virtual void ui_extension::menu_window::set_focus ( )
pure virtual

Called by host to indicate you should focus your menu.

Precondition
May only be called on hosted extensions.
virtual void ui_extension::menu_window::show_accelerators ( )
pure virtual

Indicates that you should underline menu access keys in your menu.

Remarks
Applicable only if your menu underlines menu access keys only when activated by the keyboard. This is typically determined by the SPI_GETKEYBOARDCUES system parameter.
Do not change the state within this function call. Use PostMessage.
Implementation example
PostMessage(wnd_menu, WM_UPDATEUISTATE, MAKEWPARAM(UIS_CLEAR , UISF_HIDEACCEL), 0);

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