EZwgl (4.20 WorkAreas)

## 4.20 WorkAreas

A workArea is a free format lister for display items. It is like a canvas but with limited display capabilities. Each workArea widget has a private geometry manager, which arranges the locations of display items.

### Widget Info

Symbolic widget type | EZ_WIDGET_WORK_AREA
Default class name | "WorkArea"
Default instance name | "workArea"

Symbolic widget type | EZ_WIDGET_IWORK_AREA
Default class name | "IWorkArea"
Default instance name | "iWorkArea"

### Subwidgets Info

Subwidgets of WorkArea are listed below.

                ( iWorkArea
     WorkArea-->( horizontalScrollbar
                ( verticalScrollbar

### Widget Interface Routines

    void  EZ_GetWorkAreaWidgetComponents(EZ_Widget *widget, EZ_Widget **iwa,
    	                         EZ_Widget **hscroll, EZ_Widget **vscroll);

return the components of a workArea widget.

`void EZ_WorkAreaInsertItems(EZ_Widget *widget, EZ_Item **item, int nitems);`

insert some items in a workArea widget.

`void EZ_WorkAreaInsertItem(EZ_Widget *widget, EZ_Item *item);`

insert one item in a workArea widget.

`void EZ_WorkAreaDeleteItem(EZ_Widget *widget, EZ_Item *item);`

delete the specified item from a workArea widget and update the display.

    void EZ_WorkAreaDeleteItem(EZ_Widget *widget, EZ_Item *item,
                                                 int redisplay);

delete the specified item. Update the display if requested.

`void EZ_WorkAreaClear(EZ_Widget *widget);`

clear a workArea widget.

`void EZ_WorkAreaRearrange(EZ_Widget *widget);`

redisplay a workArea widget.

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

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

    void EZ_WorkAreaSelectItemUsingIdx(EZ_Widget *widget, int idx,
                                                    int *location);

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

`EZ_Item *EZ_WorkAreaFindItemAtXY(EZ_Widget *wa, int x, int y);`

find and return the item displayed at the specified location.

`void EZ_GetWorkAreaXYOffset(EZ_Widget *widget, int *x, int *y);`

return the XY display offset of a workArea widget.

`void EZ_SetWorkAreaXYOffset(EZ_Widget *widget, int x, int y);`

set the XY display offset of a workArea widget.

`int EZ_GetWorkAreaNumberOfItems(EZ_Widget *widget);`

return the number of items in a workArea widget.

`EZ_Item *EZ_GetWorkAreaSelection(EZ_Widget *widget);`

return the selection of a workArea widget.

`EZ_Item *EZ_GetWorkAreaItemUsingIdx(EZ_Widget *wa, int idx);`

return the item in a workArea widget given index.

`EZ_Item **EZ_GetWorkAreaData(EZ_Widget *wa);`

return the array of items displayed in a workArea widget.

    int EZ_WorkAreaGetHighlightedItems(EZ_Widget *widget,
                                    EZ_Item ** a, int siz);

return the highlighted items in a workArea widget.

    void  EZ_SetWorkAreaGeometryManager(EZ_Widget *widget,
                         EZ_WorkAreaGeometryManager managet, void *pdata);

set the geometry manager for a workArea widget.

    void EZ_WorkAreaInsertItemBefore(EZ_Widget *widget, EZ_Item *item, EZ_Item *newItem);
    void EZ_WorkAreaInsertItemAfter (EZ_Widget *widget, EZ_Item *item, EZ_Item *newItem);
    void EZ_WorkAreaInsertItemUsingIdx(EZ_Widget *widget, EZ_Item *item, int idx);
    void EZ_WorkAreaDeleteItemUsingIdx(EZ_Widget *widget, int idx);
    void EZ_WorkAreaDeleteItemUsingIdxO(EZ_Widget *widget, int idx, int dp);
    void EZ_WorkAreaDeleteSomeItemsUsingIndices (EZ_Widget *widget, int *ids, int cnt);

### Screenshot

### Resources

Config_Option | ResourceName | DefaultValue
EZ_CLASS | class | `"WorkArea"`
|  | or `"IWorkArea"`
EZ_NAME | name | `"workArea"`
|  | or `"iWorkArea"`

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_SELECTION_BACKGROUND | selectionBackground |
EZ_SELECTION_FOREGROUND | selectionForeground |
EZ_TEXT_BACKGROUND | textBackground |

EZ_OPTIONAL_HSCROLLBAR | optionalHScrollbar | `true`
EZ_OPTIONAL_VSCROLLBAR | optionalVScrollbar | `true`

EZ_RUBBER_BAND | rubberBand | `false`
EZ_MOVABLE | movable | `false`

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