Simple spelling fixes (#2496)
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The Arc consists of a background and a foreground arc. The foregrond (indicator) can be touch-adjusted.
|
||||
The Arc consists of a background and a foreground arc. The foreground (indicator) can be touch-adjusted.
|
||||
|
||||
## Parts and Styles
|
||||
- `LV_PART_MAIN` Draws a background using the typical background style properties and an arc using the arc style properties. The arc's size and position will respect the *padding* style properties.
|
||||
- `LV_PART_INDICATOR` Draws an other arc using the *arc* style properties. Its padding values are interpreted relative to the background arc.
|
||||
- `LV_PART_INDICATOR` Draws another arc using the *arc* style properties. Its padding values are interpreted relative to the background arc.
|
||||
- `LV_PART_KNOB` Draws a handle on the end of the indicator using all background properties and padding values. With zero padding the knob size is the same as the indicator's width.
|
||||
Larger padding makes it larger, smaller padding makes it smaller.
|
||||
|
||||
@@ -47,12 +47,12 @@ The change rate is defined in degree/second unit and can be set with `lv_arc_set
|
||||
|
||||
|
||||
### Setting the indicator manually
|
||||
It also possible to set the angles of the indicator arc directly with `lv_arc_set_angles(arc, start_angle, end_angle)` function or `lv_arc_set_start/end_angle(arc, start_angle)`.
|
||||
In this case the set "value" and "mode" is ignored.
|
||||
It's also possible to set the angles of the indicator arc directly with `lv_arc_set_angles(arc, start_angle, end_angle)` function or `lv_arc_set_start/end_angle(arc, start_angle)`.
|
||||
In this case the set "value" and "mode" are ignored.
|
||||
|
||||
In other words, settings angles and values are independent. You should use either value and angle settings. Mixing the two might result in unintended behavior.
|
||||
In other words, settings angles and values are independent. You should use either value or angle settings. Mixing the two might result in unintended behavior.
|
||||
|
||||
To make the arc non-adjustabe remove the style of the knob and make the object non-clickable:
|
||||
To make the arc non-adjustable, remove the style of the knob and make the object non-clickable:
|
||||
```c
|
||||
lv_obj_remove_style(arc, NULL, LV_PART_KNOB);
|
||||
lv_obj_clear_flag(arc, LV_OBJ_FLAG_CLICKABLE);
|
||||
|
||||
@@ -15,7 +15,7 @@ Not only the end, but also the start value of the bar can be set, which changes
|
||||
|
||||
## Parts and Styles
|
||||
- `LV_PART_MAIN` The background of the bar and it uses the typical background style properties. Adding padding makes the indicator smaller or larger. The `anim_time` style property sets the animation time if the values set with `LV_ANIM_ON`.
|
||||
- `LV_PART_INDICATOR` The indicator itself; also also uses all the typical background properties.
|
||||
- `LV_PART_INDICATOR` The indicator itself; also uses all the typical background properties.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -27,7 +27,7 @@ The default range is 1..100.
|
||||
The new value in `lv_bar_set_value` can be set with or without an animation depending on the last parameter (`LV_ANIM_ON/OFF`).
|
||||
|
||||
### Modes
|
||||
The bar can be one the following modes:
|
||||
The bar can be one of the following modes:
|
||||
- `LV_BAR_MODE_NORMAL` A normal bar as described above
|
||||
- `LV_BAR_SYMMETRICAL` Draw the indicator from the zero value to current value. Requires a negative minimum range and positive maximum range.
|
||||
- `LV_BAR_RANGE` Allows setting the start value too by `lv_bar_set_start_value(bar, new_value, LV_ANIM_ON/OFF)`. The start value always has to be smaller than the end value.
|
||||
|
||||
@@ -42,7 +42,7 @@ In addition to the width, each button can be customized with the following param
|
||||
- `LV_BTNMATRIX_CTRL_CUSTOM_1` Custom free to use flag
|
||||
- `LV_BTNMATRIX_CTRL_CUSTOM_2` Custom free to use flag
|
||||
|
||||
By default all flags are disabled.
|
||||
By default, all flags are disabled.
|
||||
|
||||
To set or clear a button's control attribute, use `lv_btnmatrix_set_btn_ctrl(btnm, btn_id, LV_BTNM_CTRL_...)` and
|
||||
`lv_btnmatrix_clear_btn_ctrl(btnm, btn_id, LV_BTNMATRIX_CTRL_...)` respectively. More `LV_BTNM_CTRL_...` values can be OR-ed
|
||||
|
||||
@@ -59,7 +59,7 @@ The draw function can draw to any color format. For example, it's possible to dr
|
||||
`lv_canvas_transform()` can be used to rotate and/or scale the image of an image and store the result on the canvas.
|
||||
The function needs the following parameters:
|
||||
- `canvas` pointer to a canvas object to store the result of the transformation.
|
||||
- `img pointer` to an image descriptor to transform. Can be the image descriptor of an other canvas too (`lv_canvas_get_img()`).
|
||||
- `img pointer` to an image descriptor to transform. Can be the image descriptor of another canvas too (`lv_canvas_get_img()`).
|
||||
- `angle` the angle of rotation (0..3600), 0.1 deg resolution
|
||||
- `zoom` zoom factor (256: no zoom, 512: double size, 128: half size);
|
||||
- `offset_x` offset X to tell where to put the result data on destination canvas
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The Checkbox object is created from a "tick box" and a label. When the Chackbox is clicked the tick box is toggled.
|
||||
The Checkbox object is created from a "tick box" and a label. When the Checkbox is clicked the tick box is toggled.
|
||||
|
||||
## Parts and Styles
|
||||
- `LV_PART_MAIN` The is the background of the Checkbox and it uses the text and all the typical backround style properties.
|
||||
- `LV_PART_MAIN` The is the background of the Checkbox and it uses the text and all the typical background style properties.
|
||||
`pad_column` adjusts the spacing between the tickbox and the label
|
||||
- `LV_PART_INDICATOR` The "tick box" is a square that uses all the typical backround style properties.
|
||||
By default its size is equal to the height of the main part's font. Padding properties make the tick box larger in the respective directions.
|
||||
- `LV_PART_INDICATOR` The "tick box" is a square that uses all the typical background style properties.
|
||||
By default, its size is equal to the height of the main part's font. Padding properties make the tick box larger in the respective directions.
|
||||
|
||||
The Checkbox is added to the default group (if it is set).
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ The Dropdown widget is built from the elements: "button" and "list" (both not re
|
||||
- `LV_PART_MAIN` The background of the button. Uses the typical background properties and text properties for the text on it.
|
||||
- `LV_PART_INDICATOR` Typically an arrow symbol that can be an image or a text (`LV_SYMBOL`).
|
||||
|
||||
The button goes to `LV_STATE_CHECKED` when its opened.
|
||||
The button goes to `LV_STATE_CHECKED` when it's opened.
|
||||
|
||||
### List
|
||||
- `LV_PART_MAIN` The list itself. Uses the typical background properties. `max_height` can be used to limit the height of the list.
|
||||
@@ -63,7 +63,7 @@ The list can be created on any side. The default `LV_DIR_BOTTOM` can be modified
|
||||
If the list would be vertically out of the screen, it will be aligned to the edge.
|
||||
|
||||
### Symbol
|
||||
A symbol (typically an arrow) can be added to the drop down list with `lv_dropdown_set_symbol(dropdown, LV_SYMBOL_...)`
|
||||
A symbol (typically an arrow) can be added to the dropdown list with `lv_dropdown_set_symbol(dropdown, LV_SYMBOL_...)`
|
||||
|
||||
If the direction of the drop-down list is `LV_DIR_LEFT` the symbol will be shown on the left, otherwise on the right.
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ Note that the real coordinates of image objects won't change during transformati
|
||||
|
||||
### Size mode
|
||||
|
||||
By default if the image is zoom or rotated the real coordinates of the image object are not changed.
|
||||
By default, when the image is zoomed or rotated the real coordinates of the image object are not changed.
|
||||
The larger content simply overflows the object's boundaries.
|
||||
It also means the layouts are not affected the by the transformations.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Similary, the policies can be applied if the height of the text is greater than
|
||||
- `LV_LABEL_LONG_DOT` Replaces the last 3 characters from bottom right corner of the label with dots (`.`)
|
||||
- `LV_LABEL_LONG_SCROLL` If the text is wider than the label scroll it horizontally back and forth. If it's higher, scroll vertically. Only one direction is scrolled and horizontal scrolling has higher precedence.
|
||||
- `LV_LABEL_LONG_SCROLL_CIRCULAR` If the text is wider than the label scroll it horizontally continously. If it's higher, scroll vertically. Only one direction is scrolled and horizontal scrolling has higher precedence.
|
||||
- `LV_LABEL_LONG_CLIP` Simply clip the parts of the text outside of the label.
|
||||
- `LV_LABEL_LONG_CLIP` Simply clip the parts of the text outside the label.
|
||||
|
||||
You can specify the long mode with `lv_label_set_long_mode(label, LV_LABEL_LONG_...)`
|
||||
|
||||
@@ -51,7 +51,7 @@ In the text, you can use commands to recolor parts of the text. For example: `"W
|
||||
This feature can be enabled individually for each label by `lv_label_set_recolor()` function.
|
||||
|
||||
### Text selection
|
||||
If enabled by `LV_LABEL_TEXT_SELECTION` part of the text can be selected. It's similar when on PC a you use your mouse to select a text.
|
||||
If enabled by `LV_LABEL_TEXT_SELECTION` part of the text can be selected. It's similar to when you use your mouse on a PC to select a text.
|
||||
The whole mechanism (click and select the text as you drag your finger/mouse) is implemented in [Text area](/widgets/core/textarea) and the Label widget only allows manual text selection with
|
||||
`lv_label_get_text_selection_start(label, start_char_index)` and `lv_label_get_text_selection_start(label, end_char_index)`.
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ The Line object is capable of drawing straight lines between a set of points.
|
||||
The points have to be stored in an `lv_point_t` array and passed to the object by the `lv_line_set_points(lines, point_array, point_cnt)` function.
|
||||
|
||||
### Auto-size
|
||||
By default the Line's width and height are set to `LV_SIZE_CONTENT`. This means it will automatically set its size to fit all the points. If the size is set explicitly, parts on the line may not be visible.
|
||||
By default, the Line's width and height are set to `LV_SIZE_CONTENT`. This means it will automatically set its size to fit all the points. If the size is set explicitly, parts on the line may not be visible.
|
||||
|
||||
### Invert y
|
||||
By default, the *y == 0* point is in the top of the object. It might be conter-intuitive in some cases so the y coordinates can be inverted with `lv_line_set_y_invert(line, true)`. In this case, *y == 0* will be the bottom of the object.
|
||||
By default, the *y == 0* point is in the top of the object. It might be counter-intuitive in some cases so the y coordinates can be inverted with `lv_line_set_y_invert(line, true)`. In this case, *y == 0* will be the bottom of the object.
|
||||
*y invert* is disabled by default.
|
||||
|
||||
## Events
|
||||
|
||||
@@ -30,7 +30,7 @@ The get the *index* of the currently selected option use `lv_roller_get_selected
|
||||
### Visible rows
|
||||
The number of visible rows can be adjusted with `lv_roller_set_visible_row_count(roller, num)`.
|
||||
|
||||
This function calculates the height with the current style. If the font, line space, border width, etc of the roller changes this function needs to be called again.
|
||||
This function calculates the height with the current style. If the font, line space, border width, etc. of the roller changes this function needs to be called again.
|
||||
|
||||
## Events
|
||||
- `LV_EVENT_VALUE_CHANGED` Sent when a new option is selected.
|
||||
|
||||
@@ -12,7 +12,7 @@ The Slider object looks like a [Bar](/widgets/core/bar) supplemented with a knob
|
||||
## Parts and Styles
|
||||
- `LV_PART_MAIN` The background of the slider. Uses all the typical background style properties. `padding` makes the indicator smaller in the respective direction.
|
||||
- `LV_PART_INDICATOR` The indicator that shows the current state of the slider. Also uses all the typical background style properties.
|
||||
- `LV_PART_KNOB` A rectangle (or circle) drawn at the current value. Also uses all the typical background properties to describe the knob(s). By default the knob is square (with a optional corner radius) with side length equal to the smaller side of the slider. The knob can be made larger with the `padding` values. Padding values can be asymmetric too.
|
||||
- `LV_PART_KNOB` A rectangle (or circle) drawn at the current value. Also uses all the typical background properties to describe the knob(s). By default, the knob is square (with an optional corner radius) with side length equal to the smaller side of the slider. The knob can be made larger with the `padding` values. Padding values can be asymmetric too.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -22,9 +22,9 @@ To set an initial value use `lv_slider_set_value(slider, new_value, LV_ANIM_ON/O
|
||||
To specify the range (min, max values), `lv_slider_set_range(slider, min , max)` can be used.
|
||||
|
||||
### Modes
|
||||
The slider can be one the following modes:
|
||||
The slider can be one of the following modes:
|
||||
- `LV_SLIDER_MODE_NORMAL` A normal slider as described above
|
||||
- `LV_SLIDER_SYMMETRICAL` Draw the indicator form the zero value to current value. Requires negaitve minimum range and positive maximum range.
|
||||
- `LV_SLIDER_SYMMETRICAL` Draw the indicator form the zero value to current value. Requires negative minimum range and positive maximum range.
|
||||
- `LV_SLIDER_RANGE` Allows setting the start value too by `lv_bar_set_start_value(bar, new_value, LV_ANIM_ON/OFF)`. The start value has to be always smaller than the end value.
|
||||
|
||||
The mode can be changed with `lv_slider_set_mode(slider, LV_SLIDER_MODE_...)`
|
||||
@@ -35,7 +35,7 @@ In the latter case the knob moves to the point clicked and slider value changes
|
||||
|
||||
## Events
|
||||
- `LV_EVENT_VALUE_CHANGED` Sent while the slider is being dragged or changed with keys.
|
||||
The event is sent continuously while the slider is dragged and once when released. Use `lv_slider_is_dragged` to detemine whether the Slider is still being dragged or has just been released.
|
||||
The event is sent continuously while the slider is dragged and once when released. Use `lv_slider_is_dragged` to determine whether the Slider is still being dragged or has just been released.
|
||||
- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following parts.
|
||||
- `LV_SLIDER_DRAW_PART_KNOB` The main (right) knob of the slider
|
||||
- `part`: `LV_PART_KNOB`
|
||||
|
||||
@@ -39,7 +39,7 @@ You can specify the display type with `lv_chart_set_type(chart, LV_CHART_TYPE_..
|
||||
|
||||
|
||||
### Data series
|
||||
You can add any number of series to the charts by `lv_chart_add_series(chart, color, axis)`. This will allocates a `lv_chart_series_t` structure which contains the chosen `color` and an array for the data points.
|
||||
You can add any number of series to the charts by `lv_chart_add_series(chart, color, axis)`. This allocates an `lv_chart_series_t` structure which contains the chosen `color` and an array for the data points.
|
||||
`axis` can have the following values:
|
||||
- `LV_CHART_AXIS_PRIMARY_Y` Left axis
|
||||
- `LV_CHART_AXIS_SECONDARY_Y` Right axis
|
||||
@@ -73,7 +73,7 @@ For `LV_CHART_TYPE_SCATTER` type `lv_chart_set_value_by_id2(chart, ser, id, val
|
||||
### Update modes
|
||||
`lv_chart_set_next_value` can behave in two ways depending on *update mode*:
|
||||
- `LV_CHART_UPDATE_MODE_SHIFT` Shift old data to the left and add the new one to the right.
|
||||
- `LV_CHART_UPDATE_MODE_CIRCULAR` - Add the new data in circular fashion, like an ECG diagram).
|
||||
- `LV_CHART_UPDATE_MODE_CIRCULAR` - Add the new data in circular fashion, like an ECG diagram.
|
||||
|
||||
The update mode can be changed with `lv_chart_set_update_mode(chart, LV_CHART_UPDATE_MODE_...)`.
|
||||
|
||||
@@ -82,7 +82,7 @@ The number of points in the series can be modified by `lv_chart_set_point_count(
|
||||
Note: this also affects the number of points processed when an external buffer is assigned to a series, so you need to be sure the external array is large enough.
|
||||
|
||||
#### Handling large number of points
|
||||
On line charts if the number of points is greater than the pixels horizontally, the Chart will draw only vertical lines to make the drawing of large amount of data effective.
|
||||
On line charts, if the number of points is greater than the pixels horizontally, the Chart will draw only vertical lines to make the drawing of large amount of data effective.
|
||||
If there are, let's say, 10 points to a pixel, LVGL searches the smallest and the largest value and draws a vertical lines between them to ensure no peaks are missed.
|
||||
|
||||
### Vertical range
|
||||
|
||||
@@ -36,7 +36,7 @@ Learn more about [Events](/overview/event).
|
||||
|
||||
## Keys
|
||||
- `LV_KEY_UP`, `LV_KEY_RIGHT` Increment the current parameter's value by 1
|
||||
- `LV_KEY_DOWN`, `LV_KEY_LEFT` Decrement the current parameter's by 1
|
||||
- `LV_KEY_DOWN`, `LV_KEY_LEFT` Decrement the current parameter's value by 1
|
||||
- `LV_KEY_ENTER` A long press will show the next mode. Double click to reset the current parameter.
|
||||
|
||||
Learn more about [Keys](/overview/indev).
|
||||
|
||||
@@ -21,7 +21,7 @@ See the [Button](/widgets/core/btn)'s and [Label](/widgets/core/label)'s documen
|
||||
### Buttons
|
||||
`lv_list_add_btn(list, icon, text)` adds a full-width button with an icon - that can be an image or symbol - and a text.
|
||||
|
||||
The text starts to scroll horizontally if its too long.
|
||||
The text starts to scroll horizontally if it's too long.
|
||||
|
||||
### Texts
|
||||
`lv_list_add_text(list, icon, text)` adds a text.
|
||||
|
||||
@@ -32,13 +32,13 @@ Labels are added automatically on major ticks with `label_gap` distance from the
|
||||
|
||||
### Add indicators
|
||||
|
||||
Indicators needs to be added to a Scale and their value is interpreted in the range of the Scale.
|
||||
Indicators need to be added to a Scale and their value is interpreted in the range of the Scale.
|
||||
|
||||
All the indicator add functions return `lv_meter_indicator_t *`.
|
||||
|
||||
#### Needle line
|
||||
|
||||
`indic = lv_meter_add_needle_line(meter, scale, line_width, line_color, r_mod)` adds a needle line to a Scale. By default the length of the line is the same as the scale's radius but `r_mod` changes the length.
|
||||
`indic = lv_meter_add_needle_line(meter, scale, line_width, line_color, r_mod)` adds a needle line to a Scale. By default, the length of the line is the same as the scale's radius but `r_mod` changes the length.
|
||||
|
||||
`lv_meter_set_indicator_value(meter, indic, value)` sets the value of the indicator.
|
||||
|
||||
@@ -50,7 +50,7 @@ All the indicator add functions return `lv_meter_indicator_t *`.
|
||||
`lv_meter_set_indicator_value(meter, inidicator, value)` sets the value of the indicator.
|
||||
|
||||
#### Arc
|
||||
`indic = lv_meter_add_arc(meter, scale, arc_width, arc_color, r_mod)` adds and arc indicator. . By default the radius of the arc is the same as the scale's radius but `r_mod` changes the radius.
|
||||
`indic = lv_meter_add_arc(meter, scale, arc_width, arc_color, r_mod)` adds and arc indicator. . By default, the radius of the arc is the same as the scale's radius but `r_mod` changes the radius.
|
||||
|
||||
`lv_meter_set_indicator_start_value(meter, indic, value)` and `lv_meter_set_indicator_end_value(meter, inidicator, value)` sets the value of the indicator.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The text will be broken into multiple lines automatically and the height will be
|
||||
The message box can be modal (blocking clicks on the rest of the screen) or not modal.
|
||||
|
||||
## Parts and Styles
|
||||
The mesasge box is built from other widgets so you can check these widget's documentation for details.
|
||||
The message box is built from other widgets, so you can check these widgets' documentation for details.
|
||||
- Background: [lv_obj](/widgets/obj)
|
||||
- Close button: [lv_btn](/widgets/core/btn)
|
||||
- Title and text: [lv_label](/widgets/core/label)
|
||||
|
||||
@@ -28,7 +28,7 @@ The parts of the Spinbox are identical to the [Text area](/widgets/core/textarea
|
||||
`separator_position` is the number of digits before the decimal point. If 0, no decimal point is displayed.
|
||||
|
||||
### Rollover
|
||||
`lv_spinbox_set_rollover(spinbox, true/false)` enables/disabled rollover mode. If either the minimum or maximum value is reached with rollover enabled, the value will change to the other limit. If rollover is disabled the value will be remain at the minimum or maximum value.
|
||||
`lv_spinbox_set_rollover(spinbox, true/false)` enables/disabled rollover mode. If either the minimum or maximum value is reached with rollover enabled, the value will change to the other limit. If rollover is disabled the value will remain at the minimum or maximum value.
|
||||
|
||||
## Events
|
||||
- `LV_EVENT_VALUE_CHANGED` Sent when the value has changed.
|
||||
|
||||
@@ -17,7 +17,7 @@ The parts are identical to the parts of [lv_arc](/widgets/core/arc).
|
||||
To create a spinner use `lv_spinner_create(parent, spin_time, arc_length)`. `spin time` sets the spin time in milliseconds, `arc_length` sets the length of the spinning arc in degrees.
|
||||
|
||||
## Events
|
||||
No special events are sent the the Spinner.
|
||||
No special events are sent to the Spinner.
|
||||
|
||||
See the events of the [Arc](/widgets/core/arc) too.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ In object-oriented thinking, it is the base class from which all other objects i
|
||||
|
||||
The functions and functionalities of the Base object can be used with other widgets too. For example `lv_obj_set_width(slider, 100)`
|
||||
|
||||
The Base object can be directly used as a simple widget: it nothing else than a rectangle. In HTML terms, think of it as a `<div>`.
|
||||
The Base object can be directly used as a simple widget: it's nothing else than a rectangle. In HTML terms, think of it as a `<div>`.
|
||||
|
||||
### Coordinates
|
||||
|
||||
@@ -31,7 +31,7 @@ You can set the position relative to the parent with `lv_obj_set_x(obj, new_x)`
|
||||
|
||||
#### Alignment
|
||||
You can align the object on its parent with `lv_obj_set_align(obj, LV_ALIGN_...)`. After this every x and y setting will be ralitive to the set alignment mode.
|
||||
For example a this will shift the object by 10;20 px from the center of its parent.
|
||||
For example, this will shift the object by 10;20 px from the center of its parent.
|
||||
```c
|
||||
lv_obj_set_align(obj, LV_ALIGN_CENTER);
|
||||
lv_obj_set_pos(obj, 10, 20);
|
||||
|
||||
Reference in New Issue
Block a user