Commit c699c726 authored by jean-pierre charras's avatar jean-pierre charras

Eeschema: in component properties dialog, add control for fields texts...

Eeschema: in component properties dialog, add control for fields texts justification, like in Libedit.
Fix some Doxygen warnings.
parent aec75256
...@@ -36,14 +36,16 @@ const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files (*.eq ...@@ -36,14 +36,16 @@ const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files (*.eq
const wxString titleLibLoadError( _( "Library Load Error" ) ); const wxString titleLibLoadError( _( "Library Load Error" ) );
/* MacOSX: Needed for file association /*
* MacOSX: Needed for file association
* http://wiki.wxwidgets.org/WxMac-specific_topics * http://wiki.wxwidgets.org/WxMac-specific_topics
*/ */
void WinEDA_App::MacOpenFile(const wxString &fileName) { void WinEDA_App::MacOpenFile(const wxString &fileName)
{
wxFileName filename = fileName; wxFileName filename = fileName;
wxString oldPath; wxString oldPath;
WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow()); WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow());
if(!filename.FileExists()) if(!filename.FileExists())
return; return;
......
/** /*
* @file menucfg.cpp * menubar.cpp
* (Re)Create the CvPCB main MenuBar * Build the CvPCB MenuBar
*/ */
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
......
...@@ -108,11 +108,10 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) ...@@ -108,11 +108,10 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/* /*
* Redraw the BOARD items but not cursors, axis or grid. * Redraw the BOARD items but not cursors, axis or grid.
*/ */
void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC, void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset )
int aDrawMode, const wxPoint& offset )
{ {
if( m_Modules ) if( m_Modules )
{ {
m_Modules->Draw( aPanel, DC, GR_COPY ); m_Modules->Draw( aPanel, aDC, GR_COPY );
} }
} }
...@@ -578,6 +578,22 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() ...@@ -578,6 +578,22 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
m_StyleRadioBox->SetSelection( style ); m_StyleRadioBox->SetSelection( style );
// Select the right text justification
if( field.m_HJustify == GR_TEXT_HJUSTIFY_LEFT )
m_FieldHJustifyCtrl->SetSelection(0);
else if( field.m_HJustify == GR_TEXT_HJUSTIFY_RIGHT )
m_FieldHJustifyCtrl->SetSelection(2);
else
m_FieldHJustifyCtrl->SetSelection(1);
if( field.m_VJustify == GR_TEXT_VJUSTIFY_BOTTOM )
m_FieldVJustifyCtrl->SetSelection(0);
else if( field.m_VJustify == GR_TEXT_VJUSTIFY_TOP )
m_FieldVJustifyCtrl->SetSelection(2);
else
m_FieldVJustifyCtrl->SetSelection(1);
fieldNameTextCtrl->SetValue( field.m_Name ); fieldNameTextCtrl->SetValue( field.m_Name );
// the names of the fixed fields are not editable, others are. // the names of the fixed fields are not editable, others are.
...@@ -657,6 +673,19 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() ...@@ -657,6 +673,19 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT );
// Copy the text justification
GRTextHorizJustifyType hjustify[3] = {
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER,
GR_TEXT_HJUSTIFY_RIGHT
};
GRTextVertJustifyType vjustify[3] = {
GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER,
GR_TEXT_VJUSTIFY_TOP
};
field.m_HJustify = hjustify[m_FieldHJustifyCtrl->GetSelection()];
field.m_VJustify = vjustify[m_FieldVJustifyCtrl->GetSelection()];
field.m_Name = fieldNameTextCtrl->GetValue(); field.m_Name = fieldNameTextCtrl->GetValue();
/* Void fields texts for REFERENCE and VALUE (value is the name of the /* Void fields texts for REFERENCE and VALUE (value is the name of the
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -29,7 +29,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -29,7 +29,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString ); int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString );
unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 ); unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 );
unitChoice->SetSelection( 0 ); unitChoice->SetSelection( 0 );
unitSizer->Add( unitChoice, 1, wxALL|wxEXPAND, 5 ); unitSizer->Add( unitChoice, 0, wxALL|wxEXPAND, 5 );
optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
...@@ -42,9 +42,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -42,9 +42,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
orientationRadioBox->SetSelection( 0 ); orientationRadioBox->SetSelection( 0 );
orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") ); orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 ); orientationSizer->Add( orientationRadioBox, 1, wxALL|wxEXPAND, 8 );
optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 ); optionsSizer->Add( orientationSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
wxBoxSizer* mirrorSizer; wxBoxSizer* mirrorSizer;
mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); mirrorSizer = new wxBoxSizer( wxHORIZONTAL );
...@@ -57,7 +57,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -57,7 +57,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 ); mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
optionsSizer->Add( mirrorSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 ); optionsSizer->Add( mirrorSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
wxStaticBoxSizer* chipnameSizer; wxStaticBoxSizer* chipnameSizer;
chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL ); chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL );
...@@ -71,7 +71,6 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -71,7 +71,6 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 ); optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 );
convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 ); convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 );
convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") ); convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );
optionsSizer->Add( convertCheckBox, 0, wxALL, 8 ); optionsSizer->Add( convertCheckBox, 0, wxALL, 8 );
...@@ -113,11 +112,28 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -113,11 +112,28 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
fieldsSizer->Add( gridStaticBoxSizer, 5, wxALL|wxEXPAND, 8 ); fieldsSizer->Add( gridStaticBoxSizer, 5, wxEXPAND|wxRIGHT|wxLEFT, 8 );
wxBoxSizer* fieldEditBoxSizer; wxBoxSizer* fieldEditBoxSizer;
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerOptions;
sbSizerOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxHORIZONTAL );
wxString m_FieldHJustifyCtrlChoices[] = { _("Align left"), _("Align center"), _("Align right") };
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_FieldHJustifyCtrl->SetSelection( 1 );
sbSizerOptions->Add( m_FieldHJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
wxString m_FieldVJustifyCtrlChoices[] = { _("Align bottom"), _("Align center"), _("Align top") };
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_FieldVJustifyCtrl->SetSelection( 1 );
sbSizerOptions->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
fieldEditBoxSizer->Add( sbSizerOptions, 0, wxEXPAND, 5 );
wxStaticBoxSizer* visibilitySizer; wxStaticBoxSizer* visibilitySizer;
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
...@@ -125,13 +141,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -125,13 +141,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); bShowRotateSizer = new wxBoxSizer( wxVERTICAL );
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
showCheckBox->SetToolTip( _("Check if you want this field visible") ); showCheckBox->SetToolTip( _("Check if you want this field visible") );
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 );
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 );
...@@ -146,7 +160,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -146,7 +160,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND|wxTOP, 5 );
wxBoxSizer* fieldNameBoxSizer; wxBoxSizer* fieldNameBoxSizer;
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
...@@ -221,15 +235,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -221,15 +235,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 );
fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 ); fieldEditBoxSizer->Add( positionBoxSizer, 0, wxEXPAND, 5 );
fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
fieldsSizer->Add( fieldEditBoxSizer, 0, wxEXPAND, 5 );
fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 );
upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 ); upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );
...@@ -268,4 +276,5 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -268,4 +276,5 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this ); moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this ); stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -48,6 +48,8 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog ...@@ -48,6 +48,8 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
wxButton* addFieldButton; wxButton* addFieldButton;
wxButton* deleteFieldButton; wxButton* deleteFieldButton;
wxButton* moveUpButton; wxButton* moveUpButton;
wxRadioBox* m_FieldHJustifyCtrl;
wxRadioBox* m_FieldVJustifyCtrl;
wxCheckBox* showCheckBox; wxCheckBox* showCheckBox;
wxCheckBox* rotateCheckBox; wxCheckBox* rotateCheckBox;
wxRadioBox* m_StyleRadioBox; wxRadioBox* m_StyleRadioBox;
...@@ -61,25 +63,24 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog ...@@ -61,25 +63,24 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
wxTextCtrl* posXTextCtrl; wxTextCtrl* posXTextCtrl;
wxStaticText* posYLabel; wxStaticText* posYLabel;
wxTextCtrl* posYTextCtrl; wxTextCtrl* posYTextCtrl;
wxStdDialogButtonSizer* stdDialogButtonSizer; wxStdDialogButtonSizer* stdDialogButtonSizer;
wxButton* stdDialogButtonSizerOK; wxButton* stdDialogButtonSizerOK;
wxButton* stdDialogButtonSizerCancel; wxButton* stdDialogButtonSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void SetInitCmp( wxCommandEvent& event ){ event.Skip(); } virtual void SetInitCmp( wxCommandEvent& event ) { event.Skip(); }
virtual void OnListItemDeselected( wxListEvent& event ){ event.Skip(); } virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); }
virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); } virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); }
virtual void addFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void deleteFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void moveUpButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,520 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 715,520 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(); ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
}; };
......
...@@ -611,7 +611,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel() ...@@ -611,7 +611,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
m_StyleRadioBox->SetSelection( style ); m_StyleRadioBox->SetSelection( style );
// Copy the text justification // Select the right text justification
if( field.m_HJustify == GR_TEXT_HJUSTIFY_LEFT ) if( field.m_HJustify == GR_TEXT_HJUSTIFY_LEFT )
m_FieldHJustifyCtrl->SetSelection(0); m_FieldHJustifyCtrl->SetSelection(0);
else if( field.m_HJustify == GR_TEXT_HJUSTIFY_RIGHT ) else if( field.m_HJustify == GR_TEXT_HJUSTIFY_RIGHT )
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_edit_libentry_fields_in_lib_base__ #ifndef __dialog_edit_libentry_fields_in_lib_base__
#define __dialog_edit_libentry_fields_in_lib_base__ #define __dialog_edit_libentry_fields_in_lib_base__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE /// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
{ {
private: private:
protected: protected:
wxListCtrl* fieldListCtrl; wxListCtrl* fieldListCtrl;
wxButton* addFieldButton; wxButton* addFieldButton;
wxButton* deleteFieldButton; wxButton* deleteFieldButton;
wxButton* moveUpButton; wxButton* moveUpButton;
wxRadioBox* m_FieldHJustifyCtrl; wxRadioBox* m_FieldHJustifyCtrl;
wxRadioBox* m_FieldVJustifyCtrl; wxRadioBox* m_FieldVJustifyCtrl;
wxCheckBox* showCheckBox; wxCheckBox* showCheckBox;
wxCheckBox* rotateCheckBox; wxCheckBox* rotateCheckBox;
wxRadioBox* m_StyleRadioBox; wxRadioBox* m_StyleRadioBox;
wxStaticText* fieldNameLabel; wxStaticText* fieldNameLabel;
wxTextCtrl* fieldNameTextCtrl; wxTextCtrl* fieldNameTextCtrl;
wxStaticText* fieldValueLabel; wxStaticText* fieldValueLabel;
wxTextCtrl* fieldValueTextCtrl; wxTextCtrl* fieldValueTextCtrl;
wxStaticText* textSizeLabel; wxStaticText* textSizeLabel;
wxTextCtrl* textSizeTextCtrl; wxTextCtrl* textSizeTextCtrl;
wxStaticText* posXLabel; wxStaticText* posXLabel;
wxTextCtrl* posXTextCtrl; wxTextCtrl* posXTextCtrl;
wxStaticText* posYLabel; wxStaticText* posYLabel;
wxTextCtrl* posYTextCtrl; wxTextCtrl* posYTextCtrl;
wxStdDialogButtonSizer* stdDialogButtonSizer; wxStdDialogButtonSizer* stdDialogButtonSizer;
wxButton* stdDialogButtonSizerOK; wxButton* stdDialogButtonSizerOK;
wxButton* stdDialogButtonSizerCancel; wxButton* stdDialogButtonSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnListItemDeselected( wxListEvent& event ){ event.Skip(); } virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); }
virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); } virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); }
virtual void addFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void deleteFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void moveUpButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 773,550 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE(); DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 615,550 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
};
};
#endif //__dialog_edit_libentry_fields_in_lib_base__
#endif //__dialog_edit_libentry_fields_in_lib_base__
...@@ -76,11 +76,23 @@ protected: ...@@ -76,11 +76,23 @@ protected:
public: WinEDA_App(); public: WinEDA_App();
~WinEDA_App(); ~WinEDA_App();
/**
* Function OnInit
* this is the first executed function (like main() )
* @return true if the appliction can be started.
*/
bool OnInit(); bool OnInit();
bool SetBinDir(); bool SetBinDir();
void SetDefaultSearchPaths( void ); void SetDefaultSearchPaths( void );
/**
* Function MacOpenFile
* Specific to MacOSX. Not used under Linux or Windows
* MacOSX: Needed for file association
* http://wiki.wxwidgets.org/WxMac-specific_topics
*/
virtual void MacOpenFile(const wxString &fileName); virtual void MacOpenFile(const wxString &fileName);
/** /**
......
...@@ -480,7 +480,7 @@ public: ...@@ -480,7 +480,7 @@ public:
* @param aKey = the key modifiers (Alt, Shift ...) * @param aKey = the key modifiers (Alt, Shift ...)
* @return the block command id (BLOCK_MOVE, BLOCK_COPY...) * @return the block command id (BLOCK_MOVE, BLOCK_COPY...)
*/ */
virtual int ReturnBlockCommand( int key ); virtual int ReturnBlockCommand( int aKey );
/** /**
* Function HandleBlockPlace( ) * Function HandleBlockPlace( )
...@@ -805,18 +805,19 @@ public: ...@@ -805,18 +805,19 @@ public:
* Modify a full track width (using DRC control). * Modify a full track width (using DRC control).
* a full track is the set of track segments between 2 ends: pads or a * a full track is the set of track segments between 2 ends: pads or a
* point that has more than 2 segments ends connected * point that has more than 2 segments ends connected
* @param DC = the curred device context (can be NULL) * @param aDC = the curred device context (can be NULL)
* @param aTrackSegment = a segment or via on the track to change * @param aTrackSegment = a segment or via on the track to change
*/ */
void Edit_Track_Width( wxDC* DC, TRACK* Track ); void Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment );
/** /**
* Function Edit_TrackSegm_Width * Function Edit_TrackSegm_Width
* Modify one track segment width or one via diameter (using DRC control). * Modify one track segment width or one via diameter (using DRC control).
* @param DC = the current device context (can be NULL) * @param aDC = the current device context (can be NULL)
* @param aTrackItem = the track segment or via to modify * @param aTrackItem = the track segment or via to modify
*/ */
void Edit_TrackSegm_Width( wxDC* DC, TRACK* segm ); void Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem );
TRACK* Begin_Route( TRACK* track, wxDC* DC ); TRACK* Begin_Route( TRACK* track, wxDC* DC );
void End_Route( TRACK* track, wxDC* DC ); void End_Route( TRACK* track, wxDC* DC );
void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC ); void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC );
...@@ -868,7 +869,7 @@ public: ...@@ -868,7 +869,7 @@ public:
// zone handling // zone handling
/** /**
* Function Delete_Zone_Fill * Function Delete_Zone_Fill (obsolete)
* Remove the zone filling which include the segment aZone, or the zone * Remove the zone filling which include the segment aZone, or the zone
* which have the given time stamp. A zone is a group of segments which * which have the given time stamp. A zone is a group of segments which
* have the same TimeStamp * have the same TimeStamp
...@@ -876,7 +877,7 @@ public: ...@@ -876,7 +877,7 @@ public:
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == * @param aTimestamp = Timestamp for the zone to delete, used if aZone ==
* NULL * NULL
*/ */
void Delete_Zone_Fill( SEGZONE* Track, long aTimestamp = 0 ); void Delete_Zone_Fill( SEGZONE* aZone, long aTimestamp = 0 );
/** /**
...@@ -1033,6 +1034,13 @@ public: ...@@ -1033,6 +1034,13 @@ public:
* @param aNetlistFullFilename = netlist file name (*.net) * @param aNetlistFullFilename = netlist file name (*.net)
* @param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found, * @param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found,
* only the netlist will be used * only the netlist will be used
* @param aMessageWindow = a reference to a wxTextCtrl where to dislay messages.
* can be NULL
* @param aChangeFootprint if true, footprints that have changed in netlist will be changed
* @param aDeleteBadTracks if true, erroneous tracks will be deleted
* @param aDeleteExtraFootprints if true, remove unlocked footprints that are not in netlist
* @param aSelect_By_Timestamp if true, use timestamp instead of reference to identify footprints
* from components (use after reannotation of the chematic)
* @return true if Ok * @return true if Ok
* *
* the format of the netlist is something like: * the format of the netlist is something like:
......
...@@ -512,8 +512,16 @@ public: ...@@ -512,8 +512,16 @@ public:
*/ */
void DisplayInfo( WinEDA_DrawFrame* frame ); void DisplayInfo( WinEDA_DrawFrame* frame );
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, /**
int aDrawMode, const wxPoint& offset = ZeroOffset ); * Function Draw.
* Redraw the BOARD items but not cursors, axis or grid.
* @param aPanel = the panel relative to the board
* @param aDC = the curent device context
* @param aDrawMode = GR_COPY, GR_OR ... (not always used)
* @param aOffset = an draw offset value (default = 0,0)
*/
void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
int aDrawMode, const wxPoint& aOffset = ZeroOffset );
/** /**
* Function DrawHighLight * Function DrawHighLight
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment