OpenClonk
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

◆ Func

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

Definition at line 265 of file C4Gui.h.

Constructor & Destructor Documentation

◆ CallbackHandler()

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

◆ DeRef()

void C4GUI::BaseCallbackHandler::DeRef ( )
inlineinherited

Definition at line 257 of file C4Gui.h.

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

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().

Here is the caller graph for this function:

◆ DoCall()

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  }

◆ Ref()

void C4GUI::BaseCallbackHandler::Ref ( )
inlineinherited

Definition at line 256 of file C4Gui.h.

256 { ++iRefs; }

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

Here is the caller graph for this function:

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