ChartObject 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 ChartObject Widget.

Release Highlights



  • Object insertion has been overhauled to increase the rate of insertion.
  • Resource Dialogs are now transient for multiple shells.
  • Improved color allocation scheme when widgets run out of colors.
  • 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.
  • Optimized the clipping of the Rectangle's string.
  • Added extra axis lines for bar charts that have positive and negative bars.
  • New function XintPlotInsertObject which allows insertion of objects into a plot without the need for an expose (i.e. much quicker).
  • New function XintChartInitializeClassConverter. Starting with Release 3.2, libraries have been split into their basic components. Due to this change the function XintChartInitializeClassConverter is used by ChartObject to install its own converter. This converter is used to convert the ascii object format and templates for ChartObject from the string class name to the widget class pointer.
  • Function XintChartFreezeUpdates now returns a Boolean indicating whether or not the chart was already frozen.
  • Function XintEditObjectReadFile has been renamed to _XintEditObjectReadFile.
  • XintEditObjectReadFile is now a macro. When <Xint/Chart.h> is included this macro is redefined to use a "chart aware" file loader.
  • Plot aspect ratio can be controlled/maintained through two new callbacks XmNchartLayoutCallback and XmNplotLayoutCallback.
  • New for the AxisObject, a minimum distance in pixels is enforced. If the distance between any adjacent labels is smaller than this minimum distance, one of the labels will be filtered out.
  • New for the AxisObject is label dependent colors through a new callback.

AxisObject Object Class


New Resource


The following new resource is defined for the AxisObject Object Class.

Name

Type

Default

Access

XmNminimumLabelSpacing

int

0

CSG

XmNminimumLabelSpacing


Specifies the minimum distance, in pixel, between any adjacent label annotations.

New Callback


The following callbacks are defined by the ChartObject.

Name

Structure

Reason

XmNcolorLabelCallback

XintAxisObjectColorLabelCallbackStruct

None

The following ordered table lists the members of the callback structure, XintAxisObjectColorLabelCallbackStruct associated with callback XmNcolorLabelCallback.

Data Type

Member

Description

int

reason

Indicates why the callback was invoked.

XEvent *

event

Points to the XEvent that triggered the callback.

int

index

Index of the label for which the color is being changed.

float

position

Position of the label.

String

label

The character string content of the label.

Pixel

color

The color of the label (can be changed).

Object

object

The object id of the AxisObject.

int

doit

Set it to False to prevent the color from being changed.

ChartObject


Chart Callbacks


The following callbacks are defined by the ChartObject.

Name

Structure

Reason

XmNchartLayoutCallback

XintChartLayoutCallbackStruct

None

XmNplotLayoutCallback

XintPlotLayoutCallbackStruct

None

The following ordered table lists the members of the callback structure, XintChartLayoutCallbackStruct associated with callback XmNchartLayoutCallback.

Data Type

Member

Description

int

reason

Indicates why the callback was invoked.

XEvent *

event

Points to the XEvent that triggered the callback.

XintChartMargins *

chart_margins

The margins of the chart. The user should control it in the callback routine to maintain the aspect ratio he wants.

int

chart_height

Height of the chart (in pixels).

int

chart_width

Width of the chart (in pixels).

Boolean

doit

Set to False to prevent the chart margin from being recalculated.

The following ordered table lists the members of the callback structure, XintPlotLayoutCallbackStruct associated with callback XmNplotLayoutCallback.

Data Type

Member

Description

int

reason

Indicates why the callback was invoked.

XEvent *

event

Points to the XEvent that triggered the callback.

int

plot_height

Height of the plot (in pixels). **

int

plot_width

Width of the plot (in pixels).**

Boolean

doit

Set to False to prevent the plot dimensions from being recalculated.

** The user should control it in the callback routine to maintain the aspect ratio he wants.

New Defined Functions


The following new functions are defined for the ChartObject Widget.

Function Name

Description

XintChartFreezeUpdates

To freeze (or unfreeze) the chart while doing a series of changes.

XintChartInitializeClassConverter

Initializes the ChartObject class converter.

XintChartFreezeUpdates


Specifies whether to freeze or unfreeze a chart.

Boolean XintChartFreezeUpdates (...)

Object

object

Object ID of the chart to be frozen.

int

toggle

Set to 1 to freeze, 0 to unfreeze.

If toggle is set to freeze chart and chart is already frozen then it returns False. If toggle is set to unfreeze chart and chart is not frozen then returns False. Otherwise, returns True.

XintChartInitializeClassConverter


This function is used to install the ChartObject class converter. This converter is used to convert the ascii object format and templates for the ChartObject from the string class name to the widget pointer class.

void XintChartInitializeClassConverter (void)

EditObject Widget


New Defined Function


The following new function is defined for the EditObject Widget.

Function Name

Description

_XintEditObjectReadFile

Reads an ASCII file containing a description of objects and places them into the EditObject widget.

_XintEditObjectReadFile


This function reads an object description file and creates the objects in the specified EditObject widget.

Boolean _XintEditObjectReadFile (...)

Widget

widget

EditObject widget ID.

char *

filename

Name of the file containing the object description.

The function returns False if it cannot open filename or if filename does not contain a valid object description.

New Defined Macro


The following new macro is defined for the EditObject Widget.

Macro Name

Description

XintEditObjectReadFile

Reads an ASCII file containing a description of objects and places them into the EditObject widget.

XintEditObjectReadFile


This macro reads an object description file and creates the objects in the specified EditObject widget. Depending on which include file is added, this macro will be redefined to use a file loader that is "aware" of the type of file it needs to load. For instance, if <Xint/Chart.h> is included the macro is redefined to use a "Chart aware" file loader.

Boolean XintEditObjectReadFile (...)

Widget

widget

EditObject widget ID.

char *

filename

Name of the file containing the object description.

The function returns False if it cannot open filename or if filename does not contain a valid object description.

Plot2D Widget


New Defined Function


The following new function is defined for the Plot2D Widget.

Function Name

Description

XintPlotInsertObject

Allows insertion of objects into a plot without the need for an expose.

XintPlotInsertObject


This function allows the insertion of objects into a plot without the need for an expose.

void XintPlotInsertObject (...)

Object

chart or

plat

Chart or Plot ID.

Object

child

Name of the child object to be inserted.

ChartObject Bug Fixes


Bug Fixes Release3.2


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

    • Fixed scrollbar resize to ensure that the scrollbar is always greater than 1 pixel.
    • Fixed core dump with selection of polyline that has UNDEFINED values in it.
    • Fixed SetValues in DataTimeLabel to stop corruption of timeLabelFormat.
    • Removed all unnecessary private includes.
    • Fixed bug where any object created with XmNclipGrid set wouldn't show until the next expose.
    • Fixed bug where zeros in the data for a stack proportional bar chart caused a core dump.
    • Now checks the limits when symbol size is set to 8 for a polyline that is less than zero.
    • Rectangle now clips its name if it is too long to fit inside.
    • Plot3D now checks for overlapped annotation strings and flips them perpendicular if needed.
    • Fixed core dump in XintChartPick when chart was insensitive or passed as a NULL.
    • Fixed bug which ignored the setting of the symbolType when using drawSymbolCallback for polyseries/polyline.
    • Clip name of Oval to fit inside.
    • Added code to repaint chart after object has been removed.
    • Added code to cope with NULL objects being passed to XintEditObjectRaise/Front/Back/Lower. Routines now use the current object when a NULL is passed.
    • Fixed bug for symbols arc and arcfill being offset incorrectly in PostScript.
    • Fixed core dump when calling CanvasDestroy.
    • Fixed SetValues to generate a redraw if the symbol resources are updated.
    • Fixed Bar3D to display all labels when initially exposed.

BugFixes Release 3.2.10


    • BugFix #:1849 The location of a XintText object using scalable fonts displays incorrectly if the Text object is part of a XintGroup and the group is moved horizontally several times.
    • Bug Fix #: 1879 Any time I call XintEditObjectDestroyObject, one gets an error which says that the system cannot perform MALLOC and the program dies. Later, it became "INT routines appear to work with -lmapmalloc, but produce the "Cannot perform malloc" error when linked with-lmalloc".

libmalloc and libmapmalloc are extensions to the normal C runtime for different performance/implementation issues. Our library uses neither.

BugFixes Release 3.2.11


    • Bug Fix #: 2164 The functions PostscriptCanvasDeviceArc and PostscriptCanvasDeviceFillArc call function IntPSArc2 with its end_angle set to negative. This was causing incorrect postcript output of the Pie chart.

Documentation Type: