kicad源代码研究:参照Candence实现工程管理
创建工程:
创建工程和打开工程触发事件:
KICAD_MANAGER_ACTIONS::newProject
KICAD_MANAGER_ACTIONS::openProject
newProject和OpenProject事件响应具体实现,在KICAD_MANAGER_CONTROL类中实现:
Go( &KICAD_MANAGER_CONTROL::NewProject, KICAD_MANAGER_ACTIONS::newProject.MakeEvent() );
KICAD_MANAGER_CONTROL::NewProject中的具体实现中调用了KICAD_MANAGER_FRAME的CreateNewProject和LoadProject。
KICAD_MANAGER_FRAME* m_frame;
m_frame->CreateNewProject( pro );
m_frame->LoadProject( pro );
ProjectTree页面创建
创建ProjectTree在kiaca/kicad_manager_frame.cpp中是实现,
m_leftWin = new PROJECT_TREE_PANE( this );
btdabs/PROJECT_TREE_PANEZ
void PROJECT_TREE_PANE::ReCreateTreePrj()
FlowManager
/kicad/FLOW_MANAGER_MODEL类:
void FLOW_MANAGER_MODEL::RebuildFlow()
{
CreateFlowNode( wxID_ANY, _("Create"), "", false, parentNode, &KICAD_MANAGER_ACTIONS::createSch );
KICAD_MANAGER_ACTIONS::createSch
createSch事件的响应函数:
Go( &KICAD_MANAGER_CONTROL::CreateSch, KICAD_MANAGER_ACTIONS::createSch.MakeEvent() );