![]() |
libxputty 0.1
|
Go to the source code of this file.
Functions | |
int | _menu_remove_low_dash (char *str) |
void | _draw_menu_label (void *w_, void *user_data) |
_draw_menu_label - draw the menu label on expose call | |
void | _check_menu_state (void *w_, void *user_data) |
_check_menu_state - follow the mouse pointer when a menu is active | |
void | _menu_released (void *w_, void *button_, void *user_data) |
_menu_released - popup the menu on click | |
void | _menu_entry_released (void *w_, void *item_, void *user_data) |
_menu_entry_released - the menu release func | |
void | _draw_menu_slider (void *w_, void *user_data) |
_draw_menu_slider - draw the menu slider on expose call | |
void | _draw_menu (void *w_, void *user_data) |
_draw_menu - draw menu on expose call | |
void | _draw_submenu (void *w_, void *user_data) |
_draw_submenu - draw submenu on expose call | |
void | _enter_submenu (void *w_, void *user_data) |
_enter_submenu - enter submenu | |
void | _leave_submenu (void *w_, void *user_data) |
_leave_submenu - leave submenu | |
void | _draw_item (void *w_, void *user_data) |
_draw_item - draw item on expose call | |
void | _draw_value_item (void *w_, void *user_data) |
_draw_value_item - draw item on expose call | |
void | _draw_accel_item (void *w_, void *user_data) |
_draw_accel_item - draw accel item on expose call | |
void | _draw_accel_check_item (void *w_, void *user_data) |
_accel_draw_check_item - draw item on expose call | |
void | _draw_check_item (void *w_, void *user_data) |
_draw_check_item - draw item on expose call | |
void | _set_viewpoint (void *w_, void *user_data) |
_set_viewpoint - move the view_port to position | |
void | _set_menu_viewpoint (void *w_, void *user_data) |
_set_menu_viewpoint - move the view_port to position by slider | |
void | _check_item_button_pressed (void *w_, void *button_, void *user_data) |
_check_item_button_pressed - redraw item on button press | |
void | _radio_item_button_pressed (void *w_, void *button_, void *user_data) |
_radio_item_button_pressed - redraw item on button press | |
void | _value_item_released (void *w_, void *button_, void *user_data) |
_value_item_released - redraw item on button released | |
void | _configure_menu (Widget_t *parent, Widget_t *menu, int elem, bool above) |
_configure_menu - set final size and position of menu to a Widget_t | |
void _check_item_button_pressed | ( | void * | w_, |
void * | button_, | ||
void * | user_data | ||
) |
_check_item_button_pressed - redraw item on button press
*w_ | - void pointer to view_port |
*button_ | - the xbutton which is pressed |
*user_data | - attached user_data |
Definition at line 458 of file xmenu_private.c.
References adj_set_value(), Widget_t::adj_y, Widget_t::flags, HAS_FOCUS, and Adjustment_t::value.
Referenced by menu_add_check_item().
void _check_menu_state | ( | void * | w_, |
void * | user_data | ||
) |
_check_menu_state - follow the mouse pointer when a menu is active
*w_ | - the menu to check |
*user_data | - attached user_data |
Definition at line 79 of file xmenu_private.c.
References Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Xputty::hold_grab, os_transparent_draw(), Widget_t::parent, pop_menu_show(), Xputty::submenu, and widget_hide().
Referenced by add_menu().
_configure_menu - set final size and position of menu to a Widget_t
*parent | - pointer to the Widget_t the menu should pop over |
*menu | - the menu to show |
elem | - how many entries to show (max value) |
above | - show menu above or below the parent Widget_t |
Definition at line 478 of file xmenu_private.c.
References Widget_t::adj, adj_set_scale(), Widget_t::app, Resize_t::ascale, Widget_t::childlist, Childlist_t::childs, CL_VIEWPORT, Widget_t::crb, Xputty::dpy, Childlist_t::elem, Resize_t::gravity, Metrics_t::height, Widget_t::height, IS_WIDGET, Widget_t::label, Xputty::normal_font, NORTHEAST, os_get_root_window(), os_get_screen_height(), os_get_window_metrics(), os_move_window(), os_resize_window(), os_translate_coords(), Widget_t::scale, set_adjustment(), Adjustment_t::step, Adjustment_t::value, Widget_t::widget, and Widget_t::width.
Referenced by pop_menu_show(), and pop_submenu_show().
void _draw_accel_check_item | ( | void * | w_, |
void * | user_data | ||
) |
_accel_draw_check_item - draw item on expose call
*w_ | - the item to draw |
*user_data | - attached user_data |
Definition at line 391 of file xmenu_private.c.
References _draw_accel_item(), ACTIVE_, Widget_t::adj_y, Widget_t::crb, Widget_t::flags, get_color_state(), Metrics_t::height, IS_RADIO, os_get_window_metrics(), use_fg_color_scheme(), use_shadow_color_scheme(), and Adjustment_t::value.
Referenced by menu_add_accel_check_entry().
void _draw_accel_item | ( | void * | w_, |
void * | user_data | ||
) |
_draw_accel_item - draw accel item on expose call
*w_ | - the item to draw |
*user_data | - attached user_data |
show label
Definition at line 341 of file xmenu_private.c.
References _menu_remove_low_dash(), ACTIVE_, Widget_t::app, Resize_t::ascale, Widget_t::crb, get_color_state(), Metrics_t::height, Widget_t::input_label, Widget_t::label, NORMAL_, Xputty::normal_font, os_get_window_metrics(), PRELIGHT_, Widget_t::scale, SELECTED_, Widget_t::state, use_base_color_scheme(), use_frame_color_scheme(), use_text_color_scheme(), Metrics_t::visible, and Metrics_t::width.
Referenced by _draw_accel_check_item(), and menu_add_accel_item().
void _draw_check_item | ( | void * | w_, |
void * | user_data | ||
) |
_draw_check_item - draw item on expose call
*w_ | - the item to draw |
*user_data | - attached user_data |
Definition at line 415 of file xmenu_private.c.
References _draw_item(), ACTIVE_, Widget_t::adj_y, Widget_t::crb, Widget_t::flags, get_color_state(), Metrics_t::height, IS_RADIO, os_get_window_metrics(), use_fg_color_scheme(), use_shadow_color_scheme(), and Adjustment_t::value.
Referenced by menu_add_check_item(), and menu_add_radio_item().
void _draw_item | ( | void * | w_, |
void * | user_data | ||
) |
_draw_item - draw item on expose call
*w_ | - the item to draw |
*user_data | - attached user_data |
show label
Definition at line 266 of file xmenu_private.c.
References ACTIVE_, Widget_t::app, Resize_t::ascale, Widget_t::crb, get_color_state(), Metrics_t::height, Widget_t::label, NORMAL_, Xputty::normal_font, os_get_window_metrics(), PRELIGHT_, Widget_t::scale, SELECTED_, Widget_t::state, use_base_color_scheme(), use_frame_color_scheme(), use_text_color_scheme(), Metrics_t::visible, and Metrics_t::width.
Referenced by _draw_check_item(), menu_add_item(), menu_add_numeric_items(), and menu_add_value_entry().
void _draw_menu | ( | void * | w_, |
void * | user_data | ||
) |
_draw_menu - draw menu on expose call
*w_ | - the menu to draw |
*user_data | - attached user_data |
Definition at line 152 of file xmenu_private.c.
References Widget_t::crb, get_color_state(), and use_bg_color_scheme().
Referenced by create_menu().
void _draw_menu_label | ( | void * | w_, |
void * | user_data | ||
) |
_draw_menu_label - draw the menu label on expose call
*w_ | - the menu to draw |
*user_data | - attached user_data |
Definition at line 44 of file xmenu_private.c.
References _menu_remove_low_dash(), Widget_t::app, Resize_t::ascale, Widget_t::crb, get_color_state(), Metrics_t::height, Widget_t::input_label, Widget_t::label, Xputty::normal_font, os_get_window_metrics(), Widget_t::scale, and use_text_color_scheme().
Referenced by add_menu().
void _draw_menu_slider | ( | void * | w_, |
void * | user_data | ||
) |
_draw_menu_slider - draw the menu slider on expose call
*w_ | - the menu to draw |
*user_data | - attached user_data |
Definition at line 132 of file xmenu_private.c.
References Widget_t::adj, adj_get_state(), Widget_t::crb, get_color_state(), Metrics_t::height, Adjustment_t::max_value, NORMAL_, os_get_window_metrics(), use_bg_color_scheme(), use_shadow_color_scheme(), Metrics_t::visible, and Metrics_t::width.
Referenced by create_menu().
void _draw_submenu | ( | void * | w_, |
void * | user_data | ||
) |
_draw_submenu - draw submenu on expose call
*w_ | - the menu to draw |
*user_data | - attached user_data |
show label
Definition at line 159 of file xmenu_private.c.
References _menu_remove_low_dash(), ACTIVE_, Widget_t::app, Resize_t::ascale, Widget_t::crb, get_color_state(), Metrics_t::height, Widget_t::input_label, Widget_t::label, NORMAL_, Xputty::normal_font, os_get_window_metrics(), PRELIGHT_, Widget_t::scale, SELECTED_, Widget_t::state, use_base_color_scheme(), use_frame_color_scheme(), use_text_color_scheme(), Metrics_t::visible, and Metrics_t::width.
Referenced by cmenu_add_submenu(), and menu_add_submenu().
void _draw_value_item | ( | void * | w_, |
void * | user_data | ||
) |
_draw_value_item - draw item on expose call
*w_ | - the item to draw |
*user_data | - attached user_data |
show value on the item
Definition at line 299 of file xmenu_private.c.
References ACTIVE_, Widget_t::adj, adj_get_value(), Widget_t::app, Resize_t::ascale, Widget_t::crb, get_color_state(), Metrics_t::height, NORMAL_, Xputty::normal_font, os_get_window_metrics(), PRELIGHT_, Widget_t::scale, SELECTED_, Widget_t::state, Adjustment_t::step, use_base_color_scheme(), use_frame_color_scheme(), use_text_color_scheme(), Metrics_t::visible, and Metrics_t::width.
Referenced by menu_add_value_entry(), and menu_add_value_item().
void _enter_submenu | ( | void * | w_, |
void * | user_data | ||
) |
_enter_submenu - enter submenu
*w_ | - the submenu entered |
*user_data | - attached user_data |
Definition at line 211 of file xmenu_private.c.
References Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, os_get_window_metrics(), os_transparent_draw(), pop_submenu_show(), Xputty::submenu, Metrics_t::visible, and widget_hide().
Referenced by cmenu_add_submenu(), and menu_add_submenu().
void _leave_submenu | ( | void * | w_, |
void * | user_data | ||
) |
_leave_submenu - leave submenu
*w_ | - the submenu leaved |
*user_data | - attached user_data |
Definition at line 228 of file xmenu_private.c.
References Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Widget_t::data, Xputty::dpy, Childlist_t::elem, Widget_t::flags, HAS_FOCUS, os_transparent_draw(), Widget_t::parent, Xputty::submenu, Widget_t::widget, and widget_hide().
Referenced by cmenu_add_submenu(), and menu_add_submenu().
void _menu_entry_released | ( | void * | w_, |
void * | item_, | ||
void * | user_data | ||
) |
_menu_entry_released - the menu release func
*w_ | - void pointer to the Widget_t menu |
*item_ | - void pointer to the selected item *(int*) |
*user_data | - void pointer to the item label *(const char**) |
Definition at line 114 of file xmenu_private.c.
References Widget_t::adj, adj_get_value(), adj_set_value(), Widget_t::app, Xputty::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::func, and Func_t::value_changed_callback.
Referenced by add_menu(), cmenu_add_submenu(), and menu_add_submenu().
void _menu_released | ( | void * | w_, |
void * | button_, | ||
void * | user_data | ||
) |
_menu_released - popup the menu on click
*w_ | - void pointer to the Widget_t button |
*button_ | - void pointer to XEvent.xbutton struct |
*user_data | - void pointer to attached user_data |
Definition at line 106 of file xmenu_private.c.
References XEvent::button, Widget_t::childlist, Childlist_t::childs, Widget_t::flags, HAS_POINTER, and pop_menu_show().
Referenced by add_menu().
int _menu_remove_low_dash | ( | char * | str | ) |
Definition at line 25 of file xmenu_private.c.
Referenced by _draw_accel_item(), _draw_menu_label(), and _draw_submenu().
void _radio_item_button_pressed | ( | void * | w_, |
void * | button_, | ||
void * | user_data | ||
) |
_radio_item_button_pressed - redraw item on button press
*w_ | - void pointer to view_port |
*button_ | - the xbutton which is pressed |
*user_data | - attached user_data |
Definition at line 466 of file xmenu_private.c.
References Widget_t::flags, HAS_FOCUS, and radio_item_set_active().
Referenced by menu_add_radio_item().
void _set_menu_viewpoint | ( | void * | w_, |
void * | user_data | ||
) |
_set_menu_viewpoint - move the view_port to position by slider
*w_ | - void pointer to view_port |
*user_data | - attached user_data |
Definition at line 451 of file xmenu_private.c.
References Widget_t::adj, adj_get_state(), adj_set_state(), Widget_t::childlist, Childlist_t::childs, and Widget_t::parent.
Referenced by create_menu().
void _set_viewpoint | ( | void * | w_, |
void * | user_data | ||
) |
_set_viewpoint - move the view_port to position
*w_ | - void pointer to view_port |
*user_data | - attached user_data |
Definition at line 439 of file xmenu_private.c.
References Widget_t::adj, adj_get_state(), adj_get_value(), adj_set_state(), Widget_t::app, Widget_t::childlist, Childlist_t::childs, Xputty::dpy, Metrics_t::height, os_get_window_metrics(), os_move_window(), and Widget_t::parent.
Referenced by create_viewport().
void _value_item_released | ( | void * | w_, |
void * | button_, | ||
void * | user_data | ||
) |
_value_item_released - redraw item on button released
*w_ | - void pointer to view_port |
*button_ | - the xbutton which is pressed |
*user_data | - attached user_data |
Definition at line 473 of file xmenu_private.c.
References expose_widget().
Referenced by menu_add_value_entry(), and menu_add_value_item().