X11workbench Toolkit
1.0
|
Structure containing data for list-related dialog controls. More...
#include <dialog_support.h>
Data Fields | |
int | nItems |
current number of valid entries in 'aItems' | |
int | nMaxItems |
max size of aItems (must re-alloc to increase nMaxItems) | |
int | nPos |
current scroll position | |
int | nTop |
scroll position of the top item currently displayed | |
int | nHeight |
height (in items) of display area, recalculated on resize/expose | |
int | nItemHeight |
height of a single item (in pixels) | |
int | nFlags |
flags (sorted, etc.) | |
WB_GEOM | geomDisplay |
the (cached) geometry that defines the "display area" (not scrollbars, border) | |
Window | wOwner |
owning window [to be notified on change] | |
void *(* | pfnAllocator )(const void *, int) |
pointer to the copy constructor to call for each item that's added More... | |
void(* | pfnDestructor )(void *) |
destructor to call for each item that's removed More... | |
void(* | pfnDisplay )(WBDialogControl *pControl, void *pData, int iSelected, WBGC gcPaint, WB_GEOM *pGeom, WB_FONTC pFont) |
display callback function to paint the entry on the display surface More... | |
int(* | pfnSort )(const void *, const void *) |
Optional sort comparison function. NULL implies 'strcmp'. | |
void * | aItems [1] |
The array of item data, integrated into the memory block containing this structure. | |
Structure containing data for list-related dialog controls.
Internally maintained structure containing list-related control data including selection information and function callbacks for allocation, de-allocation, display, and sorting.
Definition at line 110 of file dialog_support.h.
void*(* pfnAllocator) (const void *, int) |
pointer to the copy constructor to call for each item that's added
typically this will call 'WBAlloc' followed by 'memcpy' to construct a new pointer
if this is NULL, the caller-supplied pointer is assigned to 'aItems' as-is
Definition at line 126 of file dialog_support.h.
void(* pfnDestructor) (void *) |
destructor to call for each item that's removed
typically this will point to 'WBFree()'. if it is NULL, the caller-supplied pointer is ignored on cleanup
Definition at line 131 of file dialog_support.h.
void(* pfnDisplay) (WBDialogControl *pControl, void *pData, int iSelected, WBGC gcPaint, WB_GEOM *pGeom, WB_FONTC pFont) |
display callback function to paint the entry on the display surface
generic callback function to display the contents of the item within 'pGeom' using the provided WBGC. The 'pControl' 'pData' and 'iSelected' parameters reference the WBDialogControl, the list entry's data pointer, and a boolean 'selection' flag, respectively.
Typically this will be on of the listbox 'DisplayItem' API functions.
Definition at line 139 of file dialog_support.h.