Atrinik Client  4.0
Data Structures | Macros | Typedefs
list.h File Reference

Go to the source code of this file.

Data Structures

struct  list_struct
 

Macros

#define LIST_ROW_HEIGHT(list)   (((list)->font != NULL ? FONT_HEIGHT((list)->font) : 0) + (list)->row_height_adjust)
 
#define LIST_ROWS_START(list)   ((list)->y + (list)->header_height + (list)->spacing + (list)->frame_offset)
 
#define LIST_ROWS_MAX(list)   ((uint32_t) ((list)->height + (list)->spacing) / LIST_ROW_HEIGHT((list)))
 
#define LIST_ROWS_HEIGHT(list)   (LIST_ROW_HEIGHT((list)) * (list)->max_rows)
 
#define LIST_ROW_OFFSET(row, list)   ((row) - (list)->row_offset)
 
#define LIST_HEIGHT_FULL(list)   ((int) LIST_ROWS_HEIGHT((list)) + (list)->spacing + (list)->header_height)
 
#define LIST_WIDTH_FULL(list)   ((list)->width + ((list)->scrollbar_enabled ? (list)->scrollbar.background.w : 0))
 
#define LIST_MOUSE_OVER(list, mx, my)   ((mx) > (list)->x && (mx) < (list)->x + LIST_WIDTH_FULL((list)) && (my) > (list)->y && (my) < (list)->y + LIST_HEIGHT_FULL((list)))
 
#define LIST_SORT_ALPHA   1
 
#define DOUBLE_CLICK_DELAY   300
 

Typedefs

typedef struct list_struct list_struct
 

Detailed Description

Header file for generic lists implementation.

Definition in file list.h.

Macro Definition Documentation

#define DOUBLE_CLICK_DELAY   300

Double click delay in ticks.

Definition at line 289 of file list.h.

#define LIST_HEIGHT_FULL (   list)    ((int) LIST_ROWS_HEIGHT((list)) + (list)->spacing + (list)->header_height)

Figure out full height of the list, including its header.

Definition at line 271 of file list.h.

#define LIST_MOUSE_OVER (   list,
  mx,
  my 
)    ((mx) > (list)->x && (mx) < (list)->x + LIST_WIDTH_FULL((list)) && (my) > (list)->y && (my) < (list)->y + LIST_HEIGHT_FULL((list)))

Calculate whether mouse is over the specified list.

Definition at line 278 of file list.h.

#define LIST_ROW_HEIGHT (   list)    (((list)->font != NULL ? FONT_HEIGHT((list)->font) : 0) + (list)->row_height_adjust)

Calculate list's row height.

Definition at line 256 of file list.h.

#define LIST_ROW_OFFSET (   row,
  list 
)    ((row) - (list)->row_offset)

Adjust row ID by the row offset, thus transforming row ID to 0-[max visible rows].

Definition at line 267 of file list.h.

#define LIST_ROWS_HEIGHT (   list)    (LIST_ROW_HEIGHT((list)) * (list)->max_rows)

Calculate the height of the rows.

Definition at line 262 of file list.h.

#define LIST_ROWS_MAX (   list)    ((uint32_t) ((list)->height + (list)->spacing) / LIST_ROW_HEIGHT((list)))

Figure out maximum visible rows.

Definition at line 260 of file list.h.

#define LIST_ROWS_START (   list)    ((list)->y + (list)->header_height + (list)->spacing + (list)->frame_offset)

Figure out Y position where rows should actually start.

Definition at line 258 of file list.h.

#define LIST_WIDTH_FULL (   list)    ((list)->width + ((list)->scrollbar_enabled ? (list)->scrollbar.background.w : 0))

Figure out the full width of the list, including its scrollbar, if it has one.

Definition at line 276 of file list.h.

Typedef Documentation

typedef struct list_struct list_struct

One list.