foobar2000 SDK  2015-08-03
Public Member Functions | Protected Member Functions | Private Attributes
CMenuDescriptionHybrid

#include <misc.h>

+ Inheritance diagram for CMenuDescriptionHybrid:

Public Member Functions

 CMenuDescriptionHybrid (HWND parent)
 
void Set (unsigned id, const char *desc)
 
void SetCM (contextmenu_manager::ptr mgr, unsigned base, unsigned max)
 
- Public Member Functions inherited from CMenuSelectionReceiver
 CMenuSelectionReceiver (HWND p_parent)
 
 ~CMenuSelectionReceiver ()
 
 BEGIN_MSG_MAP (CMenuSelectionReceiver) MESSAGE_HANDLER(WM_MENUSELECT
 
 DECLARE_WND_CLASS_EX (TEXT("{DF0087DB-E765-4283-BBAB-6AB2E8AB64A1}"), 0, 0)
 
OnMenuSelect END_MSG_MAP () protected
 

Protected Member Functions

bool QueryHint (unsigned p_id, pfc::string_base &p_out)
 

Private Attributes

contextmenu_manager::ptr m_cmMgr
 
unsigned m_cmMgr_base
 
unsigned m_cmMgr_max
 
pfc::map_t< unsigned, pfc::string8m_content
 

Additional Inherited Members

- Public Types inherited from CMenuSelectionReceiver
typedef CWindowImpl< CMenuSelectionReceiver_baseClass
 

Detailed Description

Definition at line 60 of file misc.h.

Constructor & Destructor Documentation

CMenuDescriptionHybrid::CMenuDescriptionHybrid ( HWND  parent)
inline

Definition at line 62 of file misc.h.

62 : CMenuSelectionReceiver(parent) {}
CMenuSelectionReceiver(HWND p_parent)
Definition: misc.h:3

Member Function Documentation

bool CMenuDescriptionHybrid::QueryHint ( unsigned  p_id,
pfc::string_base p_out 
)
inlineprotected

Definition at line 69 of file misc.h.

69  {
70  if (m_cmMgr.is_valid() && p_id >= m_cmMgr_base && p_id < m_cmMgr_max) {
71  return m_cmMgr->get_description_by_id(p_id - m_cmMgr_base,p_out);
72  }
73  return m_content.query(p_id,p_out);
74  }
unsigned m_cmMgr_max
Definition: misc.h:77
pfc::map_t< unsigned, pfc::string8 > m_content
Definition: misc.h:76
unsigned m_cmMgr_base
Definition: misc.h:77
contextmenu_manager::ptr m_cmMgr
Definition: misc.h:77
bool query(const _t_key &p_key, _t_value &p_value) const
Definition: map.h:44
void CMenuDescriptionHybrid::Set ( unsigned  id,
const char *  desc 
)
inline

Definition at line 63 of file misc.h.

63 {m_content.set(id, desc);}
pfc::map_t< unsigned, pfc::string8 > m_content
Definition: misc.h:76
void set(const _t_key &p_key, const _t_value &p_value)
Definition: map.h:22
void CMenuDescriptionHybrid::SetCM ( contextmenu_manager::ptr  mgr,
unsigned  base,
unsigned  max 
)
inline

Definition at line 65 of file misc.h.

65  {
66  m_cmMgr = mgr; m_cmMgr_base = base; m_cmMgr_max = max;
67  }
unsigned m_cmMgr_max
Definition: misc.h:77
unsigned m_cmMgr_base
Definition: misc.h:77
contextmenu_manager::ptr m_cmMgr
Definition: misc.h:77

Field Documentation

contextmenu_manager::ptr CMenuDescriptionHybrid::m_cmMgr
private

Definition at line 77 of file misc.h.

unsigned CMenuDescriptionHybrid::m_cmMgr_base
private

Definition at line 77 of file misc.h.

unsigned CMenuDescriptionHybrid::m_cmMgr_max
private

Definition at line 77 of file misc.h.

pfc::map_t<unsigned,pfc::string8> CMenuDescriptionHybrid::m_content
private

Definition at line 76 of file misc.h.


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