EditTable 3.2 Release Notes


This document contains information about the differences between versions 3.1 and 3.2 plus bug fixes included in Release3.2.10 of the EditTable Widget.

Topic

See Page

Release Highlights

Release Notes - page 2

EditTable Widget

Release Notes - page 3

EditTable Bug Fixes

Release Notes - page 7

EditTable Release Highlights



EditTable Widget


New Defined Callback


The following new callback is defined by an EditTable widget.

Name

Structure

Reason

XmNcellWidgetDisplayCallback

XintEditTableCellWidgetCallbackStruct

XintCR_QUERY_CELL_WIDGET

XintCR_UPDATE_CELL_WIDGET

XintEditTableCellWidgetCallbackStruct


The following ordered table lists the members of the callback structure, XintEditTableCellWidgetCallbackStruct, used by the EditTable widget for callback XmNcellWidgetDisplayCallback. The reason member will be set to one of the following defined constants.

Data Type

Member

Description

int

reason

Indicates why the callback was invoked.

XEvent *

event

Points to the event that triggered the callback.

int

row

Indicates the row number of the selected cell.

int

column

Indicates the column number of the selected cell.

Widget

widget

ID of the Widget In a Cell.

XintCellWidget-Resources *

resources

Points to the resources that may be set automatically on the widget.

Boolean

doit

Indicates whether or not the resources defined above will be set on the widget before it is drawn. This value is initialized to the setting of resource XmNcellWidgetSetResources.

Boolean

displayit

Indicates whether or not the widget in this cell should be displayed.

Defined Constant

Description

XintCR_QUERY_CELL_WIDGET

The column width or row height was set to 0 (for auto calculate). Allows the programmer to set the resources on the widget so that proper cell size can be calculated.

XintCR_UPDATE_CELL_WIDGET

The widget is about to be drawn on the virtual screen. Allows the programmer to set the resources on this widget before it is drawn.

Structure XintCellWidgetResources is defined as follows.

typedef struct {

String string;

String font;

Pixel background;

Pixel foreground;

int alignment;

int sensitive;

} XintCellWidgetResources;

Where:

Member

Description

string

Format of the display string for the cell value.

font

X window font name for the display string.

background

Cell background color.

foreground

Cell foreground color.

alignment

Motif alignment constant for the cell.

sensitive

Cell read-only.

If the XmNcellWidgetSetResources constraint resource is set to True, primitive widgets, such as labels and buttons, do not require a callback. Their resources will be set correctly.

In other cases, such as inserting toggle buttons or option menus, a callback is required. Inside this callback the application should extract the current cell contents, then set the widget state and graphic resources accordingly. When the state of a widget in a cell is changed (for example, an option menu is changed to a new selection), the application should update the cell contents. A cell is identified by its location. If a widget is used for more than one cell, the cell location can be obtained by using function XintEditTableGetCellPointerPosition.

The doit member will be set to the value of the constraint resource, XmNcellWidgetSetResources, before the callback is called.

New Defined Action


The following new action procedures are defined by the EditTable widget for manipulating a table. These action procedures can be tied to user actions via a translation table.

Name

Description

AnnotationResizeHandlers(tolerance)

Shows the row or column resizing cursor when the mousepointer is over the border between adjacent rows or columns in the annotation area. Tolerance is the maximum distance in pixels within which the resizing cursor will be shown. If it is null or not a number, the tolerance will be set to 3.

New Defined Functions


The following new functions are defined for the EditTable Widget.

Function Name

Description

XintEditTableGetColumnUserData

Returns a pointer to a column's user data.

XintEditTableSetColumnUserData

Assigns user data to a specific column.

XintEditTableOutputSimplePS

Output of PostScript file carries only the courier 10 font and ignores all but left and middle alignment.

XintEditTableOutputSimplePS2

Output of PostScript file uses fonts and alignments set in EditTable.

XintEditTableGetColumnUserData


Returns pointer to the column's user data.

XtPointer XintEditTableGetColumnUserData(...)

Widget

widget

Widget ID of the EditTable.

int

column

Column number to retrieve the user data.

XintEditTableSetColumnUserData


Specifies the column and the column's user data.

Boolean XintEditTableSetColumnUserData(...)

Widget

widget

Widget ID of the EditTable.

int

column

Column number to store the user data.

XtPointer

user_data

Pointer to user data.

Returns False if widget is not a valid EditTable or if the column does not exist. Returns True, otherwise.

XintEditTableOutputSimplePS


Generates PostScript output, ignoring all font specifiers, and using only Courier-10.

Boolean XintEditTableOutputSimplePS(...)

Widget

widget

Widget ID of the EditTable.

char *

filename

Name of output PostScript file.

int

orientation

Orientation of output. Use the constant of either XintORIENTATION_LANDSCAPE or XintORIENTATION_PORTRAIT.

int

start_column

Starting column for output to PostScript.

int

end_column

Ending column for output to PostScript.

int

start_row

Starting row for output to PostScript

int

end_row

Ending row for output to PostScript.

Returns False if widget is not a valid EditTable, if the column/row ranges are not valid, or if the filename cannot be written to. Returns True, otherwise.

XintEditTableOutputSimplePS2


Generates PostScript output, using all fonts and alignments set up in the EditTable. If the scale is set to 0, the output will be fitted to one page.

Boolean XintEditTableOutputSimplePS2(...)

Widget

widget

Widget ID of the EditTable.

char *

filename

Name of output PostScript file.

int

orientation

Orientation of output. Use the constant of either XintORIENTATION_LANDSCAPE or XintORIENTATION_PORTRAIT.

double

scale

Scale to use for output to PostScript. Using a scale of 0 will fit the output EditTable to one page.

int

start_column

Starting column for output to PostScript.

int

end_column

Ending column for output to PostScript.

int

start_row

Starting row for output to PostScript

int

end_row

Ending row for output to PostScript.

Returns False if widget is not a valid EditTable, if the column/row ranges are not valid, or if the filename cannot be written to. Returns True, otherwise.

EditTable Bug Fixes


Bug Fixes


The following is the list of the bugs that were fixed for the 3.2 release:

BugFixes Release3.2.10


BugFixes Release3.2.11