38 int width = metrics.
width-2;
39 int height = metrics.
height-2;
48 cairo_rectangle(w->
crb, 0, 0, width , height);
51 }
else if(w->
state==2) {
53 }
else if(w->
state==3) {
56 cairo_fill_preserve(w->
crb);
57 cairo_set_line_width(w->
crb, 1.0);
60 cairo_text_extents_t extents;
63 cairo_set_font_size (w->
crb, height/2);
64 cairo_text_extents(w->
crb,w->
label , &extents);
66 cairo_move_to (w->
crb, (width-extents.width)/2., height - extents.height );
68 cairo_new_path (w->
crb);
69 if (extents.width > (
float)width) {
73 w->
flags &= ~HAS_TOOLTIP;
83 int height = metrics.
height-2;
96 int width = metrics.
width;
106 int width = metrics.
width;
107 int height = metrics.
height;
111 cairo_rectangle(w->
crb, width-5,0,5,height);
112 cairo_fill_preserve(w->
crb);
116 cairo_rectangle(w->
crb, width-5,(height-10)*sliderstate,5,10);
117 cairo_fill_preserve(w->
crb);
119 cairo_set_line_width(w->
crb,1);
120 cairo_stroke(w->
crb);
128 int height = metrics.
height;
138 if(xbutton->
button == Button1) {
141 int old_value = (int) listbox->
adj->
value;
146 float value = (float)i;
155 }
else if(xbutton->
button == Button4) {
157 }
else if(xbutton->
button == Button5) {
161 float value = view_port->
adj->
value + (view_port->
adj->
step * -direction);
163 if (value<view_port->adj->min_value) value = view_port->
adj->
min_value;
evfunc button_release_callback
Metrics_t - struct to receive window size, position & visibility Pass this struct to os_get_window_...
void check_value_changed(Adjustment_t *adj, float *value)
check_value_changed - check if Adjustment_t value have changed and send value_changed_callback (VALUE...
void adj_set_state(Adjustment_t *adj, float state)
adj_set_state - set the current state of the Adjustment_t
float adj_get_value(Adjustment_t *adj)
adj_get_value - get the current value of the Adjustment_t
float adj_get_state(Adjustment_t *adj)
adj_get_state - get the current state of the Adjustment_t
int childlist_has_child(Childlist_t *childlist)
childlist_has_child - check if a Widget_t Childlist_t contain a child
void use_frame_color_scheme(Widget_t *w, Color_state st)
use_frame_color_scheme - use frame Colors to paint on Widget_t
Color_state get_color_state(Widget_t *wid)
get_color_state - get the Color_state to use in relation to the Widget_t state
void use_text_color_scheme(Widget_t *w, Color_state st)
use_text_color_scheme - use text Colors to paint on Widget_t
void use_bg_color_scheme(Widget_t *w, Color_state st)
use_bg_color_scheme - use background Colors to paint on Widget_t
void use_fg_color_scheme(Widget_t *w, Color_state st)
use_fg_color_scheme - use forground Colors to paint on Widget_t
void use_base_color_scheme(Widget_t *w, Color_state st)
use_base_color_scheme - use base Colors to paint on Widget_t
void _draw_listbox_viewslider(void *w_, void *user_data)
_draw_listbox_viewslider - draw a slider on the viewport to indicate the view point
void _reconfigure_listbox_viewport(void *w_, void *user_data)
_reconfigure_listbox_viewport - reconfigure the viewport adjustment on size changes
void _draw_listbox_item(void *w_, void *user_data)
_draw_listbox_item - draw item on expose call
void _listbox_entry_released(void *w_, void *button_, void *user_data)
_listbox_entry_released - redraw the slider when buttob released
void _draw_listbox(void *w_, void *user_data)
_draw_listbox - draw listbox on expose call
void _configure_listbox(void *w_, void *user_data)
_configure_listbox - configure the viewport on mapping
void _set_listbox_viewpoint(void *w_, void *user_data)
_set_listbox_viewpoint - move the view_port to position