Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewForm ¶
NewForm is a unit converter in English, Russian and Chinese, switched live. The category is chosen with RadioButtons, the units with ComboBoxes; the two NumBoxes convert into each other, a Slider sets the precision and a Checkbox the thousands separators; a Table shows the value in every unit of the category (with a ContextMenu to copy it), and an EditableComboBox finds a unit in any category. All the texts come from the i18n catalog in strings.go: SetTextFunc, SetTitleFunc, SetTooltipFunc and SetHintFunc for the widgets' own texts, SetOnLanguageChanged for the rest.
Types ¶
type CategoryStrings ¶
type Strings ¶
type Strings struct {
Title string
Category string
Conversion string
Swap string
Precision string
PrecisionTT string
Thousands string
ThousandsTT string
CommonTitle string
CommonTT string
ColumnUnit string
ColumnValue string
Search string
SearchHint string
SearchTT string
Language string
CopyValue string
ConvertTo string
// How numbers are written
DecimalSeparator string
ThousandsSeparator string
Categories CategoryStrings
Units UnitStrings
}
Strings are all the texts of the converter, a value per language.
type UnitName ¶
UnitName is the name of a unit and its symbol, which some languages write in their own script.
type UnitStrings ¶
type UnitStrings struct {
Millimetre, Centimetre, Metre, Kilometre, Inch, Foot, Yard, Mile, NauticalMile UnitName
SquareCentimetre, SquareMetre, Hectare, SquareKilometre, SquareFoot, Acre, SquareMile UnitName
Millilitre, Litre, CubicMetre, FluidOunce, Cup, GallonUS, GallonUK UnitName
Milligram, Gram, Kilogram, Tonne, Ounce, Pound, Stone UnitName
Celsius, Fahrenheit, Kelvin UnitName
MetrePerSecond, KilometrePerHour, MilePerHour, Knot, FootPerSecond UnitName
Bit, Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Kibibyte, Mebibyte, Gibibyte, Tebibyte UnitName
}