|
Code::Blocks
SVN r11506
|
Provides static functions to add hooks to the editor modification operations. More...
Classes | |
| class | cbSmartIndentEditorHookFunctor |
| Provides a HookFunctor which redirects the Call() of a cbSmartIndentPlugin so only the interface of cbSmartIndentPlugin has to be implemented for a new language. More... | |
| class | HookFunctor |
| Functor class for use as a editor modification operations hook. More... | |
| class | HookFunctorBase |
| Abstract base hook functor interface. More... | |
Typedefs | |
| typedef std::map< int, HookFunctorBase * > | HookFunctorsMap |
Functions | |
| DLLIMPORT int | RegisterHook (HookFunctorBase *functor) |
| Register a project loading/saving hook. More... | |
| DLLIMPORT HookFunctorBase * | UnregisterHook (int id, bool deleteHook=true) |
| Unregister a previously registered project loading/saving hook. More... | |
| DLLIMPORT bool | HasRegisteredHooks () |
| Are there any hooks registered? More... | |
| DLLIMPORT void | CallHooks (cbEditor *editor, wxScintillaEvent &event) |
| Call all registered hooks using the supplied parameters. More... | |
Variables | |
| static HookFunctorsMap | s_HookFunctorsMap |
| static int | s_UniqueID = 0 |
Provides static functions to add hooks to the editor modification operations.
| typedef std::map<int, HookFunctorBase*> EditorHooks::HookFunctorsMap |
Definition at line 73 of file editor_hooks.cpp.
| void EditorHooks::CallHooks | ( | cbEditor * | editor, |
| wxScintillaEvent & | event | ||
| ) |
Call all registered hooks using the supplied parameters.
This is called by ProjectLoader.
| editor | The editor in question. |
| event | Parameter (wxScintilla event) to provide to the registered hook |
Definition at line 111 of file editor_hooks.cpp.
References EditorHooks::HookFunctorBase::Call(), LogManager::DebugLog(), F(), wxString::FromUTF8(), Manager::Get(), Manager::GetLogManager(), s_HookFunctorsMap, wxStopWatch::Time(), wxString::wx_str(), and wxT.
Referenced by cbEditor::OnScintillaEvent().
| bool EditorHooks::HasRegisteredHooks | ( | ) |
Are there any hooks registered?
Definition at line 106 of file editor_hooks.cpp.
References s_HookFunctorsMap.
Referenced by cbEditor::OnScintillaEvent().
| int EditorHooks::RegisterHook | ( | EditorHooks::HookFunctorBase * | functor | ) |
Register a project loading/saving hook.
| functor | The functor to use as a callback. |
Definition at line 78 of file editor_hooks.cpp.
References s_HookFunctorsMap, and s_UniqueID.
Referenced by CCManager::CCManager(), CodeCompletion::OnAttach(), and cbSmartIndentPlugin::OnAttach().
| EditorHooks::HookFunctorBase * EditorHooks::UnregisterHook | ( | int | id, |
| bool | deleteHook = true |
||
| ) |
Unregister a previously registered project loading/saving hook.
| id | The hook's ID. You should have the ID from when RegisterHook() was called. |
| deleteHook | If true, the hook will be deleted (default). If not, it's up to you to delete it. |
deleteHook was true, it always returns NULL. Definition at line 89 of file editor_hooks.cpp.
References s_HookFunctorsMap.
Referenced by CodeCompletion::OnRelease(), cbSmartIndentPlugin::OnRelease(), and CCManager::~CCManager().
|
static |
Definition at line 74 of file editor_hooks.cpp.
Referenced by CallHooks(), HasRegisteredHooks(), RegisterHook(), and UnregisterHook().
|
static |
Definition at line 75 of file editor_hooks.cpp.
Referenced by RegisterHook().
1.8.13