|
Code::Blocks
SVN r11506
|
#include <toolsmanager.h>
Public Member Functions | |
| void | CreateMenu (wxMenuBar *menuBar) |
| void | ReleaseMenu (wxMenuBar *menuBar) |
| void | AddTool (const cbTool *tool, bool save=true) |
| void | InsertTool (int position, const cbTool *tool, bool save=true) |
| void | RemoveToolByIndex (int index) |
| cbTool * | GetToolByMenuId (int id) |
| cbTool * | GetToolByIndex (int index) |
| int | GetToolsCount () const |
| void | BuildToolsMenu (wxMenu *menu) |
| void | OnToolClick (wxCommandEvent &event) |
| void | OnIdle (wxIdleEvent &event) |
| void | OnToolStdOutput (CodeBlocksEvent &event) |
| void | OnToolErrOutput (CodeBlocksEvent &event) |
| void | OnToolTerminated (CodeBlocksEvent &event) |
| void | OnConfigure (wxCommandEvent &event) |
Private Member Functions | |
| ToolsManager () | |
| ~ToolsManager () override | |
| int | Configure () |
| bool | Execute (const cbTool *tool) |
| void | LoadTools () |
| void | SaveTools () |
Private Attributes | |
| ToolsList | m_Tools |
| MenuItemsManager | m_ItemsManager |
| wxMenu * | m_Menu |
| PipedProcess * | m_pProcess |
| int | m_Pid |
Friends | |
| class | Mgr< ToolsManager > |
| class | Manager |
Additional Inherited Members | |
Static Public Member Functions inherited from Mgr< ToolsManager > | |
| static bool | Valid () |
| static ToolsManager * | Get () |
| static void | Free () |
Protected Member Functions inherited from Mgr< ToolsManager > | |
| Mgr () | |
| virtual | ~Mgr () |
Definition at line 23 of file toolsmanager.h.
|
private |
Definition at line 50 of file toolsmanager.cpp.
References Manager::Get(), and Manager::GetAppWindow().
|
overrideprivate |
Definition at line 59 of file toolsmanager.cpp.
References MenuItemsManager::Clear(), m_ItemsManager, and m_Tools.
| void ToolsManager::AddTool | ( | const cbTool * | tool, |
| bool | save = true |
||
| ) |
Definition at line 196 of file toolsmanager.cpp.
References InsertTool(), and m_Tools.
Referenced by LoadTools(), ConfigureToolsDlg::OnAdd(), and ConfigureToolsDlg::OnAddSeparator().
| void ToolsManager::BuildToolsMenu | ( | wxMenu * | menu | ) |
Definition at line 302 of file toolsmanager.cpp.
References _(), _T, MenuItemsManager::Add(), CB_TOOLS_SEPARATOR, MenuItemsManager::Clear(), cbTool::GetMenuId(), wxMenu::GetMenuItemCount(), cbTool::GetName(), idToolsConfigure, m_ItemsManager, m_Menu, m_Tools, OnToolClick(), cbTool::SetMenuId(), wxID_SEPARATOR, and wxNewId().
Referenced by Configure(), and MainFrame::CreateMenubar().
|
private |
Definition at line 339 of file toolsmanager.cpp.
References BuildToolsMenu(), cbEVT_MENUBAR_CREATE_BEGIN, cbEVT_MENUBAR_CREATE_END, Manager::Get(), m_Menu, PlaceWindow(), Manager::ProcessEvent(), SaveTools(), and wxDialog::ShowModal().
Referenced by OnConfigure().
| void ToolsManager::CreateMenu | ( | wxMenuBar * | menuBar | ) |
Definition at line 72 of file toolsmanager.cpp.
|
private |
Definition at line 80 of file toolsmanager.cpp.
References _(), _T, LogManager::app_log, wxString::c_str(), cbEVT_SWITCH_TO_LOG_WINDOW, cbMessageBox(), CONSOLE_RUNNER, DEFAULT_CONSOLE_TERM, F(), Manager::Get(), cbTool::GetCommand(), Manager::GetConfigManager(), ConfigManager::GetExecutableFolder(), cbTool::GetLaunchOption(), Manager::GetLogManager(), Manager::GetMacrosManager(), cbTool::GetName(), cbTool::GetParams(), cbTool::GetWorkingDir(), idToolProcess, cbTool::LAUNCH_HIDDEN, cbTool::LAUNCH_NEW_CONSOLE_WINDOW, cbTool::LAUNCH_VISIBLE, cbTool::LAUNCH_VISIBLE_DETACHED, LogManager::Log(), m_Pid, m_pProcess, Manager::ProcessEvent(), ConfigManager::Read(), MacrosManager::RecalcVars(), wxString::Replace(), MacrosManager::ReplaceMacros(), wxString::wx_str(), wxEXEC_ASYNC, wxExecute(), wxFileExists(), wxGetCwd(), wxICON_ERROR, wxSetWorkingDirectory(), and wxT.
Referenced by OnToolClick().
| cbTool * ToolsManager::GetToolByIndex | ( | int | index | ) |
Definition at line 239 of file toolsmanager.cpp.
References m_Tools.
Referenced by ConfigureToolsDlg::DoFillList(), ConfigureToolsDlg::OnEdit(), and ConfigureToolsDlg::OnUpdateUI().
| cbTool * ToolsManager::GetToolByMenuId | ( | int | id | ) |
Definition at line 228 of file toolsmanager.cpp.
References cbTool::GetMenuId(), and m_Tools.
Referenced by OnToolClick().
|
inline |
Definition at line 35 of file toolsmanager.h.
References ScriptBindings::IOLib::Execute().
Referenced by ConfigureToolsDlg::DoFillList().
| void ToolsManager::InsertTool | ( | int | position, |
| const cbTool * | tool, | ||
| bool | save = true |
||
| ) |
Definition at line 204 of file toolsmanager.cpp.
References m_Tools, and SaveTools().
Referenced by AddTool(), ConfigureToolsDlg::OnDown(), and ConfigureToolsDlg::OnUp().
|
private |
Definition at line 252 of file toolsmanager.cpp.
References _(), _T, AddTool(), ConfigManager::EnumerateSubPaths(), F(), Manager::Get(), cbTool::GetCommand(), Manager::GetConfigManager(), wxArrayString::GetCount(), Manager::GetLogManager(), cbTool::GetName(), wxString::IsEmpty(), LogManager::Log(), m_Tools, ConfigManager::Read(), ConfigManager::ReadInt(), cbTool::SetCommand(), cbTool::SetLaunchOption(), cbTool::SetName(), cbTool::SetParams(), and cbTool::SetWorkingDir().
| void ToolsManager::OnConfigure | ( | wxCommandEvent & | event | ) |
Definition at line 358 of file toolsmanager.cpp.
References Configure().
| void ToolsManager::OnIdle | ( | wxIdleEvent & | event | ) |
Definition at line 370 of file toolsmanager.cpp.
References PipedProcess::HasInput(), and m_pProcess.
| void ToolsManager::OnToolClick | ( | wxCommandEvent & | event | ) |
Definition at line 363 of file toolsmanager.cpp.
References _(), cbMessageBox(), Execute(), cbTool::GetName(), and GetToolByMenuId().
Referenced by BuildToolsMenu().
| void ToolsManager::OnToolErrOutput | ( | CodeBlocksEvent & | event | ) |
Definition at line 388 of file toolsmanager.cpp.
References _T, Manager::Get(), Manager::GetLogManager(), and LogManager::Log().
| void ToolsManager::OnToolStdOutput | ( | CodeBlocksEvent & | event | ) |
Definition at line 383 of file toolsmanager.cpp.
References _T, Manager::Get(), Manager::GetLogManager(), and LogManager::Log().
| void ToolsManager::OnToolTerminated | ( | CodeBlocksEvent & | event | ) |
Definition at line 393 of file toolsmanager.cpp.
References _T, F(), Manager::Get(), Manager::GetLogManager(), LogManager::Log(), m_Pid, and m_pProcess.
| void ToolsManager::ReleaseMenu | ( | wxMenuBar * | menuBar | ) |
Definition at line 76 of file toolsmanager.cpp.
| void ToolsManager::RemoveToolByIndex | ( | int | index | ) |
Definition at line 213 of file toolsmanager.cpp.
References m_Tools, and SaveTools().
Referenced by ConfigureToolsDlg::OnDown(), ConfigureToolsDlg::OnRemove(), and ConfigureToolsDlg::OnUp().
|
private |
Definition at line 274 of file toolsmanager.cpp.
References _(), _T, ConfigManager::DeleteSubPath(), ConfigManager::EnumerateSubPaths(), Manager::Get(), cbTool::GetCommand(), Manager::GetConfigManager(), wxArrayString::GetCount(), cbTool::GetLaunchOption(), cbTool::GetName(), cbTool::GetParams(), cbTool::GetWorkingDir(), m_Tools, wxString::Printf(), and ConfigManager::Write().
Referenced by Configure(), InsertTool(), and RemoveToolByIndex().
|
friend |
Definition at line 27 of file toolsmanager.h.
|
friend |
Definition at line 26 of file toolsmanager.h.
|
private |
Definition at line 53 of file toolsmanager.h.
Referenced by BuildToolsMenu(), and ~ToolsManager().
|
private |
Definition at line 54 of file toolsmanager.h.
Referenced by BuildToolsMenu(), and Configure().
|
private |
Definition at line 56 of file toolsmanager.h.
Referenced by Execute(), and OnToolTerminated().
|
private |
Definition at line 55 of file toolsmanager.h.
Referenced by Execute(), OnIdle(), and OnToolTerminated().
|
private |
Definition at line 52 of file toolsmanager.h.
Referenced by AddTool(), BuildToolsMenu(), GetToolByIndex(), GetToolByMenuId(), InsertTool(), LoadTools(), RemoveToolByIndex(), SaveTools(), and ~ToolsManager().
1.8.13