KiCad PCB EDA Suite
EDA_SIZE_CTRL Class Reference

#include <dialog_helpers.h>

Inheritance diagram for EDA_SIZE_CTRL:
EDA_POSITION_CTRL

Public Member Functions

 EDA_SIZE_CTRL (wxWindow *parent, const wxString &title, const wxSize &size_to_edit, EDA_UNITS_T user_unit, wxBoxSizer *BoxSizer)
 
 ~EDA_SIZE_CTRL ()
 
wxSize GetValue ()
 
void Enable (bool x_win_on, bool y_win_on)
 
void SetValue (int x_value, int y_value)
 

Public Attributes

EDA_UNITS_T m_UserUnit
 
wxPoint m_Pos_To_Edit
 
wxTextCtrl * m_FramePosX
 
wxTextCtrl * m_FramePosY
 

Detailed Description

Definition at line 179 of file dialog_helpers.h.

Constructor & Destructor Documentation

EDA_SIZE_CTRL::EDA_SIZE_CTRL ( wxWindow *  parent,
const wxString &  title,
const wxSize &  size_to_edit,
EDA_UNITS_T  user_unit,
wxBoxSizer *  BoxSizer 
)

Definition at line 246 of file wxwineda.cpp.

248  :
249  EDA_POSITION_CTRL( parent, title, wxPoint( size_to_edit.x, size_to_edit.y ),
250  aUnit, aBoxSizer )
251 {
252 }
EDA_POSITION_CTRL(wxWindow *parent, const wxString &title, const wxPoint &pos_to_edit, EDA_UNITS_T user_unit, wxBoxSizer *BoxSizer)
Definition: wxwineda.cpp:155
EDA_SIZE_CTRL::~EDA_SIZE_CTRL ( )
inline

Definition at line 185 of file dialog_helpers.h.

185 { }

Member Function Documentation

void EDA_POSITION_CTRL::Enable ( bool  x_win_on,
bool  y_win_on 
)
inherited

Definition at line 219 of file wxwineda.cpp.

References EDA_POSITION_CTRL::m_FramePosX, and EDA_POSITION_CTRL::m_FramePosY.

220 {
221  m_FramePosX->Enable( x_win_on );
222  m_FramePosY->Enable( y_win_on );
223 }
wxTextCtrl * m_FramePosX
wxTextCtrl * m_FramePosY
wxSize EDA_SIZE_CTRL::GetValue ( )

Definition at line 255 of file wxwineda.cpp.

References EDA_POSITION_CTRL::GetValue(), wxPoint::x, and wxPoint::y.

Referenced by MWAVE_POLYGONAL_SHAPE_DLG::OnOkClick().

256 {
258  wxSize size;
259 
260  size.x = pos.x;
261  size.y = pos.y;
262  return size;
263 }
wxPoint GetValue()
Definition: wxwineda.cpp:208
void EDA_POSITION_CTRL::SetValue ( int  x_value,
int  y_value 
)
inherited

Definition at line 226 of file wxwineda.cpp.

References EDA_POSITION_CTRL::m_FramePosX, EDA_POSITION_CTRL::m_FramePosY, EDA_POSITION_CTRL::m_Pos_To_Edit, EDA_POSITION_CTRL::m_UserUnit, StringFromValue(), wxPoint::x, and wxPoint::y.

Referenced by EDA_POSITION_CTRL::EDA_POSITION_CTRL(), and MWAVE_POLYGONAL_SHAPE_DLG::ReadDataShapeDescr().

227 {
228  wxString msg;
229 
230  m_Pos_To_Edit.x = x_value;
231  m_Pos_To_Edit.y = y_value;
232 
234  m_FramePosX->Clear();
235  m_FramePosX->SetValue( msg );
236 
238  m_FramePosY->Clear();
239  m_FramePosY->SetValue( msg );
240 }
wxString StringFromValue(EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:203
EDA_UNITS_T m_UserUnit
wxTextCtrl * m_FramePosX
wxTextCtrl * m_FramePosY

Member Data Documentation

wxPoint EDA_POSITION_CTRL::m_Pos_To_Edit
inherited

Definition at line 156 of file dialog_helpers.h.

Referenced by EDA_POSITION_CTRL::SetValue().

EDA_UNITS_T EDA_POSITION_CTRL::m_UserUnit
inherited

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