9 typedef struct _TX_List TX_List
;
10 typedef struct _TXColumns TXColumns
;
13 struct list_head node
;
19 typedef int (*cmpr_fn
)(TXObj
*,
20 const struct list_head
*,
21 const struct list_head
*);
22 typedef void (*bind_fn
)(TXObj
*, int ch
, int key
);
23 typedef char *(*text_fn
)(TXObj
*, char *, void *);
24 typedef void *(*data_fn
)(TXObj
*, void *, void *);
25 typedef char **(*cols_fn
)(TXObj
*, char *, void *);
28 struct Row
**map
; /* integer mapping to rows */
29 struct list_head rows
; /* sorted rows */
30 struct list_head
*top
;
31 struct list_head
*sel
;
33 int size
; /* max amount of rows before new allocation */
34 int count
; /* amount of rows */
35 int asc
; /* ascending sort */
55 TX_LIST_SCROLL
= 1<<10,
56 TX_LIST_SEPARATOR
= 1<<11,
57 TX_LIST_TITLE
= 1<<12,
58 TX_LIST_HLIGHT
= 1<<13
61 void tx_list_new (TXObj
*obj
);
62 void tx_list_init (TXObj
*obj
);
63 void tx_list_sort (TXObj
*obj
);
64 void tx_list_sort_asc_set (TXObj
*obj
, int asc
);
65 int tx_list_sort_asc_get (TXObj
*obj
);
66 void tx_list_clear (TXObj
*obj
);
67 void tx_list_sync (TXObj
*obj
);
68 void tx_list_row_remove (TXObj
*obj
, int k
);
69 void tx_list_scroll (TXObj
*obj
, int scroll
);
70 void tx_list_row_sync (TXObj
*obj
, int k
, void *d
);
71 int tx_list_selected_get (TXObj
*obj
);
72 void tx_list_selected_set (TXObj
*obj
, int k
); /* NI */
75 void tx_list_cols_cb_set (TXObj
*obj
, cols_fn
);
76 void tx_list_text_cb_set (TXObj
*obj
, text_fn
);
77 void tx_list_data_cb_set (TXObj
*obj
, data_fn
);
78 void tx_list_cmpr_cb_set (TXObj
*obj
, cmpr_fn
);
79 void tx_list_bind_cb_set (TXObj
*obj
, bind_fn
);
82 int *tx_list_columns_width_get (TXObj
*obj
);
83 void tx_list_columns_width_set (TXObj
*obj
, int ncols
, int *widths
);
84 void tx_list_columns_title_set (TXObj
*obj
, int ncols
, char **titles
);
85 void tx_list_column_sort_set (TXObj
*obj
, int i
);
86 int tx_list_column_sort_get (TXObj
*obj
); /* NI */