OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4GUI::CBMenuHandlerEx< CBClass, TEx > Class Template Reference

#include <C4Gui.h>

Inheritance diagram for C4GUI::CBMenuHandlerEx< CBClass, TEx >:
[legend]
Collaboration diagram for C4GUI::CBMenuHandlerEx< CBClass, TEx >:
[legend]

Public Member Functions

 CBMenuHandlerEx (CBClass *pCBTarget, typename DlgCallbackEx< CBClass, const TEx & >::ContextClickFunc pCallbackFn, TEx aExtra)
 
 CBMenuHandlerEx (CBClass *pCBTarget, typename DlgCallbackEx< CBClass, const TEx & >::ContextClickFunc pCallbackFn)
 
const TEx & GetExtra () const
 
void SetExtra (const TEx &e)
 
virtual void OnOK (Element *pTargetElement)
 

Detailed Description

template<class CBClass, class TEx>
class C4GUI::CBMenuHandlerEx< CBClass, TEx >

Definition at line 2710 of file C4Gui.h.

Constructor & Destructor Documentation

template<class CBClass, class TEx>
C4GUI::CBMenuHandlerEx< CBClass, TEx >::CBMenuHandlerEx ( CBClass *  pCBTarget,
typename DlgCallbackEx< CBClass, const TEx & >::ContextClickFunc  pCallbackFn,
TEx  aExtra 
)
inline

Definition at line 2718 of file C4Gui.h.

2719  : MenuHandler(), pCBTarget(pCBTarget), pCallbackFn(pCallbackFn), Extra(aExtra) { }
template<class CBClass, class TEx>
C4GUI::CBMenuHandlerEx< CBClass, TEx >::CBMenuHandlerEx ( CBClass *  pCBTarget,
typename DlgCallbackEx< CBClass, const TEx & >::ContextClickFunc  pCallbackFn 
)
inline

Definition at line 2720 of file C4Gui.h.

2721  : MenuHandler(), pCBTarget(pCBTarget), pCallbackFn(pCallbackFn), Extra() { }

Member Function Documentation

template<class CBClass, class TEx>
const TEx& C4GUI::CBMenuHandlerEx< CBClass, TEx >::GetExtra ( ) const
inline

Definition at line 2723 of file C4Gui.h.

2723 { return Extra; }
template<class CBClass, class TEx>
virtual void C4GUI::CBMenuHandlerEx< CBClass, TEx >::OnOK ( Element pTargetElement)
inlinevirtual

Implements C4GUI::MenuHandler.

Definition at line 2726 of file C4Gui.h.

2727  {
2728  if (!pCBTarget || !pCallbackFn) return;
2729  // do callback
2730  (pCBTarget->*pCallbackFn)(pTargetElement, Extra);
2731  }
template<class CBClass, class TEx>
void C4GUI::CBMenuHandlerEx< CBClass, TEx >::SetExtra ( const TEx &  e)
inline

Definition at line 2724 of file C4Gui.h.

2724 { Extra = e; }

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