14 #include <wx/fs_zip.h> 41 #ifdef PPRCESS_EVENT_PERFORMANCE_MEASURE 45 #endif // PPRCESS_EVENT_PERFORMANCE_MEASURE 51 static Manager* s_ManagerInstance =
nullptr;
54 #ifdef PPRCESS_EVENT_PERFORMANCE_MEASURE 115 else name =
_(
"unknown CodeBlocksEvent");
119 #endif // PPRCESS_EVENT_PERFORMANCE_MEASURE 130 while (mit->second.size())
132 delete (*(mit->second.begin()));
133 mit->second.erase(mit->second.begin());
139 while (mit->second.size())
141 delete (*(mit->second.begin()));
142 mit->second.erase(mit->second.begin());
148 while (mit->second.size())
150 delete (*(mit->second.begin()));
151 mit->second.erase(mit->second.begin());
157 while (mit->second.size())
159 delete (*(mit->second.begin()));
160 mit->second.erase(mit->second.begin());
171 cbThrow(
_T(
"Illegal argument to Manager::Get()"));
184 if (!s_ManagerInstance)
185 s_ManagerInstance =
new Manager;
192 s_ManagerInstance =
nullptr;
251 EventSinksMap::iterator mit =
m_EventSinks.find(event.GetEventType());
254 for (EventSinksArray::iterator it = mit->second.begin(); it != mit->second.end(); ++it)
256 #ifdef PPRCESS_EVENT_PERFORMANCE_MEASURE 258 #endif // PPRCESS_EVENT_PERFORMANCE_MEASURE 262 #ifdef PPRCESS_EVENT_PERFORMANCE_MEASURE 266 const char *p = (*it)->GetTypeName();
269 realname = abi::__cxa_demangle(p, 0, 0, &status);
282 msg << GetCodeblocksEventName(type);
285 #endif // PPRCESS_EVENT_PERFORMANCE_MEASURE 296 DockEventSinksMap::iterator mit =
m_DockEventSinks.find(event.GetEventType());
299 for (DockEventSinksArray::iterator it = mit->second.begin(); it != mit->second.end(); ++it)
313 for (LayoutEventSinksArray::iterator it = mit->second.begin(); it != mit->second.end(); ++it)
324 LogEventSinksMap::iterator mit =
m_LogEventSinks.find(event.GetEventType());
327 for (LogEventSinksArray::iterator it = mit->second.begin(); it != mit->second.end(); ++it)
345 static bool xrcok =
false;
364 if (!m && createonfailure) m =
new wxMenuBar();
371 if (!m && createonfailure) m =
new wxMenu(
_T(
""));
387 tb = parent->CreateToolBar(flags,
wxID_ANY);
398 wxSize size = smallToolBar ?
wxSize(16, 16) : (platform::macosx ? wxSize(32, 32) : wxSize(22, 22));
414 if (!toolBar)
return true;
574 EventSinksArray::iterator it = mit->second.begin();
575 bool endIsInvalid =
false;
576 while (!endIsInvalid && it != mit->second.end())
578 if ((*it) && (*it)->GetThis() == owner)
580 EventSinksArray::iterator it2 = it++;
581 endIsInvalid = it == mit->second.end();
583 mit->second.erase(it2);
592 DockEventSinksArray::iterator it = mit->second.begin();
593 bool endIsInvalid =
false;
594 while (!endIsInvalid && it != mit->second.end())
596 if ((*it) && (*it)->GetThis() == owner)
598 DockEventSinksArray::iterator it2 = it++;
599 endIsInvalid = it == mit->second.end();
601 mit->second.erase(it2);
610 LayoutEventSinksArray::iterator it = mit->second.begin();
611 bool endIsInvalid =
false;
612 while (!endIsInvalid && it != mit->second.end())
614 if ((*it) && (*it)->GetThis() == owner)
616 LayoutEventSinksArray::iterator it2 = it++;
617 endIsInvalid = it == mit->second.end();
619 mit->second.erase(it2);
628 LogEventSinksArray::iterator it = mit->second.begin();
629 bool endIsInvalid =
false;
630 while (!endIsInvalid && it != mit->second.end())
632 if ((*it) && (*it)->GetThis() == owner)
634 LogEventSinksArray::iterator it2 = it++;
635 endIsInvalid = it == mit->second.end();
637 mit->second.erase(it2);
wxString F(const wxChar *msg,...)
sprintf-like function
EVTIMPORT const wxEventType cbEVT_BUILDTARGET_RENAMED
EVTIMPORT const wxEventType cbEVT_PROJECT_FILE_ADDED
virtual void ProcessPendingEvents()
EVTIMPORT const wxEventType cbEVT_PROJECT_END_ADD_FILES
EVTIMPORT const wxEventType cbEVT_PROJECT_RENAMED
EVTIMPORT const wxEventType cbEVT_PROJECT_NEW
PluginManager * GetPluginManager() const
Data folder in user's dir.
EVTIMPORT const wxEventType cbEVT_APP_START_SHUTDOWN
static void ProcessPendingEvents()
static bool LoadResource(const wxString &file)
static bool IsAppStartedUp()
ConfigManager * GetConfigManager(const wxString &name_space) const
UserVariableManager * GetUserVariableManager() const
static void Free()
Never, EVER, call this function! It is the last function called on shutdown....
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
EVTIMPORT const wxEventType cbEVT_COMPILER_FINISHED
static void SetAppShuttingDown(bool app_shutting_down)
wxToolBar * LoadToolBar(wxWindow *parent, const wxString &name)
EVTIMPORT const wxEventType cbEVT_CLEAN_PROJECT_STARTED
wxFileOffset Length() const
static bool IsAppShuttingDown()
static bool m_AppShuttingDown
static void SetBatchBuild(bool is_batch)
EVTIMPORT const wxEventType cbEVT_PLUGIN_ATTACHED
PersonalityManager * GetPersonalityManager() const
EVTIMPORT const wxEventType cbEVT_PIPEDPROCESS_STDOUT
Manage different personalities.
bool ReadBool(const wxString &name, bool defaultVal=false)
EVTIMPORT const wxEventType cbEVT_BUILDTARGET_SELECTED
wxMenu * LoadMenu(const wxString &name)
EVTIMPORT const wxEventType cbEVT_PLUGIN_RELEASED
EVTIMPORT const wxEventType cbEVT_PROJECT_ACTIVATE
FileManager * GetFileManager() const
Event used to request from the main app to add a log.
Event used to request from the main app to add a window to the docking system.
static void LoadXRC(wxString relpath)
Loads XRC file(s) using data_path.
static ProjectManager * Get()
EVTIMPORT const wxEventType cbEVT_DEBUGGER_STARTED
EVTIMPORT const wxEventType cbEVT_PROJECT_BEGIN_ADD_FILES
static void BlockYields(bool block)
Blocks/unblocks Manager::Yield(). Be careful when using it. Actually, do not use it ;) ...
static ConfigManager * GetConfigManager(const wxString &name_space)
EVTIMPORT const wxEventType cbEVT_PROJECT_SAVE
EVTIMPORT const wxEventType cbEVT_EDITOR_SPLIT
EVTIMPORT const wxEventType cbEVT_PIPEDPROCESS_TERMINATED
EVTIMPORT const wxEventType cbEVT_THREADTASK_ALLDONE
wxMenuBar * LoadMenuBar(wxWindow *parent, const wxString &name)
static bool m_AppStartedUp
EVTIMPORT const wxEventType cbEVT_COMPILER_SET_BUILD_OPTIONS
EVTIMPORT const wxEventType cbEVT_CLEAN_WORKSPACE_STARTED
A generic Code::Blocks event.
static wxString LocateDataFile(const wxString &filename, int search_dirs=sdAllKnown)
Locate a file in an installation- and platform-independent way.
wxWindow * GetAppWindow() const
EditorManager * GetEditorManager() const
void LogError(const wxString &msg, int i=app_log)
ProjectManager * GetProjectManager() const
Functions returning pointers to the respective sub-manager instances.
PluginManager manages plugins.
DebuggerManager * GetDebuggerManager() const
static bool m_BlockYields
EVTIMPORT const wxEventType cbEVT_EDITOR_CLOSE
LayoutEventSinksMap m_LayoutEventSinks
LogEventSinksMap m_LogEventSinks
static void InitXRC(bool force=false)
XML Resource functions /////// Inits XML Resource system.
Base abstract event functor class.
EVTIMPORT const wxEventType cbEVT_PLUGIN_LOADING_COMPLETE
DockEventSinksMap m_DockEventSinks
static wxCmdLineParser * GetCmdLineParser()
EVTIMPORT const wxEventType cbEVT_PROJECT_BEGIN_REMOVE_FILES
static wxString FromUTF8(const char *s)
EVTIMPORT const wxEventType cbEVT_EDITOR_SWITCHED
EVTIMPORT const wxEventType cbEVT_APP_DEACTIVATED
wxFrame * GetAppFrame() const
CCManager * GetCCManager() const
EVTIMPORT const wxEventType cbEVT_DEBUGGER_PAUSED
EVTIMPORT const wxEventType cbEVT_APP_ACTIVATED
const wxPoint wxDefaultPosition
void RemoveAllEventSinksFor(void *owner)
LogManager * GetLogManager() const
EVTIMPORT const wxEventType cbEVT_EDITOR_UPDATE_UI
EVTIMPORT const wxEventType cbEVT_BUILDTARGET_REMOVED
static void AddHandler(wxFileSystemHandler *handler)
const wxStringCharType * wx_str() const
static void AddFile(const wxString &filename, wxImage &image, wxBitmapType type)
EVTIMPORT const wxEventType cbEVT_THREADTASK_ENDED
EVTIMPORT const wxEventType cbEVT_EDITOR_DEACTIVATED
EVTIMPORT const wxEventType cbEVT_DEBUGGER_FINISHED
EVTIMPORT const wxEventType cbEVT_PROJECT_TARGETS_MODIFIED
MacrosManager * GetMacrosManager() const
static bool Access(const wxString &name, wxFile::OpenMode mode)
const wxString & _(const wxString &string)
Code Completion Plugin Manager.
EVTIMPORT const wxEventType cbEVT_THREADTASK_STARTED
static void Yield()
Whenever you need to call wxYield(), call Manager::Yield(). It's safer.
EVTIMPORT const wxEventType cbEVT_PROJECT_END_REMOVE_FILES
ssize_t Read(void *buffer, size_t count)
EVTIMPORT const wxEventType cbEVT_APP_STARTUP_DONE
ColourManager * GetColourManager() const
EVTIMPORT const wxEventType cbEVT_PLUGIN_UNINSTALLED
EVTIMPORT const wxEventType cbEVT_EDITOR_ACTIVATED
EVTIMPORT const wxEventType cbEVT_COMPILER_STARTED
The entry point singleton for working with projects.
Provides scripting in Code::Blocks.
void Log(const wxString &msg, int i=app_log, Logger::level lv=Logger::info)
EventSinksMap m_EventSinks
EVTIMPORT const wxEventType cbEVT_EDITOR_BEFORE_SAVE
void DebugLog(const wxString &msg, Logger::level lv=Logger::info)
static void SetAppStartedUp(bool app_started_up)
bool ProcessEvent(CodeBlocksEvent &event)
EVTIMPORT const wxEventType cbEVT_WORKSPACE_CHANGED
EVTIMPORT const wxEventType cbEVT_PROJECT_OPEN
void RegisterEventSink(wxEventType eventType, IEventFunctorBase< CodeBlocksEvent > *functor)
void InsertHandler(wxXmlResourceHandler *handler)
EVTIMPORT const wxEventType cbEVT_PROJECT_CLOSE
EVTIMPORT const wxEventType cbEVT_EDITOR_OPEN
static wxXmlResource * Get()
EVTIMPORT const wxEventType cbEVT_PROJECT_FILE_REMOVED
ScriptingManager * GetScriptingManager() const
EVTIMPORT const wxEventType cbEVT_BUILDTARGET_ADDED
bool Yield(bool onlyIfNeeded=false)
EVTIMPORT const wxEventType cbEVT_EDITOR_UNSPLIT
EVTIMPORT const wxEventType cbEVT_EDITOR_SAVE
EVTIMPORT const wxEventType cbEVT_PLUGIN_INSTALLED
static wxCmdLineParser m_CmdLineParser
static Manager * s_ManagerInstance
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
EVTIMPORT const wxEventType cbEVT_PIPEDPROCESS_STDERR
EVTIMPORT const wxEventType cbEVT_EDITOR_MODIFIED
Event used to request from the main app to manage the view layouts.