EZ
Up Prev Next Contents


3.19 Fancy ListBoxes

A fancyListBox extend the functionalities of a listBox. It displays multi-columns of display-items with an optional header row. The contents of a fancyListBox can be scrolled in both directions.

There are two fancyListBoxes in EZwgl, an internal fancyListBox and a composite fancyListBox.

Widget Info

Symbolic widget type EZ_WIDGET_FANCY_LISTBOX
Default class name "FancyListBox"
Default instance name "fancyListBox"

Symbolic widget type EZ_WIDGET_IFANCY_LISTBOX
Default class name "IFancyListBox"
Default instance name "iFancyListBox"

Subwidgets Info

Subwidgets of FancyListBox are listed below.


                ( iFancyListBox
 FancyListBox-->( horizontalScrollbar
                ( verticalScrollbar


Widget Interface Routines

void EZ_GetFancyListBoxWidgetComponents(EZ_Widget *widget, EZ_Widget **iflistBox, EZ_Widget **hscroll, EZ_Widget **vscroll);

return the components of a FancyListBox.

EZ_Item **EZ_GetFancyListBoxSelection(EZ_Widget *widget);

return the current selection in a fancyListBox.

EZ_Item *EZ_GetFancyListBoxItemUsingIdx (EZ_Widget *widget, int row, int col);

return the item at the specified location.

void EZ_GetFancyListBoxSelectionIdx(EZ_Widget *widget, int *row, int *col);

return the row and column index of the current selection in a fancyListBox.

void EZ_SetFancyListBoxData (EZ_Widget *widget, EZ_Item **data, int nrow, int ncol);

set the array of display items to be displayed in a fancyListBox.

void EZ_FancyListBoxClear (EZ_Widget *widget);

clear a fancyListBox.

void EZ_GetFancyListBoxXYOffset (EZ_Widget *widget, int *xoff, int *yoff);

return the XY display offset of a fancyListBox

void EZ_SetFancyListBoxXYOffset (EZ_Widget *widget, int xoff, int yoff);

set the XY display offset of a fancyListBox

void EZ_SetFancyListBoxHeader (EZ_Widget *widget, EZ_Item **header, int nelts);

set the header row of a fancyListBox.

void EZ_FancyListBoxInsertRow (EZ_Widget *widget, EZ_Item **items, int nitems, int where);

insert a row of display items into a fancyListBox.

void EZ_FancyListBoxDeleteRow (EZ_Widget *widget, int idx);

delete the specified row in a fancyListBox.

void EZ_FancyListBoxDeleteSomeRows(EZ_Widget *widget, int *idces, int cnt);

delete some rows from a fancyListBox.

void EZ_FancyListBoxReplaceItem(EZ_Widget *widget, EZ_Item *old, EZ_Item *newItem);

replace an item with a new item.

void EZ_FancyListBoxReplaceItemUsingIdx(EZ_Widget *widget, int row, int col, EZ_Item *newItem);

replace the item at the specified location by a new item.

void EZ_FancyListBoxSelectItemUsingIdx(EZ_Widget *widget, int Srow, int Scol, int *location);

select the specified item and display it at the specified location.

void EZ_FancyListBoxSelectItem(EZ_Widget *widget, EZ_Item *item, int *location);

select the specified item and display it at the specified location.

int EZ_GetFancyListBoxNumberOfRows (EZ_Widget *widget);

return the number of rows in a fancyListBox, counting the header row.

int EZ_GetFancyListBoxNumberOfColumns (EZ_Widget *widget);

return the number of columns in a fancyListBox.

EZ_Item ***EZ_GetFancyListBoxData (EZ_Widget *widget);

return the array of display items in a fancyListBox. Don't modify them.

EZ_Item **EZ_FancyListBoxFindRowAtXY(EZ_Widget *fl, int x, int y, int *r_ret);

return the row of items displayed at the specified location.

EZ_Item *EZ_FancyListBoxFindItemAtXY(EZ_Widget *fl, int x, int y, int *r_ret, int *c_ret);

return the item displayed at the specified location.

int EZ_FancyListBoxGetHighlightedRows(EZ_Widget *widget, int *ary, int size);

return the row indices of highlighted items in a fancyListBox.

int EZ_FancyListBoxGetHighlightedItems(EZ_Widget *widget, EZ_Item **arg,int siz);

return the highlighted items in a fancyListBox.

void EZ_SetFancyListBoxRowBg(EZ_Widget *widget, int mode, char *bg1, char *bg2);

set the alternating background colors.

Screenshot

Resources

Config_Option ResourceName DefaultValue
EZ_CLASS class "FancyListBox"
or "IFancyListBox"
EZ_NAME name "fancyListBox"
or "iFancyListBox"

EZ_X x
EZ_Y y
EZ_WIDTH width
EZ_HEIGHT height

EZ_LOCATION location
EZ_SIZE size
EZ_GEOMETRY geometry

EZ_WIDTH_HINT widthHint
EZ_HEIGHT_HINT heightHint
EZ_SIZE_HINT sizeHint

EZ_BORDER_WIDTH borderWidth 0
EZ_BORDER_TYPE borderType none
EZ_FOCUS_PAD focusPad 0

EZ_PADX padx 0
EZ_PADY pady 0
EZ_IPADX iPadx 0
EZ_IPADY iPady 0

EZ_CURSOR cursor "XC_left_ptr"
EZ_BUBBLE_STRING bubbleString null

EZ_CALLBACK N/A null null
EZ_MOTION_CALLBACK N/A null null
EZ_DESTROY_CALLBACK N/A null null
EZ_EVENT_HANDLER N/A null null

EZ_FOREGROUND foreground "black"
EZ_BACKGROUND background "gray74
EZ_BG_IMAGE_FILE bgImageFile null
EZ_BG_PIXMAP N/A none

EZ_BG_IMAGE_FILE_B bgImageFileB null
EZ_BG_PIXMAP_B N/A none
EZ_CLIENT_PTR_DATA N/A null
EZ_CLIENT_INT_DATA clientIntData 0

EZ_DND_DRAG_CURSOR dndDragCursor none
EZ_DND_BUBBLE_STRING dndBubbleString null

EZ_SCROLLBAR_WIDTH scrollbarWidth 10
EZ_SCROLLBAR_BORDER_WIDTH scrollbarBorderWidth 2
EZ_HSCROLL_INCREMENT hScrollIncrement 1
EZ_VSCROLL_INCREMENT vScrollIncrement 1

EZ_SELECTION_BACKGROUND selectionBackground
EZ_SELECTION_FOREGROUND selectionForeground
EZ_TEXT_BACKGROUND textBackground

EZ_OPTIONAL_HSCROLLBAR optionalHScrollbar true
EZ_OPTIONAL_VSCROLLBAR optionalVScrollbar true

EZ_FANCY_LISTBOX_TYPE fancyListBoxType 0
EZ_FANCY_LISTBOX_COLUMNS fancyListBoxColumns 0
EZ_HIGHLIGHT_MODE highlightMode 0
EZ_ROW_BG rowBg off nil nil

EZ_RUBBER_BAND rubberBand false


Up Prev Next Contents

HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>