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.

 

EditTable Release Highlights

 

  • Text overflow marker is now an equilateral triangle.
  • Drag & Drop callback updated to allow user to examine column number when moving a frozen column back to main table.
  • Each column now has a UserData field and there are two new API functions to set (XintEditTableSetColumnUserData) and get (XintEditTableGetColumnUserData).
  • Resource convertors updated to handle Release3.1 new constants XintSPAN_ALWAYS and XintTYPE_NONE.
  • Allow pulldown menus to be displayed in a cell.
  • Added new code to speed up the drawing of grid lines in the table.
  • SetListBehaviour now has a new flag to allow cell editing.
  • Two new PostScript output functions (EditTableSimplePS and EditTableSimplePS2).
  • PostScript optimized for output of images.
  • PostScript optimized for output of text.
  • PostScript output now tells you when you are trying to write to a read-only file.
  • PostScript now caches the previous selected font in the output driver to avoid extra output.
  • PostScript now caches output in memory before committing to file.
  • Added support for 255 character file names in PostScript.
  • Can now selectively suppress the display of the widget in a cell
  • A new resizing curser is now shown to indicate that you can stretch rows/columns with the mouse button 2.

 

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:

    • Fixed all the translation problems caused by a bulletinBoard remapping osfActivate, osfEnter and others, for all its children.
    • Text overflow marker is now an equilateral triangle.
    • Fixed to handle insert/delete rows for data type XintTYPE_NONE.
    • Fixed core dump in ReportStyle if you set XintFRONT_PAGE_ONLY.
    • Fixed ReportStyle bug that left too much space between rows and columns.
    • Fixed traversing hidden and frozen rows and columns.
    • Fixed scrolling in partial cell display.
    • Fixed the dropping of a userFormatted cell.
    • Fixed scrollbar/display problems when inserting rows when the table is frozen.
    • Fixed traversal problem where it was finding itself in a negative cell.
    • Fixed calculation of the visible area of the table.
    • Fixed XintEditTAbleCellSpanSetRange. It was not calculating the intersection of the existing span properly.
    • Fixed XmNnumberOfVisibleColumns/Rows to be recognized at initialization and from a resource file.
    • Fixed bug when table was frozen the table size was not updated when inserting columns.
    • Fixed row/column deletion to handle a frozen update table.
    • Fixed core dump if cell pointer was in the last row and this row was deleted.
    • Fixed display problems when columns/rows were reordered while update table was frozen.
    • Fixed setting a cell foreground which resulted in all other cells inheriting the wrong default color.
    • Fix UMR with ReportStyle. Compiler does not convert integers to floating point when optimized.
    • Fixed lack of redisplay with reordering of rows/columns.
    • Fixed spanning to cope with un-hiding a row/column.

 

BugFixes Release3.2.10

    • BugFix #: 1712 Linking EditTable data with a bar chart, then deleting all the rows in the table and then trying to insert rows to the table results in a core dump.
    • BugFix #: 1770 When creating rectangle edit objects in an EditTable cell, if one calls XintEditObjectFreeze (object, TRUE) and then calls XtVaSetValues on one of the editobjects a segmentation fault occurs in SetValues.
    • BugFix #: 1813 The function XintEditTableIsCellDefined() does not return True for String type data.
    • BugFix #: 1818 A columns's font, selected by a user, is not being applied to a newly inserted row .
    • BugFix #: 1856 When the rows of the displayed table are selected, the desired look is to have the cell text changed to the cell color and the cell color changed to the cell text color.
    • BugFix #: 1857 Using XintHorizontalUserToPixel on a frozen column, the column returned is the column index in the frozen part of the table, not the original column index of the table.
    • BugFix #: 1916 Using DataLabelObject to store Database-Relation-Data, EditTable displays the data in its Column correctly but the program crashs on update.
    • BugFix #: 1934 If XintEditTableCopyRows() is called first and then XintEditTableDeleteRows(), the program will crash if the rows copied are more than the rows deleted.
    • BugFix #: 2019 When using spanning annotation, scrolling horizontal scrollbar doesn't update the annotation for the columns covered by spanned columns.
    • BugFix #: 2102 When one drags a null value string and drops it into another cell, it causes a core dump.

 

BugFixes Release3.2.11

    • Bug Fix #: 1747 & 2105 EditTable cell flashes when its value is not changed and gets updated unnecessarily.

Documentation Type: