~jeru-sheng/kicad/kicad-feature

« back to all changes in this revision

Viewing changes to pcbnew/dialog_initpcb.cpp

  • Committer: plyatov
  • Date: 2007-05-06 16:03:28 UTC
  • Revision ID: svn-v4:16bec504-3128-0410-b3e8-8e38c2123bca:trunk/kicad:13
Initial import of KiCad.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        dialog_initpcb.cpp
 
3
// Purpose:     
 
4
// Author:      jean-pierre Charras
 
5
// Modified by: 
 
6
// Created:     15/02/2006 21:42:41
 
7
// RCS-ID:      
 
8
// Copyright:   License GNU
 
9
// Licence:     
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
// Generated by DialogBlocks (unregistered), 15/02/2006 21:42:41
 
13
 
 
14
 
 
15
////@begin includes
 
16
////@end includes
 
17
 
 
18
#include "dialog_initpcb.h"
 
19
 
 
20
////@begin XPM images
 
21
////@end XPM images
 
22
 
 
23
/*!
 
24
 * WinEDA_PcbGlobalDeleteFrame type definition
 
25
 */
 
26
 
 
27
IMPLEMENT_DYNAMIC_CLASS( WinEDA_PcbGlobalDeleteFrame, wxDialog )
 
28
 
 
29
/*!
 
30
 * WinEDA_PcbGlobalDeleteFrame event table definition
 
31
 */
 
32
 
 
33
BEGIN_EVENT_TABLE( WinEDA_PcbGlobalDeleteFrame, wxDialog )
 
34
 
 
35
////@begin WinEDA_PcbGlobalDeleteFrame event table entries
 
36
    EVT_BUTTON( wxID_OK, WinEDA_PcbGlobalDeleteFrame::OnOkClick )
 
37
 
 
38
    EVT_BUTTON( wxID_CANCEL, WinEDA_PcbGlobalDeleteFrame::OnCancelClick )
 
39
 
 
40
////@end WinEDA_PcbGlobalDeleteFrame event table entries
 
41
 
 
42
END_EVENT_TABLE()
 
43
 
 
44
/*!
 
45
 * WinEDA_PcbGlobalDeleteFrame constructors
 
46
 */
 
47
 
 
48
WinEDA_PcbGlobalDeleteFrame::WinEDA_PcbGlobalDeleteFrame( )
 
49
{
 
50
}
 
51
 
 
52
WinEDA_PcbGlobalDeleteFrame::WinEDA_PcbGlobalDeleteFrame( WinEDA_PcbFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
 
53
{
 
54
    m_Parent = parent;
 
55
    Create(parent, id, caption, pos, size, style);
 
56
}
 
57
 
 
58
/*!
 
59
 * WinEDA_PcbGlobalDeleteFrame creator
 
60
 */
 
61
 
 
62
bool WinEDA_PcbGlobalDeleteFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
 
63
{
 
64
////@begin WinEDA_PcbGlobalDeleteFrame member initialisation
 
65
    m_DelZones = NULL;
 
66
    m_DelTexts = NULL;
 
67
    m_DelEdges = NULL;
 
68
    m_DelDrawings = NULL;
 
69
    m_DelModules = NULL;
 
70
    m_DelTracks = NULL;
 
71
    m_DelMarkers = NULL;
 
72
    m_DelAlls = NULL;
 
73
    m_TrackFilterAR = NULL;
 
74
    m_TrackFilterLocked = NULL;
 
75
////@end WinEDA_PcbGlobalDeleteFrame member initialisation
 
76
 
 
77
////@begin WinEDA_PcbGlobalDeleteFrame creation
 
78
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
 
79
    wxDialog::Create( parent, id, caption, pos, size, style );
 
80
 
 
81
    CreateControls();
 
82
    GetSizer()->Fit(this);
 
83
    GetSizer()->SetSizeHints(this);
 
84
    Centre();
 
85
////@end WinEDA_PcbGlobalDeleteFrame creation
 
86
    return true;
 
87
}
 
88
 
 
89
/*!
 
90
 * Control creation for WinEDA_PcbGlobalDeleteFrame
 
91
 */
 
92
 
 
93
void WinEDA_PcbGlobalDeleteFrame::CreateControls()
 
94
{    
 
95
 
 
96
    SetFont(*g_DialogFont);
 
97
////@begin WinEDA_PcbGlobalDeleteFrame content construction
 
98
    // Generated by DialogBlocks, 15/02/2006 22:10:20 (unregistered)
 
99
 
 
100
    WinEDA_PcbGlobalDeleteFrame* itemDialog1 = this;
 
101
 
 
102
    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
 
103
    itemDialog1->SetSizer(itemBoxSizer2);
 
104
 
 
105
    wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Items to delete"));
 
106
    wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL);
 
107
    itemBoxSizer2->Add(itemStaticBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
 
108
 
 
109
    m_DelZones = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Delete Zones"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
110
    m_DelZones->SetValue(false);
 
111
    itemStaticBoxSizer3->Add(m_DelZones, 0, wxALIGN_LEFT|wxALL, 5);
 
112
 
 
113
    m_DelTexts = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Delete Texts"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
114
    m_DelTexts->SetValue(false);
 
115
    itemStaticBoxSizer3->Add(m_DelTexts, 0, wxALIGN_LEFT|wxALL, 5);
 
116
 
 
117
    m_DelEdges = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("Delete Edges"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
118
    m_DelEdges->SetValue(false);
 
119
    itemStaticBoxSizer3->Add(m_DelEdges, 0, wxALIGN_LEFT|wxALL, 5);
 
120
 
 
121
    m_DelDrawings = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _("Delete Drawings"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
122
    m_DelDrawings->SetValue(false);
 
123
    itemStaticBoxSizer3->Add(m_DelDrawings, 0, wxALIGN_LEFT|wxALL, 5);
 
124
 
 
125
    m_DelModules = new wxCheckBox( itemDialog1, ID_CHECKBOX4, _("Delete Modules"), wxDefaultPosition, wxDefaultSize, 0 );
 
126
    m_DelModules->SetValue(false);
 
127
    itemStaticBoxSizer3->Add(m_DelModules, 0, wxALIGN_LEFT|wxALL, 5);
 
128
 
 
129
    m_DelTracks = new wxCheckBox( itemDialog1, ID_CHECKBOX5, _("Delete Tracks"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
130
    m_DelTracks->SetValue(false);
 
131
    itemStaticBoxSizer3->Add(m_DelTracks, 0, wxALIGN_LEFT|wxALL, 5);
 
132
 
 
133
    m_DelMarkers = new wxCheckBox( itemDialog1, ID_CHECKBOX6, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
134
    m_DelMarkers->SetValue(false);
 
135
    itemStaticBoxSizer3->Add(m_DelMarkers, 0, wxALIGN_LEFT|wxALL, 5);
 
136
 
 
137
    m_DelAlls = new wxCheckBox( itemDialog1, ID_CHECKBOX7, _("Clear Board"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
138
    m_DelAlls->SetValue(false);
 
139
    itemStaticBoxSizer3->Add(m_DelAlls, 0, wxALIGN_LEFT|wxALL, 5);
 
140
 
 
141
    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL);
 
142
    itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
 
143
 
 
144
    wxStaticBox* itemStaticBoxSizer13Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Track Filter"));
 
145
    wxStaticBoxSizer* itemStaticBoxSizer13 = new wxStaticBoxSizer(itemStaticBoxSizer13Static, wxVERTICAL);
 
146
    itemBoxSizer12->Add(itemStaticBoxSizer13, 0, wxGROW|wxALL, 5);
 
147
 
 
148
    m_TrackFilterAR = new wxCheckBox( itemDialog1, ID_CHECKBOX8, _("Include AutoRouted Tracks"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
149
    m_TrackFilterAR->SetValue(false);
 
150
    itemStaticBoxSizer13->Add(m_TrackFilterAR, 0, wxALIGN_LEFT|wxALL, 5);
 
151
 
 
152
    m_TrackFilterLocked = new wxCheckBox( itemDialog1, ID_CHECKBOX9, _("Include Locked Tracks"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
 
153
    m_TrackFilterLocked->SetValue(false);
 
154
    itemStaticBoxSizer13->Add(m_TrackFilterLocked, 0, wxALIGN_LEFT|wxALL, 5);
 
155
 
 
156
    itemBoxSizer12->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
 
157
 
 
158
    wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL);
 
159
    itemBoxSizer12->Add(itemBoxSizer17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
 
160
 
 
161
    wxButton* itemButton18 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
 
162
    itemBoxSizer17->Add(itemButton18, 0, wxGROW|wxALL, 5);
 
163
 
 
164
    wxButton* itemButton19 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
 
165
    itemBoxSizer17->Add(itemButton19, 0, wxGROW|wxALL, 5);
 
166
 
 
167
////@end WinEDA_PcbGlobalDeleteFrame content construction
 
168
}
 
169
 
 
170
/*!
 
171
 * Should we show tooltips?
 
172
 */
 
173
 
 
174
bool WinEDA_PcbGlobalDeleteFrame::ShowToolTips()
 
175
{
 
176
    return true;
 
177
}
 
178
 
 
179
/*!
 
180
 * Get bitmap resources
 
181
 */
 
182
 
 
183
wxBitmap WinEDA_PcbGlobalDeleteFrame::GetBitmapResource( const wxString& name )
 
184
{
 
185
    // Bitmap retrieval
 
186
////@begin WinEDA_PcbGlobalDeleteFrame bitmap retrieval
 
187
    wxUnusedVar(name);
 
188
    return wxNullBitmap;
 
189
////@end WinEDA_PcbGlobalDeleteFrame bitmap retrieval
 
190
}
 
191
 
 
192
/*!
 
193
 * Get icon resources
 
194
 */
 
195
 
 
196
wxIcon WinEDA_PcbGlobalDeleteFrame::GetIconResource( const wxString& name )
 
197
{
 
198
    // Icon retrieval
 
199
////@begin WinEDA_PcbGlobalDeleteFrame icon retrieval
 
200
    wxUnusedVar(name);
 
201
    return wxNullIcon;
 
202
////@end WinEDA_PcbGlobalDeleteFrame icon retrieval
 
203
}
 
204
/*!
 
205
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
 
206
 */
 
207
 
 
208
void WinEDA_PcbGlobalDeleteFrame::OnOkClick( wxCommandEvent& event )
 
209
{
 
210
    AcceptPcbDelete(event);
 
211
}
 
212
 
 
213
/*!
 
214
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
 
215
 */
 
216
 
 
217
void WinEDA_PcbGlobalDeleteFrame::OnCancelClick( wxCommandEvent& event )
 
218
{
 
219
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PcbGlobalDeleteFrame.
 
220
    // Before editing this code, remove the block markers.
 
221
    event.Skip();
 
222
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PcbGlobalDeleteFrame. 
 
223
}
 
224
 
 
225