KiCad PCB EDA Suite
TUNER_SLIDER_BASE Class Reference

Class TUNER_SLIDER_BASE. More...

#include <tuner_slider_base.h>

Inheritance diagram for TUNER_SLIDER_BASE:
TUNER_SLIDER

Public Member Functions

 TUNER_SLIDER_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(97, 283), long style=wxTAB_TRAVERSAL)
 
 ~TUNER_SLIDER_BASE ()
 

Protected Member Functions

virtual void onClose (wxCommandEvent &event)
 
virtual void onSliderChanged (wxScrollEvent &event)
 
virtual void onMaxTextEnter (wxCommandEvent &event)
 
virtual void onValueTextEnter (wxCommandEvent &event)
 
virtual void onMinTextEnter (wxCommandEvent &event)
 
virtual void onSave (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_name
 
wxButton * m_closeBtn
 
wxSlider * m_slider
 
wxTextCtrl * m_maxText
 
wxTextCtrl * m_valueText
 
wxTextCtrl * m_minText
 
wxButton * m_saveBtn
 

Detailed Description

Class TUNER_SLIDER_BASE.

Definition at line 32 of file tuner_slider_base.h.

Constructor & Destructor Documentation

TUNER_SLIDER_BASE::TUNER_SLIDER_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxSize( 97,283 ),
long  style = wxTAB_TRAVERSAL 
)

Definition at line 12 of file tuner_slider_base.cpp.

References m_closeBtn, m_maxText, m_minText, m_name, m_saveBtn, m_slider, m_valueText, onClose(), onMaxTextEnter(), onMinTextEnter(), onSave(), onSliderChanged(), and onValueTextEnter().

12  : wxPanel( parent, id, pos, size, style )
13 {
14  wxBoxSizer* bSizer1;
15  bSizer1 = new wxBoxSizer( wxVERTICAL );
16 
17  wxBoxSizer* bSizer2;
18  bSizer2 = new wxBoxSizer( wxHORIZONTAL );
19 
20  m_name = new wxStaticText( this, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
21  m_name->Wrap( -1 );
22  bSizer2->Add( m_name, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
23 
24  m_closeBtn = new wxButton( this, wxID_ANY, _(" X "), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
25  bSizer2->Add( m_closeBtn, 0, wxALL, 5 );
26 
27 
28  bSizer1->Add( bSizer2, 0, wxALL|wxEXPAND, 5 );
29 
30  wxBoxSizer* bSizer3;
31  bSizer3 = new wxBoxSizer( wxHORIZONTAL );
32 
33  wxBoxSizer* bSizer4;
34  bSizer4 = new wxBoxSizer( wxVERTICAL );
35 
36  m_slider = new wxSlider( this, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_INVERSE|wxSL_LEFT|wxSL_VERTICAL );
37  bSizer4->Add( m_slider, 1, 0, 5 );
38 
39 
40  bSizer3->Add( bSizer4, 0, wxEXPAND, 5 );
41 
42  wxGridSizer* gSizer1;
43  gSizer1 = new wxGridSizer( 0, 1, 0, 0 );
44 
45  m_maxText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
46  m_maxText->SetMinSize( wxSize( 70,-1 ) );
47 
48  gSizer1->Add( m_maxText, 0, wxALIGN_TOP|wxALL, 5 );
49 
50  m_valueText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
51  m_valueText->SetMinSize( wxSize( 70,-1 ) );
52 
53  gSizer1->Add( m_valueText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
54 
55  m_minText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
56  m_minText->SetMinSize( wxSize( 70,-1 ) );
57 
58  gSizer1->Add( m_minText, 0, wxALIGN_BOTTOM|wxALL, 5 );
59 
60 
61  bSizer3->Add( gSizer1, 1, wxEXPAND, 5 );
62 
63 
64  bSizer1->Add( bSizer3, 1, wxEXPAND, 5 );
65 
66  m_saveBtn = new wxButton( this, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0 );
67  bSizer1->Add( m_saveBtn, 0, wxALL, 5 );
68 
69 
70  this->SetSizer( bSizer1 );
71  this->Layout();
72 
73  // Connect Events
74  m_closeBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TUNER_SLIDER_BASE::onClose ), NULL, this );
75  m_slider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
76  m_slider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
77  m_slider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
78  m_slider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
79  m_slider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
80  m_slider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
81  m_slider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
82  m_slider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
83  m_slider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
84  m_maxText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onMaxTextEnter ), NULL, this );
85  m_valueText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onValueTextEnter ), NULL, this );
86  m_minText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onMinTextEnter ), NULL, this );
87  m_saveBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TUNER_SLIDER_BASE::onSave ), NULL, this );
88 }
virtual void onMinTextEnter(wxCommandEvent &event)
virtual void onSave(wxCommandEvent &event)
wxTextCtrl * m_valueText
wxStaticText * m_name
wxTextCtrl * m_maxText
virtual void onClose(wxCommandEvent &event)
wxTextCtrl * m_minText
virtual void onSliderChanged(wxScrollEvent &event)
virtual void onMaxTextEnter(wxCommandEvent &event)
virtual void onValueTextEnter(wxCommandEvent &event)
TUNER_SLIDER_BASE::~TUNER_SLIDER_BASE ( )

Definition at line 90 of file tuner_slider_base.cpp.

References m_closeBtn, m_maxText, m_minText, m_saveBtn, m_slider, m_valueText, onClose(), onMaxTextEnter(), onMinTextEnter(), onSave(), onSliderChanged(), and onValueTextEnter().

91 {
92  // Disconnect Events
93  m_closeBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TUNER_SLIDER_BASE::onClose ), NULL, this );
94  m_slider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
95  m_slider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
96  m_slider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
97  m_slider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
98  m_slider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
99  m_slider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
100  m_slider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
101  m_slider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
102  m_slider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( TUNER_SLIDER_BASE::onSliderChanged ), NULL, this );
103  m_maxText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onMaxTextEnter ), NULL, this );
104  m_valueText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onValueTextEnter ), NULL, this );
105  m_minText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onMinTextEnter ), NULL, this );
106  m_saveBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TUNER_SLIDER_BASE::onSave ), NULL, this );
107 
108 }
virtual void onMinTextEnter(wxCommandEvent &event)
virtual void onSave(wxCommandEvent &event)
wxTextCtrl * m_valueText
wxTextCtrl * m_maxText
virtual void onClose(wxCommandEvent &event)
wxTextCtrl * m_minText
virtual void onSliderChanged(wxScrollEvent &event)
virtual void onMaxTextEnter(wxCommandEvent &event)
virtual void onValueTextEnter(wxCommandEvent &event)

Member Function Documentation

virtual void TUNER_SLIDER_BASE::onClose ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 46 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

46 { event.Skip(); }
virtual void TUNER_SLIDER_BASE::onMaxTextEnter ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 48 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

48 { event.Skip(); }
virtual void TUNER_SLIDER_BASE::onMinTextEnter ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 50 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

50 { event.Skip(); }
virtual void TUNER_SLIDER_BASE::onSave ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 51 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

51 { event.Skip(); }
virtual void TUNER_SLIDER_BASE::onSliderChanged ( wxScrollEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 47 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

47 { event.Skip(); }
virtual void TUNER_SLIDER_BASE::onValueTextEnter ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 49 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

49 { event.Skip(); }

Member Data Documentation

wxButton* TUNER_SLIDER_BASE::m_closeBtn
protected

Definition at line 38 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

wxTextCtrl* TUNER_SLIDER_BASE::m_maxText
protected
wxTextCtrl* TUNER_SLIDER_BASE::m_minText
protected
wxStaticText* TUNER_SLIDER_BASE::m_name
protected
wxButton* TUNER_SLIDER_BASE::m_saveBtn
protected

Definition at line 43 of file tuner_slider_base.h.

Referenced by TUNER_SLIDER_BASE(), and ~TUNER_SLIDER_BASE().

wxSlider* TUNER_SLIDER_BASE::m_slider
protected
wxTextCtrl* TUNER_SLIDER_BASE::m_valueText
protected

The documentation for this class was generated from the following files: