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(126, 283), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~TUNER_SLIDER_BASE ()
 

Protected Member Functions

virtual void onClose (wxCommandEvent &event)
 
virtual void onSliderChanged (wxScrollEvent &event)
 
virtual void onMaxKillFocus (wxFocusEvent &event)
 
virtual void onMaxTextEnter (wxCommandEvent &event)
 
virtual void onValueKillFocus (wxFocusEvent &event)
 
virtual void onValueTextEnter (wxCommandEvent &event)
 
virtual void onMinKillFocus (wxFocusEvent &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 34 of file tuner_slider_base.h.

Constructor & Destructor Documentation

◆ TUNER_SLIDER_BASE()

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

Definition at line 12 of file tuner_slider_base.cpp.

12  : wxPanel( parent, id, pos, size, style, name )
13 {
14  wxBoxSizer* bSizerMain;
15  bSizerMain = new wxBoxSizer( wxVERTICAL );
16 
17  wxBoxSizer* bSizerUpper;
18  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
19 
20  m_name = new wxStaticText( this, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
21  m_name->Wrap( -1 );
22  bSizerUpper->Add( m_name, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
23 
24  m_closeBtn = new wxButton( this, wxID_ANY, _(" X "), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
25  bSizerUpper->Add( m_closeBtn, 0, wxALL, 5 );
26 
27 
28  bSizerMain->Add( bSizerUpper, 0, wxALL|wxEXPAND, 5 );
29 
30  wxBoxSizer* bSizerMiddle;
31  bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
32 
33  wxBoxSizer* bSizerSlider;
34  bSizerSlider = 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  bSizerSlider->Add( m_slider, 1, 0, 5 );
38 
39 
40  bSizerMiddle->Add( bSizerSlider, 0, wxEXPAND, 5 );
41 
42  wxGridSizer* gSizerTxtCtr;
43  gSizerTxtCtr = 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  gSizerTxtCtr->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  gSizerTxtCtr->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  gSizerTxtCtr->Add( m_minText, 0, wxALIGN_BOTTOM|wxALL, 5 );
59 
60 
61  bSizerMiddle->Add( gSizerTxtCtr, 1, wxEXPAND, 5 );
62 
63 
64  bSizerMain->Add( bSizerMiddle, 1, wxEXPAND, 5 );
65 
66  m_saveBtn = new wxButton( this, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0 );
67  bSizerMain->Add( m_saveBtn, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
68 
69 
70  this->SetSizer( bSizerMain );
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_KILL_FOCUS, wxFocusEventHandler( TUNER_SLIDER_BASE::onMaxKillFocus ), NULL, this );
85  m_maxText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onMaxTextEnter ), NULL, this );
86  m_valueText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( TUNER_SLIDER_BASE::onValueKillFocus ), NULL, this );
87  m_valueText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onValueTextEnter ), NULL, this );
88  m_minText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( TUNER_SLIDER_BASE::onMinKillFocus ), NULL, this );
89  m_minText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( TUNER_SLIDER_BASE::onMinTextEnter ), NULL, this );
90  m_saveBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TUNER_SLIDER_BASE::onSave ), NULL, this );
91 }
virtual void onMinTextEnter(wxCommandEvent &event)
virtual void onSave(wxCommandEvent &event)
wxTextCtrl * m_valueText
wxStaticText * m_name
#define _(s)
wxTextCtrl * m_maxText
virtual void onClose(wxCommandEvent &event)
const char * name
Definition: DXF_plotter.cpp:56
virtual void onMaxKillFocus(wxFocusEvent &event)
wxTextCtrl * m_minText
virtual void onSliderChanged(wxScrollEvent &event)
virtual void onValueKillFocus(wxFocusEvent &event)
virtual void onMaxTextEnter(wxCommandEvent &event)
virtual void onValueTextEnter(wxCommandEvent &event)
virtual void onMinKillFocus(wxFocusEvent &event)

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

◆ ~TUNER_SLIDER_BASE()

TUNER_SLIDER_BASE::~TUNER_SLIDER_BASE ( )

Definition at line 93 of file tuner_slider_base.cpp.

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

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

Member Function Documentation

◆ onClose()

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

Reimplemented in TUNER_SLIDER.

Definition at line 48 of file tuner_slider_base.h.

48 { event.Skip(); }

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

◆ onMaxKillFocus()

virtual void TUNER_SLIDER_BASE::onMaxKillFocus ( wxFocusEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 50 of file tuner_slider_base.h.

50 { event.Skip(); }

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

◆ onMaxTextEnter()

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

Reimplemented in TUNER_SLIDER.

Definition at line 51 of file tuner_slider_base.h.

51 { event.Skip(); }

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

◆ onMinKillFocus()

virtual void TUNER_SLIDER_BASE::onMinKillFocus ( wxFocusEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 54 of file tuner_slider_base.h.

54 { event.Skip(); }

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

◆ onMinTextEnter()

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

Reimplemented in TUNER_SLIDER.

Definition at line 55 of file tuner_slider_base.h.

55 { event.Skip(); }

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

◆ onSave()

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

Reimplemented in TUNER_SLIDER.

Definition at line 56 of file tuner_slider_base.h.

56 { event.Skip(); }

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

◆ onSliderChanged()

virtual void TUNER_SLIDER_BASE::onSliderChanged ( wxScrollEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 49 of file tuner_slider_base.h.

49 { event.Skip(); }

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

◆ onValueKillFocus()

virtual void TUNER_SLIDER_BASE::onValueKillFocus ( wxFocusEvent &  event)
inlineprotectedvirtual

Reimplemented in TUNER_SLIDER.

Definition at line 52 of file tuner_slider_base.h.

52 { event.Skip(); }

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

◆ onValueTextEnter()

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

Reimplemented in TUNER_SLIDER.

Definition at line 53 of file tuner_slider_base.h.

53 { event.Skip(); }

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

Member Data Documentation

◆ m_closeBtn

wxButton* TUNER_SLIDER_BASE::m_closeBtn
protected

Definition at line 40 of file tuner_slider_base.h.

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

◆ m_maxText

wxTextCtrl* TUNER_SLIDER_BASE::m_maxText
protected

◆ m_minText

wxTextCtrl* TUNER_SLIDER_BASE::m_minText
protected

◆ m_name

wxStaticText* TUNER_SLIDER_BASE::m_name
protected

◆ m_saveBtn

wxButton* TUNER_SLIDER_BASE::m_saveBtn
protected

Definition at line 45 of file tuner_slider_base.h.

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

◆ m_slider

wxSlider* TUNER_SLIDER_BASE::m_slider
protected

◆ m_valueText

wxTextCtrl* TUNER_SLIDER_BASE::m_valueText
protected

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