25void _rounded_box(cairo_t *cr,
float x,
float y,
float w,
float h,
float lsize) {
28 cairo_move_to(cr, x+lsize,y);
29 cairo_line_to(cr, x+w,y);
30 cairo_curve_to(cr, x+w,y,x+w,y,x+w,y);
31 cairo_line_to(cr, x+w,y+h-r);
32 cairo_curve_to(cr, x+w,y+h,x+w,y+h,x+w-r,y+h);
33 cairo_line_to(cr, x+r,y+h);
34 cairo_curve_to(cr, x,y+h,x,y+h,x,y+h-r);
35 cairo_line_to(cr, x,y+r);
36 cairo_curve_to(cr, x,y,x,y,x,y);
43 int width_t = metrics.
width;
44 int height_t = metrics.
height;
49 if (elem) tabsize = width_t/elem;
52 cairo_new_path (w->
crb);
53 cairo_set_line_width(w->
crb,1);
58 cairo_text_extents_t extents;
66 cairo_move_to (w->
crb, t+1, 21);
67 cairo_line_to(w->
crb, t+1, 1);
68 cairo_line_to(w->
crb, t+tabsize-1, 1);
69 cairo_line_to(w->
crb, t+tabsize-1, 21);
76 cairo_rectangle(w->
crb, t+2, 1, tabsize-4, 20);
77 cairo_fill_preserve(w->
crb);
84 cairo_text_extents(w->
crb,
"Äy" , &extents);
85 cairo_move_to (w->
crb, 5+t, 2+extents.height);
87 cairo_new_path (w->
crb);
102 int width_t = metrics.
width;
105 if (xbutton->
y < 20) {
106 int tabsize = width_t;
108 if (elem) tabsize = width_t/elem;
Metrics_t - struct to receive window size, position & visibility Pass this struct to os_get_window_...
void adj_set_value(Adjustment_t *adj, float value)
adj_set_value - set the current value to the Adjustment_t
float adj_get_value(Adjustment_t *adj)
adj_get_value - get the current value of the Adjustment_t
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 _draw_tabbox(void *w_, void *user_data)
_draw_tabbox - draw the tabbox on expose call
void _rounded_box(cairo_t *cr, float x, float y, float w, float h, float lsize)
void _draw_tab(void *w_, void *user_data)
_draw_tab - draw a single tab on expose call
void _tab_button_released(void *w_, void *button_, void *user_data)
_tab_button_released - select the tab to show (hide all other)