BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
7f799100
Commit
7f799100
authored
Feb 03, 2017
by
Kiss-Vamosi Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_pb: slider function added
parent
a97d4b6a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
183 additions
and
34 deletions
+183
-34
lv_pb.c
lv_objx/lv_pb.c
+165
-25
lv_pb.h
lv_objx/lv_pb.h
+18
-9
No files found.
lv_objx/lv_pb.c
View file @
7f799100
This diff is collapsed.
Click to expand it.
lv_objx/lv_pb.h
View file @
7f799100
...
...
@@ -23,6 +23,7 @@
#include "../lv_obj/lv_obj.h"
#include "lv_rect.h"
#include "lv_btn.h"
#include "lv_label.h"
/*********************
...
...
@@ -38,11 +39,13 @@ typedef struct
{
lv_rect_ext_t
rect_ext
;
/*Ext. of ancestor*/
/*New data for this type */
lv_obj_t
*
label
;
/*Pointer to the label on the progress bar*/
uint16_t
act_value
;
/*Current value of the progress bar*/
uint16_t
min_value
;
/*Minimum value of the progress bar*/
uint16_t
max_value
;
/*Maximum value of the progress bar*/
char
*
format_str
;
/*Format string of the label. E.g. "Progress: %d"*/
lv_obj_t
*
label
;
/*Pointer to the label on the progress bar*/
int16_t
act_value
;
/*Current value of the progress bar*/
int16_t
tmp_value
;
/*Value when settings from a display input*/
int16_t
min_value
;
/*Minimum value of the progress bar*/
int16_t
max_value
;
/*Maximum value of the progress bar*/
char
*
format_str
;
/*Format string of the label. E.g. "Progress: %d"*/
uint8_t
set_in_prog
:
1
;
/*Indicates the setting by display input is in progress*/
}
lv_pb_ext_t
;
/*Style of progress bar*/
...
...
@@ -50,13 +53,19 @@ typedef struct
{
lv_rects_t
bg
;
/*Style of the background (inherited)*/
lv_rects_t
bar
;
/*Style of the bar*/
lv_labels_t
label
;
/*Style of the label*/
lv_labels_t
label
;
/*Style of the label*/
lv_rects_t
btn
;
/*Style of the button (it is rectangle but acts as a button)*/
color_t
tmp_bar_mcolor
;
/*Main color of temporal bar when settings by hand*/
color_t
tmp_bar_gcolor
;
/*Gradient color of temporal bar when settings by hand*/
cord_t
btn_size
;
/*Width or height of the button (depending on the orientation of the pb)*/
uint8_t
tmp_bar_opa
;
/*Opacity of temporal bar in percentage of the object opacity [%]*/
}
lv_pbs_t
;
/*Built-in styles of progress bar*/
typedef
enum
{
LV_PBS_DEF
,
LV_PBS_SLIDER
,
}
lv_pbs_builtin_t
;
/**********************
...
...
@@ -84,7 +93,7 @@ bool lv_pb_signal(lv_obj_t * pb, lv_signal_t sign, void * param);
* @param pb pointer to a progress bar object
* @param value new value
*/
void
lv_pb_set_value
(
lv_obj_t
*
pb
,
u
int16_t
value
);
void
lv_pb_set_value
(
lv_obj_t
*
pb
,
int16_t
value
);
/**
* Set minimum and the maximum values of a progress bar
...
...
@@ -92,7 +101,7 @@ void lv_pb_set_value(lv_obj_t * pb, uint16_t value);
* @param min minimum value
* @param max maximum value
*/
void
lv_pb_set_min_max_value
(
lv_obj_t
*
pb
,
uint16_t
min
,
u
int16_t
max
);
void
lv_pb_set_min_max_value
(
lv_obj_t
*
pb
,
int16_t
min
,
int16_t
max
);
/**
* Set format string for the label of the progress bar
...
...
@@ -106,7 +115,7 @@ void lv_pb_set_format_str(lv_obj_t * pb, const char * format);
* @param pb pointer to a progress bar object
* @return the value of the progress bar
*/
u
int16_t
lv_pb_get_value
(
lv_obj_t
*
pb
);
int16_t
lv_pb_get_value
(
lv_obj_t
*
pb
);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment