diff --git a/pcbnew/dialog_track_options.cpp b/pcbnew/dialog_track_options.cpp index 584551a473..6a68430757 100644 --- a/pcbnew/dialog_track_options.cpp +++ b/pcbnew/dialog_track_options.cpp @@ -47,12 +47,12 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_PcbTracksDialog, wxDialog ) BEGIN_EVENT_TABLE( WinEDA_PcbTracksDialog, wxDialog ) ////@begin WinEDA_PcbTracksDialog event table entries - EVT_BUTTON( wxID_OK, WinEDA_PcbTracksDialog::OnOkClick ) + EVT_INIT_DIALOG( WinEDA_PcbTracksDialog::OnInitDialog ) + + EVT_BUTTON( wxID_OK, WinEDA_PcbTracksDialog::OnOkClick ) EVT_BUTTON( wxID_CANCEL, WinEDA_PcbTracksDialog::OnCancelClick ) - EVT_ACTIVATE( WinEDA_PcbTracksDialog::OnActivate ) - ////@end WinEDA_PcbTracksDialog event table entries END_EVENT_TABLE() @@ -71,21 +71,6 @@ WinEDA_PcbTracksDialog::WinEDA_PcbTracksDialog( WinEDA_PcbFrame* parent, wxWindo Create(parent, id, caption, pos, size, style); } -/** - * Function OnActivate - * gets control when the dialog becomes activated. - * After creation, not during creation. - */ -void WinEDA_PcbTracksDialog::OnActivate( wxActivateEvent& event ) -{ - m_OptViaSize->SetFocus(); - - // deselect the existing text, seems SetFocus() wants to emulate Microsoft, which is not desireable here. - m_OptViaSize->SetSelection(0,0); - - event.Skip(); -} - /*! * WinEDA_PcbTracksDialog creator @@ -110,12 +95,14 @@ bool WinEDA_PcbTracksDialog::Create( wxWindow* parent, wxWindowID id, const wxSt ////@end WinEDA_PcbTracksDialog member initialisation ////@begin WinEDA_PcbTracksDialog creation - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + SetExtraStyle(wxWS_EX_BLOCK_EVENTS); wxDialog::Create( parent, id, caption, pos, size, style ); CreateControls(); - GetSizer()->Fit(this); - GetSizer()->SetSizeHints(this); + if (GetSizer()) + { + GetSizer()->SetSizeHints(this); + } Centre(); ////@end WinEDA_PcbTracksDialog creation return true; @@ -130,7 +117,7 @@ void WinEDA_PcbTracksDialog::CreateControls() SetFont(*g_DialogFont); ////@begin WinEDA_PcbTracksDialog content construction - // Generated by DialogBlocks, 25/02/2006 08:02:26 (unregistered) + // Generated by DialogBlocks, Sun 25 Nov 2007 15:41:58 CST (unregistered) WinEDA_PcbTracksDialog* itemDialog1 = this; @@ -160,12 +147,12 @@ void WinEDA_PcbTracksDialog::CreateControls() itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - wxString m_OptViaTypeStrings[] = { - _("Blind Via"), - _("Buried Via"), - _("Standard Via") - }; - m_OptViaType = new wxRadioBox( itemDialog1, ID_VIA_TYPE_SELECTION, _("Via Type"), wxDefaultPosition, wxDefaultSize, 3, m_OptViaTypeStrings, 1, wxRA_SPECIFY_COLS ); + wxArrayString m_OptViaTypeStrings; + m_OptViaTypeStrings.Add(_("Blind Via")); + m_OptViaTypeStrings.Add(_("Buried Via")); + m_OptViaTypeStrings.Add(_("Standard Via")); + m_OptViaType = new wxRadioBox( itemDialog1, ID_VIA_TYPE_SELECTION, _("Via Type"), wxDefaultPosition, wxDefaultSize, m_OptViaTypeStrings, 1, wxRA_SPECIFY_COLS ); + m_OptViaType->SetSelection(0); itemBoxSizer3->Add(m_OptViaType, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); @@ -389,3 +376,18 @@ void WinEDA_PcbTracksDialog::OnCancelClick( wxCommandEvent& event ) } + +/*! + * wxEVT_INIT_DIALOG event handler for ID_DIALOG + */ + +void WinEDA_PcbTracksDialog::OnInitDialog( wxInitDialogEvent& event ) +{ + m_OptViaSize->SetFocus(); + + // deselect the existing text, seems SetFocus() wants to emulate Microsoft, which is not desireable here. + m_OptViaSize->SetSelection(0,0); + + event.Skip(); +} + diff --git a/pcbnew/dialog_track_options.h b/pcbnew/dialog_track_options.h index b245074e53..7a3dd0c8d4 100644 --- a/pcbnew/dialog_track_options.h +++ b/pcbnew/dialog_track_options.h @@ -38,11 +38,6 @@ ////@begin control identifiers #define ID_DIALOG 10000 -#define SYMBOL_WINEDA_PCBTRACKSDIALOG_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER -#define SYMBOL_WINEDA_PCBTRACKSDIALOG_TITLE _("Tracks and Vias Sizes") -#define SYMBOL_WINEDA_PCBTRACKSDIALOG_IDNAME ID_DIALOG -#define SYMBOL_WINEDA_PCBTRACKSDIALOG_SIZE wxSize(400, 300) -#define SYMBOL_WINEDA_PCBTRACKSDIALOG_POSITION wxDefaultPosition #define ID_TEXTCTRL 10001 #define ID_TEXTCTRL1 10002 #define ID_TEXTCTRL2 10003 @@ -50,6 +45,11 @@ #define ID_TEXTCTRL3 10005 #define ID_TEXTCTRL4 10006 #define ID_TEXTCTRL5 10007 +#define SYMBOL_WINEDA_PCBTRACKSDIALOG_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER +#define SYMBOL_WINEDA_PCBTRACKSDIALOG_TITLE _("Tracks and Vias Sizes") +#define SYMBOL_WINEDA_PCBTRACKSDIALOG_IDNAME ID_DIALOG +#define SYMBOL_WINEDA_PCBTRACKSDIALOG_SIZE wxSize(400, 300) +#define SYMBOL_WINEDA_PCBTRACKSDIALOG_POSITION wxDefaultPosition ////@end control identifiers /*! @@ -82,19 +82,15 @@ public: ////@begin WinEDA_PcbTracksDialog event handler declarations + /// wxEVT_INIT_DIALOG event handler for ID_DIALOG + void OnInitDialog( wxInitDialogEvent& event ); + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK void OnOkClick( wxCommandEvent& event ); /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL void OnCancelClick( wxCommandEvent& event ); - /** - * Function OnActivate - * gets control when the dialog becomes activated. - * After creation, not during creation. - */ - void OnActivate( wxActivateEvent& event ); - ////@end WinEDA_PcbTracksDialog event handler declarations ////@begin WinEDA_PcbTracksDialog member function declarations diff --git a/pcbnew/dialog_track_options.pjd b/pcbnew/dialog_track_options.pjd index c37c80752e..15a44c073f 100644 --- a/pcbnew/dialog_track_options.pjd +++ b/pcbnew/dialog_track_options.pjd @@ -1,4 +1,4 @@ - +
0 @@ -6,18 +6,20 @@ "" "" "" - 30 "" 0 0 0 + 1 1 1 + 1 0 "jean-pierre Charras" "License GNU" "" 0 + 0 "<All platforms>" "<Any>" "///////////////////////////////////////////////////////////////////////////// @@ -43,12 +45,6 @@ // Licence: ///////////////////////////////////////////////////////////////////////////// -" - " -/*! - * %BODY% - */ - " "///////////////////////////////////////////////////////////////////////////// // Name: %SYMBOLS-FILENAME% @@ -82,6 +78,14 @@ #include "wx/wx.h" #endif +" + " /// %BODY% +" + " +/*! + * %BODY% + */ + " "app_resources.h" "app_resources.cpp" @@ -93,11 +97,21 @@ "" "<None>" "<System>" + "utf-8" "<System>" "" + 0 + 0 + 4 + " " + "" 0 + 0 + 1 1 1 + 0 + 1
@@ -174,7 +188,7 @@ 1 1 0 - 0 + 1 "Windows" "html-document" @@ -198,7 +212,11 @@ 10000 0 "" + 0 + "" 0 + 0 + "wxEVT_INIT_DIALOG|OnInitDialog|NONE||" "ID_DIALOG" 10000 "WinEDA_PcbTracksDialog" @@ -219,6 +237,13 @@ 0 1 "<Any platform>" + "" + "" + "" + "" + "" + "" + "Tiled" 0 1 0 @@ -237,7 +262,9 @@ 0 0 0 - 0 + 0 + 0 + 0 0 0 1 @@ -249,6 +276,7 @@ -1 400 300 + 0 "" "wxBoxSizer H" @@ -304,9 +332,16 @@ "wbStaticTextProxy" "wxID_STATIC" 5105 + "" "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" "m_ViaSizeTitle" "Via Size" + -1 "" "" "" @@ -317,6 +352,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -328,6 +368,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -360,7 +402,13 @@ "wbTextCtrlProxy" "ID_TEXTCTRL" 10001 + "" "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" "m_OptViaSize" "" 0 @@ -374,6 +422,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -387,8 +440,9 @@ 0 0 0 - 0 + 0 0 + 0 0 0 0 @@ -396,6 +450,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -414,6 +470,7 @@ 0 "" "" + 0 "wxStaticText: wxID_STATIC" @@ -428,9 +485,16 @@ "wbStaticTextProxy" "wxID_STATIC" 5105 + "" "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" "m_ViaDefaultDrillValueTitle" "Default Via Drill" + -1 "" "" "" @@ -441,6 +505,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -452,6 +521,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -484,7 +555,13 @@ "wbTextCtrlProxy" "ID_TEXTCTRL1" 10002 + "" "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" "m_OptViaDrill" "" 0 @@ -498,6 +575,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -511,8 +593,9 @@ 0 0 0 - 0 + 0 0 + 0 0 0 0 @@ -520,6 +603,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -538,6 +623,7 @@ 0 "" "" + 0 "wxStaticText: wxID_STATIC" @@ -552,9 +638,16 @@ "wbStaticTextProxy" "wxID_STATIC" 5105 + "" "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" "m_ViaAltDrillValueTitle" "Alternate Via Drill" + -1 "" "" "" @@ -565,6 +658,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -576,6 +674,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -608,7 +708,13 @@ "wbTextCtrlProxy" "ID_TEXTCTRL2" 10003 + "" "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" "m_OptCustomViaDrill" "" 0 @@ -622,6 +728,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -635,8 +746,9 @@ 0 0 0 - 0 + 0 0 + 0 0 0 0 @@ -644,6 +756,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -662,6 +776,7 @@ 0 "" "" + 0 "Spacer" @@ -702,10 +817,18 @@ "wbRadioBoxProxy" "ID_VIA_TYPE_SELECTION" 10004 + "" "wxRadioBox" + "wxRadioBox" + 1 + 0 + "" + "" "m_OptViaType" "Via Type" 1 + "Blind Via|Buried Via|Standard Via" + 0 "" "" "" @@ -716,10 +839,16 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 1 - "Blind Via|Buried Via|Standard Via" 0 + 0 + 0 "" -1 -1 @@ -804,9 +933,16 @@ "wbStaticTextProxy" "wxID_STATIC" 5105 + "" "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" "m_TrackWidthTitle" "Track Width" + -1 "" "" "" @@ -817,6 +953,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -828,6 +969,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -860,7 +1003,13 @@ "wbTextCtrlProxy" "ID_TEXTCTRL3" 10005 + "" "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" "m_OptTrackWidth" "" 0 @@ -874,6 +1023,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -887,8 +1041,9 @@ 0 0 0 - 0 + 0 0 + 0 0 0 0 @@ -896,6 +1051,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -914,6 +1071,7 @@ 0 "" "" + 0 "wxStaticText: wxID_STATIC" @@ -928,9 +1086,16 @@ "wbStaticTextProxy" "wxID_STATIC" 5105 + "" "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" "m_TrackClearanceTitle" "Clearance" + -1 "" "" "" @@ -941,6 +1106,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -952,6 +1122,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -984,7 +1156,13 @@ "wbTextCtrlProxy" "ID_TEXTCTRL4" 10006 + "" "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" "m_OptTrackClearance" "" 0 @@ -998,6 +1176,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -1011,8 +1194,9 @@ 0 0 0 - 0 + 0 0 + 0 0 0 0 @@ -1020,6 +1204,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -1038,6 +1224,7 @@ 0 "" "" + 0 "wxStaticText: wxID_STATIC" @@ -1052,9 +1239,16 @@ "wbStaticTextProxy" "wxID_STATIC" 5105 + "" "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" "m_MaskClearanceTitle" "Mask clearance" + -1 "" "" "" @@ -1065,6 +1259,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -1076,6 +1275,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -1108,7 +1309,13 @@ "wbTextCtrlProxy" "ID_TEXTCTRL5" 10007 + "" "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" "m_OptMaskMargin" "" 0 @@ -1122,6 +1329,11 @@ "<Any platform>" "" "" + "" + "" + "" + "" + "" 0 0 0 @@ -1135,8 +1347,9 @@ 0 0 0 - 0 + 0 0 + 0 0 0 0 @@ -1144,6 +1357,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -1162,6 +1377,7 @@ 0 "" "" + 0 "Spacer" @@ -1228,12 +1444,25 @@ "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick" "wxID_OK" 5100 + "" "wxButton" + "wxButton" + 1 + 0 + "" + "" "" "&OK" 0 "" "" + "" + "" + "" + "" + "" + "" + "" "" "D20000" "" @@ -1247,6 +1476,8 @@ 0 0 0 + 0 + 0 "" -1 -1 @@ -1280,12 +1511,25 @@ "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick" "wxID_CANCEL" 5101 + "" "wxButton" + "wxButton" + 1 + 0 + "" + "" "" "&Cancel" 0 "" "" + "" + "" + "" + "" + "" + "" + "" "" "0000FF" "" @@ -1299,6 +1543,8 @@ 0 0 0 + 0 + 0 "" -1 -1