Meter is a widget that renders a current value on as a filled bar/circle/semicircle relative to a minimum and maximum potential value.
| 19 | // bar/circle/semicircle relative to a minimum and maximum potential |
| 20 | // value. |
| 21 | type Meter struct { |
| 22 | WidgetBase |
| 23 | |
| 24 | // Type is the styling type of the meter. |
| 25 | Type MeterTypes |
| 26 | |
| 27 | // Value is the current value of the meter. |
| 28 | // It defaults to 0.5. |
| 29 | Value float32 |
| 30 | |
| 31 | // Min is the minimum possible value of the meter. |
| 32 | // It defaults to 0. |
| 33 | Min float32 |
| 34 | |
| 35 | // Max is the maximum possible value of the meter. |
| 36 | // It defaults to 1. |
| 37 | Max float32 |
| 38 | |
| 39 | // Text, for [MeterCircle] and [MeterSemicircle], is the |
| 40 | // text to render inside of the circle/semicircle. |
| 41 | Text string |
| 42 | |
| 43 | // ValueColor is the image color that will be used to |
| 44 | // render the filled value bar. It should be set in a Styler. |
| 45 | ValueColor image.Image |
| 46 | |
| 47 | // Width, for [MeterCircle] and [MeterSemicircle], is the |
| 48 | // width of the circle/semicircle. It should be set in a Styler. |
| 49 | Width units.Value |
| 50 | } |
| 51 | |
| 52 | // MeterTypes are the different styling types of [Meter]s. |
| 53 | type MeterTypes int32 //enums:enum -trim-prefix Meter |
nothing calls this directly
no outgoing calls
no test coverage detected