38 #define DEFAULT_SPACING 2 120 g_free ( lv->
boxes );
168 unsigned int offset = 0;
199 unsigned int offset = 0;
217 for (
unsigned int i = 0; i < max && width > 0; i++ ) {
220 if ( twidth >= width ) {
229 width -= twidth + spacing_hori;
230 left_offset += twidth + spacing_hori;
236 for (
unsigned int i = 0; i < lv->
cur_elements && width > 0 && i <= offset; i++ ) {
239 if ( twidth >= width ) {
245 right_offset -= twidth;
249 width -= twidth + spacing_hori;
250 right_offset -= spacing_hori;
257 void * temp = lv->
boxes[i];
260 lv->
boxes[sw] = temp;
276 unsigned int offset = 0;
311 width -= spacing_hori;
314 unsigned int element_width = ( width ) / lv->
cur_columns;
315 for (
unsigned int i = 0; i < max; i++ ) {
316 unsigned int ex = left_offset + ( ( i ) / lv->
max_rows ) * ( element_width + spacing_hori );
332 for (
unsigned int i = 0; i < max; i++ ) {
354 unsigned int newne = 0;
366 for (
unsigned int i = newne; i < lv->
cur_elements; i++ ) {
371 for (
unsigned int i = lv->
cur_elements; i < newne; i++ ) {
453 for ( i = 0; i < max && target == NULL; i++ ) {
491 for ( i = 0; i < max &&
WIDGET ( lv->
boxes[i] ) != wid; i++ ) {
497 gboolean custom = FALSE;
void listview_set_selected(listview *lv, unsigned int selected)
static unsigned int scroll_continious(listview *lv)
unsigned int menu_columns
listview_update_callback callback
listview * listview_create(widget *parent, const char *name, listview_update_callback cb, void *udata, unsigned int eh, gboolean reverse)
static void listview_resize(widget *wid, short w, short h)
static WidgetTriggerActionResult listview_element_trigger_action(widget *wid, MouseBindingListviewElementAction action, gint x, gint y, void *user_data)
unsigned int cur_elements
void listview_nav_up(listview *lv)
void listview_nav_page_prev(listview *lv)
void(* listview_update_callback)(textbox *tb, unsigned int entry, void *udata, TextBoxFontType type, gboolean full)
unsigned int listview_get_num_lines(listview *lv)
unsigned int menu_columns
static void update_element(listview *lv, unsigned int tb, unsigned int index, gboolean full)
void listview_set_num_elements(listview *lv, unsigned int rows)
unsigned int max_elements
xcb_timestamp_t last_click
void listview_set_scroll_type(listview *lv, ScrollType type)
static void listview_free(widget *wid)
int rofi_theme_get_boolean(const widget *widget, const char *property, int def)
MouseBindingListviewAction
RofiDistance rofi_theme_get_distance(const widget *widget, const char *property, int def)
textbox * textbox_create(widget *parent, WidgetType type, const char *name, TextboxFlags flags, TextBoxFontType tbft, const char *text, double xalign, double yalign)
void listview_nav_right(listview *lv)
void listview_set_show_scrollbar(listview *lv, gboolean enabled)
MouseBindingListviewElementAction
void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata)
void listview_set_num_lines(listview *lv, unsigned int num_lines)
static void listview_recompute_elements(listview *lv)
static widget * listview_find_mouse_target(widget *wid, WidgetType type, gint x, gint y)
static void listview_nav_page_next_int(listview *lv)
unsigned int element_height
unsigned int listview_get_selected(listview *lv)
void(* listview_mouse_activated_cb)(listview *, gboolean, void *)
unsigned int req_elements
struct _listview::@1 barview
unsigned int element_width
void listview_set_multi_select(listview *lv, gboolean enable)
static int listview_get_desired_height(widget *wid)
static void listview_nav_page_prev_int(listview *lv)
void textbox_moveresize(textbox *tb, int x, int y, int w, int h)
static void _listview_draw(widget *wid, cairo_t *draw)
void listview_set_fixed_num_lines(listview *lv)
static unsigned int scroll_per_page_barview(listview *lv)
static WidgetTriggerActionResult listview_trigger_action(widget *wid, MouseBindingListviewAction action, G_GNUC_UNUSED gint x, G_GNUC_UNUSED gint y, G_GNUC_UNUSED void *user_data)
int distance_get_pixel(RofiDistance d, RofiOrientation ori)
static void barview_draw(widget *wid, cairo_t *draw)
void listview_nav_page_next(listview *lv)
RofiOrientation rofi_theme_get_orientation(const widget *widget, const char *property, RofiOrientation def)
static void listview_draw(widget *wid, cairo_t *draw)
unsigned int max_displayed_lines
listview_mouse_activated_cb mouse_activated
void * mouse_activated_data
static void listview_nav_down_int(listview *lv)
void listview_set_max_lines(listview *lv, unsigned int max_lines)
int textbox_get_estimated_height(const textbox *tb, int eh)
unsigned int fixed_num_lines
gboolean listview_get_fixed_num_lines(listview *lv)
void listview_nav_left(listview *lv)
int textbox_get_desired_width(widget *wid)
unsigned int fixed_num_lines
void listview_nav_down(listview *lv)
gboolean scrollbar_scroll
int rofi_theme_get_integer(const widget *widget, const char *property, int def)
static unsigned int scroll_per_page(listview *lv)
static void listview_nav_up_int(listview *lv)