OpenClonk
C4GUI::ParCallbackHandler< CB, ParType > Class Template Reference

#include <C4Gui.h>

Inheritance diagram for C4GUI::ParCallbackHandler< CB, ParType >:
[legend]
Collaboration diagram for C4GUI::ParCallbackHandler< CB, ParType >:
[legend]

Public Types

typedef void(CB::* Func) (ParType par)
 

Public Member Functions

void DoCall (ParType par) override
 
 ParCallbackHandler (CB *pTarget, Func rFunc)
 
void Ref ()
 
void DeRef ()
 

Protected Member Functions

void DoCall (class Element *pElement) override
 

Detailed Description

template<class CB, class ParType>
class C4GUI::ParCallbackHandler< CB, ParType >

Definition at line 328 of file C4Gui.h.

Member Typedef Documentation

◆ Func

template<class CB , class ParType >
typedef void(CB::* C4GUI::ParCallbackHandler< CB, ParType >::Func) (ParType par)

Definition at line 331 of file C4Gui.h.

Constructor & Destructor Documentation

◆ ParCallbackHandler()

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

Definition at line 345 of file C4Gui.h.

345 : 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() [1/2]

template<class ParType >
void C4GUI::BaseParCallbackHandler< ParType >::DoCall ( class Element pElement)
inlineoverrideprotectedvirtualinherited

Implements C4GUI::BaseCallbackHandler.

Definition at line 321 of file C4Gui.h.

321 {assert(false);} // no-par: Not to be called

Referenced by C4GUI::ScrollBar::OnPosChanged().

Here is the caller graph for this function:

◆ DoCall() [2/2]

template<class CB , class ParType >
void C4GUI::ParCallbackHandler< CB, ParType >::DoCall ( ParType  par)
inlineoverridevirtual

Implements C4GUI::BaseParCallbackHandler< ParType >.

Definition at line 343 of file C4Gui.h.

343 { ((pCBClass)->*CBFunc)(par); }

◆ 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: