Minor SIM_PLOT_FRAME redesign
This commit is contained in:
parent
2b1d2d7bd1
commit
751a335503
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jun 24 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -9,76 +9,65 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
KIWAY_PLAYER( aKiway, aParent, FRAME_SIMULATOR, _( "Spice Simulation" ),
|
||||
wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, wxT("Spice Simulation" ) )
|
||||
|
||||
SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
m_menubar1 = new wxMenuBar( 0 );
|
||||
m_menu1 = new wxMenu();
|
||||
wxMenuItem* m_menuItem7;
|
||||
m_menuItem7 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("New Plot") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem7 = new wxMenuItem( m_menu1, wxID_ANY, wxString( _("New Plot") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu1->Append( m_menuItem7 );
|
||||
|
||||
m_menu1->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_menuItem8;
|
||||
m_menuItem8 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Open Workbook") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem8 = new wxMenuItem( m_menu1, wxID_ANY, wxString( _("Open Workbook") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu1->Append( m_menuItem8 );
|
||||
|
||||
wxMenuItem* m_menuItem2;
|
||||
m_menuItem2 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Save Workbook") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem2 = new wxMenuItem( m_menu1, wxID_ANY, wxString( _("Save Workbook") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu1->Append( m_menuItem2 );
|
||||
|
||||
m_menu1->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_menuItem1;
|
||||
m_menuItem1 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Exit Simulation") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem1 = new wxMenuItem( m_menu1, wxID_ANY, wxString( _("Exit Simulation") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu1->Append( m_menuItem1 );
|
||||
|
||||
m_menubar1->Append( m_menu1, wxT("File") );
|
||||
m_menubar1->Append( m_menu1, _("File") );
|
||||
|
||||
m_menu2 = new wxMenu();
|
||||
wxMenuItem* m_menuItem3;
|
||||
m_menuItem3 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Zoom In") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem3 = new wxMenuItem( m_menu2, wxID_ANY, wxString( _("Zoom In") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu2->Append( m_menuItem3 );
|
||||
|
||||
wxMenuItem* m_menuItem4;
|
||||
m_menuItem4 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Zoom Out") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem4 = new wxMenuItem( m_menu2, wxID_ANY, wxString( _("Zoom Out") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu2->Append( m_menuItem4 );
|
||||
|
||||
wxMenuItem* m_menuItem5;
|
||||
m_menuItem5 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Fit on Screen") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuItem5 = new wxMenuItem( m_menu2, wxID_ANY, wxString( _("Fit on Screen") ) , wxEmptyString, wxITEM_NORMAL );
|
||||
m_menu2->Append( m_menuItem5 );
|
||||
|
||||
m_menu2->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_menuItem6;
|
||||
m_menuItem6 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Show grid") ) , wxEmptyString, wxITEM_CHECK );
|
||||
m_menuItem6 = new wxMenuItem( m_menu2, wxID_ANY, wxString( _("Show grid") ) , wxEmptyString, wxITEM_CHECK );
|
||||
m_menu2->Append( m_menuItem6 );
|
||||
|
||||
m_menubar1->Append( m_menu2, wxT("View") );
|
||||
m_menubar1->Append( m_menu2, _("View") );
|
||||
|
||||
this->SetMenuBar( m_menubar1 );
|
||||
|
||||
wxBoxSizer* bSizer1;
|
||||
bSizer1 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_splitter1 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_BORDER );
|
||||
m_splitter1->SetSashGravity( 0.2 );
|
||||
m_splitter1->SetSashSize( 0 );
|
||||
m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitter1OnIdle ), NULL, this );
|
||||
|
||||
m_panel31 = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer5;
|
||||
bSizer5 = new wxBoxSizer( wxVERTICAL );
|
||||
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_splitter2 = new wxSplitterWindow( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DBORDER );
|
||||
m_splitter2->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitter2OnIdle ), NULL, this );
|
||||
|
||||
m_panel61 = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_panel61 = new wxPanel( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_panel61->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
||||
|
||||
wxBoxSizer* bSizer6;
|
||||
|
@ -94,18 +83,20 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_panel61->SetSizer( bSizer6 );
|
||||
m_panel61->Layout();
|
||||
bSizer6->Fit( m_panel61 );
|
||||
m_panel7 = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
bSizer5->Add( m_panel61, 3, wxEXPAND | wxALL, 5 );
|
||||
|
||||
m_panel7 = new wxPanel( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer7;
|
||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText2 = new wxStaticText( m_panel7, wxID_ANY, wxT("Signals"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
m_staticText2 = new wxStaticText( m_panel7, wxID_ANY, _("Signals"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
m_staticText2->Wrap( -1 );
|
||||
bSizer7->Add( m_staticText2, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_signals = new wxListBox( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_MULTIPLE|wxLB_SORT );
|
||||
m_signals = new wxListBox( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT );
|
||||
bSizer7->Add( m_signals, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticText21 = new wxStaticText( m_panel7, wxID_ANY, wxT("Parameters"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
m_staticText21 = new wxStaticText( m_panel7, wxID_ANY, _("Parameters"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
m_staticText21->Wrap( -1 );
|
||||
bSizer7->Add( m_staticText21, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
@ -113,43 +104,48 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
bSizer7->Add( m_signals1, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 1, 3, 0, 0 );
|
||||
fgSizer1 = new wxFlexGridSizer( 1, 0, 0, 0 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_button1 = new wxButton( m_panel7, wxID_ANY, wxT("Probe"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_button1, 0, wxALL, 5 );
|
||||
m_simulateBtn = new wxButton( m_panel7, wxID_ANY, _("Simulate"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_simulateBtn, 0, wxALL, 5 );
|
||||
|
||||
m_button2 = new wxButton( m_panel7, wxID_ANY, wxT("Tune"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_button2, 0, wxALL, 5 );
|
||||
m_probeBtn = new wxButton( m_panel7, wxID_ANY, _("Probe"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_probeBtn, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_tuneBtn = new wxButton( m_panel7, wxID_ANY, _("Tune"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_tuneBtn, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer7->Add( fgSizer1, 0, wxEXPAND, 5 );
|
||||
bSizer7->Add( fgSizer1, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panel7->SetSizer( bSizer7 );
|
||||
m_panel7->Layout();
|
||||
bSizer7->Fit( m_panel7 );
|
||||
m_splitter2->SplitVertically( m_panel61, m_panel7, 0 );
|
||||
bSizer5->Add( m_splitter2, 1, wxEXPAND, 5 );
|
||||
bSizer5->Add( m_panel7, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
m_panel31->SetSizer( bSizer5 );
|
||||
m_panel31->Layout();
|
||||
bSizer5->Fit( m_panel31 );
|
||||
m_panel3 = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
bSizer1->Add( m_panel31, 3, wxEXPAND | wxALL, 5 );
|
||||
|
||||
m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_simConsole = new wxRichTextCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS );
|
||||
m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||
|
||||
bSizer3->Add( m_simConsole, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
m_panel3->SetSizer( bSizer3 );
|
||||
m_panel3->Layout();
|
||||
bSizer3->Fit( m_panel3 );
|
||||
m_splitter1->SplitHorizontally( m_panel31, m_panel3, 700 );
|
||||
bSizer1->Add( m_splitter1, 1, wxEXPAND, 5 );
|
||||
bSizer1->Add( m_panel3, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizer1 );
|
||||
|
@ -159,11 +155,19 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
|
||||
// Connect Events
|
||||
this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onNewPlot ) );
|
||||
m_signals->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
|
||||
m_simulateBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSimulate ), NULL, this );
|
||||
m_probeBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onPlaceProbe ), NULL, this );
|
||||
m_tuneBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onTune ), NULL, this );
|
||||
}
|
||||
|
||||
SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onNewPlot ) );
|
||||
m_signals->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
|
||||
m_simulateBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSimulate ), NULL, this );
|
||||
m_probeBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onPlaceProbe ), NULL, this );
|
||||
m_tuneBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onTune ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jun 24 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class KIWAY_PLAYER;
|
||||
|
||||
#include "kiway_player.h"
|
||||
|
@ -28,7 +29,6 @@ class KIWAY_PLAYER;
|
|||
#include <wx/stattext.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/splitter.h>
|
||||
#include <wx/richtext/richtextctrl.h>
|
||||
#include <wx/frame.h>
|
||||
|
||||
|
@ -46,9 +46,7 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
|
|||
wxMenuBar* m_menubar1;
|
||||
wxMenu* m_menu1;
|
||||
wxMenu* m_menu2;
|
||||
wxSplitterWindow* m_splitter1;
|
||||
wxPanel* m_panel31;
|
||||
wxSplitterWindow* m_splitter2;
|
||||
wxPanel* m_panel61;
|
||||
wxAuiNotebook* m_plotNotebook;
|
||||
wxPanel* m_panel7;
|
||||
|
@ -56,30 +54,25 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
|
|||
wxListBox* m_signals;
|
||||
wxStaticText* m_staticText21;
|
||||
wxListBox* m_signals1;
|
||||
wxButton* m_button1;
|
||||
wxButton* m_button2;
|
||||
wxButton* m_simulateBtn;
|
||||
wxButton* m_probeBtn;
|
||||
wxButton* m_tuneBtn;
|
||||
wxPanel* m_panel3;
|
||||
wxRichTextCtrl* m_simConsole;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onNewPlot( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onSignalDblClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onSimulate( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onPlaceProbe( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onTune( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
SIM_PLOT_FRAME_BASE( KIWAY* aKiway, wxWindow* aParent );
|
||||
|
||||
SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Simulation Workbook"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1280,900 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("SIM_PLOT_FRAME") );
|
||||
|
||||
~SIM_PLOT_FRAME_BASE();
|
||||
|
||||
void m_splitter1OnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitter1->SetSashPosition( 700 );
|
||||
m_splitter1->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitter1OnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
void m_splitter2OnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitter2->SetSashPosition( 0 );
|
||||
m_splitter2->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitter2OnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue