Loading common/displlst.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ #include "common.h" #include "macros.h" #include "kicad_string.h" #include "dialog_helpers.h" enum listbox { Loading common/drawframe.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "wxstruct.h" #include "confirm.h" #include "kicad_device_context.h" #include "dialog_helpers.h" #include <wx/fontdlg.h> Loading common/wxwineda.cpp +1 −63 Original line number Diff line number Diff line Loading @@ -2,14 +2,10 @@ /* wxwineda.cpp */ /****************/ #ifdef __GNUG__ #pragma implementation #endif #include "fctsys.h" #include "common.h" #include "wxstruct.h" #include "dialog_helpers.h" /* * Text entry dialog to enter one or more lines of text. Loading Loading @@ -390,61 +386,3 @@ void WinEDA_ValueCtrl::Enable( bool enbl ) m_ValueCtrl->Enable( enbl ); m_Text->Enable( enbl ); } /**********************************************************************/ /* Class to display and edit a double precision floating point value. */ /**********************************************************************/ WinEDA_DFloatValueCtrl::WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title, double value, wxBoxSizer* BoxSizer ) { wxString buffer; wxString label = title; m_Value = value; m_Text = new wxStaticText( parent, -1, label ); BoxSizer->Add( m_Text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); buffer.Printf( wxT( "%f" ), m_Value ); m_ValueCtrl = new wxTextCtrl( parent, -1, buffer ); BoxSizer->Add( m_ValueCtrl, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); } WinEDA_DFloatValueCtrl::~WinEDA_DFloatValueCtrl() { delete m_ValueCtrl; delete m_Text; } double WinEDA_DFloatValueCtrl::GetValue() { double coord = 0; m_ValueCtrl->GetValue().ToDouble( &coord ); return coord; } void WinEDA_DFloatValueCtrl::SetValue( double new_value ) { wxString buffer; m_Value = new_value; buffer.Printf( wxT( "%f" ), m_Value ); m_ValueCtrl->SetValue( buffer ); } void WinEDA_DFloatValueCtrl::Enable( bool enbl ) { m_ValueCtrl->Enable( enbl ); m_Text->Enable( enbl ); } eeschema/database.cpp +10 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include "general.h" #include "protos.h" #include "class_library.h" #include "dialog_helpers.h" #include <boost/foreach.hpp> Loading Loading @@ -64,13 +65,18 @@ wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& Buf return wxEmptyString; } wxSingleChoiceDialog dlg( frame, wxEmptyString, _( "Select Component" ), nameList ); // Show candidate list: wxString cmpname; WinEDAListBox dlg( frame, _( "Select Component" ), NULL, cmpname, DisplayCmpDoc ); if( dlg.ShowModal() == wxID_CANCEL || dlg.GetStringSelection().IsEmpty() ) dlg.InsertItems(nameList); int selection = dlg.ShowModal(); if( selection < 0 ) return wxEmptyString; return dlg.GetStringSelection(); cmpname = nameList[selection]; return cmpname; } Loading eeschema/dialog_edit_component_in_schematic.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include "protos.h" #include "class_library.h" #include "sch_component.h" #include "dialog_helpers.h" #include "dialog_edit_component_in_schematic.h" Loading Loading
common/displlst.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ #include "common.h" #include "macros.h" #include "kicad_string.h" #include "dialog_helpers.h" enum listbox { Loading
common/drawframe.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "wxstruct.h" #include "confirm.h" #include "kicad_device_context.h" #include "dialog_helpers.h" #include <wx/fontdlg.h> Loading
common/wxwineda.cpp +1 −63 Original line number Diff line number Diff line Loading @@ -2,14 +2,10 @@ /* wxwineda.cpp */ /****************/ #ifdef __GNUG__ #pragma implementation #endif #include "fctsys.h" #include "common.h" #include "wxstruct.h" #include "dialog_helpers.h" /* * Text entry dialog to enter one or more lines of text. Loading Loading @@ -390,61 +386,3 @@ void WinEDA_ValueCtrl::Enable( bool enbl ) m_ValueCtrl->Enable( enbl ); m_Text->Enable( enbl ); } /**********************************************************************/ /* Class to display and edit a double precision floating point value. */ /**********************************************************************/ WinEDA_DFloatValueCtrl::WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title, double value, wxBoxSizer* BoxSizer ) { wxString buffer; wxString label = title; m_Value = value; m_Text = new wxStaticText( parent, -1, label ); BoxSizer->Add( m_Text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); buffer.Printf( wxT( "%f" ), m_Value ); m_ValueCtrl = new wxTextCtrl( parent, -1, buffer ); BoxSizer->Add( m_ValueCtrl, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); } WinEDA_DFloatValueCtrl::~WinEDA_DFloatValueCtrl() { delete m_ValueCtrl; delete m_Text; } double WinEDA_DFloatValueCtrl::GetValue() { double coord = 0; m_ValueCtrl->GetValue().ToDouble( &coord ); return coord; } void WinEDA_DFloatValueCtrl::SetValue( double new_value ) { wxString buffer; m_Value = new_value; buffer.Printf( wxT( "%f" ), m_Value ); m_ValueCtrl->SetValue( buffer ); } void WinEDA_DFloatValueCtrl::Enable( bool enbl ) { m_ValueCtrl->Enable( enbl ); m_Text->Enable( enbl ); }
eeschema/database.cpp +10 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include "general.h" #include "protos.h" #include "class_library.h" #include "dialog_helpers.h" #include <boost/foreach.hpp> Loading Loading @@ -64,13 +65,18 @@ wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& Buf return wxEmptyString; } wxSingleChoiceDialog dlg( frame, wxEmptyString, _( "Select Component" ), nameList ); // Show candidate list: wxString cmpname; WinEDAListBox dlg( frame, _( "Select Component" ), NULL, cmpname, DisplayCmpDoc ); if( dlg.ShowModal() == wxID_CANCEL || dlg.GetStringSelection().IsEmpty() ) dlg.InsertItems(nameList); int selection = dlg.ShowModal(); if( selection < 0 ) return wxEmptyString; return dlg.GetStringSelection(); cmpname = nameList[selection]; return cmpname; } Loading
eeschema/dialog_edit_component_in_schematic.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include "protos.h" #include "class_library.h" #include "sch_component.h" #include "dialog_helpers.h" #include "dialog_edit_component_in_schematic.h" Loading