C4GUI::CallbackHandler< CB > Class Template Reference

#include <C4Gui.h>

Inheritance diagram for C4GUI::CallbackHandler< CB >:
Collaboration diagram for C4GUI::CallbackHandler< CB >:

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 

Definition at line 277 of file C4Gui.h.

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

Member Function Documentation

◆ DeRef()

void C4GUI::BaseCallbackHandler::DeRef ( )

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:

◆ DoCall()

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

Implements C4GUI::BaseCallbackHandler.

Definition at line 272 of file C4Gui.h.

273  {
274  ((pCBClass)->*CBFunc)(pElement);
275  }

◆ Ref()

void C4GUI::BaseCallbackHandler::Ref ( )

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: