Communicator UI: 6 Routines for Lists

Up: GEOS SDK TechDocs | Up | Prev: 5 FoamProgressDialog

There are two routines useful for presenting the user with a list that is alphabetically sorted and/or presents has multi-column items.

The FoamGetLexicalOrder() routine is used for alphabetically ordering strings. It takes a char value and returns a byte-size number. This number represents that character's position in a sorted multi-language "alphabet". If you are presenting the user with a sorted list of strings, this is the routine to use to sort the list.

The CreateVisMonikerLine() routine puts together a multi-column visual moniker. It puts the moniker together from an array of strings and/or bitmaps you supply. It returns the optr of the new moniker. It takes the following arguments:

The VisMonikerColumn structure is defined:

typedef struct {
	byte            VMC_width; /* 0 for bitmaps */
	const void *    VMC_ptr; 
	Justification   VMC_just; 
	TextStyle       VMC_style; 
	ColumnBorder    VMC_border; 
} VisMonikerColumn;

For each field, pass a VMC_width to specify the number of pixels to allow to draw the text, or 0 to signal that this column is a bitmap. VMC_ptr should point to a string buffer if the column contains text; it should point to a simple bitmap if the column contains a bitmap.

When you are done using the multi-column moniker, it is up to you to free its memory. Get the memory block handle from the optr and pass that handle to MemFree() .


Up: GEOS SDK TechDocs | Up | Prev: 5 FoamProgressDialog