Commit 36fa92a1 authored by dickelbeck's avatar dickelbeck

dialogblocks syncing

parent 1bc33543
......@@ -47,11 +47,11 @@ 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_CANCEL, WinEDA_PcbTracksDialog::OnCancelClick )
EVT_BUTTON( wxID_OK, WinEDA_PcbTracksDialog::OnOkClick )
EVT_ACTIVATE( WinEDA_PcbTracksDialog::OnActivate )
EVT_BUTTON( wxID_CANCEL, WinEDA_PcbTracksDialog::OnCancelClick )
////@end WinEDA_PcbTracksDialog event table entries
......@@ -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();
}
......@@ -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
......
This diff is collapsed.
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