You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.7 KiB

  1. /*****************************************************************************
  2. *
  3. * netlist_control.h
  4. *
  5. *****************************************************************************/
  6. #ifndef _NETLIST_CONTROL_H_
  7. #define _NETLIST_CONTROL_H_
  8. /* Event id for notebook page buttons: */
  9. enum id_netlist {
  10. ID_CREATE_NETLIST = 1550,
  11. ID_CURRENT_FORMAT_IS_DEFAULT,
  12. ID_RUN_SIMULATOR,
  13. ID_SETUP_PLUGIN,
  14. ID_VALIDATE_PLUGIN,
  15. ID_DELETE_PLUGIN,
  16. ID_NETLIST_NOTEBOOK
  17. };
  18. /* panel (notebook page) identifiers */
  19. enum panel_netlist_index {
  20. PANELPCBNEW = 0, /* Handle Netlist format Pcbnew */
  21. PANELORCADPCB2, /* Handle Netlist format OracdPcb2 */
  22. PANELCADSTAR, /* Handle Netlist format CadStar */
  23. PANELSPICE, /* Handle Netlist format Pspice */
  24. PANELCUSTOMBASE /* First auxiliary panel (custom netlists).
  25. * others use PANELCUSTOMBASE+1, PANELCUSTOMBASE+2.. */
  26. };
  27. /* Values returned when the netlist dialog is demiss */
  28. enum gen_netlist_diag {
  29. NET_OK,
  30. NET_ABORT,
  31. NET_PLUGIN_CHANGE
  32. };
  33. /* wxPanels for creating the NoteBook pages for each netlist format: */
  34. class EDA_NoteBookPage : public wxPanel
  35. {
  36. public:
  37. int m_IdNetType;
  38. wxCheckBox* m_IsCurrentFormat;
  39. WinEDA_EnterText* m_CommandStringCtrl;
  40. WinEDA_EnterText* m_TitleStringCtrl;
  41. wxButton* m_ButtonCancel;
  42. wxBoxSizer* m_LeftBoxSizer;
  43. wxBoxSizer* m_RightBoxSizer;
  44. wxBoxSizer* m_RightOptionsBoxSizer;
  45. wxBoxSizer* m_LowBoxSizer;
  46. EDA_NoteBookPage( wxNotebook* parent, const wxString& title,
  47. int id_NetType, int idCheckBox, int idCreateFile,
  48. bool selected );
  49. ~EDA_NoteBookPage() { };
  50. };
  51. /* Dialog frame for creating netlists */
  52. class WinEDA_NetlistFrame : public wxDialog
  53. {
  54. public:
  55. WinEDA_SchematicFrame* m_Parent;
  56. wxNotebook* m_NoteBook;
  57. EDA_NoteBookPage* m_PanelNetType[4 + CUSTOMPANEL_COUNTMAX];
  58. wxRadioBox* m_UseNetNamesInNetlist;
  59. public:
  60. // Constructor and destructor
  61. WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent );
  62. ~WinEDA_NetlistFrame() { };
  63. private:
  64. void InstallCustomPages();
  65. void InstallPageSpice();
  66. void GenNetlist( wxCommandEvent& event );
  67. void RunSimulator( wxCommandEvent& event );
  68. void NetlistUpdateOpt();
  69. void OnCancelClick( wxCommandEvent& event );
  70. void SelectNetlistType( wxCommandEvent& event );
  71. void SetupPluginData( wxCommandEvent& event );
  72. void DeletePluginPanel( wxCommandEvent& event );
  73. void ValidatePluginPanel( wxCommandEvent& event );
  74. void WriteCurrentNetlistSetup( void );
  75. DECLARE_EVENT_TABLE()
  76. };
  77. #endif /* _NETLIST_CONTROL_H_ */