32 #ifndef _BASE_UNITS_H_ 33 #define _BASE_UNITS_H_ 47 #define INDETERMINATE_STATE _( "-- mixed values --" ) 48 #define INDETERMINATE_ACTION _( "-- leave unchanged --" ) 54 #define ALLOW_BOLD_THICKNESS true 56 #define ALLOW_BOLD_THICKNESS IsBold() 206 #endif // _BASE_UNITS_H_ int Mm2mils(double x)
Convert mm to mils.
wxString MessageTextFromValue(EDA_UNITS aUnits, double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function MessageTextFromValue is a helper to convert the double length aValue to a string in inches,...
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function DoubleValueFromString converts aTextValue to a double.
EDA_DATA_TYPE
The type of unit.
void FetchUnitsFromString(const wxString &aTextValue, EDA_UNITS &aUnits)
Function FetchUnitsFromString writes any unit info found in the string to aUnits.
Define a general 2D-vector/point.
long long int ValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
int Mils2mm(double x)
Convert mils to mm.
wxString StringFromValue(EDA_UNITS aUnit, double aValue, bool aAddUnitSymbol=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function StringFromValue returns the string from aValue according to units (inch, mm ....
double From_User_Unit(EDA_UNITS aUnit, double aValue)
Return in internal units the value "val" given in a real unit such as "in", "mm" or "deg".
std::string FormatInternalUnits(int aValue)
Function FormatInternalUnits converts aValue from internal units to a string appropriate for writing ...
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Get the units string for a given units type.
double To_User_Unit(EDA_UNITS aUnit, double aValue)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
std::string FormatAngle(double aAngle)
Function FormatAngle converts aAngle from board units to a string appropriate for writing to file.