Code::Blocks  SVN r11506
Public Types | Public Member Functions | Protected Attributes | List of all members
EditorHooks::HookFunctor< T > Class Template Reference

Functor class for use as a editor modification operations hook. More...

#include <editor_hooks.h>

Inheritance diagram for EditorHooks::HookFunctor< T >:
Collaboration diagram for EditorHooks::HookFunctor< T >:

Public Types

typedef void(T::* Func) (cbEditor *, wxScintillaEvent &)
 

Public Member Functions

 HookFunctor (T *obj, Func func)
 
void Call (cbEditor *editor, wxScintillaEvent &event) const override
 
- Public Member Functions inherited from EditorHooks::HookFunctorBase
virtual ~HookFunctorBase ()
 

Protected Attributes

T * m_pObj
 
Func m_pFunc
 

Detailed Description

template<class T>
class EditorHooks::HookFunctor< T >

Functor class for use as a editor modification operations hook.

Passed as the first parameter in RegisterHook() and UnregisterHook().

example: EditorHooks::HookFunctorBase* myhook = new EditorHooks::HookFunctor<MyClass>(this, &MyClass::OnHookCalled); int id = EditorHooks::RegisterHook(myhook); ... (and before your class' destruction - or earlier): EditorHooks::UnregisterHook(id, true);

Member functions used as hook callbacks must have the following signature: void YourFunctionName(cbEditor*, wxScintillaEvent&)

Definition at line 52 of file editor_hooks.h.

Member Typedef Documentation

◆ Func

template<class T>
typedef void(T::* EditorHooks::HookFunctor< T >::Func) (cbEditor *, wxScintillaEvent &)

Definition at line 55 of file editor_hooks.h.

Constructor & Destructor Documentation

◆ HookFunctor()

template<class T>
EditorHooks::HookFunctor< T >::HookFunctor ( T *  obj,
Func  func 
)
inline

Definition at line 56 of file editor_hooks.h.

Member Function Documentation

◆ Call()

template<class T>
void EditorHooks::HookFunctor< T >::Call ( cbEditor editor,
wxScintillaEvent event 
) const
inlineoverridevirtual

Implements EditorHooks::HookFunctorBase.

Definition at line 58 of file editor_hooks.h.

References GetTypeName().

Member Data Documentation

◆ m_pFunc

template<class T>
Func EditorHooks::HookFunctor< T >::m_pFunc
protected

Definition at line 74 of file editor_hooks.h.

◆ m_pObj

template<class T>
T* EditorHooks::HookFunctor< T >::m_pObj
protected

Definition at line 73 of file editor_hooks.h.


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