diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt
index 307b60dfb2..bf0fd8d698 100644
--- a/bitmap2component/CMakeLists.txt
+++ b/bitmap2component/CMakeLists.txt
@@ -17,6 +17,7 @@ if(WIN32)
set(BITMAP2COMPONENT_RESOURCES bitmap2component.rc)
endif(MINGW)
endif(WIN32)
+
add_executable(bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES})
@@ -28,6 +29,6 @@ target_link_libraries( bitmap2component
kbool )
install(TARGETS bitmap2component
- DESTINATION ${KICAD_PLUGINS}
+ DESTINATION ${KICAD_BIN}
COMPONENT binary)
diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp
index 3eab77a013..f55d975d47 100644
--- a/bitmap2component/bitmap2cmp_gui.cpp
+++ b/bitmap2component/bitmap2cmp_gui.cpp
@@ -69,6 +69,7 @@ private:
// Event handlers
void OnPaint( wxPaintEvent& event );
void OnLoadFile( wxCommandEvent& event );
+ bool LoadFile( wxString& aFullFileName );
void OnExportEeschema( wxCommandEvent& event );
void OnExportPcbnew( wxCommandEvent& event );
void Binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level)
@@ -94,16 +95,13 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
SetIcon( wxICON( bitmap2component ) );
#endif
- wxString msg( wxT( "000000" ) );
- m_gridInfo->SetCellValue( 0, 0, msg );
- m_gridInfo->SetCellValue( 1, 0, msg );
- if( GetSizer() )
- {
- GetSizer()->SetSizeHints( this );
- }
+ GetSizer()->SetSizeHints( this );
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
+ m_buttonExportEeschema->Enable( false );
+ m_buttonExportPcbnew->Enable( false );
+
if ( m_FramePos == wxDefaultPosition )
Centre();
}
@@ -162,13 +160,24 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
if( diag != wxID_OK )
return;
+ wxString fullFilename = FileDlg.GetPath();
+ if( ! LoadFile( fullFilename ) )
+ return;
- m_BitmapFileName = FileDlg.GetPath();
+ m_buttonExportEeschema->Enable( true );
+ m_buttonExportPcbnew->Enable( true );
+ SetStatusText( fullFilename );
+ Refresh();
+}
+
+bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
+{
+ m_BitmapFileName = aFullFileName;
if( !m_Pict_Image.LoadFile( m_BitmapFileName ) )
{
wxMessageBox( _( "Couldn't load image from <%s>" ), m_BitmapFileName.c_str() );
- return;
+ return false;
}
m_Pict_Bitmap = wxBitmap( m_Pict_Image );
@@ -178,12 +187,12 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
int nb = m_Pict_Bitmap.GetDepth();
wxString msg;
- msg.Printf( wxT( "%d" ), h );
- m_gridInfo->SetCellValue( 0, 0, msg );
msg.Printf( wxT( "%d" ), w );
- m_gridInfo->SetCellValue( 1, 0, msg );
+ m_SizeXValue->SetLabel(msg);
+ msg.Printf( wxT( "%d" ), h );
+ m_SizeYValue->SetLabel(msg);
msg.Printf( wxT( "%d" ), nb );
- m_gridInfo->SetCellValue( 2, 0, msg );
+ m_BPPValue->SetLabel(msg);
m_InitialPicturePanel->SetVirtualSize( w, h );
m_GreyscalePicturePanel->SetVirtualSize( w, h );
@@ -197,9 +206,9 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
m_NB_Image = m_Greyscale_Image;
Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
- Refresh();
-}
+ return true;
+}
void BM2CMP_FRAME::Binarize( double aThreshold )
{
@@ -261,7 +270,7 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
- wxFileDialog FileDlg( this, _( "Create lib file" ), path, wxEmptyString,
+ wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = FileDlg.ShowModal();
@@ -291,8 +300,9 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
- wxString msg = _( "Footprint export file (*.emp)|*.emp" );
- wxFileDialog FileDlg( this, _( "Create footprint export file" ), path, wxEmptyString,
+ wxString msg = _( "Footprint file (*.mod)|*.mod" );
+ wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ),
+ path, wxEmptyString,
msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = FileDlg.ShowModal();
diff --git a/bitmap2component/bitmap2cmp_gui_base.cpp b/bitmap2component/bitmap2cmp_gui_base.cpp
index fa72459275..742c9f43b1 100644
--- a/bitmap2component/bitmap2cmp_gui_base.cpp
+++ b/bitmap2component/bitmap2cmp_gui_base.cpp
@@ -36,45 +36,65 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
wxBoxSizer* brightSizer;
brightSizer = new wxBoxSizer( wxVERTICAL );
- m_gridInfo = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ wxStaticBoxSizer* sbSizerInfo;
+ sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Bitmap info:") ), wxVERTICAL );
- // Grid
- m_gridInfo->CreateGrid( 3, 1 );
- m_gridInfo->EnableEditing( false );
- m_gridInfo->EnableGridLines( true );
- m_gridInfo->EnableDragGridSize( false );
- m_gridInfo->SetMargins( 0, 0 );
+ wxFlexGridSizer* fgSizerInfo;
+ fgSizerInfo = new wxFlexGridSizer( 3, 3, 0, 0 );
+ fgSizerInfo->SetFlexibleDirection( wxBOTH );
+ fgSizerInfo->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- // Columns
- m_gridInfo->SetColSize( 0, 80 );
- m_gridInfo->EnableDragColMove( false );
- m_gridInfo->EnableDragColSize( true );
- m_gridInfo->SetColLabelSize( 30 );
- m_gridInfo->SetColLabelValue( 0, _("Value") );
- m_gridInfo->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+ m_staticTextSizeX = new wxStaticText( this, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSizeX->Wrap( -1 );
+ fgSizerInfo->Add( m_staticTextSizeX, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- // Rows
- m_gridInfo->AutoSizeRows();
- m_gridInfo->EnableDragRowSize( true );
- m_gridInfo->SetRowLabelSize( 80 );
- m_gridInfo->SetRowLabelValue( 0, _("Size X") );
- m_gridInfo->SetRowLabelValue( 1, _("Size Y") );
- m_gridInfo->SetRowLabelValue( 2, _("BPP") );
- m_gridInfo->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTRE );
+ m_SizeXValue = new wxStaticText( this, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SizeXValue->Wrap( -1 );
+ fgSizerInfo->Add( m_SizeXValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- // Label Appearance
+ m_SizeXunits = new wxStaticText( this, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SizeXunits->Wrap( -1 );
+ fgSizerInfo->Add( m_SizeXunits, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- // Cell Defaults
- m_gridInfo->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
- brightSizer->Add( m_gridInfo, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+ m_staticTextSizeY = new wxStaticText( this, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSizeY->Wrap( -1 );
+ fgSizerInfo->Add( m_staticTextSizeY, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_SizeYValue = new wxStaticText( this, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SizeYValue->Wrap( -1 );
+ fgSizerInfo->Add( m_SizeYValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_SizeYunits = new wxStaticText( this, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SizeYunits->Wrap( -1 );
+ fgSizerInfo->Add( m_SizeYunits, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticTextBPP = new wxStaticText( this, wxID_ANY, _("BPP:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBPP->Wrap( -1 );
+ fgSizerInfo->Add( m_staticTextBPP, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_BPPValue = new wxStaticText( this, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_BPPValue->Wrap( -1 );
+ fgSizerInfo->Add( m_BPPValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_BPPunits = new wxStaticText( this, wxID_ANY, _("bits"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_BPPunits->Wrap( -1 );
+ fgSizerInfo->Add( m_BPPunits, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ sbSizerInfo->Add( fgSizerInfo, 0, wxEXPAND|wxBOTTOM, 5 );
+
+ brightSizer->Add( sbSizerInfo, 0, wxEXPAND|wxALL, 5 );
m_buttonLoad = new wxButton( this, wxID_ANY, _("Load Bitmap"), wxDefaultPosition, wxDefaultSize, 0 );
brightSizer->Add( m_buttonLoad, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonExportEeschema = new wxButton( this, wxID_ANY, _("Export to eeschema"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonExportEeschema->SetToolTip( _("Create a lib file for Eeschema") );
+
brightSizer->Add( m_buttonExportEeschema, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonExportPcbnew = new wxButton( this, wxID_ANY, _("Export to Pcbnew"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonExportPcbnew->SetToolTip( _("Create a footprint file for PcbNew") );
+
brightSizer->Add( m_buttonExportPcbnew, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
wxString m_rbOptionsChoices[] = { _("Normal"), _("Negative") };
@@ -94,6 +114,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
this->SetSizer( bMainSizer );
this->Layout();
+ m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
// Connect Events
m_InitialPicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
diff --git a/bitmap2component/bitmap2cmp_gui_base.fbp b/bitmap2component/bitmap2cmp_gui_base.fbp
index d008ba62fd..14ed3feb19 100644
--- a/bitmap2component/bitmap2cmp_gui_base.fbp
+++ b/bitmap2component/bitmap2cmp_gui_base.fbp
@@ -288,113 +288,493 @@
none
+
+
+
+ 1
+
+ 1
+
+ 0
+ wxID_ANY
+
+
+ m_statusBar
+ protected
+
+
+ wxST_SIZEGRIP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bitmap2component/bitmap2cmp_gui_base.h b/bitmap2component/bitmap2cmp_gui_base.h
index 735f97b8d4..a27138f258 100644
--- a/bitmap2component/bitmap2cmp_gui_base.h
+++ b/bitmap2component/bitmap2cmp_gui_base.h
@@ -20,12 +20,13 @@
#include
#include
#include
-#include
+#include
+#include
+#include
#include
#include
-#include
#include
-#include
+#include
#include
///////////////////////////////////////////////////////////////////////////
@@ -43,13 +44,22 @@ class BM2CMP_FRAME_BASE : public wxFrame
wxScrolledWindow* m_InitialPicturePanel;
wxScrolledWindow* m_GreyscalePicturePanel;
wxScrolledWindow* m_BNPicturePanel;
- wxGrid* m_gridInfo;
+ wxStaticText* m_staticTextSizeX;
+ wxStaticText* m_SizeXValue;
+ wxStaticText* m_SizeXunits;
+ wxStaticText* m_staticTextSizeY;
+ wxStaticText* m_SizeYValue;
+ wxStaticText* m_SizeYunits;
+ wxStaticText* m_staticTextBPP;
+ wxStaticText* m_BPPValue;
+ wxStaticText* m_BPPunits;
wxButton* m_buttonLoad;
wxButton* m_buttonExportEeschema;
wxButton* m_buttonExportPcbnew;
wxRadioBox* m_rbOptions;
wxStaticText* m_ThresholdText;
wxSlider* m_sliderThreshold;
+ wxStatusBar* m_statusBar;
// Virtual event handlers, overide them in your derived class
virtual void OnPaint( wxPaintEvent& event ){ event.Skip(); }
diff --git a/bitmap2component/bitmap2component_16x16.xpm b/bitmap2component/bitmap2component_16x16.xpm
new file mode 100644
index 0000000000..2b4d283a98
--- /dev/null
+++ b/bitmap2component/bitmap2component_16x16.xpm
@@ -0,0 +1,38 @@
+/* XPM */
+const char *bitmap2component_16x16_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 16 1",
+"& c #128B26",
+" c #0CFA0C",
+"# c #A75104",
+"@ c #22204C",
+"O c #050304",
+"; c #191327",
+"X c #054306",
+"* c #F27504",
+"o c #0C7E0C",
+": c #1ACC2E",
+"$ c #51280C",
+"- c #391E07",
+". c #0CBE0C",
+"% c #289F55",
+"= c #703505",
+"+ c #1C563C",
+/* pixels */
+" . X",
+"oooooooooooo .. ",
+"oXO+ooooooXO .. ",
+"@@#$+%+& XX X",
+"OO#*#O#=OX XOOO",
+"OO#*=O$-OO;@@@: ",
+"OO=OO.%:XOO***$o",
+"%:% X. ;***#X",
+"ooooo . .o;***#;",
+"OO=$OXooOOO###;o",
+"OO#*#O#$OOX+o&: ",
+"OO#*=O=-OX XOOO",
+"&X=;& %% XX X",
+"oX;oooooooXO .. ",
+"oooooooooooo .. ",
+" . X"
+};
diff --git a/common/gestfich.cpp b/common/gestfich.cpp
index fa8427b0a2..17e6c44c7b 100644
--- a/common/gestfich.cpp
+++ b/common/gestfich.cpp
@@ -443,7 +443,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
}
wxString msg;
- msg.Printf( _( "Command <%s> could not found" ), GetChars( ExecFile ) );
+ msg.Printf( _( "Command <%s> could not found" ), GetChars( FullFileName ) );
DisplayError( frame, msg, 20 );
return -1;
}
diff --git a/demos/interf_u/interf_u.pro b/demos/interf_u/interf_u.pro
index d22691c050..a17cbcd99e 100644
--- a/demos/interf_u/interf_u.pro
+++ b/demos/interf_u/interf_u.pro
@@ -1,4 +1,4 @@
-update=30/06/2010 12:54:53
+update=05/07/2010 19:03:21
version=1
last_client=pcbnew
[common]
diff --git a/eeschema/class_text-label.cpp b/eeschema/class_text-label.cpp
index c2c2aa87fc..a72adc9ec7 100644
--- a/eeschema/class_text-label.cpp
+++ b/eeschema/class_text-label.cpp
@@ -129,8 +129,8 @@ SCH_TEXT* SCH_TEXT::GenCopy()
break;
}
- newitem->m_Layer = m_Layer;
- newitem->m_Shape = m_Shape;
+ newitem->m_Layer = m_Layer;
+ newitem->m_Shape = m_Shape;
newitem->m_Orient = m_Orient;
newitem->m_Size = m_Size;
newitem->m_Width = m_Width;
@@ -181,7 +181,7 @@ wxPoint SCH_TEXT::GetSchematicTextOffset()
}
-bool SCH_TEXT::Matches( wxFindReplaceData& aSearchData, void * aAuxData )
+bool SCH_TEXT::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
{
return SCH_ITEM::Matches( m_Text, aSearchData );
}
@@ -212,12 +212,21 @@ void SCH_TEXT::Mirror_Y( int aYaxis_position )
int px = m_Pos.x;
int dx;
- if( m_Orient == 0 ) /* horizontal text */
+ switch( GetSchematicTextOrientation() )
+ {
+ case 0: /* horizontal text */
dx = LenSize( m_Text ) / 2;
- else if( m_Orient == 2 ) /* invert horizontal text*/
+ break;
+
+ case 2: /* invert horizontal text*/
dx = -LenSize( m_Text ) / 2;
- else
+ break;
+
+ default:
dx = 0;
+ break;
+ }
+
px += dx;
px -= aYaxis_position;
NEGATE( px );
@@ -270,14 +279,23 @@ wxPoint SCH_HIERLABEL::GetSchematicTextOffset()
*/
void SCH_HIERLABEL::Mirror_Y( int aYaxis_position )
{
- // Text is NOT really mirrored; it is moved to a suitable position
- // which is the closest position for a true mirrored text
- // The center position is mirrored and the text is moved for half
- // horizontal len
- if( m_Orient == 0 ) /* horizontal text */
- m_Orient = 2;
- else if( m_Orient == 2 ) /* invert horizontal text*/
- m_Orient = 0;
+/* The hierarchical label is NOT really mirrored.
+ * for an horizontal label, the schematic orientation is changed.
+ * for a vericalal label, the schematic orientation is not changed.
+ * and the label is moved to a suitable position
+ */
+
+ switch( GetSchematicTextOrientation() )
+ {
+ case 0: /* horizontal text */
+ SetSchematicTextOrientation( 2 );
+ break;
+
+ case 2: /* invert horizontal text*/
+ SetSchematicTextOrientation( 0 );
+ break;
+ }
+
m_Pos.x -= aYaxis_position;
NEGATE( m_Pos.x );
m_Pos.x += aYaxis_position;
@@ -290,14 +308,22 @@ void SCH_HIERLABEL::Mirror_Y( int aYaxis_position )
*/
void SCH_GLOBALLABEL::Mirror_Y( int aYaxis_position )
{
- // Text is NOT really mirrored; it is moved to a suitable position
- // which is the closest position for a true mirrored text
- // The center position is mirrored and the text is moved for half
- // horizontal len
- if( m_Orient == 0 ) /* horizontal text */
- m_Orient = 2;
- else if( m_Orient == 2 ) /* invert horizontal text*/
- m_Orient = 0;
+ /* The global label is NOT really mirrored.
+ * for an horizontal label, the schematic orientation is changed.
+ * for a vericalal label, the schematic orientation is not changed.
+ * and the label is moved to a suitable position
+ */
+ switch( GetSchematicTextOrientation() )
+ {
+ case 0: /* horizontal text */
+ SetSchematicTextOrientation( 2 );
+ break;
+
+ case 2: /* invert horizontal text*/
+ SetSchematicTextOrientation( 0 );
+ break;
+ }
+
m_Pos.x -= aYaxis_position;
NEGATE( m_Pos.x );
m_Pos.x += aYaxis_position;
@@ -583,6 +609,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& aOffset,
int DrawMode, int Color )
{
/****************************************************************************/
+
/* Text type Comment (text on layer "NOTE") have 4 directions, and the Text
* origin is the first letter
*/
@@ -612,10 +639,10 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& aOffset,
{
EDA_Rect BoundaryBox;
BoundaryBox = GetBoundingBox();
- int x1 = BoundaryBox.GetX();
- int y1 = BoundaryBox.GetY();
- int x2 = BoundaryBox.GetRight();
- int y2 = BoundaryBox.GetBottom();
+ int x1 = BoundaryBox.GetX();
+ int y1 = BoundaryBox.GetY();
+ int x2 = BoundaryBox.GetRight();
+ int y2 = BoundaryBox.GetBottom();
GRRect( &panel->m_ClipBox, DC, x1, y1, x2, y2, BROWN );
}
#endif
@@ -649,8 +676,8 @@ bool SCH_TEXT::Save( FILE* aFile ) const
}
if( fprintf( aFile, "Text Notes %-4d %-4d %-4d %-4d %s %d\n%s\n",
- m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x,
- shape, m_Width, CONV_TO_UTF8( text ) ) == EOF )
+ m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x,
+ shape, m_Width, CONV_TO_UTF8( text ) ) == EOF )
{
success = false;
}
@@ -705,8 +732,8 @@ bool SCH_LABEL::Save( FILE* aFile ) const
shape = "Italic";
if( fprintf( aFile, "Text Label %-4d %-4d %-4d %-4d %s %d\n%s\n",
- m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x, shape,
- m_Width, CONV_TO_UTF8( m_Text ) ) == EOF )
+ m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x, shape,
+ m_Width, CONV_TO_UTF8( m_Text ) ) == EOF )
{
success = false;
}
@@ -741,9 +768,9 @@ bool SCH_GLOBALLABEL::Save( FILE* aFile ) const
if( m_Italic )
shape = "Italic";
if( fprintf( aFile, "Text GLabel %-4d %-4d %-4d %-4d %s %s %d\n%s\n",
- m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x,
- SheetLabelType[m_Shape], shape, m_Width,
- CONV_TO_UTF8( m_Text ) ) == EOF )
+ m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x,
+ SheetLabelType[m_Shape], shape, m_Width,
+ CONV_TO_UTF8( m_Text ) ) == EOF )
{
success = false;
}
@@ -756,6 +783,7 @@ bool SCH_GLOBALLABEL::Save( FILE* aFile ) const
bool SCH_GLOBALLABEL::HitTest( const wxPoint& aPosRef )
{
/************************************************/
+
/** Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
@@ -792,9 +820,9 @@ bool SCH_HIERLABEL::Save( FILE* aFile ) const
if( m_Italic )
shape = "Italic";
if( fprintf( aFile, "Text HLabel %-4d %-4d %-4d %-4d %s %s %d\n%s\n",
- m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x,
- SheetLabelType[m_Shape], shape, m_Width,
- CONV_TO_UTF8( m_Text ) ) == EOF )
+ m_Pos.x, m_Pos.y, m_SchematicOrientation, m_Size.x,
+ SheetLabelType[m_Shape], shape, m_Width,
+ CONV_TO_UTF8( m_Text ) ) == EOF )
{
success = false;
}
@@ -807,6 +835,7 @@ bool SCH_HIERLABEL::Save( FILE* aFile ) const
bool SCH_HIERLABEL::HitTest( const wxPoint& aPosRef )
{
/************************************************/
+
/** Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
@@ -834,6 +863,7 @@ void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel,
int Color )
{
/*****************************************************************************/
+
/* Texts type Global Label have 4 directions, and the Text origin is the
* graphic icon
*/
@@ -869,10 +899,10 @@ void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel,
{
EDA_Rect BoundaryBox;
BoundaryBox = GetBoundingBox();
- int x1 = BoundaryBox.GetX();
- int y1 = BoundaryBox.GetY();
- int x2 = BoundaryBox.GetRight();
- int y2 = BoundaryBox.GetBottom();
+ int x1 = BoundaryBox.GetX();
+ int y1 = BoundaryBox.GetY();
+ int x2 = BoundaryBox.GetRight();
+ int y2 = BoundaryBox.GetBottom();
GRRect( &panel->m_ClipBox, DC, x1, y1, x2, y2, BROWN );
}
#endif
@@ -969,6 +999,7 @@ void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel,
int Color )
{
/*****************************************************************************/
+
/* Texts type Global Label have 4 directions, and the Text origin is the
* graphic icon
*/
@@ -1003,10 +1034,10 @@ void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel,
{
EDA_Rect BoundaryBox;
BoundaryBox = GetBoundingBox();
- int x1 = BoundaryBox.GetX();
- int y1 = BoundaryBox.GetY();
- int x2 = BoundaryBox.GetRight();
- int y2 = BoundaryBox.GetBottom();
+ int x1 = BoundaryBox.GetX();
+ int y1 = BoundaryBox.GetY();
+ int x2 = BoundaryBox.GetRight();
+ int y2 = BoundaryBox.GetBottom();
GRRect( &panel->m_ClipBox, DC, x1, y1, x2, y2, BROWN );
}
#endif
@@ -1035,6 +1066,7 @@ void SCH_GLOBALLABEL::CreateGraphicShape( std::vector & aCorner_list,
// 50% more for negation bar
int y = wxRound( (double) HalfSize * 1.5 + (double) linewidth + 3.0 );
+
// Starting point(anchor)
aCorner_list.push_back( wxPoint( 0, 0 ) );
aCorner_list.push_back( wxPoint( 0, -y ) ); // Up
@@ -1113,12 +1145,13 @@ EDA_Rect SCH_GLOBALLABEL::GetBoundingBox()
int width = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
height = ( (m_Size.y * 15) / 10 ) + width + 2 * TXTMARGE;
+
// text X size add height for triangular shapes(bidirectional)
length = LenSize( m_Text ) + height + DANGLING_SYMBOL_SIZE;
switch( m_SchematicOrientation ) // respect orientation
{
- case 0: /* Horiz Normal Orientation (left justified) */
+ case 0: /* Horiz Normal Orientation (left justified) */
dx = -length;
dy = height;
x += DANGLING_SYMBOL_SIZE;
@@ -1202,6 +1235,7 @@ EDA_Rect SCH_LABEL::GetBoundingBox()
return box;
}
+
/***********************************/
EDA_Rect SCH_TEXT::GetBoundingBox()
/***********************************/
@@ -1210,19 +1244,20 @@ EDA_Rect SCH_TEXT::GetBoundingBox()
// when calculating the bounding box
int linewidth =
(m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
+
linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold );
EXCHG( linewidth, m_Width ); // Set the real width
EDA_Rect rect = GetTextBox( -1 );
EXCHG( linewidth, m_Width ); // set initial value
- if( m_Orient ) // Rotate rect
+ if( m_Orient ) // Rotate rect
{
wxPoint pos = rect.GetOrigin();
wxPoint end = rect.GetEnd();
RotatePoint( &pos, m_Pos, m_Orient );
RotatePoint( &end, m_Pos, m_Orient );
- rect.SetOrigin(pos);
- rect.SetEnd(end);
+ rect.SetOrigin( pos );
+ rect.SetEnd( end );
}
rect.Normalize();
diff --git a/eeschema/dialog_edit_component_in_schematic.cpp b/eeschema/dialog_edit_component_in_schematic.cpp
index d28e481c6b..1f9a4ff6fd 100644
--- a/eeschema/dialog_edit_component_in_schematic.cpp
+++ b/eeschema/dialog_edit_component_in_schematic.cpp
@@ -789,6 +789,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event )
if( entry == NULL )
return;
+ // save old cmp in undo list if not already in edit, or moving ...
+ if( m_Cmp->m_Flags == 0 )
+ m_Parent->SaveCopyInUndoList( m_Cmp, UR_CHANGED );
+
INSTALL_DC( dc, m_Parent->DrawPanel );
RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, g_XorMode );
diff --git a/eeschema/dialog_edit_component_in_schematic_fbp.cpp b/eeschema/dialog_edit_component_in_schematic_fbp.cpp
index 082b8070e8..636fbd8813 100644
--- a/eeschema/dialog_edit_component_in_schematic_fbp.cpp
+++ b/eeschema/dialog_edit_component_in_schematic_fbp.cpp
@@ -1,271 +1,271 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 16 2008)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
-#include "dialog_edit_component_in_schematic_fbp.h"
-
-///////////////////////////////////////////////////////////////////////////
-
-DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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 );
-
- wxBoxSizer* upperSizer;
- upperSizer = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* optionsSizer;
- optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
-
- wxStaticBoxSizer* unitSizer;
- unitSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Unit") ), wxVERTICAL );
-
- wxString unitChoiceChoices[] = { _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9"), _("10"), _("11"), _("12"), _("13"), _("14"), _("15"), _("16"), _("17"), _("18"), _("19"), _("20"), _("21"), _("22"), _("23"), _("24"), _("25"), _("26") };
- int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString );
- unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 );
- unitChoice->SetSelection( 0 );
- unitSizer->Add( unitChoice, 1, wxALL|wxEXPAND, 5 );
-
- optionsSizer->Add( unitSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 );
-
- wxBoxSizer* orientationSizer;
- orientationSizer = new wxBoxSizer( wxHORIZONTAL );
-
- wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
- int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
- orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
- orientationRadioBox->SetSelection( 0 );
- orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
-
- orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 );
-
- optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 );
-
- wxBoxSizer* mirrorSizer;
- mirrorSizer = new wxBoxSizer( wxHORIZONTAL );
-
- wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") };
- int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString );
- mirrorRadioBox = new wxRadioBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, mirrorRadioBoxNChoices, mirrorRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
- mirrorRadioBox->SetSelection( 0 );
- mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
-
- mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
-
- optionsSizer->Add( mirrorSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 );
-
- wxStaticBoxSizer* chipnameSizer;
- chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL );
-
- chipnameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- chipnameTextCtrl->SetMaxLength( 32 );
- chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );
-
- chipnameSizer->Add( chipnameTextCtrl, 1, wxALL|wxEXPAND, 5 );
-
- optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 );
-
- 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") );
-
- optionsSizer->Add( convertCheckBox, 0, wxALL, 8 );
-
- partsAreLockedLabel = new wxStaticText( this, wxID_ANY, _("Parts are locked"), wxDefaultPosition, wxDefaultSize, 0 );
- partsAreLockedLabel->Wrap( -1 );
- optionsSizer->Add( partsAreLockedLabel, 0, wxALL|wxEXPAND, 8 );
-
- upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
-
- 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, wxALL|wxEXPAND, 8 );
-
- wxBoxSizer* fieldEditBoxSizer;
- fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
-
- 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 );
- m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schemati") );
-
- 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 name of the currently selected field\nSome fixed fields names are not editable") );
-
- 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 size 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 );
- posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") );
-
- 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 );
-
-
- fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
-
- defaultsButton = new wxButton( this, wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
- defaultsButton->SetToolTip( _("Set position and style of fields and component orientation to default lib value.\nFields texts are not modified.") );
-
- fieldEditBoxSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
-
-
- fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
-
- fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 );
-
- upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );
-
- mainSizer->Add( upperSizer, 1, wxEXPAND, 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
- fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
- fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
- addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
- deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
- moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
- defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
- stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
- stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
-}
-
-DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP()
-{
- // Disconnect Events
- fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
- fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
- addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
- deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
- moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
- defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), 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 );
-}
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Apr 16 2008)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_edit_component_in_schematic_fbp.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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 );
+
+ wxBoxSizer* upperSizer;
+ upperSizer = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* optionsSizer;
+ optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
+
+ wxStaticBoxSizer* unitSizer;
+ unitSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Unit") ), wxVERTICAL );
+
+ wxString unitChoiceChoices[] = { _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9"), _("10"), _("11"), _("12"), _("13"), _("14"), _("15"), _("16"), _("17"), _("18"), _("19"), _("20"), _("21"), _("22"), _("23"), _("24"), _("25"), _("26") };
+ int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString );
+ unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 );
+ unitChoice->SetSelection( 0 );
+ unitSizer->Add( unitChoice, 1, wxALL|wxEXPAND, 5 );
+
+ optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
+
+ wxBoxSizer* orientationSizer;
+ orientationSizer = new wxBoxSizer( wxHORIZONTAL );
+
+ wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
+ int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
+ orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
+ orientationRadioBox->SetSelection( 0 );
+ orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
+
+ orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 );
+
+ optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 );
+
+ wxBoxSizer* mirrorSizer;
+ mirrorSizer = new wxBoxSizer( wxHORIZONTAL );
+
+ wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") };
+ int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString );
+ mirrorRadioBox = new wxRadioBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, mirrorRadioBoxNChoices, mirrorRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
+ mirrorRadioBox->SetSelection( 0 );
+ mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
+
+ mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
+
+ optionsSizer->Add( mirrorSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 );
+
+ wxStaticBoxSizer* chipnameSizer;
+ chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL );
+
+ chipnameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ chipnameTextCtrl->SetMaxLength( 32 );
+ chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );
+
+ chipnameSizer->Add( chipnameTextCtrl, 1, wxALL|wxEXPAND, 5 );
+
+ optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 );
+
+ 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") );
+
+ optionsSizer->Add( convertCheckBox, 0, wxALL, 8 );
+
+ partsAreLockedLabel = new wxStaticText( this, wxID_ANY, _("Parts are locked"), wxDefaultPosition, wxDefaultSize, 0 );
+ partsAreLockedLabel->Wrap( -1 );
+ optionsSizer->Add( partsAreLockedLabel, 0, wxALL|wxEXPAND, 8 );
+
+ defaultsButton = new wxButton( this, wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
+ defaultsButton->SetToolTip( _("Set position and style of fields and component orientation to default lib value.\nFields texts are not modified.") );
+
+ optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
+
+ upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
+
+ 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, wxALL|wxEXPAND, 8 );
+
+ wxBoxSizer* fieldEditBoxSizer;
+ fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
+
+ 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 );
+ m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schemati") );
+
+ 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 name of the currently selected field\nSome fixed fields names are not editable") );
+
+ 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 size 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 );
+ posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") );
+
+ 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 );
+
+
+ fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 );
+
+ upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );
+
+ mainSizer->Add( upperSizer, 1, wxEXPAND, 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
+ defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
+ fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
+ fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
+ addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
+ deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
+ moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
+ stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
+ stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
+}
+
+DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP()
+{
+ // Disconnect Events
+ defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
+ fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
+ fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
+ addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
+ deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), 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 );
+ stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
+}
diff --git a/eeschema/dialog_edit_component_in_schematic_fbp.fbp b/eeschema/dialog_edit_component_in_schematic_fbp.fbp
index 60fc31ed36..06abf34281 100644
--- a/eeschema/dialog_edit_component_in_schematic_fbp.fbp
+++ b/eeschema/dialog_edit_component_in_schematic_fbp.fbp
@@ -1,1614 +1,1614 @@
-
-
-
-
- ;
- C++
- 1
- ANSI
- connect
- dialog_edit_component_in_schematic_fbp
- 1000
- none
- 1
-
-
- .
-
- 1
- 0
- 0
-
-
-
-
- 1
-
-
-
- 0
- wxID_ANY
-
-
- DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
-
- 630,481
- wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU
-
- Component Properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- mainSizer
- wxVERTICAL
- none
-
- 5
- wxEXPAND
- 1
-
-
- upperSizer
- wxHORIZONTAL
- none
-
- 5
- wxALIGN_TOP|wxALL|wxEXPAND
- 0
-
- wxID_ANY
- Options
-
- optionsSizer
- wxVERTICAL
- none
-
-
- 8
- wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- wxID_ANY
- Unit
-
- unitSizer
- wxVERTICAL
- none
-
-
- 5
- wxALL|wxEXPAND
- 1
-
-
- "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26"
-
- 1
-
-
- 0
- wxID_ANY
-
-
- unitChoice
- protected
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
-
- orientationSizer
- wxHORIZONTAL
- none
-
- 8
- wxALL
- 1
-
-
- "0" "+90" "180" "-90"
-
- 1
-
-
- 0
- wxID_ANY
- Orientation (Degrees)
- 1
-
-
- orientationRadioBox
- protected
-
- 0
-
- wxRA_SPECIFY_COLS
-
- Select if the component is to be rotated when drawn
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
-
- mirrorSizer
- wxHORIZONTAL
- none
-
- 8
- wxALL
- 1
-
-
- "Normal" "Mirror ---" "Mirror |"
-
- 1
-
-
- 0
- wxID_ANY
- Mirror
- 1
-
-
- mirrorRadioBox
- protected
-
- 0
-
- wxRA_SPECIFY_COLS
-
- Pick the graphical transformation to be used when displaying the component, if any
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 8
- wxEXPAND|wxLEFT|wxRIGHT|wxTOP
- 0
-
- wxID_ANY
- Chip Name
-
- chipnameSizer
- wxHORIZONTAL
- none
-
-
- 5
- wxALL|wxEXPAND
- 1
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 32
-
- chipnameTextCtrl
- protected
-
-
-
-
- The name of the symbol in the library from which this component came
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 8
- wxALL
- 0
-
-
- 0
-
- 1
-
-
- 0
- wxID_ANY
- Convert
-
-
- convertCheckBox
- protected
-
-
-
-
- Use the alternate shape of this component.
For gates, this is the "De Morgan" conversion
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 8
- wxALL|wxEXPAND
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
- Parts are locked
-
-
- partsAreLockedLabel
- protected
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 1
-
- wxID_ANY
- Fields
-
- fieldsSizer
- wxHORIZONTAL
- none
-
-
- 8
- wxALL|wxEXPAND
- 5
-
- wxID_ANY
-
-
- gridStaticBoxSizer
- wxVERTICAL
- none
-
-
- 8
- wxALL|wxEXPAND
- 1
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 220,-1
- fieldListCtrl
- protected
-
-
- wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- OnListItemDeselected
-
-
-
- OnListItemSelected
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
-
- 0
- 1
-
-
- 0
- wxID_ANY
- Add Field
-
-
- addFieldButton
- protected
-
-
-
-
- Add a new custom field
-
-
-
- addFieldButtonHandler
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
-
- 0
- 1
-
-
- 0
- wxID_ANY
- Delete Field
-
-
- deleteFieldButton
- protected
-
-
-
-
- Delete one of the optional fields
-
-
-
- deleteFieldButtonHandler
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
-
- 0
- 1
-
-
- 0
- wxID_ANY
- Move Up
-
-
- moveUpButton
- protected
-
-
-
-
- Move the selected optional fields up one position
-
-
-
- moveUpButtonHandler
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 3
-
-
- fieldEditBoxSizer
- wxVERTICAL
- none
-
- 5
- wxEXPAND
- 0
-
- wxID_ANY
- Visibility
-
- visibilitySizer
- wxHORIZONTAL
- none
-
-
- 5
- wxALIGN_CENTER_VERTICAL
- 1
-
-
- bShowRotateSizer
- wxVERTICAL
- none
-
- 5
- wxALL
- 0
-
-
- 0
-
- 1
-
-
- 0
- wxID_ANY
- Show
-
-
- showCheckBox
- protected
-
-
-
-
- Check if you want this field visible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL
- 0
-
-
- 0
-
- 1
-
-
- 0
- wxID_ANY
- Rotate
-
-
- rotateCheckBox
- protected
-
-
-
-
- Check if you want this field's text rotated 90 degrees
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxBOTTOM|wxRIGHT|wxLEFT
- 1
-
-
- "Normal" "Italic" "Bold" "Bold Italic"
-
- 1
-
-
- 0
- wxID_ANY
- Style:
- 1
-
-
- m_StyleRadioBox
- protected
-
- 0
-
- wxRA_SPECIFY_COLS
-
- The style of the currently selected field's text in the schemati
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
- fieldNameBoxSizer
- wxVERTICAL
- none
-
- 5
-
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
- Field Name
-
-
- fieldNameLabel
- protected
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 0
-
- fieldNameTextCtrl
- protected
-
-
-
-
- The name of the currently selected field
Some fixed fields names are not editable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
- fieldTextBoxSizer
- wxVERTICAL
- none
-
- 5
-
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
- Field Value
-
-
- fieldValueLabel
- protected
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 0
-
- fieldValueTextCtrl
- protected
-
-
-
-
- The text (or value) of the currently selected field
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
- textSizeBoxSizer
- wxVERTICAL
- none
-
- 5
-
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
- Size(")
-
-
- textSizeLabel
- protected
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 0
-
- textSizeTextCtrl
- protected
-
-
-
-
- The size of the currently selected field's text in the schematic
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 1
-
-
- positionBoxSizer
- wxHORIZONTAL
- none
-
- 5
- wxALL|wxEXPAND
- 1
-
-
- posXBoxSizer
- wxVERTICAL
- none
-
- 5
-
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
- PosX(")
-
-
- posXLabel
- protected
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 0
-
- posXTextCtrl
- protected
-
-
-
-
- The X coordinate of the text relative to the component
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 1
-
-
- posYBoxSizer
- wxVERTICAL
- none
-
- 5
-
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
- PosY(")
-
-
- posYLabel
- protected
-
-
-
-
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 0
-
-
-
- 1
-
-
- 0
- wxID_ANY
-
- 0
-
- posYTextCtrl
- protected
-
-
-
-
- The Y coordinate of the text relative to the component
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 1
-
- 0
- protected
- 0
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
-
- 0
- 1
-
-
- 0
- wxID_ANY
- Reset to Library Defaults
-
-
- defaultsButton
- protected
-
-
-
-
- Set position and style of fields and component orientation to default lib value.
Fields texts are not modified.
-
-
-
- SetInitCmp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 1
-
- 0
- protected
- 0
-
-
-
-
-
-
-
-
-
- 8
- wxALL|wxEXPAND
- 0
-
- 0
- 1
- 0
- 0
- 0
- 1
- 0
- 0
-
- stdDialogButtonSizer
- protected
-
- OnCancelButtonClick
-
-
-
- OnOKButtonClick
-
-
-
-
-
-
-
-
+
+
+
+
+ ;
+ C++
+ 1
+ ANSI
+ connect
+ dialog_edit_component_in_schematic_fbp
+ 1000
+ none
+ 1
+
+
+ .
+
+ 1
+ 0
+ 0
+
+
+
+
+ 1
+
+
+
+ 0
+ wxID_ANY
+
+
+ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
+
+ 630,520
+ wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU
+
+ Component Properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mainSizer
+ wxVERTICAL
+ none
+
+ 5
+ wxEXPAND
+ 1
+
+
+ upperSizer
+ wxHORIZONTAL
+ none
+
+ 5
+ wxALIGN_TOP|wxALL|wxEXPAND
+ 0
+
+ wxID_ANY
+ Options
+
+ optionsSizer
+ wxVERTICAL
+ none
+
+
+ 8
+ wxEXPAND|wxTOP|wxRIGHT|wxLEFT
+ 0
+
+ wxID_ANY
+ Unit
+
+ unitSizer
+ wxVERTICAL
+ none
+
+
+ 5
+ wxALL|wxEXPAND
+ 1
+
+
+ "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26"
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+
+ unitChoice
+ protected
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ wxEXPAND|wxLEFT|wxRIGHT|wxTOP
+ 0
+
+
+ orientationSizer
+ wxHORIZONTAL
+ none
+
+ 8
+ wxALL
+ 1
+
+
+ "0" "+90" "180" "-90"
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Orientation (Degrees)
+ 1
+
+
+ orientationRadioBox
+ protected
+
+ 0
+
+ wxRA_SPECIFY_COLS
+
+ Select if the component is to be rotated when drawn
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ wxEXPAND|wxLEFT|wxRIGHT|wxTOP
+ 0
+
+
+ mirrorSizer
+ wxHORIZONTAL
+ none
+
+ 8
+ wxALL
+ 1
+
+
+ "Normal" "Mirror ---" "Mirror |"
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Mirror
+ 1
+
+
+ mirrorRadioBox
+ protected
+
+ 0
+
+ wxRA_SPECIFY_COLS
+
+ Pick the graphical transformation to be used when displaying the component, if any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 8
+ wxEXPAND|wxLEFT|wxRIGHT|wxTOP
+ 0
+
+ wxID_ANY
+ Chip Name
+
+ chipnameSizer
+ wxHORIZONTAL
+ none
+
+
+ 5
+ wxALL|wxEXPAND
+ 1
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 32
+
+ chipnameTextCtrl
+ protected
+
+
+
+
+ The name of the symbol in the library from which this component came
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 8
+ wxALL
+ 0
+
+
+ 0
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Convert
+
+
+ convertCheckBox
+ protected
+
+
+
+
+ Use the alternate shape of this component.
For gates, this is the "De Morgan" conversion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 8
+ wxALL|wxEXPAND
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Parts are locked
+
+
+ partsAreLockedLabel
+ protected
+
+
+
+
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+
+ 0
+ 1
+
+
+ 0
+ wxID_ANY
+ Reset to Library Defaults
+
+
+ defaultsButton
+ protected
+
+
+
+
+ Set position and style of fields and component orientation to default lib value.
Fields texts are not modified.
+
+
+
+ SetInitCmp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 1
+
+ wxID_ANY
+ Fields
+
+ fieldsSizer
+ wxHORIZONTAL
+ none
+
+
+ 8
+ wxALL|wxEXPAND
+ 5
+
+ wxID_ANY
+
+
+ gridStaticBoxSizer
+ wxVERTICAL
+ none
+
+
+ 8
+ wxALL|wxEXPAND
+ 1
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 220,-1
+ fieldListCtrl
+ protected
+
+
+ wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OnListItemDeselected
+
+
+
+ OnListItemSelected
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+
+ 0
+ 1
+
+
+ 0
+ wxID_ANY
+ Add Field
+
+
+ addFieldButton
+ protected
+
+
+
+
+ Add a new custom field
+
+
+
+ addFieldButtonHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+
+ 0
+ 1
+
+
+ 0
+ wxID_ANY
+ Delete Field
+
+
+ deleteFieldButton
+ protected
+
+
+
+
+ Delete one of the optional fields
+
+
+
+ deleteFieldButtonHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+
+ 0
+ 1
+
+
+ 0
+ wxID_ANY
+ Move Up
+
+
+ moveUpButton
+ protected
+
+
+
+
+ Move the selected optional fields up one position
+
+
+
+ moveUpButtonHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 3
+
+
+ fieldEditBoxSizer
+ wxVERTICAL
+ none
+
+ 5
+ wxEXPAND
+ 0
+
+ wxID_ANY
+ Visibility
+
+ visibilitySizer
+ wxHORIZONTAL
+ none
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL
+ 1
+
+
+ bShowRotateSizer
+ wxVERTICAL
+ none
+
+ 5
+ wxALL
+ 0
+
+
+ 0
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Show
+
+
+ showCheckBox
+ protected
+
+
+
+
+ Check if you want this field visible
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL
+ 0
+
+
+ 0
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Rotate
+
+
+ rotateCheckBox
+ protected
+
+
+
+
+ Check if you want this field's text rotated 90 degrees
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxBOTTOM|wxRIGHT|wxLEFT
+ 1
+
+
+ "Normal" "Italic" "Bold" "Bold Italic"
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Style:
+ 1
+
+
+ m_StyleRadioBox
+ protected
+
+ 0
+
+ wxRA_SPECIFY_COLS
+
+ The style of the currently selected field's text in the schemati
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+ fieldNameBoxSizer
+ wxVERTICAL
+ none
+
+ 5
+
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Field Name
+
+
+ fieldNameLabel
+ protected
+
+
+
+
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 0
+
+ fieldNameTextCtrl
+ protected
+
+
+
+
+ The name of the currently selected field
Some fixed fields names are not editable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+ fieldTextBoxSizer
+ wxVERTICAL
+ none
+
+ 5
+
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Field Value
+
+
+ fieldValueLabel
+ protected
+
+
+
+
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 0
+
+ fieldValueTextCtrl
+ protected
+
+
+
+
+ The text (or value) of the currently selected field
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+ textSizeBoxSizer
+ wxVERTICAL
+ none
+
+ 5
+
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+ Size(")
+
+
+ textSizeLabel
+ protected
+
+
+
+
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 0
+
+ textSizeTextCtrl
+ protected
+
+
+
+
+ The size of the currently selected field's text in the schematic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 1
+
+
+ positionBoxSizer
+ wxHORIZONTAL
+ none
+
+ 5
+ wxALL|wxEXPAND
+ 1
+
+
+ posXBoxSizer
+ wxVERTICAL
+ none
+
+ 5
+
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+ PosX(")
+
+
+ posXLabel
+ protected
+
+
+
+
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 0
+
+ posXTextCtrl
+ protected
+
+
+
+
+ The X coordinate of the text relative to the component
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 1
+
+
+ posYBoxSizer
+ wxVERTICAL
+ none
+
+ 5
+
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+ PosY(")
+
+
+ posYLabel
+ protected
+
+
+
+
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 0
+
+
+
+ 1
+
+
+ 0
+ wxID_ANY
+
+ 0
+
+ posYTextCtrl
+ protected
+
+
+
+
+ The Y coordinate of the text relative to the component
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 1
+
+ 0
+ protected
+ 0
+
+
+
+ 5
+ wxEXPAND
+ 1
+
+ 0
+ protected
+ 0
+
+
+
+
+
+
+
+
+
+ 8
+ wxALL|wxEXPAND
+ 0
+
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+
+ stdDialogButtonSizer
+ protected
+
+ OnCancelButtonClick
+
+
+
+ OnOKButtonClick
+
+
+
+
+
+
+
+
diff --git a/eeschema/dialog_edit_component_in_schematic_fbp.h b/eeschema/dialog_edit_component_in_schematic_fbp.h
index d6952b3b6e..cb9044a449 100644
--- a/eeschema/dialog_edit_component_in_schematic_fbp.h
+++ b/eeschema/dialog_edit_component_in_schematic_fbp.h
@@ -1,87 +1,87 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 16 2008)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
-#ifndef __dialog_edit_component_in_schematic_fbp__
-#define __dialog_edit_component_in_schematic_fbp__
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-///////////////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
-///////////////////////////////////////////////////////////////////////////////
-class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
-{
- private:
-
- protected:
- wxChoice* unitChoice;
- wxRadioBox* orientationRadioBox;
- wxRadioBox* mirrorRadioBox;
- wxTextCtrl* chipnameTextCtrl;
- wxCheckBox* convertCheckBox;
- wxStaticText* partsAreLockedLabel;
- wxListCtrl* fieldListCtrl;
- wxButton* addFieldButton;
- wxButton* deleteFieldButton;
- wxButton* moveUpButton;
- 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;
-
- wxButton* defaultsButton;
-
- wxStdDialogButtonSizer* stdDialogButtonSizer;
- wxButton* stdDialogButtonSizerOK;
- wxButton* stdDialogButtonSizerCancel;
-
- // Virtual event handlers, overide them in your derived class
- 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 SetInitCmp( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnOKButtonClick( wxCommandEvent& event ){ event.Skip(); }
-
-
- 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( 864,640 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
- ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
-
-};
-
-#endif //__dialog_edit_component_in_schematic_fbp__
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Apr 16 2008)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __dialog_edit_component_in_schematic_fbp__
+#define __dialog_edit_component_in_schematic_fbp__
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
+{
+ private:
+
+ protected:
+ wxChoice* unitChoice;
+ wxRadioBox* orientationRadioBox;
+ wxRadioBox* mirrorRadioBox;
+ wxTextCtrl* chipnameTextCtrl;
+ wxCheckBox* convertCheckBox;
+ wxStaticText* partsAreLockedLabel;
+ wxButton* defaultsButton;
+ wxListCtrl* fieldListCtrl;
+ wxButton* addFieldButton;
+ wxButton* deleteFieldButton;
+ wxButton* moveUpButton;
+ 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 SetInitCmp( wxCommandEvent& 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_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();
+
+};
+
+#endif //__dialog_edit_component_in_schematic_fbp__
diff --git a/include/common.h b/include/common.h
index d349db789e..2339cc2a1b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -30,7 +30,7 @@ class WinEDA_DrawPanel;
*/
// default name for nameless projects
-#define NAMELESS_PROJECT wxT("noname")
+#define NAMELESS_PROJECT wxT( "noname" )
#define NB_ITEMS 11
@@ -49,21 +49,24 @@ enum pseudokeys {
/* TODO Executable names TODO*/
#ifdef __WINDOWS__
-# define CVPCB_EXE wxT( "cvpcb.exe" )
-# define PCBNEW_EXE wxT( "pcbnew.exe" )
-# define EESCHEMA_EXE wxT( "eeschema.exe" )
-# define GERBVIEW_EXE wxT( "gerbview.exe" )
+#define CVPCB_EXE wxT( "cvpcb.exe" )
+#define PCBNEW_EXE wxT( "pcbnew.exe" )
+#define EESCHEMA_EXE wxT( "eeschema.exe" )
+#define GERBVIEW_EXE wxT( "gerbview.exe" )
+#define BITMAPCONVERTER_EXE wxT( "bitmap2component.exe" )
#else
-# ifndef __WXMAC__
-# define CVPCB_EXE wxT( "cvpcb" )
-# define PCBNEW_EXE wxT( "pcbnew" )
-# define EESCHEMA_EXE wxT( "eeschema" )
-# define GERBVIEW_EXE wxT( "gerbview" )
+#ifndef __WXMAC__
+#define CVPCB_EXE wxT( "cvpcb" )
+#define PCBNEW_EXE wxT( "pcbnew" )
+#define EESCHEMA_EXE wxT( "eeschema" )
+#define GERBVIEW_EXE wxT( "gerbview" )
+#define BITMAPCONVERTER_EXE wxT( "bitmap2component" )
#else
-# define CVPCB_EXE wxT( "cvpcb.app/Contents/MacOS/cvpcb" )
-# define PCBNEW_EXE wxT( "pcbnew.app/Contents/MacOS/pcbnew" )
-# define EESCHEMA_EXE wxT( "eeschema.app/Contents/MacOS/eeschema" )
-# define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" )
+#define CVPCB_EXE wxT( "cvpcb.app/Contents/MacOS/cvpcb" )
+#define PCBNEW_EXE wxT( "pcbnew.app/Contents/MacOS/pcbnew" )
+#define EESCHEMA_EXE wxT( "eeschema.app/Contents/MacOS/eeschema" )
+#define GERBVIEW_EXE wxT( "gerbview.app/Contents/MacOS/gerbview" )
+#define BITMAPCONVERTER_EXE wxT( "bitmap2component.app/Contents/MacOS/bitmap2component" )
# endif
#endif
@@ -280,11 +283,11 @@ void InitKiCadAbout( wxAboutDialogInfo& info );
* If "by posting on this line
* Color = color display
*/
-void Affiche_1_Parametre( WinEDA_DrawFrame* frame,
- int pos_X,
- const wxString& texte_H,
- const wxString& texte_L,
- int color );
+void Affiche_1_Parametre( WinEDA_DrawFrame* frame,
+ int pos_X,
+ const wxString& texte_H,
+ const wxString& texte_L,
+ int color );
int GetTimeStamp();
@@ -309,8 +312,8 @@ const wxString& valeur_param( int valeur, wxString& buf_texte );
* the format string must contain the %s format specifier.
* @return The formatted units symbol.
*/
-wxString ReturnUnitSymbol( int aUnits = g_UnitMetric,
- const wxString& aFormatString = _( " (%s):" ) );
+wxString ReturnUnitSymbol( int aUnits = g_UnitMetric,
+ const wxString& aFormatString = _( " (%s):" ) );
/**
* Get a human readable units string.
diff --git a/kicad/commandframe.cpp b/kicad/commandframe.cpp
index b65ed6b81a..06b860bc50 100644
--- a/kicad/commandframe.cpp
+++ b/kicad/commandframe.cpp
@@ -9,16 +9,20 @@
#include "kicad.h"
+#include "../bitmap2component/bitmap2component_16x16.xpm"
+
RIGHT_KM_FRAME::RIGHT_KM_FRAME( WinEDA_MainFrame* parent ) :
wxSashLayoutWindow( parent, wxID_ANY )
{
+ #define BUTTON_HEIGHT 32
m_Parent = parent;
m_DialogWin = NULL;
m_ButtPanel = new wxPanel( this, wxID_ANY );
m_ButtonSeparation = 10; // control of command buttons position
- m_ButtonLastPosition.x = 20; // control of command buttons position
- m_ButtonLastPosition.y = 20; // control of command buttons position
- m_ButtonsPanelHeight = (m_ButtonLastPosition.y * 2) + 32;
+ m_ButtonsListPosition.x = 20;
+ m_ButtonsListPosition.y = 20 + BUTTON_HEIGHT;
+ m_ButtonLastPosition = m_ButtonsListPosition;
+ m_ButtonsPanelHeight = m_ButtonsListPosition.y + 20;
CreateCommandToolbar();
m_DialogWin = new wxTextCtrl( this, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
@@ -84,6 +88,11 @@ void RIGHT_KM_FRAME::CreateCommandToolbar( void )
btn->SetToolTip( _( "GerbView (Gerber viewer)" ) );
AddFastLaunch( btn );
+ btn = new wxBitmapButton( parent, ID_TO_BITMAP_CONVERTER,
+ wxBitmap( bitmap2component_16x16_xpm ) );
+ btn->SetToolTip( _( "Bitmap2Component (Bitmap converter to create logos)" ) );
+ AddFastLaunch( btn );
+
}
@@ -96,6 +105,8 @@ void RIGHT_KM_FRAME::AddFastLaunch( wxBitmapButton* button )
* @param button = wxBitmapButton to add to the window
*/
{
- button->Move( m_ButtonLastPosition );
+ wxPoint buttPos = m_ButtonLastPosition;
+ buttPos.y -= button->GetSize().GetHeight();
+ button->Move( buttPos );
m_ButtonLastPosition.x += button->GetSize().GetWidth() + m_ButtonSeparation;
}
diff --git a/kicad/kicad.h b/kicad/kicad.h
index 4c3680044a..ebf5de7337 100644
--- a/kicad/kicad.h
+++ b/kicad/kicad.h
@@ -43,6 +43,7 @@ enum id_kicad_frm {
ID_TO_EDITOR,
ID_TO_EESCHEMA,
ID_TO_GERBVIEW,
+ ID_TO_BITMAP_CONVERTER,
ID_BROWSE_AN_SELECT_FILE,
ID_SELECT_PREFERED_EDITOR,
ID_SELECT_PREFERED_PDF_BROWSER_NAME,
@@ -60,11 +61,11 @@ class WinEDA_MainFrame : public WinEDA_BasicFrame
{
public:
TREE_PROJECT_FRAME* m_LeftWin;
- RIGHT_KM_FRAME* m_RightWin;
- WinEDA_Toolbar* m_VToolBar; // Vertical toolbar (not used)
- wxString m_BoardFileName;
- wxString m_SchematicRootFileName;
- wxFileName m_ProjectFileName;
+ RIGHT_KM_FRAME* m_RightWin;
+ WinEDA_Toolbar* m_VToolBar; // Vertical toolbar (not used)
+ wxString m_BoardFileName;
+ wxString m_SchematicRootFileName;
+ wxFileName m_ProjectFileName;
private:
int m_LeftWin_Width;
@@ -79,42 +80,43 @@ public:
/** Function CreateCommandToolbar
* Create the main buttons (fast launch buttons)
*/
- void OnCloseWindow( wxCloseEvent& Event );
- void OnSize( wxSizeEvent& event );
- void OnSashDrag( wxSashEvent& event );
- void OnLoadProject( wxCommandEvent& event );
- void OnSaveProject( wxCommandEvent& event );
- void OnArchiveFiles( wxCommandEvent& event );
- void OnUnarchiveFiles( wxCommandEvent& event );
- void OnRunPcbNew( wxCommandEvent& event );
- void OnRunCvpcb( wxCommandEvent& event );
- void OnRunEeschema( wxCommandEvent& event );
- void OnRunGerbview( wxCommandEvent& event );
+ void OnCloseWindow( wxCloseEvent& Event );
+ void OnSize( wxSizeEvent& event );
+ void OnSashDrag( wxSashEvent& event );
+ void OnLoadProject( wxCommandEvent& event );
+ void OnSaveProject( wxCommandEvent& event );
+ void OnArchiveFiles( wxCommandEvent& event );
+ void OnUnarchiveFiles( wxCommandEvent& event );
+ void OnRunPcbNew( wxCommandEvent& event );
+ void OnRunCvpcb( wxCommandEvent& event );
+ void OnRunEeschema( wxCommandEvent& event );
+ void OnRunGerbview( wxCommandEvent& event );
+ void OnRunBitmapConverter( wxCommandEvent& event );
- void OnOpenTextEditor( wxCommandEvent& event );
- void OnOpenFileInTextEditor( wxCommandEvent& event );
- void OnOpenFileInEditor( wxCommandEvent& event );
+ void OnOpenTextEditor( wxCommandEvent& event );
+ void OnOpenFileInTextEditor( wxCommandEvent& event );
+ void OnOpenFileInEditor( wxCommandEvent& event );
- void OnFileHistory( wxCommandEvent& event );
- void OnExit( wxCommandEvent& event );
- void Process_Preferences( wxCommandEvent& event );
- void ReCreateMenuBar();
- void RecreateBaseHToolbar();
- void PrintMsg( const wxString& text );
- void ClearMsg();
- void SetLanguage( wxCommandEvent& event );
- void OnRefresh( wxCommandEvent& event );
- void OnSelectDefaultPdfBrowser( wxCommandEvent& event );
- void OnSelectPreferredPdfBrowser( wxCommandEvent& event );
- void OnSelectPreferredEditor( wxCommandEvent& event );
+ void OnFileHistory( wxCommandEvent& event );
+ void OnExit( wxCommandEvent& event );
+ void Process_Preferences( wxCommandEvent& event );
+ void ReCreateMenuBar();
+ void RecreateBaseHToolbar();
+ void PrintMsg( const wxString& text );
+ void ClearMsg();
+ void SetLanguage( wxCommandEvent& event );
+ void OnRefresh( wxCommandEvent& event );
+ void OnSelectDefaultPdfBrowser( wxCommandEvent& event );
+ void OnSelectPreferredPdfBrowser( wxCommandEvent& event );
+ void OnSelectPreferredEditor( wxCommandEvent& event );
- void OnUpdateDefaultPdfBrowser( wxUpdateUIEvent& event );
- void OnUpdatePreferredPdfBrowser( wxUpdateUIEvent& event );
+ void OnUpdateDefaultPdfBrowser( wxUpdateUIEvent& event );
+ void OnUpdatePreferredPdfBrowser( wxUpdateUIEvent& event );
- void CreateNewProject( const wxString PrjFullFileName );
+ void CreateNewProject( const wxString PrjFullFileName );
- void LoadSettings();
- void SaveSettings();
+ void LoadSettings();
+ void SaveSettings();
DECLARE_EVENT_TABLE()
};
@@ -139,13 +141,16 @@ enum TreeFileType {
class RIGHT_KM_FRAME : public wxSashLayoutWindow
{
public:
- wxTextCtrl* m_DialogWin;
+ wxTextCtrl* m_DialogWin;
private:
WinEDA_MainFrame* m_Parent;
int m_ButtonsPanelHeight;
wxPanel* m_ButtPanel;
- wxPoint m_ButtonLastPosition; /* position of the last button in the window */
- int m_ButtonSeparation; /* button distance in pixels */
+ int m_ButtonSeparation; // button distance in pixels
+ wxPoint m_ButtonsListPosition; /* position of the left bottom corner
+ * of the first bitmap button
+ */
+ wxPoint m_ButtonLastPosition; // position of the last button in the window
public:
RIGHT_KM_FRAME( WinEDA_MainFrame* parent );
diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp
index 0793dd3209..8e0d216f5a 100644
--- a/kicad/mainframe.cpp
+++ b/kicad/mainframe.cpp
@@ -171,6 +171,11 @@ void WinEDA_MainFrame::OnExit( wxCommandEvent& event )
Close( true );
}
+void WinEDA_MainFrame::OnRunBitmapConverter( wxCommandEvent& event )
+{
+ ExecuteFile( this, BITMAPCONVERTER_EXE, wxEmptyString );
+}
+
void WinEDA_MainFrame::OnRunPcbNew( wxCommandEvent& event )
{
diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp
index c0bea3cf57..9a7ed4448a 100644
--- a/kicad/menubar.cpp
+++ b/kicad/menubar.cpp
@@ -55,6 +55,7 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
EVT_BUTTON( ID_TO_CVPCB, WinEDA_MainFrame::OnRunCvpcb )
EVT_BUTTON( ID_TO_EESCHEMA, WinEDA_MainFrame::OnRunEeschema )
EVT_BUTTON( ID_TO_GERBVIEW, WinEDA_MainFrame::OnRunGerbview )
+ EVT_BUTTON( ID_TO_BITMAP_CONVERTER, WinEDA_MainFrame::OnRunBitmapConverter )
EVT_UPDATE_UI( ID_SELECT_DEFAULT_PDF_BROWSER,
WinEDA_MainFrame::OnUpdateDefaultPdfBrowser )
diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp
index 509289409a..d2e58be86b 100644
--- a/pcbnew/class_edge_mod.cpp
+++ b/pcbnew/class_edge_mod.cpp
@@ -94,21 +94,20 @@ EDA_Rect EDGE_MODULE::GetBoundingBox()
// We must compute true coordinates from m_PolyPoints
// which are relative to module position, orientation 0
- std::vector points = m_PolyPoints;
- wxPoint p_end = m_Start;
-
+ wxPoint p_end;
MODULE* Module = (MODULE*) m_Parent;
- for( unsigned ii = 0; ii < points.size(); ii++ )
+ for( unsigned ii = 0; ii < m_PolyPoints.size(); ii++ )
{
- wxPoint& pt = points[ii];
+ wxPoint pt = m_PolyPoints[ii];
if( Module )
{
- RotatePoint( &pt.x, &pt.y, Module->m_Orient );
+ RotatePoint( &pt, Module->m_Orient );
pt += Module->m_Pos;
}
- pt += m_Start0;
+ if( ii == 0 )
+ p_end = pt;
bbox.m_Pos.x = MIN( bbox.m_Pos.x, pt.x );
bbox.m_Pos.y = MIN( bbox.m_Pos.y, pt.y );
p_end.x = MAX( p_end.x, pt.x );
@@ -121,6 +120,7 @@ EDA_Rect EDGE_MODULE::GetBoundingBox()
}
}
+ bbox.Inflate( (m_Width+1) / 2 );
return bbox;
}
@@ -269,8 +269,7 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
wxPoint& pt = points[ii];
RotatePoint( &pt.x, &pt.y, module->m_Orient );
- pt += module->m_Pos;
- pt += m_Start0 - offset;
+ pt += module->m_Pos - offset;
}
GRPoly( &panel->m_ClipBox, DC, points.size(), &points[0],
diff --git a/pcbnew/class_edge_mod.h b/pcbnew/class_edge_mod.h
index d937dae84a..b5bb8cd7ee 100644
--- a/pcbnew/class_edge_mod.h
+++ b/pcbnew/class_edge_mod.h
@@ -9,17 +9,19 @@ class EDGE_MODULE : public BOARD_ITEM
{
public:
int m_Width; // 0 = line, > 0 = tracks, bus ...
- wxPoint m_Start; // Line start point
- wxPoint m_End; // Line end point
+ wxPoint m_Start; // Line start point / circle and arc center
+ wxPoint m_End; // Line end point / circle and arc starting point
int m_Shape; // enum Track_Shapes
- wxPoint m_Start0; // Start point.
- wxPoint m_End0; // End point.
+ wxPoint m_Start0; // Start point or centre, relative to module origin, orient 0.
+ wxPoint m_End0; // End point, relative to module origin, orient 0.
int m_Angle; // Arcs: angle in 0.1 degrees
- std::vector m_PolyPoints; // For polygons: number of points (> 2)
- // Coord are relative to Origin, orient 0
+ std::vector m_PolyPoints; /* For polygons: number of points (> 2)
+ * Coord are relative to Origin, orient 0
+ * m_Start0 and m_End0 are not used for polygons
+ */
public:
EDGE_MODULE( MODULE* parent );
@@ -40,7 +42,8 @@ public:
return m_Start;
}
- void Copy( EDGE_MODULE* source ); // copy structure
+
+ void Copy( EDGE_MODULE* source ); // copy structure
/**
* Function Save
@@ -48,17 +51,17 @@ public:
* @param aFile The FILE to write to.
* @return bool - true if success writing else false.
*/
- bool Save( FILE* aFile ) const;
+ bool Save( FILE* aFile ) const;
- int ReadDescr( char* Line, FILE* File, int* LineNum = NULL );
+ int ReadDescr( char* Line, FILE* File, int* LineNum = NULL );
- void SetDrawCoord();
+ void SetDrawCoord();
/* drawing functions */
- void Draw( WinEDA_DrawPanel* panel, wxDC* DC,
- int aDrawMode, const wxPoint& offset = ZeroOffset );
+ void Draw( WinEDA_DrawPanel* panel, wxDC* DC,
+ int aDrawMode, const wxPoint& offset = ZeroOffset );
- void Draw3D( Pcb3D_GLCanvas* glcanvas );
+ void Draw3D( Pcb3D_GLCanvas* glcanvas );
/**
* Function DisplayInfo
@@ -67,7 +70,7 @@ public:
* Is virtual from EDA_BaseStruct.
* @param frame A WinEDA_DrawFrame in which to print status information.
*/
- void DisplayInfo( WinEDA_DrawFrame* frame );
+ void DisplayInfo( WinEDA_DrawFrame* frame );
/**
@@ -85,7 +88,7 @@ public:
* @param refPos A wxPoint to test
* @return bool - true if a hit, else false
*/
- bool HitTest( const wxPoint& refPos );
+ bool HitTest( const wxPoint& refPos );
/**
* Function GetClass
@@ -95,9 +98,11 @@ public:
virtual wxString GetClass() const
{
return wxT( "MGRAPHIC" );
+
// return wxT( "EDGE" ); ?
}
+
/** Function TransformShapeWithClearanceToPolygon
* Convert the track shape to a closed polygon
* Used in filling zones calculations
@@ -109,7 +114,7 @@ public:
* clearance when the circle is approxiamted by segment bigger or equal
* to the real clearance value (usually near from 1.0)
*/
- void TransformShapeWithClearanceToPolygon(
+ void TransformShapeWithClearanceToPolygon(
std::vector & aCornerBuffer,
int aClearanceValue,
int
@@ -117,6 +122,7 @@ public:
double aCorrectionFactor );
#if defined(DEBUG)
+
/**
* Function Show
* is used to output the object tree, currently for debugging only.
diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp
index e56391a1c7..133004a27e 100644
--- a/pcbnew/class_module.cpp
+++ b/pcbnew/class_module.cpp
@@ -36,7 +36,7 @@ MODULE::MODULE( BOARD* parent ) :
m_ModuleStatus = 0;
flag = 0;
m_CntRot90 = m_CntRot180 = 0;
- m_Surface = 0;
+ m_Surface = 0.0;
m_Link = 0;
m_LastEdit_Time = time( NULL );
m_LocalClearance = 0;
@@ -634,13 +634,11 @@ void MODULE::Set_Rectangle_Encadrement()
int width;
int cx, cy, uxf, uyf, rayon;
int xmax, ymax;
-
+ int xmin, ymin;
/* Initial coordinates of the module has a nonzero limit value. */
- m_BoundaryBox.m_Pos.x = -500;
- m_BoundaryBox.m_Pos.y = -500;
- xmax = 500;
- ymax = 500;
+ xmin = ymin = -250;
+ xmax = ymax = 250;
for( EDGE_MODULE* pt_edge_mod = (EDGE_MODULE*) m_Drawings.GetFirst();
pt_edge_mod; pt_edge_mod = pt_edge_mod->Next() )
@@ -655,50 +653,59 @@ void MODULE::Set_Rectangle_Encadrement()
case S_ARC:
case S_CIRCLE:
{
- cx = pt_edge_mod->m_Start0.x; cy = pt_edge_mod->m_Start0.y; // center
+ cx = pt_edge_mod->m_Start0.x;
+ cy = pt_edge_mod->m_Start0.y; // center
uxf = pt_edge_mod->m_End0.x; uyf = pt_edge_mod->m_End0.y;
rayon = (int) hypot( (double) (cx - uxf), (double) (cy - uyf) );
rayon += width;
- m_BoundaryBox.m_Pos.x = MIN( m_BoundaryBox.m_Pos.x, cx - rayon );
- m_BoundaryBox.m_Pos.y = MIN( m_BoundaryBox.m_Pos.y, cy - rayon );
+ xmin = MIN( xmin, cx - rayon );
+ ymin = MIN( ymin, cy - rayon );
xmax = MAX( xmax, cx + rayon );
ymax = MAX( ymax, cy + rayon );
break;
}
- default:
- m_BoundaryBox.m_Pos.x = MIN( m_BoundaryBox.m_Pos.x,
- pt_edge_mod->m_Start0.x - width );
- m_BoundaryBox.m_Pos.x = MIN( m_BoundaryBox.m_Pos.x,
- pt_edge_mod->m_End0.x - width );
- m_BoundaryBox.m_Pos.y = MIN( m_BoundaryBox.m_Pos.y,
- pt_edge_mod->m_Start0.y - width );
- m_BoundaryBox.m_Pos.y = MIN( m_BoundaryBox.m_Pos.y,
- pt_edge_mod->m_End0.y - width );
+ case S_SEGMENT:
+ xmin = MIN( xmin, pt_edge_mod->m_Start0.x - width );
+ xmin = MIN( xmin, pt_edge_mod->m_End0.x - width );
+ ymin = MIN( ymin, pt_edge_mod->m_Start0.y - width );
+ ymin = MIN( ymin, pt_edge_mod->m_End0.y - width );
xmax = MAX( xmax, pt_edge_mod->m_Start0.x + width );
xmax = MAX( xmax, pt_edge_mod->m_End0.x + width );
ymax = MAX( ymax, pt_edge_mod->m_Start0.y + width );
ymax = MAX( ymax, pt_edge_mod->m_End0.y + width );
break;
+
+ case S_POLYGON:
+ for( unsigned ii = 0; ii < pt_edge_mod->m_PolyPoints.size(); ii++ )
+ {
+ wxPoint pt = pt_edge_mod->m_PolyPoints[ii];
+ xmin = MIN( xmin, (pt.x - width) );
+ ymin = MIN( ymin, (pt.y - width) );
+ xmax = MAX( xmax, (pt.x + width) );
+ ymax = MAX( ymax, (pt.y + width) );
+ }
+ break;
}
}
- /* Pads: find the min and max coordinates and update the bounding
- * rectangle.
+ /* Pads: find the min and max coordinates and update the bounding box.
*/
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
rayon = pad->m_Rayon;
cx = pad->m_Pos0.x;
cy = pad->m_Pos0.y;
- m_BoundaryBox.m_Pos.x = MIN( m_BoundaryBox.m_Pos.x, cx - rayon );
- m_BoundaryBox.m_Pos.y = MIN( m_BoundaryBox.m_Pos.y, cy - rayon );
+ xmin = MIN( xmin, cx - rayon );
+ ymin = MIN( ymin, cy - rayon );
xmax = MAX( xmax, cx + rayon );
ymax = MAX( ymax, cy + rayon );
}
- m_BoundaryBox.SetWidth( xmax - m_BoundaryBox.m_Pos.x );
- m_BoundaryBox.SetHeight( ymax - m_BoundaryBox.m_Pos.y );
+ m_BoundaryBox.m_Pos.x = xmin;
+ m_BoundaryBox.m_Pos.y = ymin;
+ m_BoundaryBox.SetWidth( xmax - xmin );
+ m_BoundaryBox.SetHeight( ymax - ymin );
}
@@ -709,75 +716,28 @@ void MODULE::Set_Rectangle_Encadrement()
*/
void MODULE::SetRectangleExinscrit()
{
- int width;
- int cx, cy, uxf, uyf, rayon;
- int xmax, ymax;
-
- m_RealBoundaryBox.m_Pos.x = xmax = m_Pos.x;
- m_RealBoundaryBox.m_Pos.y = ymax = m_Pos.y;
+ m_RealBoundaryBox.m_Pos = m_Pos;
+ m_RealBoundaryBox.SetEnd( m_Pos );
+ m_RealBoundaryBox.Inflate( 500 ); // Give a min size
for( EDGE_MODULE* edge = (EDGE_MODULE*) m_Drawings.GetFirst();
edge; edge = edge->Next() )
{
- if( edge->Type() != TYPE_EDGE_MODULE )
+ if( edge->Type() != TYPE_EDGE_MODULE ) // Shoud not occur
continue;
- width = edge->m_Width / 2;
-
- switch( edge->m_Shape )
- {
- case S_ARC:
- case S_CIRCLE:
- {
- cx = edge->m_Start.x;
- cy = edge->m_Start.y; // center
- uxf = edge->m_End.x;
- uyf = edge->m_End.y;
- rayon = (int) hypot( (double) (cx - uxf), (double) (cy - uyf) );
- rayon += width;
- m_RealBoundaryBox.m_Pos.x = MIN( m_RealBoundaryBox.m_Pos.x,
- cx - rayon );
- m_RealBoundaryBox.m_Pos.y = MIN( m_RealBoundaryBox.m_Pos.y,
- cy - rayon );
- xmax = MAX( xmax, cx + rayon );
- ymax = MAX( ymax, cy + rayon );
- break;
- }
-
- default:
- m_RealBoundaryBox.m_Pos.x = MIN( m_RealBoundaryBox.m_Pos.x,
- edge->m_Start.x - width );
- m_RealBoundaryBox.m_Pos.x = MIN( m_RealBoundaryBox.m_Pos.x,
- edge->m_End.x - width );
- m_RealBoundaryBox.m_Pos.y = MIN( m_RealBoundaryBox.m_Pos.y,
- edge->m_Start.y - width );
- m_RealBoundaryBox.m_Pos.y = MIN( m_RealBoundaryBox.m_Pos.y,
- edge->m_End.y - width );
- xmax = MAX( xmax, edge->m_Start.x + width );
- xmax = MAX( xmax, edge->m_End.x + width );
- ymax = MAX( ymax, edge->m_Start.y + width );
- ymax = MAX( ymax, edge->m_End.y + width );
- break;
- }
+ EDA_Rect rect = edge->GetBoundingBox();
+ m_RealBoundaryBox.Merge(rect);
}
+
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
- rayon = pad->m_Rayon;
-
- cx = pad->m_Pos.x;
- cy = pad->m_Pos.y;
-
- m_RealBoundaryBox.m_Pos.x = MIN( m_RealBoundaryBox.m_Pos.x, cx - rayon );
- m_RealBoundaryBox.m_Pos.y = MIN( m_RealBoundaryBox.m_Pos.y, cy - rayon );
-
- xmax = MAX( xmax, cx + rayon );
- ymax = MAX( ymax, cy + rayon );
+ EDA_Rect rect = pad->GetBoundingBox();
+ m_RealBoundaryBox.Merge(rect);
}
- m_RealBoundaryBox.SetWidth( xmax - m_RealBoundaryBox.m_Pos.x );
- m_RealBoundaryBox.SetHeight( ymax - m_RealBoundaryBox.m_Pos.y );
- m_Surface = ABS( (float) m_RealBoundaryBox.GetWidth()
+ m_Surface = ABS( (double) m_RealBoundaryBox.GetWidth()
* m_RealBoundaryBox.GetHeight() );
}
@@ -801,7 +761,7 @@ EDA_Rect MODULE::GetBoundingBox()
text_area = m_Value->GetBoundingBox();
area.Merge( text_area );
- for( EDGE_MODULE* edge = (EDGE_MODULE*) m_Drawings.GetFirst(); edge;
+ for( EDGE_MODULE* edge = (EDGE_MODULE*) m_Drawings.GetFirst(); edge;
edge = edge->Next() )
{
if( edge->Type() != TYPE_TEXTE_MODULE )
diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h
index 92e28fbc27..ba86b7a24f 100644
--- a/pcbnew/class_module.h
+++ b/pcbnew/class_module.h
@@ -67,7 +67,7 @@ public:
* (UP <->Down) */
wxSize m_Ext; /* Automatic placement margin around
* the module */
- float m_Surface; // Bounding box area
+ double m_Surface; // Bounding box area
unsigned long m_Link; /* Temporary variable ( used in
* editions, ...) */
diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp
index cbd4bf4f51..ce7719f1a3 100644
--- a/pcbnew/edit.cpp
+++ b/pcbnew/edit.cpp
@@ -341,11 +341,13 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_PCB_SWITCH_TRACK_POSTURE:
- /* XXX POSTURE XXX */
- ShowNewTrackWhenMovingCursor( DrawPanel, &dc, true );
- g_Alternate_Track_Posture = !g_Alternate_Track_Posture;
- ShowNewTrackWhenMovingCursor( DrawPanel, &dc, false );
- break;
+ /* change the position of initial segment when creating new tracks
+ * switch from _/ to -\ .
+ */
+ ShowNewTrackWhenMovingCursor( DrawPanel, &dc, false );
+ g_Alternate_Track_Posture = !g_Alternate_Track_Posture;
+ ShowNewTrackWhenMovingCursor( DrawPanel, &dc, false );
+ break;
case ID_POPUP_PCB_PLACE_MICROVIA:
if( !IsMicroViaAcceptable() )
diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp
index 8d7dbe3340..9e4da79a44 100644
--- a/pcbnew/hotkeys.cpp
+++ b/pcbnew/hotkeys.cpp
@@ -499,7 +499,10 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
DrawPanel->Refresh();
break;
- case HK_SWITCH_TRACK_POSTURE: // change the position of initial segment when creating new tracks
+ case HK_SWITCH_TRACK_POSTURE:
+ /* change the position of initial segment when creating new tracks
+ * switch from _/ to -\ .
+ */
ShowNewTrackWhenMovingCursor( DrawPanel, DC, false );
g_Alternate_Track_Posture = !g_Alternate_Track_Posture;
ShowNewTrackWhenMovingCursor( DrawPanel, DC, false );