|
Atrinik Client 2.5
|
#include <global.h>Go to the source code of this file.
Functions | |
| static int | list_handle_key (list_struct *list, SDLKey key) |
| static void | list_draw_frame (list_struct *list) |
| static void | list_row_color (list_struct *list, int row, SDL_Rect box) |
| static void | list_row_highlight (list_struct *list, SDL_Rect box) |
| static void | list_row_selected (list_struct *list, SDL_Rect box) |
| list_struct * | list_get_focused () |
| void | list_set_focus (list_struct *list) |
| void | list_set_parent (list_struct *list, int px, int py) |
| list_struct * | list_create (uint32 id, uint32 max_rows, uint32 cols, int spacing) |
| void | list_add (list_struct *list, uint32 row, uint32 col, const char *str) |
| void | list_remove_row (list_struct *list, uint32 row) |
| void | list_set_column (list_struct *list, uint32 col, int width, int spacing, const char *name, int centered) |
| void | list_set_font (list_struct *list, int font) |
| void | list_scrollbar_enable (list_struct *list) |
| static int | list_scrollbar_get_size (list_struct *list, SDL_Rect *box) |
| static int | list_slider_get_size (list_struct *list, SDL_Rect *box) |
| static void | list_scrollbar_render (list_struct *list) |
| void | list_show (list_struct *list, int x, int y) |
| void | list_clear_rows (list_struct *list) |
| void | list_clear (list_struct *list) |
| void | list_offsets_ensure (list_struct *list) |
| void | list_remove (list_struct *list) |
| void | list_remove_all () |
| static void | list_scroll (list_struct *list, int up, int scroll) |
| int | list_handle_keyboard (list_struct *list, SDL_KeyboardEvent *event) |
| int | lists_handle_keyboard (SDL_KeyboardEvent *event) |
| int | list_handle_mouse (list_struct *list, int mx, int my, SDL_Event *event) |
| int | lists_handle_mouse (int mx, int my, SDL_Event *event) |
| list_struct * | list_exists (uint32 id) |
| static int | list_compare_alpha (const void *a, const void *b) |
| void | list_sort (list_struct *list, int type) |
| int | list_set_selected (list_struct *list, const char *str, uint32 col) |
Variables | |
| static list_struct * | list_head = NULL |
| static list_struct * | list_tail = NULL |
| static int | old_scrollbar_pos = 0 |
Generic lists implementation.
Definition in file list.c.
| void list_add | ( | list_struct * | list, |
| uint32 | row, | ||
| uint32 | col, | ||
| const char * | str | ||
| ) |
| void list_clear | ( | list_struct * | list | ) |
| void list_clear_rows | ( | list_struct * | list | ) |
| static int list_compare_alpha | ( | const void * | a, |
| const void * | b | ||
| ) | [static] |
Used for alphabetical sorting in list_sort().
| a | What to compare. |
| b | What to compare against. |
| list_struct* list_create | ( | uint32 | id, |
| uint32 | max_rows, | ||
| uint32 | cols, | ||
| int | spacing | ||
| ) |
| static void list_draw_frame | ( | list_struct * | list | ) | [static] |
| list_struct* list_exists | ( | uint32 | id | ) |
| list_struct* list_get_focused | ( | ) |
| static int list_handle_key | ( | list_struct * | list, |
| SDLKey | key | ||
| ) | [static] |
| int list_handle_keyboard | ( | list_struct * | list, |
| SDL_KeyboardEvent * | event | ||
| ) |
| int list_handle_mouse | ( | list_struct * | list, |
| int | mx, | ||
| int | my, | ||
| SDL_Event * | event | ||
| ) |
| void list_offsets_ensure | ( | list_struct * | list | ) |
| void list_remove | ( | list_struct * | list | ) |
| void list_remove_row | ( | list_struct * | list, |
| uint32 | row | ||
| ) |
| static void list_row_color | ( | list_struct * | list, |
| int | row, | ||
| SDL_Rect | box | ||
| ) | [static] |
| static void list_row_highlight | ( | list_struct * | list, |
| SDL_Rect | box | ||
| ) | [static] |
| static void list_row_selected | ( | list_struct * | list, |
| SDL_Rect | box | ||
| ) | [static] |
| static void list_scroll | ( | list_struct * | list, |
| int | up, | ||
| int | scroll | ||
| ) | [static] |
| void list_scrollbar_enable | ( | list_struct * | list | ) |
| static int list_scrollbar_get_size | ( | list_struct * | list, |
| SDL_Rect * | box | ||
| ) | [static] |
| static void list_scrollbar_render | ( | list_struct * | list | ) | [static] |
| void list_set_column | ( | list_struct * | list, |
| uint32 | col, | ||
| int | width, | ||
| int | spacing, | ||
| const char * | name, | ||
| int | centered | ||
| ) |
Set options for one column.
| list | List. |
| col | Column ID. |
| width | The column's ID. -1 to leave default (0). |
| spacing | Spacing between columns. -1 to leave default (0). |
| name | Name of the column. NULL to leave default (no name shown). |
| centered | Whether to center the drawn name/text in the column. -1 to leave default (not centered). |
| void list_set_focus | ( | list_struct * | list | ) |
| void list_set_font | ( | list_struct * | list, |
| int | font | ||
| ) |
| void list_set_parent | ( | list_struct * | list, |
| int | px, | ||
| int | py | ||
| ) |
| int list_set_selected | ( | list_struct * | list, |
| const char * | str, | ||
| uint32 | col | ||
| ) |
| void list_show | ( | list_struct * | list, |
| int | x, | ||
| int | y | ||
| ) |
| static int list_slider_get_size | ( | list_struct * | list, |
| SDL_Rect * | box | ||
| ) | [static] |
| void list_sort | ( | list_struct * | list, |
| int | type | ||
| ) |
Sort a list's entries.
| list | List to sort. |
| type | How to sort, one of List sort types. |
| int lists_handle_keyboard | ( | SDL_KeyboardEvent * | event | ) |
| int lists_handle_mouse | ( | int | mx, |
| int | my, | ||
| SDL_Event * | event | ||
| ) |
list_struct* list_head = NULL [static] |
list_struct* list_tail = NULL [static] |
int old_scrollbar_pos = 0 [static] |
1.7.4