Commit a67a4f7e authored by CHARRAS's avatar CHARRAS

listboxes.cpp problem: apply to window version only. Some other very minor...

listboxes.cpp problem: apply to window version only. Some other very minor enhancements and bug fixes
parent 58c51a6f
......@@ -4,6 +4,17 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Oct-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+cvpcb: listboxes.cpp problem solved: exists only under windows
now apply to windows only, because this Workaround creates a problem undex linux
+others:
some very minor problems solved
+eeschema:
in B.O.M.: the footprint field can be added to the field list
2007-Oct-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+cvpcb: listboxes.cpp problem solved: Workaround for a curious bug in wxWidgets:
......
......@@ -406,6 +406,7 @@ void FootprintListBox::SetActiveFootprintList( bool FullList, bool Redraw )
{
bool old_selection = m_UseFootprintFullList;
#ifdef __WINDOWS__
/* Workaround for a curious bug in wxWidgets:
* if we switch from a long list of footprints to a short list (a filtered footprint list),
* and if the selected item is near the end of the long list,
......@@ -419,7 +420,7 @@ void FootprintListBox::SetActiveFootprintList( bool FullList, bool Redraw )
if( new_selection != old_selection )
SetSelection( 0, TRUE );
}
#endif
if( FullList )
{
m_UseFootprintFullList = TRUE;
......
......@@ -76,6 +76,7 @@ static bool s_ListBySheet;
static bool s_BrowsList;
static int s_OutputFormOpt;
static int s_OutputSeparatorOpt;
static bool s_Add_FpField_state;
static bool s_Add_F1_state;
static bool s_Add_F2_state;
static bool s_Add_F3_state;
......@@ -85,6 +86,7 @@ static bool s_Add_F6_state;
static bool s_Add_F7_state;
static bool s_Add_F8_state;
static bool * s_AddFieldList[] = {
& s_Add_FpField_state,
& s_Add_F1_state,
& s_Add_F2_state,
& s_Add_F3_state,
......@@ -194,6 +196,7 @@ bool WinEDA_Build_BOM_Frame::Create( wxWindow* parent, wxWindowID id, const wxSt
m_OutputSeparatorCtrl = NULL;
m_GetListBrowser = NULL;
m_FieldsToAppendListSizer = NULL;
m_AddFootprintField = NULL;
m_AddField1 = NULL;
m_AddField2 = NULL;
m_AddField3 = NULL;
......@@ -209,7 +212,7 @@ bool WinEDA_Build_BOM_Frame::Create( wxWindow* parent, wxWindowID id, const wxSt
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
if( GetSizer() )
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
......@@ -227,7 +230,7 @@ void WinEDA_Build_BOM_Frame::CreateControls()
SetFont(*g_DialogFont);
////@begin WinEDA_Build_BOM_Frame content construction
// Generated by DialogBlocks, 13/10/2007 00:04:07 (unregistered)
// Generated by DialogBlocks, 30/10/2007 12:13:46 (unregistered)
WinEDA_Build_BOM_Frame* itemDialog1 = this;
......@@ -294,58 +297,62 @@ void WinEDA_Build_BOM_Frame::CreateControls()
m_FieldsToAppendListSizer = new wxStaticBoxSizer(itemStaticBoxSizer16Static, wxVERTICAL);
itemBoxSizer15->Add(m_FieldsToAppendListSizer, 0, wxALIGN_LEFT|wxALL, 5);
m_AddFootprintField = new wxCheckBox( itemDialog1, ID_CHECKBOX_FOOTPRINT_FIELD, _("Add Footprint Field"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddFootprintField->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddFootprintField, 0, wxGROW|wxALL, 5);
m_AddField1 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD1, _("Add Field 1"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField1->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField1, 0, wxGROW|wxALL, 5);
m_AddField2 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD2, _("Add Field 2"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField2->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField2, 0, wxGROW|wxALL, 5);
m_AddField3 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD3, _("Add Field 3"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField3->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField3, 0, wxGROW|wxALL, 5);
m_AddField4 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD4, _("Add Field 4"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField4->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField4, 0, wxGROW|wxALL, 5);
m_AddField5 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD5, _("Add Field 5"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField5->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField5, 0, wxGROW|wxALL, 5);
m_AddField6 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD6, _("Add Field 6"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField6->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField6, 0, wxGROW|wxALL, 5);
m_AddField7 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD7, _("Add Field 7"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField7->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField7, 0, wxGROW|wxALL, 5);
m_AddField8 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD8, _("Add Field 8"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AddField8->SetValue(false);
m_FieldsToAppendListSizer->Add(m_AddField8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_FieldsToAppendListSizer->Add(m_AddField8, 0, wxGROW|wxALL, 5);
itemBoxSizer15->Add(5, 5, 0, wxGROW|wxALL, 10);
wxButton* itemButton26 = new wxButton( itemDialog1, ID_CREATE_LIST, _("Create &List"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton26->SetDefault();
itemButton26->SetForegroundColour(wxColour(166, 0, 0));
itemBoxSizer15->Add(itemButton26, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton27 = new wxButton( itemDialog1, ID_CREATE_LIST, _("Create &List"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton27->SetDefault();
itemButton27->SetForegroundColour(wxColour(166, 0, 0));
itemBoxSizer15->Add(itemButton27, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxButton* itemButton28 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton28->SetForegroundColour(wxColour(255, 0, 0));
itemBoxSizer27->Add(itemButton28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton29 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton29->SetForegroundColour(wxColour(255, 0, 0));
itemBoxSizer28->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton29 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton29->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer27->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton30 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton30->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer28->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton30 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer27->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton31 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer28->Add(itemButton31, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
// Set validators
m_ListCmpbyRefItems->SetValidator( wxGenericValidator(& s_ListByRef) );
......@@ -356,6 +363,7 @@ void WinEDA_Build_BOM_Frame::CreateControls()
m_OutputFormCtrl->SetValidator( wxGenericValidator(& s_OutputFormOpt) );
m_OutputSeparatorCtrl->SetValidator( wxGenericValidator(& s_OutputSeparatorOpt) );
m_GetListBrowser->SetValidator( wxGenericValidator(& s_BrowsList) );
m_AddFootprintField->SetValidator( wxGenericValidator(& s_Add_FpField_state) );
m_AddField1->SetValidator( wxGenericValidator(& s_Add_F1_state) );
m_AddField2->SetValidator( wxGenericValidator(& s_Add_F2_state) );
m_AddField3->SetValidator( wxGenericValidator(& s_Add_F3_state) );
......
......@@ -47,6 +47,7 @@
#define ID_RADIOBOX_SELECT_FORMAT 10006
#define ID_RADIOBOX_SEPARATOR 10007
#define ID_CHECKBOX6 10008
#define ID_CHECKBOX_FOOTPRINT_FIELD 10018
#define ID_CHECKBOX_FIELD1 10009
#define ID_CHECKBOX_FIELD2 10010
#define ID_CHECKBOX_FIELD3 10011
......@@ -149,6 +150,7 @@ public:
wxRadioBox* m_OutputSeparatorCtrl;
wxCheckBox* m_GetListBrowser;
wxStaticBoxSizer* m_FieldsToAppendListSizer;
wxCheckBox* m_AddFootprintField;
wxCheckBox* m_AddField1;
wxCheckBox* m_AddField2;
wxCheckBox* m_AddField3;
......
......@@ -112,6 +112,7 @@
<bool name="archive_image_files">1</bool>
<bool name="archive_all_image_files">0</bool>
<bool name="xrc_retain_relative_paths">1</bool>
<bool name="xrc_generate_id_tags">0</bool>
</header>
<data>
<document>
......@@ -447,6 +448,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX1"</string>
<long name="proxy-Id value">10001</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -510,6 +512,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX2"</string>
<long name="proxy-Id value">10002</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -573,6 +576,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX3"</string>
<long name="proxy-Id value">10003</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -636,6 +640,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX4"</string>
<long name="proxy-Id value">10004</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -699,6 +704,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX5"</string>
<long name="proxy-Id value">10005</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -764,6 +770,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_RADIOBOX_SELECTED|OnRadioboxSelectFormatSelected|NONE||"</string>
<string name="proxy-Id name">"ID_RADIOBOX_SELECT_FORMAT"</string>
<long name="proxy-Id value">10006</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxRadioBox"</string>
<string name="proxy-Base class">"wxRadioBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -827,6 +834,7 @@
<string name="proxy-type">"wbRadioBoxProxy"</string>
<string name="proxy-Id name">"ID_RADIOBOX_SEPARATOR"</string>
<long name="proxy-Id value">10007</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxRadioBox"</string>
<string name="proxy-Base class">"wxRadioBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -924,6 +932,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX6"</string>
<long name="proxy-Id value">10008</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1035,6 +1044,70 @@
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<document>
<string name="title">"wxCheckBox: ID_CHECKBOX_FOOTPRINT_FIELD"</string>
<string name="type">"dialog-control-document"</string>
<string name="filename">""</string>
<string name="icon-name">"checkbox"</string>
<long name="is-transient">0</long>
<long name="owns-file">1</long>
<long name="title-mode">0</long>
<long name="locked">0</long>
<string name="created">"30/10/2007"</string>
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FOOTPRINT_FIELD"</string>
<long name="proxy-Id value">10018</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
<bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">"m_AddFootprintField"</string>
<string name="proxy-Label">"Add Footprint Field"</string>
<bool name="proxy-Initial value">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">"s_Add_FpField_state"</string>
<string name="proxy-Data validator">"wxGenericValidator(&amp; %VARIABLE%)"</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<bool name="proxy-wxALIGN_RIGHT">0</bool>
<bool name="proxy-wxCHK_2STATE">1</bool>
<bool name="proxy-wxCHK_3STATE">0</bool>
<bool name="proxy-wxCHK_ALLOW_3RD_STATE_FOR_USER">0</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
<bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
<bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
<string name="proxy-Custom styles">""</string>
<long name="proxy-X">-1</long>
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
<bool name="proxy-wxLEFT">1</bool>
<bool name="proxy-wxRIGHT">1</bool>
<bool name="proxy-wxTOP">1</bool>
<bool name="proxy-wxBOTTOM">1</bool>
<bool name="proxy-wxSHAPED">0</bool>
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
</document>
<document>
<string name="title">"wxCheckBox: ID_CHECKBOX_FIELD1"</string>
<string name="type">"dialog-control-document"</string>
......@@ -1048,6 +1121,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD1"</string>
<long name="proxy-Id value">10009</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1084,7 +1158,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1111,6 +1185,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD2"</string>
<long name="proxy-Id value">10010</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1147,7 +1222,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1174,6 +1249,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD3"</string>
<long name="proxy-Id value">10011</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1210,7 +1286,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1237,6 +1313,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD4"</string>
<long name="proxy-Id value">10012</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1273,7 +1350,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1300,6 +1377,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD5"</string>
<long name="proxy-Id value">10013</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1336,7 +1414,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1363,6 +1441,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD6"</string>
<long name="proxy-Id value">10014</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1399,7 +1478,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1426,6 +1505,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD7"</string>
<long name="proxy-Id value">10015</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1462,7 +1542,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1489,6 +1569,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX_FIELD8"</string>
<long name="proxy-Id value">10016</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1525,7 +1606,7 @@
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1580,6 +1661,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnCreateListClick|NONE||"</string>
<string name="proxy-Id name">"ID_CREATE_LIST"</string>
<long name="proxy-Id value">10017</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1673,6 +1755,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||"</string>
<string name="proxy-Id name">"wxID_OK"</string>
<long name="proxy-Id value">5100</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1739,6 +1822,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||"</string>
<string name="proxy-Id name">"wxID_CANCEL"</string>
<long name="proxy-Id value">5101</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1805,6 +1889,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnApplyClick|NONE||"</string>
<string name="proxy-Id name">"wxID_APPLY"</string>
<long name="proxy-Id value">5102</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string>
<bool name="proxy-External implementation">1</bool>
......
......@@ -183,7 +183,7 @@ public:
void Clear_D_CODE_Data();
};
eda_global wxChar *g_GERBER_Tool_Type[6]
eda_global const wxChar *g_GERBER_Tool_Type[6]
#ifdef MAIN
= { wxT("????"), wxT("Rond"), wxT("Rect"), wxT("Line"), wxT("Oval"), wxT("Macro")
}
......
......@@ -51,7 +51,7 @@ class StructColors
{
public:
unsigned char m_Blue, m_Green, m_Red, m_Numcolor;
wxChar* m_Name;
const wxChar* m_Name;
int m_LightColor;
};
......
......@@ -652,9 +652,8 @@ public:
int Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone );
void Install_Test_DRC_Frame( wxDC* DC );
void Trace_Pcb( wxDC* DC, int mode );
void Trace_PcbEdges( wxDC* DC, int mode_color );
// Gestion des textes sur pcb
// Handling texts on the board
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
......@@ -663,17 +662,17 @@ public:
void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB,
wxDC* DC, const wxPoint& pos );
// Gestion des Segments type DRAWITEM
// Graphic Segments type DRAWSEGMENT
void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
// Gestion des modules (voir egalement WinEDA_BasePcbFrame)
// Footprint edition (see also WinEDA_BasePcbFrame)
void StartMove_Module( MODULE* module, wxDC* DC );
bool Delete_Module( MODULE* module, wxDC* DC );
// loading modules: see WinEDA_BasePcbFrame
// Gestion du PCB
// Borad handling
void Erase_Zones( wxDC* DC, bool query );
void Erase_Segments_Pcb( wxDC* DC, bool is_edges, bool query );
void Erase_Pistes( wxDC* DC, int masque_type, bool query );
......
......@@ -772,7 +772,7 @@ int D_PAD::WriteDescr( FILE* File )
{
int cshape, NbLigne = 0;;
char* texttype;
const char* texttype;
if( GetState( DELETED ) )
return NbLigne;
......
......@@ -1057,7 +1057,7 @@ void WinEDA_DrillFrame::GenDrillMap( int format )
break;
}
/* Trace du contour ( couche EDGE ) */
/* Draw items on edge layer */
PtStruct = m_Parent->m_Pcb->m_Drawings;
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
{
......@@ -1079,6 +1079,9 @@ void WinEDA_DrillFrame::GenDrillMap( int format )
PlotMirePcb( (MIREPCB*) PtStruct, format, EDGE_LAYER );
break;
case TYPEMARQUEUR: // do not draw
break;
default:
DisplayError( this, wxT( "WinEDA_DrillFrame::GenDrillMap() : Unexpected Draw Type" ) );
break;
......
......@@ -19,10 +19,11 @@
/* class WinEDA_ModuleEditFrame */
/********************************/
BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, wxFrame )
COMMON_EVENTS_DRAWFRAME EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START,
COMMON_EVENTS_DRAWFRAME
EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START,
ID_POPUP_PCB_ITEM_SELECTION_END,
WinEDA_BasePcbFrame::ProcessItemSelection )
COMMON_EVENTS_DRAWFRAME EVT_CLOSE( WinEDA_ModuleEditFrame::OnCloseWindow )
EVT_CLOSE( WinEDA_ModuleEditFrame::OnCloseWindow )
EVT_SIZE( WinEDA_ModuleEditFrame::OnSize )
EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, WinEDA_PcbFrame::OnSelectZoom )
......
......@@ -27,8 +27,7 @@
void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/**********************************************************************/
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
* pour l'ecran actif et ses sous ecran
/* Draw the footprint editor BOARD, and others elements : axis, grid ..
*/
{
......@@ -47,6 +46,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
DrawPanel->DrawBackGround( DC );
TraceWorkSheet( DC, screen, 0 );
/* Redraw the footprint */
Module = (MODULE*) m_Pcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Pnext )
{
......@@ -58,7 +58,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
if( DrawPanel->ManageCurseur )
DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
/* Reaffichage du curseur */
/* Redraw the cursor */
DrawPanel->Trace_Curseur( DC );
screen->ClrRefreshReq();
......@@ -69,8 +69,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/****************************************************************/
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
* pour l'ecran actif et ses sous ecran
/* Draw the BOARD, and others elements : axis, grid ..
*/
{
PCB_SCREEN* Screen = GetScreen();
......@@ -90,20 +89,17 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
TraceWorkSheet( DC, GetScreen(), 0 );
Affiche_Status_Box();
/* Reaffichage des curseurs */
for( Screen = GetScreen(); Screen != NULL; Screen = Screen->Next() )
{
if( DrawPanel->ManageCurseur )
DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
/* Redraw the cursor */
DrawPanel->Trace_Curseur( DC );
}
}
/****************************************************/
void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
/****************************************************/
/* Trace l'ensemble des elements du PCB sur l'ecran actif*/
/* Redraw the BOARD items but not cursors, axis or grid */
{
MARQUEUR* Marqueur;
MODULE* Module;
......@@ -140,7 +136,7 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
Trace_Pads_Only( DrawPanel, DC, Module, 0, 0, MaskLay, mode );
}
/* Trace des elements particuliers de Drawings Pcb */
/* Draw the graphic items */
PtStruct = m_Pcb->m_Drawings;
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
......@@ -167,6 +163,10 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
Marqueur->Draw( DrawPanel, DC, mode );
break;
case TYPEDRAWSEGMENT:
Trace_DrawSegmentPcb( DrawPanel, DC, (DRAWSEGMENT*) PtStruct, mode );
break;
default:
break;
}
......@@ -184,28 +184,8 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
Trace_DrawSegmentPcb( DrawPanel, DC, segment, mode );
}
Trace_PcbEdges( DC, mode );
DrawGeneralRatsnest( DC );
m_CurrentScreen->ClrRefreshReq();
}
/**************************************************************/
void WinEDA_PcbFrame::Trace_PcbEdges( wxDC* DC, int mode_color )
/**************************************************************/
/* impression des contours ( edge pcb) : et draw */
{
EDA_BaseStruct* PtStruct;
if( !m_Pcb )
return;
for( PtStruct = m_Pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Pnext )
{
if( PtStruct->m_Flags & IS_MOVED )
continue;
if( PtStruct->Type() != TYPEDRAWSEGMENT )
continue;
Trace_DrawSegmentPcb( DrawPanel, DC, (DRAWSEGMENT*) PtStruct, mode_color );
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment