![]() |
libxputty 0.1
|
Go to the source code of this file.
Functions | |
void | pop_menu_show (Widget_t *parent, Widget_t *menu, int elem, bool above) |
pop_menu_show - pop up a menu to a Widget_t | |
void | pop_submenu_show (Widget_t *parent, Widget_t *menu, int elem, bool above) |
pop_submenu_show - pop up a submenu to a Widget_t | |
Widget_t * | create_viewport (Widget_t *parent, int width, int height) |
create_viewport - create a viewport on a menu to a Widget_t | |
void | set_active_radio_entry (void *w_, void *user_data) |
void | set_active_radio_entry_num (Widget_t *w, int active) |
set_active_radio_item - activate selected radio item by number | |
Widget_t * | add_menu (Widget_t *parent, const char *label, int x, int y, int width, int height) |
add_menu - add a menu to a Widget_t | |
Widget_t * | add_menubar (Widget_t *parent, const char *label, int x, int y, int width, int height) |
add_menubar - add a menubar to a Widget_t | |
Widget_t * | menubar_add_menu (Widget_t *parent, const char *label) |
menubar_add_menu - add a menu to a menubar | |
Widget_t * | menu_add_entry (Widget_t *wid, const char *label) |
menu_add_entry - add a entry to menu | |
Widget_t * | menu_add_radio_entry (Widget_t *wid, const char *label) |
menu_add_radio_entry- add a radio entry to menu | |
Widget_t * | menu_add_check_entry (Widget_t *wid, const char *label) |
menu_add_check_entry- add a check entry to menu | |
Widget_t * | menu_add_accel_check_entry (Widget_t *wid, const char *label) |
menu_add_accel_check_entry- add a check entry with accel to menu | |
Widget_t * | menu_add_value_entry (Widget_t *wid, const char *label) |
menu_add_value_entry- add a value entry to menu | |
Widget_t * | menu_add_submenu (Widget_t *w, const char *label) |
menu_add_submenu - add a submenu to a Widget_t | |
Widget_t * | cmenu_add_submenu (Widget_t *w, const char *label) |
cmenu_add_submenu - add a submenu to a cmenu | |
Widget_t * | create_menu (Widget_t *parent, int height) |
create_menu - create a menu to a Widget_t | |
Widget_t * | menu_add_item (Widget_t *menu, const char *label) |
menu_add_item - add a item to menu | |
void | menu_remove_item (Widget_t *menu, Widget_t *item) |
menu_remove_item - remove a item from menu | |
Widget_t * | menu_add_accel_item (Widget_t *menu, const char *label) |
menu_add_accel_item - add a accel item to menu | |
Widget_t * | menu_add_check_item (Widget_t *menu, const char *label) |
menu_add_check_item - add a item to menu | |
void | radio_item_set_active (Widget_t *w) |
radio_item_set_active - activate selected radio item | |
Widget_t * | menu_add_radio_item (Widget_t *menu, const char *label) |
menu_add_radio_item - add a radio item to menu | |
Widget_t * | menu_add_value_item (Widget_t *menu, const char *label) |
menu_add_value_item - add a item to menu | |
void | menu_add_numeric_items (Widget_t *menu, int *imin, int *imax) |
menu_add_numeric_items - add numeric items from imin to imax to menu | |
add_menu - add a menu to a Widget_t
*parent | - pointer to the Widget_t the menu should pop over |
*label | - the label of the menu |
x,y,width,height | - the position/geometry to create the menu |
Definition at line 86 of file xmenu.c.
References _check_menu_state(), _draw_menu_label(), _menu_entry_released(), _menu_released(), add_adjustment(), Widget_t::adj, Func_t::adj_callback, Widget_t::adj_y, Widget_t::app, Func_t::button_release_callback, CL_NONE, create_menu(), create_widget(), Func_t::enter_callback, Func_t::expose_callback, Widget_t::func, Resize_t::gravity, Widget_t::label, Func_t::leave_callback, NONE, os_transparent_draw(), Widget_t::scale, set_active_radio_entry(), and Widget_t::state.
Referenced by menubar_add_menu().
Widget_t * add_menubar | ( | Widget_t * | parent, |
const char * | label, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
add_menubar - add a menubar to a Widget_t
*parent | - pointer to the Widget_t hold the menubar |
*label | - unused |
x,y,width,height | - the position/geometry to create the menubar |
Definition at line 106 of file xmenu.c.
References Widget_t::app, create_widget(), Widget_t::flags, Resize_t::gravity, NO_AUTOREPEAT, NO_PROPAGATE, NORTHEAST, and Widget_t::scale.
cmenu_add_submenu - add a submenu to a cmenu
*wid | - pointer to the Widget_t the submenu belongs to |
*label | - the label of the menu |
Definition at line 226 of file xmenu.c.
References _draw_submenu(), _enter_submenu(), _leave_submenu(), _menu_entry_released(), add_adjustment(), Widget_t::adj, Func_t::adj_callback, Widget_t::adj_y, Widget_t::app, Func_t::button_release_callback, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, CL_NONE, CL_VIEWPORT, create_menu(), create_widget(), Func_t::enter_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Resize_t::init_height, IS_SUBMENU, Widget_t::label, Func_t::leave_callback, Adjustment_t::max_value, MENUITEM, os_get_window_metrics(), Widget_t::scale, set_active_radio_entry(), set_adjustment(), and Metrics_t::width.
Referenced by add_keyboard().
create_menu - create a menu to a Widget_t
*parent | - pointer to the Widget_t the menu should pop over |
height | - define the height of a single menu item |
Definition at line 256 of file xmenu.c.
References _draw_menu(), _draw_menu_slider(), _set_menu_viewpoint(), add_vslider(), Widget_t::adj, Widget_t::adj_y, Widget_t::app, Widget_t::childlist, childlist_add_child(), CL_VIEWPORTSLIDER, Widget_t::color_scheme, create_viewport(), create_window(), Func_t::expose_callback, Widget_t::flags, Widget_t::func, Resize_t::gravity, IS_POPUP, IS_WIDGET, NO_AUTOREPEAT, NO_PROPAGATE, NONE, NORTHWEST, os_get_root_window(), os_set_transient_for_hint(), os_set_window_attrb(), os_translate_coords(), Widget_t::scale, set_adjustment(), Func_t::value_changed_callback, and Widget_t::widget.
Referenced by add_keyboard(), add_menu(), cmenu_add_submenu(), and menu_add_submenu().
create_viewport - create a viewport on a menu to a Widget_t
*parent | - pointer to the Widget_t the menu should pop over |
width | - define the width of the viewport |
height | - define the height of the viewport |
Definition at line 50 of file xmenu.c.
References _set_viewpoint(), add_adjustment(), Widget_t::adj, Func_t::adj_callback, Widget_t::adj_y, Widget_t::app, CL_VIEWPORT, create_widget(), Widget_t::flags, Widget_t::func, Resize_t::gravity, NONE, and Widget_t::scale.
Referenced by create_menu().
menu_add_accel_check_entry- add a check entry with accel to menu
*wid | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 159 of file xmenu.c.
References _draw_accel_check_item(), Widget_t::adj, Widget_t::childlist, Childlist_t::childs, CL_NONE, Func_t::expose_callback, Widget_t::func, Adjustment_t::max_value, menu_add_check_item(), and set_adjustment().
menu_add_accel_item - add a accel item to menu
*menu | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 311 of file xmenu.c.
References _draw_accel_item(), Func_t::expose_callback, Widget_t::func, and menu_add_item().
Referenced by menu_add_entry().
menu_add_check_entry- add a check entry to menu
*wid | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 150 of file xmenu.c.
References Widget_t::adj, Widget_t::childlist, Childlist_t::childs, CL_NONE, Adjustment_t::max_value, menu_add_check_item(), and set_adjustment().
menu_add_check_item - add a item to menu
*menu | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 317 of file xmenu.c.
References _check_item_button_pressed(), _draw_check_item(), add_adjustment(), Widget_t::adj, Widget_t::adj_y, Func_t::button_press_callback, CL_TOGGLE, Func_t::expose_callback, Widget_t::func, and menu_add_item().
Referenced by add_keyboard(), menu_add_accel_check_entry(), menu_add_check_entry(), and menu_add_radio_item().
menu_add_entry - add a entry to menu
*wid | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 132 of file xmenu.c.
References Widget_t::adj, Widget_t::childlist, Childlist_t::childs, CL_NONE, Adjustment_t::max_value, menu_add_accel_item(), and set_adjustment().
menu_add_item - add a item to menu
*menu | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 283 of file xmenu.c.
References _draw_item(), Widget_t::adj, Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, CL_VIEWPORT, create_widget(), Func_t::enter_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Resize_t::init_height, Widget_t::label, Func_t::leave_callback, Adjustment_t::max_value, MENUITEM, os_get_window_metrics(), os_transparent_draw(), Widget_t::scale, set_adjustment(), and Metrics_t::width.
Referenced by menu_add_accel_item(), menu_add_check_item(), and menu_add_value_item().
void menu_add_numeric_items | ( | Widget_t * | menu, |
int * | imin, | ||
int * | imax | ||
) |
menu_add_numeric_items - add numeric items from imin to imax to menu
*menu | - pointer to the Widget_t menu |
*imin | - the low number of the numeric items |
*imax | - the high number of the numeric items |
Definition at line 360 of file xmenu.c.
References _draw_item(), Widget_t::adj, Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, CL_VIEWPORT, create_widget(), Func_t::enter_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Resize_t::init_height, Widget_t::input_label, Widget_t::label, Func_t::leave_callback, Adjustment_t::max_value, MENUITEM, os_get_window_metrics(), os_transparent_draw(), Widget_t::scale, set_adjustment(), and Metrics_t::width.
menu_add_radio_entry- add a radio entry to menu
*wid | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 141 of file xmenu.c.
References Widget_t::adj, Widget_t::childlist, Childlist_t::childs, CL_NONE, Adjustment_t::max_value, menu_add_radio_item(), and set_adjustment().
Referenced by add_keyboard().
menu_add_radio_item - add a radio item to menu
*menu | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 342 of file xmenu.c.
References _draw_check_item(), _radio_item_button_pressed(), Func_t::button_press_callback, Func_t::expose_callback, Widget_t::flags, Widget_t::func, IS_RADIO, and menu_add_check_item().
Referenced by menu_add_radio_entry().
menu_add_submenu - add a submenu to a Widget_t
*wid | - pointer to the Widget_t the submenu belongs to |
*label | - the label of the menu |
Definition at line 194 of file xmenu.c.
References _draw_submenu(), _enter_submenu(), _leave_submenu(), _menu_entry_released(), add_adjustment(), Widget_t::adj, Func_t::adj_callback, Widget_t::adj_y, Widget_t::app, Func_t::button_release_callback, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, CL_NONE, CL_VIEWPORT, create_menu(), create_widget(), Func_t::enter_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Resize_t::init_height, IS_SUBMENU, Widget_t::label, Func_t::leave_callback, Adjustment_t::max_value, MENUITEM, os_get_window_metrics(), Widget_t::scale, set_active_radio_entry(), set_adjustment(), and Metrics_t::width.
menu_add_value_entry- add a value entry to menu
*wid | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 169 of file xmenu.c.
References _draw_item(), _draw_value_item(), _value_item_released(), add_adjustment(), Widget_t::adj, Widget_t::adj_y, Widget_t::app, Func_t::button_release_callback, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, CL_CONTINUOS, CL_VIEWPORT, create_widget(), Func_t::enter_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Widget_t::label, Func_t::leave_callback, Adjustment_t::max_value, MENUITEM, os_get_window_metrics(), os_transparent_draw(), Widget_t::scale, set_adjustment(), and Metrics_t::width.
Referenced by add_keyboard().
menu_add_value_item - add a item to menu
*menu | - pointer to the Widget_t menu |
*label | - Label to show on the menu |
Definition at line 351 of file xmenu.c.
References _draw_value_item(), _value_item_released(), add_adjustment(), Widget_t::adj, Widget_t::adj_y, Func_t::button_release_callback, CL_CONTINUOS, Func_t::expose_callback, Widget_t::func, and menu_add_item().
menu_remove_item - remove a item from menu
Definition at line 303 of file xmenu.c.
References Widget_t::adj, Widget_t::app, Widget_t::childlist, Childlist_t::childs, CL_VIEWPORT, destroy_widget(), Xputty::dpy, Adjustment_t::max_value, os_move_window(), and set_adjustment().
menubar_add_menu - add a menu to a menubar
*parent | - pointer to the parent Widget_t (menubar) |
*label | - Label to show on the menu |
Definition at line 114 of file xmenu.c.
References add_menu(), Widget_t::childlist, Childlist_t::childs, Widget_t::crb, Childlist_t::elem, Metrics_t::height, os_get_window_metrics(), and Metrics_t::width.
pop_menu_show - pop up a 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 27 of file xmenu.c.
References _configure_menu(), Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Childlist_t::elem, Xputty::hold_grab, os_grab_pointer(), pop_widget_show_all(), and widget_hide().
Referenced by _check_menu_state(), and _menu_released().
pop_submenu_show - pop up a submenu 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 41 of file xmenu.c.
References _configure_menu(), Widget_t::app, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Childlist_t::elem, Xputty::submenu, and submenu_widget_show_all().
Referenced by _enter_submenu().
void radio_item_set_active | ( | Widget_t * | w | ) |
radio_item_set_active - activate selected radio item
*w | - the Widget_t to activate |
Definition at line 326 of file xmenu.c.
References Widget_t::adj, adj_set_value(), Widget_t::adj_y, Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, IS_RADIO, Widget_t::parent, and Widget_t::state.
Referenced by _radio_item_button_pressed(), and set_active_radio_entry_num().
void set_active_radio_entry | ( | void * | w_, |
void * | user_data | ||
) |
Definition at line 60 of file xmenu.c.
References Widget_t::adj, adj_get_value(), adj_set_value(), Widget_t::adj_y, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Childlist_t::elem, Widget_t::flags, and IS_RADIO.
Referenced by add_menu(), cmenu_add_submenu(), and menu_add_submenu().
void set_active_radio_entry_num | ( | Widget_t * | w, |
int | active | ||
) |
set_active_radio_item - activate selected radio item by number
*w | - the Widget_t hold the menu |
active | - the menu entry to activate |
Definition at line 78 of file xmenu.c.
References Widget_t::adj, Widget_t::childlist, Childlist_t::childs, Widget_t::flags, IS_RADIO, and radio_item_set_active().
Referenced by add_keyboard().