foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
ui_element_instance_callback_impl< t_receiver >

#include <ui_element.h>

+ Inheritance diagram for ui_element_instance_callback_impl< t_receiver >:

Public Member Functions

 ui_element_instance_callback_impl (t_receiver *p_receiver)
 
bool is_edit_mode_enabled ()
 
bool is_elem_visible (service_ptr_t< class ui_element_instance > elem)
 
t_size notify (ui_element_instance *source, const GUID &what, t_size param1, const void *param2, t_size param2size)
 
void on_alt_pressed (bool p_state)
 
void on_min_max_info_change ()
 
void orphan ()
 
bool query_color (const GUID &p_what, t_ui_color &p_out)
 
t_ui_font query_font_ex (const GUID &p_what)
 
bool request_activation (service_ptr_t< class ui_element_instance > p_item)
 
void request_replace (service_ptr_t< class ui_element_instance > p_item)
 
- Public Member Functions inherited from ui_element_instance_callback
t_uint32 get_dialog_texture (ui_element_instance *source)
 
bool is_border_needed (ui_element_instance *source)
 
bool is_elem_visible_ (service_ptr_t< class ui_element_instance > elem)
 
t_size notify_ (ui_element_instance *source, const GUID &what, t_size param1, const void *param2, t_size param2size)
 
t_ui_font query_font ()
 
t_ui_color query_std_color (const GUID &p_what)
 
bool set_elem_label (ui_element_instance *source, const char *label)
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 

Private Attributes

t_receiver * m_receiver
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

template<typename t_receiver>
class ui_element_instance_callback_impl< t_receiver >

ui_element_instance_callback implementation helper.

Definition at line 191 of file ui_element.h.

Constructor & Destructor Documentation

template<typename t_receiver >
ui_element_instance_callback_impl< t_receiver >::ui_element_instance_callback_impl ( t_receiver *  p_receiver)
inline

Definition at line 193 of file ui_element.h.

193 : m_receiver(p_receiver) {}

Member Function Documentation

template<typename t_receiver >
bool ui_element_instance_callback_impl< t_receiver >::is_edit_mode_enabled ( )
inlinevirtual

Queries whether "edit mode" is enabled. Most of UI element editing functionality should be locked when it's not.

Implements ui_element_instance_callback.

Definition at line 209 of file ui_element.h.

209  {
210  if (m_receiver) return m_receiver->is_edit_mode_enabled();
211  else return false;
212  }
template<typename t_receiver >
bool ui_element_instance_callback_impl< t_receiver >::is_elem_visible ( service_ptr_t< class ui_element_instance elem)
inlinevirtual

Implements ui_element_instance_callback_v2.

Definition at line 224 of file ui_element.h.

224  {
225  if (m_receiver) return m_receiver->is_elem_visible(elem);
226  else return false;
227  }
template<typename t_receiver >
t_size ui_element_instance_callback_impl< t_receiver >::notify ( ui_element_instance source,
const GUID what,
t_size  param1,
const void *  param2,
t_size  param2size 
)
inline

Definition at line 228 of file ui_element.h.

228  {
229  if (m_receiver) return m_receiver->host_notify(source, what, param1, param2, param2size);
230  else return 0;
231  }
template<typename t_receiver >
void ui_element_instance_callback_impl< t_receiver >::on_alt_pressed ( bool  p_state)
inlinevirtual

Deprecated, does nothing.

Implements ui_element_instance_callback.

Definition at line 197 of file ui_element.h.

197 {}
template<typename t_receiver >
void ui_element_instance_callback_impl< t_receiver >::on_min_max_info_change ( )
inlinevirtual

Implements ui_element_instance_callback.

Definition at line 194 of file ui_element.h.

194  {
195  if (m_receiver != NULL) m_receiver->on_min_max_info_change();
196  }
template<typename t_receiver >
void ui_element_instance_callback_impl< t_receiver >::orphan ( )
inline

Definition at line 222 of file ui_element.h.

222 {m_receiver = NULL;}
template<typename t_receiver >
bool ui_element_instance_callback_impl< t_receiver >::query_color ( const GUID p_what,
t_ui_color p_out 
)
inlinevirtual

Returns true on success, false when the color is undefined and defaults such as global windows settings should be used.

Implements ui_element_instance_callback.

Definition at line 199 of file ui_element.h.

199  {
200  if (m_receiver != NULL) return m_receiver->query_color(p_what,p_out);
201  else return false;
202  }
template<typename t_receiver >
t_ui_font ui_element_instance_callback_impl< t_receiver >::query_font_ex ( const GUID p_what)
inlinevirtual

Retrieves an user-configurable font to use for specified kind of display. See ui_font_* constant for possible parameters.

Implements ui_element_instance_callback.

Definition at line 217 of file ui_element.h.

217  {
218  if (m_receiver) return m_receiver->query_font_ex(p_what);
219  else return NULL;
220  }
template<typename t_receiver >
bool ui_element_instance_callback_impl< t_receiver >::request_activation ( service_ptr_t< class ui_element_instance p_item)
inlinevirtual

Tells the host that specified element wants to activate itself as a result of some kind of external user command (eg. menu command). Host should ensure that requesting child element's window is visible.
.

Returns
True when relevant child element window has been properly made visible and requesting code should proceed to SetFocus their window etc, false when denied.

Implements ui_element_instance_callback.

Definition at line 204 of file ui_element.h.

204  {
205  if (m_receiver) return m_receiver->request_activation(p_item);
206  else return false;
207  }
template<typename t_receiver >
void ui_element_instance_callback_impl< t_receiver >::request_replace ( service_ptr_t< class ui_element_instance p_item)
inlinevirtual

Tells the host that the user has requested the element to be replaced with another one. Note: this is generally used only when "edit mode" is enabled, but legal to call when it's not (eg. dummy element calls it regardless of settings when clicked).

Implements ui_element_instance_callback.

Definition at line 213 of file ui_element.h.

213  {
214  if (m_receiver) m_receiver->request_replace(p_item);
215  }

Field Documentation

template<typename t_receiver >
t_receiver* ui_element_instance_callback_impl< t_receiver >::m_receiver
private

Definition at line 233 of file ui_element.h.


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