OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4GUI::CallbackHandler< CB > Class Template Reference

#include <C4Gui.h>

Inheritance diagram for C4GUI::CallbackHandler< CB >:
[legend]
Collaboration diagram for C4GUI::CallbackHandler< CB >:
[legend]

Public Types

typedef void(CB::* Func )(class Element *pElement)
 

Public Member Functions

void DoCall (class Element *pElement) override
 
 CallbackHandler (CB *pTarget, Func rFunc)
 
void Ref ()
 
void DeRef ()
 

Detailed Description

template<class CB>
class C4GUI::CallbackHandler< CB >

Definition at line 262 of file C4Gui.h.

Member Typedef Documentation

template<class CB >
typedef void(CB::* C4GUI::CallbackHandler< CB >::Func)(class Element *pElement)

Definition at line 265 of file C4Gui.h.

Constructor & Destructor Documentation

template<class CB >
C4GUI::CallbackHandler< CB >::CallbackHandler ( CB *  pTarget,
Func  rFunc 
)
inline

Definition at line 277 of file C4Gui.h.

277 : pCBClass(pTarget), CBFunc(rFunc) {}

Member Function Documentation

void C4GUI::BaseCallbackHandler::DeRef ( )
inlineinherited

Definition at line 257 of file C4Gui.h.

Referenced by C4GUI::ConfirmationDialog::OnClosed(), C4GUI::CheckBox::SetOnChecked(), C4GUI::ListBox::SetSelectionChangeCallbackFn(), C4GUI::ListBox::SetSelectionDblClickFn(), C4GUI::CheckBox::~CheckBox(), C4GUI::ConfirmationDialog::~ConfirmationDialog(), C4GUI::ListBox::~ListBox(), and C4GUI::ScrollBar::~ScrollBar().

257 { if (!--iRefs) delete this; }

Here is the caller graph for this function:

template<class CB >
void C4GUI::CallbackHandler< CB >::DoCall ( class Element pElement)
inlineoverridevirtual

Implements C4GUI::BaseCallbackHandler.

Definition at line 272 of file C4Gui.h.

273  {
274  ((pCBClass)->*CBFunc)(pElement);
275  }
void C4GUI::BaseCallbackHandler::Ref ( )
inlineinherited

Definition at line 256 of file C4Gui.h.

Referenced by C4GUI::ConfirmationDialog::ConfirmationDialog(), C4GUI::ConfirmationDialog::OnClosed(), C4GUI::ScrollBar::ScrollBar(), C4GUI::CheckBox::SetOnChecked(), C4GUI::ListBox::SetSelectionChangeCallbackFn(), and C4GUI::ListBox::SetSelectionDblClickFn().

256 { ++iRefs; }

Here is the caller graph for this function:


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