12PANEL_COLOR_CODE_BASE::PANEL_COLOR_CODE_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) :
CALCULATOR_PANEL( parent, id, pos, size, style,
name )
14 wxBoxSizer* bSizerPanelColorCode;
15 bSizerPanelColorCode =
new wxBoxSizer( wxHORIZONTAL );
17 wxBoxSizer* bSizerOpts;
18 bSizerOpts =
new wxBoxSizer( wxVERTICAL );
20 wxString m_rbToleranceSelectionChoices[] = {
_(
"10% / 5%"),
_(
"<= 2%") };
21 int m_rbToleranceSelectionNChoices =
sizeof( m_rbToleranceSelectionChoices ) /
sizeof( wxString );
22 m_rbToleranceSelection =
new wxRadioBox(
this, wxID_ANY,
_(
"Tolerance"), wxDefaultPosition, wxDefaultSize, m_rbToleranceSelectionNChoices, m_rbToleranceSelectionChoices, 1, wxRA_SPECIFY_COLS );
27 bSizerPanelColorCode->Add( bSizerOpts, 0, wxALL, 8 );
29 wxFlexGridSizer* fgSizerColoCode;
30 fgSizerColoCode =
new wxFlexGridSizer( 2, 6, 0, 0 );
31 fgSizerColoCode->SetFlexibleDirection( wxBOTH );
32 fgSizerColoCode->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
34 m_staticTextBand1 =
new wxStaticText(
this, wxID_ANY,
_(
"1st Band"), wxDefaultPosition, wxDefaultSize, 0 );
36 fgSizerColoCode->Add(
m_staticTextBand1, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
38 m_staticTextBand2 =
new wxStaticText(
this, wxID_ANY,
_(
"2nd Band"), wxDefaultPosition, wxDefaultSize, 0 );
40 fgSizerColoCode->Add(
m_staticTextBand2, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
42 m_staticTextBand3 =
new wxStaticText(
this, wxID_ANY,
_(
"3rd Band"), wxDefaultPosition, wxDefaultSize, 0 );
44 fgSizerColoCode->Add(
m_staticTextBand3, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
46 m_staticTextBand4 =
new wxStaticText(
this, wxID_ANY,
_(
"4th Band"), wxDefaultPosition, wxDefaultSize, 0 );
48 fgSizerColoCode->Add(
m_staticTextBand4, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
50 m_staticTextBand5 =
new wxStaticText(
this, wxID_ANY,
_(
"Multiplier"), wxDefaultPosition, wxDefaultSize, 0 );
52 fgSizerColoCode->Add(
m_staticTextBand5, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
54 m_staticTextBand6 =
new wxStaticText(
this, wxID_ANY,
_(
"Tolerance"), wxDefaultPosition, wxDefaultSize, 0 );
56 fgSizerColoCode->Add(
m_staticTextBand6, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
58 m_Band1bitmap =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
59 fgSizerColoCode->Add(
m_Band1bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
61 m_Band2bitmap =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
62 fgSizerColoCode->Add(
m_Band2bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
64 m_Band3bitmap =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
65 fgSizerColoCode->Add(
m_Band3bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
67 m_Band4bitmap =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
68 fgSizerColoCode->Add(
m_Band4bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
70 m_Band_mult_bitmap =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
73 m_Band_tol_bitmap =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
77 bSizerPanelColorCode->Add( fgSizerColoCode, 1, wxEXPAND|wxLEFT, 5 );
80 this->SetSizer( bSizerPanelColorCode );
wxStaticBitmap * m_Band_tol_bitmap
virtual void OnToleranceSelection(wxCommandEvent &event)
wxStaticText * m_staticTextBand4
wxStaticText * m_staticTextBand1
wxStaticText * m_staticTextBand5
wxStaticText * m_staticTextBand3
wxStaticBitmap * m_Band2bitmap
wxStaticBitmap * m_Band4bitmap
wxStaticBitmap * m_Band_mult_bitmap
wxRadioBox * m_rbToleranceSelection
wxStaticText * m_staticTextBand6
PANEL_COLOR_CODE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
wxStaticBitmap * m_Band1bitmap
wxStaticBitmap * m_Band3bitmap
wxStaticText * m_staticTextBand2