Browse Source
Eeschema: in component properties dialog, add control for fields texts justification, like in Libedit.
Eeschema: in component properties dialog, add control for fields texts justification, like in Libedit.
Fix some Doxygen warnings.pull/1/head
14 changed files with 1626 additions and 1245 deletions
-
8cvpcb/cvpcb.cpp
-
6cvpcb/menubar.cpp
-
5cvpcb/setvisu.cpp
-
29eeschema/dialogs/dialog_edit_component_in_schematic.cpp
-
45eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp
-
309eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp
-
25eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h
-
2eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
-
427eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
-
1810eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
-
159eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
-
12include/appl_wxstruct.h
-
22include/wxPcbStruct.h
-
12pcbnew/class_board.h
@ -1,219 +1,208 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_edit_libentry_fields_in_lib_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
|||
|
|||
wxBoxSizer* mainSizer; |
|||
mainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxStaticBoxSizer* fieldsSizer; |
|||
fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL ); |
|||
|
|||
wxStaticBoxSizer* gridStaticBoxSizer; |
|||
gridStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); |
|||
|
|||
fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); |
|||
fieldListCtrl->SetMinSize( wxSize( 220,-1 ) ); |
|||
|
|||
gridStaticBoxSizer->Add( fieldListCtrl, 1, wxALL|wxEXPAND, 8 ); |
|||
|
|||
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
addFieldButton->SetToolTip( _("Add a new custom field") ); |
|||
|
|||
gridStaticBoxSizer->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") ); |
|||
|
|||
gridStaticBoxSizer->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") ); |
|||
|
|||
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
fieldsSizer->Add( gridStaticBoxSizer, 5, wxEXPAND|wxRIGHT, 8 ); |
|||
|
|||
wxBoxSizer* fieldEditBoxSizer; |
|||
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxStaticBoxSizer* optionsSizer; |
|||
optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* orientationSizer; |
|||
orientationSizer = new wxBoxSizer( 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 ); |
|||
m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") ); |
|||
|
|||
orientationSizer->Add( m_FieldHJustifyCtrl, 1, wxALL, 8 ); |
|||
|
|||
optionsSizer->Add( orientationSizer, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND|wxALIGN_CENTER_VERTICAL, 0 ); |
|||
|
|||
wxBoxSizer* mirrorSizer; |
|||
mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
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 ); |
|||
m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") ); |
|||
|
|||
mirrorSizer->Add( m_FieldVJustifyCtrl, 1, wxALL, 8 ); |
|||
|
|||
optionsSizer->Add( mirrorSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, 0 ); |
|||
|
|||
fieldEditBoxSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxStaticBoxSizer* visibilitySizer; |
|||
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* bShowRotateSizer; |
|||
bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
|
|||
showCheckBox->SetToolTip( _("Check if you want this field visible") ); |
|||
|
|||
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); |
|||
|
|||
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
|
|||
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); |
|||
|
|||
bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); |
|||
|
|||
visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; |
|||
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString ); |
|||
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_StyleRadioBox->SetSelection( 0 ); |
|||
visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* fieldNameBoxSizer; |
|||
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldNameLabel->Wrap( -1 ); |
|||
fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 ); |
|||
|
|||
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); |
|||
|
|||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* fieldTextBoxSizer; |
|||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldValueLabel->Wrap( -1 ); |
|||
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 ); |
|||
|
|||
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); |
|||
|
|||
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* textSizeBoxSizer; |
|||
textSizeBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size(\")"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
textSizeLabel->Wrap( -1 ); |
|||
textSizeBoxSizer->Add( textSizeLabel, 0, 0, 5 ); |
|||
|
|||
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
textSizeTextCtrl->SetToolTip( _("The vertical height of the currently selected field's text in the schematic") ); |
|||
|
|||
textSizeBoxSizer->Add( textSizeTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( textSizeBoxSizer, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* positionBoxSizer; |
|||
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* posXBoxSizer; |
|||
posXBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX(\")"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posXLabel->Wrap( -1 ); |
|||
posXBoxSizer->Add( posXLabel, 0, 0, 5 ); |
|||
|
|||
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posXBoxSizer->Add( posXTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
positionBoxSizer->Add( posXBoxSizer, 1, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* posYBoxSizer; |
|||
posYBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posYLabel->Wrap( -1 ); |
|||
posYBoxSizer->Add( posYLabel, 0, 0, 5 ); |
|||
|
|||
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") ); |
|||
|
|||
posYBoxSizer->Add( posYTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 ); |
|||
|
|||
fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 ); |
|||
|
|||
mainSizer->Add( fieldsSizer, 1, wxEXPAND|wxALL, 5 ); |
|||
|
|||
stdDialogButtonSizer = new wxStdDialogButtonSizer(); |
|||
stdDialogButtonSizerOK = new wxButton( this, wxID_OK ); |
|||
stdDialogButtonSizer->AddButton( stdDialogButtonSizerOK ); |
|||
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL ); |
|||
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel ); |
|||
stdDialogButtonSizer->Realize(); |
|||
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 ); |
|||
|
|||
this->SetSizer( mainSizer ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) ); |
|||
fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemDeselected ), NULL, this ); |
|||
fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemSelected ), NULL, this ); |
|||
addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this ); |
|||
deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this ); |
|||
moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this ); |
|||
stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this ); |
|||
stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) ); |
|||
fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemDeselected ), NULL, this ); |
|||
fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemSelected ), NULL, this ); |
|||
addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this ); |
|||
deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this ); |
|||
moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this ); |
|||
stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this ); |
|||
stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this ); |
|||
} |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_edit_libentry_fields_in_lib_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
|||
|
|||
wxBoxSizer* mainSizer; |
|||
mainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxStaticBoxSizer* fieldsSizer; |
|||
fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL ); |
|||
|
|||
wxStaticBoxSizer* gridStaticBoxSizer; |
|||
gridStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); |
|||
|
|||
fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); |
|||
fieldListCtrl->SetMinSize( wxSize( 220,-1 ) ); |
|||
|
|||
gridStaticBoxSizer->Add( fieldListCtrl, 1, wxALL|wxEXPAND, 8 ); |
|||
|
|||
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
addFieldButton->SetToolTip( _("Add a new custom field") ); |
|||
|
|||
gridStaticBoxSizer->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") ); |
|||
|
|||
gridStaticBoxSizer->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") ); |
|||
|
|||
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
fieldsSizer->Add( gridStaticBoxSizer, 5, wxEXPAND|wxRIGHT, 8 ); |
|||
|
|||
wxBoxSizer* fieldEditBoxSizer; |
|||
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxStaticBoxSizer* optionsSizer; |
|||
optionsSizer = 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 ); |
|||
m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") ); |
|||
|
|||
optionsSizer->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 8 ); |
|||
|
|||
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 ); |
|||
m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") ); |
|||
|
|||
optionsSizer->Add( m_FieldVJustifyCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 8 ); |
|||
|
|||
fieldEditBoxSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxEXPAND|wxBOTTOM, 5 ); |
|||
|
|||
wxStaticBoxSizer* visibilitySizer; |
|||
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* bShowRotateSizer; |
|||
bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
showCheckBox->SetToolTip( _("Check if you want this field visible") ); |
|||
|
|||
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); |
|||
|
|||
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); |
|||
|
|||
bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); |
|||
|
|||
visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; |
|||
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString ); |
|||
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_StyleRadioBox->SetSelection( 1 ); |
|||
visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* fieldNameBoxSizer; |
|||
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldNameLabel->Wrap( -1 ); |
|||
fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 ); |
|||
|
|||
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); |
|||
|
|||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* fieldTextBoxSizer; |
|||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldValueLabel->Wrap( -1 ); |
|||
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 ); |
|||
|
|||
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); |
|||
|
|||
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* textSizeBoxSizer; |
|||
textSizeBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size(\")"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
textSizeLabel->Wrap( -1 ); |
|||
textSizeBoxSizer->Add( textSizeLabel, 0, 0, 5 ); |
|||
|
|||
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
textSizeTextCtrl->SetToolTip( _("The vertical height of the currently selected field's text in the schematic") ); |
|||
|
|||
textSizeBoxSizer->Add( textSizeTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( textSizeBoxSizer, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* positionBoxSizer; |
|||
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* posXBoxSizer; |
|||
posXBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX(\")"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posXLabel->Wrap( -1 ); |
|||
posXBoxSizer->Add( posXLabel, 0, 0, 5 ); |
|||
|
|||
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posXBoxSizer->Add( posXTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
positionBoxSizer->Add( posXBoxSizer, 1, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* posYBoxSizer; |
|||
posYBoxSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posYLabel->Wrap( -1 ); |
|||
posYBoxSizer->Add( posYLabel, 0, 0, 5 ); |
|||
|
|||
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") ); |
|||
|
|||
posYBoxSizer->Add( posYTextCtrl, 0, wxEXPAND, 5 ); |
|||
|
|||
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); |
|||
|
|||
fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 ); |
|||
|
|||
fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 ); |
|||
|
|||
mainSizer->Add( fieldsSizer, 1, wxEXPAND|wxALL, 5 ); |
|||
|
|||
stdDialogButtonSizer = new wxStdDialogButtonSizer(); |
|||
stdDialogButtonSizerOK = new wxButton( this, wxID_OK ); |
|||
stdDialogButtonSizer->AddButton( stdDialogButtonSizerOK ); |
|||
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL ); |
|||
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel ); |
|||
stdDialogButtonSizer->Realize(); |
|||
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 ); |
|||
|
|||
this->SetSizer( mainSizer ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) ); |
|||
fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemDeselected ), NULL, this ); |
|||
fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemSelected ), NULL, this ); |
|||
addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this ); |
|||
deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this ); |
|||
moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this ); |
|||
stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this ); |
|||
stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) ); |
|||
fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemDeselected ), NULL, this ); |
|||
fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemSelected ), NULL, this ); |
|||
addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this ); |
|||
deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this ); |
|||
moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this ); |
|||
stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this ); |
|||
stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this ); |
|||
|
|||
} |
|||
1810
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,79 +1,80 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Apr 16 2008) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __dialog_edit_libentry_fields_in_lib_base__ |
|||
#define __dialog_edit_libentry_fields_in_lib_base__ |
|||
|
|||
#include <wx/intl.h> |
|||
|
|||
#include <wx/listctrl.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/string.h> |
|||
#include <wx/button.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/statbox.h> |
|||
#include <wx/radiobox.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxListCtrl* fieldListCtrl; |
|||
wxButton* addFieldButton; |
|||
wxButton* deleteFieldButton; |
|||
wxButton* moveUpButton; |
|||
wxRadioBox* m_FieldHJustifyCtrl; |
|||
wxRadioBox* m_FieldVJustifyCtrl; |
|||
wxCheckBox* showCheckBox; |
|||
wxCheckBox* rotateCheckBox; |
|||
wxRadioBox* m_StyleRadioBox; |
|||
wxStaticText* fieldNameLabel; |
|||
wxTextCtrl* fieldNameTextCtrl; |
|||
wxStaticText* fieldValueLabel; |
|||
wxTextCtrl* fieldValueTextCtrl; |
|||
wxStaticText* textSizeLabel; |
|||
wxTextCtrl* textSizeTextCtrl; |
|||
wxStaticText* posXLabel; |
|||
wxTextCtrl* posXTextCtrl; |
|||
wxStaticText* posYLabel; |
|||
wxTextCtrl* posYTextCtrl; |
|||
wxStdDialogButtonSizer* stdDialogButtonSizer; |
|||
wxButton* stdDialogButtonSizerOK; |
|||
wxButton* stdDialogButtonSizerCancel; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } |
|||
virtual void OnListItemDeselected( wxListEvent& event ){ event.Skip(); } |
|||
virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); } |
|||
virtual void addFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void deleteFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void moveUpButtonHandler( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnOKButtonClick( wxCommandEvent& event ){ event.Skip(); } |
|||
|
|||
|
|||
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(); |
|||
|
|||
}; |
|||
|
|||
#endif //__dialog_edit_libentry_fields_in_lib_base__ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Sep 8 2010) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __dialog_edit_libentry_fields_in_lib_base__ |
|||
#define __dialog_edit_libentry_fields_in_lib_base__ |
|||
|
|||
#include <wx/intl.h> |
|||
|
|||
#include <wx/listctrl.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/string.h> |
|||
#include <wx/button.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/statbox.h> |
|||
#include <wx/radiobox.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxListCtrl* fieldListCtrl; |
|||
wxButton* addFieldButton; |
|||
wxButton* deleteFieldButton; |
|||
wxButton* moveUpButton; |
|||
wxRadioBox* m_FieldHJustifyCtrl; |
|||
wxRadioBox* m_FieldVJustifyCtrl; |
|||
wxCheckBox* showCheckBox; |
|||
wxCheckBox* rotateCheckBox; |
|||
wxRadioBox* m_StyleRadioBox; |
|||
wxStaticText* fieldNameLabel; |
|||
wxTextCtrl* fieldNameTextCtrl; |
|||
wxStaticText* fieldValueLabel; |
|||
wxTextCtrl* fieldValueTextCtrl; |
|||
wxStaticText* textSizeLabel; |
|||
wxTextCtrl* textSizeTextCtrl; |
|||
wxStaticText* posXLabel; |
|||
wxTextCtrl* posXTextCtrl; |
|||
wxStaticText* posYLabel; |
|||
wxTextCtrl* posYTextCtrl; |
|||
wxStdDialogButtonSizer* stdDialogButtonSizer; |
|||
wxButton* stdDialogButtonSizerOK; |
|||
wxButton* stdDialogButtonSizerCancel; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } |
|||
virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); } |
|||
virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); } |
|||
virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } |
|||
|
|||
|
|||
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( 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__ |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue