Code::Blocks  SVN r11506
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ToolsManager Class Reference

#include <toolsmanager.h>

Inheritance diagram for ToolsManager:
Collaboration diagram for ToolsManager:

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)
 
cbToolGetToolByMenuId (int id)
 
cbToolGetToolByIndex (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
 
wxMenum_Menu
 
PipedProcessm_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 ToolsManagerGet ()
 
static void Free ()
 
- Protected Member Functions inherited from Mgr< ToolsManager >
 Mgr ()
 
virtual ~Mgr ()
 

Detailed Description

Definition at line 23 of file toolsmanager.h.

Constructor & Destructor Documentation

◆ ToolsManager()

ToolsManager::ToolsManager ( )
private

Definition at line 50 of file toolsmanager.cpp.

References Manager::Get(), and Manager::GetAppWindow().

◆ ~ToolsManager()

ToolsManager::~ToolsManager ( )
overrideprivate

Definition at line 59 of file toolsmanager.cpp.

References MenuItemsManager::Clear(), m_ItemsManager, and m_Tools.

Member Function Documentation

◆ AddTool()

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().

◆ BuildToolsMenu()

void ToolsManager::BuildToolsMenu ( wxMenu menu)

◆ Configure()

int ToolsManager::Configure ( )
private

◆ CreateMenu()

void ToolsManager::CreateMenu ( wxMenuBar menuBar)

Definition at line 72 of file toolsmanager.cpp.

◆ Execute()

bool ToolsManager::Execute ( const cbTool tool)
private

◆ GetToolByIndex()

cbTool * ToolsManager::GetToolByIndex ( int  index)

◆ GetToolByMenuId()

cbTool * ToolsManager::GetToolByMenuId ( int  id)

Definition at line 228 of file toolsmanager.cpp.

References cbTool::GetMenuId(), and m_Tools.

Referenced by OnToolClick().

◆ GetToolsCount()

int ToolsManager::GetToolsCount ( ) const
inline

Definition at line 35 of file toolsmanager.h.

References ScriptBindings::IOLib::Execute().

Referenced by ConfigureToolsDlg::DoFillList().

◆ InsertTool()

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().

◆ LoadTools()

void ToolsManager::LoadTools ( )
private

◆ OnConfigure()

void ToolsManager::OnConfigure ( wxCommandEvent event)

Definition at line 358 of file toolsmanager.cpp.

References Configure().

◆ OnIdle()

void ToolsManager::OnIdle ( wxIdleEvent event)

Definition at line 370 of file toolsmanager.cpp.

References PipedProcess::HasInput(), and m_pProcess.

◆ OnToolClick()

void ToolsManager::OnToolClick ( wxCommandEvent event)

Definition at line 363 of file toolsmanager.cpp.

References _(), cbMessageBox(), Execute(), cbTool::GetName(), and GetToolByMenuId().

Referenced by BuildToolsMenu().

◆ OnToolErrOutput()

void ToolsManager::OnToolErrOutput ( CodeBlocksEvent event)

Definition at line 388 of file toolsmanager.cpp.

References _T, Manager::Get(), Manager::GetLogManager(), and LogManager::Log().

◆ OnToolStdOutput()

void ToolsManager::OnToolStdOutput ( CodeBlocksEvent event)

Definition at line 383 of file toolsmanager.cpp.

References _T, Manager::Get(), Manager::GetLogManager(), and LogManager::Log().

◆ OnToolTerminated()

void ToolsManager::OnToolTerminated ( CodeBlocksEvent event)

◆ ReleaseMenu()

void ToolsManager::ReleaseMenu ( wxMenuBar menuBar)

Definition at line 76 of file toolsmanager.cpp.

◆ RemoveToolByIndex()

void ToolsManager::RemoveToolByIndex ( int  index)

◆ SaveTools()

void ToolsManager::SaveTools ( )
private

Friends And Related Function Documentation

◆ Manager

friend class Manager
friend

Definition at line 27 of file toolsmanager.h.

◆ Mgr< ToolsManager >

friend class Mgr< ToolsManager >
friend

Definition at line 26 of file toolsmanager.h.

Member Data Documentation

◆ m_ItemsManager

MenuItemsManager ToolsManager::m_ItemsManager
private

Definition at line 53 of file toolsmanager.h.

Referenced by BuildToolsMenu(), and ~ToolsManager().

◆ m_Menu

wxMenu* ToolsManager::m_Menu
private

Definition at line 54 of file toolsmanager.h.

Referenced by BuildToolsMenu(), and Configure().

◆ m_Pid

int ToolsManager::m_Pid
private

Definition at line 56 of file toolsmanager.h.

Referenced by Execute(), and OnToolTerminated().

◆ m_pProcess

PipedProcess* ToolsManager::m_pProcess
private

Definition at line 55 of file toolsmanager.h.

Referenced by Execute(), OnIdle(), and OnToolTerminated().

◆ m_Tools

ToolsList ToolsManager::m_Tools
private

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