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
 
wxTextCtrl * m_FramePosX
 
wxTextCtrl * m_FramePosY
 

Detailed Description

Definition at line 141 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 90 of file eda_size_ctrl.cpp.

91  :
92  EDA_POSITION_CTRL( parent, title, wxPoint( aSize.x, aSize.y ), aUnit, aBoxSizer )
93 {
94 }
EDA_POSITION_CTRL(wxWindow *parent, const wxString &title, const wxPoint &pos_to_edit, EDA_UNITS_T user_unit, wxBoxSizer *BoxSizer)
EDA_SIZE_CTRL::~EDA_SIZE_CTRL ( )
inline

Definition at line 147 of file dialog_helpers.h.

147 { }

Member Function Documentation

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

Definition at line 73 of file eda_size_ctrl.cpp.

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

74 {
75  m_FramePosX->Enable( x_win_on );
76  m_FramePosY->Enable( y_win_on );
77 }
wxTextCtrl * m_FramePosX
wxTextCtrl * m_FramePosY
wxSize EDA_SIZE_CTRL::GetValue ( )

Definition at line 97 of file eda_size_ctrl.cpp.

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

98 {
100 
101  return wxSize( pos.x, pos.y );
102 }
void EDA_POSITION_CTRL::SetValue ( int  x_value,
int  y_value 
)
inherited

Definition at line 80 of file eda_size_ctrl.cpp.

References EDA_POSITION_CTRL::m_FramePosX, EDA_POSITION_CTRL::m_FramePosY, EDA_POSITION_CTRL::m_UserUnit, and StringFromValue().

Referenced by EDA_POSITION_CTRL::EDA_POSITION_CTRL().

81 {
82  m_FramePosX->SetValue( StringFromValue( m_UserUnit, x_value, true ) );
83  m_FramePosY->SetValue( StringFromValue( m_UserUnit, y_value, true ) );
84 }
EDA_UNITS_T m_UserUnit
wxTextCtrl * m_FramePosX
wxTextCtrl * m_FramePosY
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:210

Member Data Documentation

EDA_UNITS_T EDA_POSITION_CTRL::m_UserUnit
inherited

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