![]() ![]() |
This manual aims to list all SXY Classes and its methods.
SimpleGraphType
This enumeration defines an application graph configuration.
typedef enum { LINEAR_SIMPLE_GRAPH = 0, SEMILOG_SIMPLE_GRAPH, LOG_SIMPLE_GRAPH, TIME_LINEAR_SIMPLE_GRAPH, TIME_LOG_SIMPLE_GRAPH } SimpleGraphType; |
This enumeration defines then axes configuration layout
typedef enum { HALF_CROSS_LAYOUT = 0, QUARTER_CROSS_LAYOUT, TYPICAL_LAYOUT, DEPTH_LAYOUT } SimpleGraphLayout; |
This enumeration lists the set of available masks to draw for an applications data curve.
typedef enum { SIMPLE_CURVE_MARK_MASK = 0, SIMPLE_CURVE_LINE_MASK, SIMPLE_CURVE_LINEAR_MASK, SIMPLE_CURVE_PARABOLIC_MASK } SimpleCurveMasks; |
This enumeration defines the set of axis scale orientation
typedef enum{ ALIGNED = 0, ROTATED } AxisScaleOrientation; |
This enumeration describes the axis label position (relative to axis).
typedef enum{ AT_MIDDLE = 0, AT_END, AT_END_ROTATED } AxisTitleStyle; |
This enumeration stands for a list of predefined standard colors.
typedef enum { SXY_RED = 0xFF0000L, SXY_DARK_RED = 0x800000L, SXY_GREEN = 0x00FF00L, SXY_DARK_GREEN = 0x008000L, SXY_BLUE = 0x0000FFL, SXY_DARK_BLUE = 0x000080L, SXY_YELLOW = 0xFFFF00L, SXY_DARK_YELLOW = 0x808000L, SXY_MAGENTA = 0xFF00FFL, SXY_DARK_MAGENTA = 0x800080L, SXY_CYAN = 0x00FFFFL, SXY_DARK_CYAN = 0x008080L, SXY_WHITE = 0xFFFFFFL, SXY_BLACK = 0x000000L, SXY_DARK_GRAY = 0x808080L, SXY_GRAY = 0xC0C0C0L } SXY_Color; |
Events correspond to messages that are sent to the client application whenever something happens to a graph. The communication is done through a single callback tagged with the event name. This is done by a client function called genericEvent.
void genericEvent(SimpleGraph graph, string event_name); |
This function has two parameters:
![]() | graph: the origin graph; |
![]() | event_name: a string that represent the event tag. |
SXYCOM_Application
This class represents a client application and offers methods for building graphs and curves.
Graph Creation
![]() | SimpleGraph createSimpleGraph(SimpleGraphType t, int width, int height, string theme) : builds a new graph dialog whose type is defined by parameter t (see SimpleGraphType enumeration for details). The dialog dimension is defined by a (width x height) pixels rectangle and the dialog look and feel is determined by the selected scheme (whose name is defined by parameter theme). See SXYCOM tutorial for complete theme specification. |
![]() | ArrayCurve createArrayCurve(void) : creates a new curve whose id (see getId() curve method) can be used to attach or detach curves to a graph; |
![]() | void Quit(void) : closes all SXY graphs and finishes SXYCOM process; |
This class represents a graph curve.
Curve Identification
![]() | int getId(void) : returns a curve identification that should be used to attach or detach a curve into a graph; |
![]() | void setTitle(string txt) : sets the curve title to txt; |
![]() | string getTitle(void) : returns the curve title; |
![]() | long getColor(void) : returns the curve color; |
![]() | void setColor(long col) : sets the curve color to col; |
![]() | void setRGBColor(long red, long green, long blue) : sets the curve color based on a RGB color definition. The parameters red, green and blue correspond to R, G and B components respectively; |
![]() | void setMaskVisibility(SimpleCurveMasks m, boolean flag) : sets the desired mask (parameter m) visibility to the state defined by flag; |
![]() | boolean getMaskVisibility(SimpleCurveMasks m) : returns the visibility flag for the mask defined by m; |
![]() | double getLimitsXmin(void) : returns the horizontal minimum value for the curve; |
![]() | double getLimitsYmin(void) : returns the vertical minimum value for the curve; |
![]() | double getLimitsXmax(void) : returns the horizontal maximum value for the curve; |
![]() | double getLimitsYmax(void) : returns the vertical maximum value for the curve; |
![]() | double getCurveNumPoints(void) : returns the number of data points for the curve; |
![]() | double getCurvePointX(int n) : return the horizontal coordinate for the n-th data point; |
![]() | double getCurvePointY(int n) : return the vertical coordinate for the n-th data point; |
![]() | void writePoint(int n, double x, double y) : replaces coordinate of the n-th point of the curve for the x,y); |
![]() | void removePointAt(int n) : removes the n-th point of the curve; |
![]() | void insertPointAt(int n, double x, double y) : inserts a new (x,y) point after the n-th point of the curve; |
![]() | void insertPoint(double x, double y) : Inserts a new point (x,y) at the end of the curve |
![]() | void insertHole(void) : inserts a hole in the end of the curve; |
![]() | void insertHoleAt(int n) : inserts a hole after the n-th point of the curve |
![]() | void invalidateCurvePoint(int n) : invalidate the n-th data point |
![]() | boolean isInvalidPoint(int n) : returns the validity flag for the n-th data point; |
![]() | boolean isInvalidValue(double v) : returns a flag indicating the invalidity of the numeric value v ; |
![]() | int getCurveSize(void) : returns the number of curve points; |
![]() | boolean isReadOnly(void) : tells whether the curve can be manipulated by the user; |
![]() | void setReadOnly(boolean ro) : sets whether the curve can be manipulated by the user (based on the read-only ro parameter flag); |
This class is responsible for dealing with dialog graph.
Scales Adjustment
![]() | double getScalesXmin(void) : returns the horizontal minimum scale for the graph; |
![]() | double getScalesYmin(void) : returns the vertical minimum scale for the graph; |
![]() | double getScalesXmax(void) : returns the horizontal maximum scale for the graph; |
![]() | double getScalesYmax(void) : returns the vertical maximum scale for the graph; |
![]() | void setScales(double xmin, double xmax, double ymin, double ymax) : sets the graph scales with the values defined by the parameters; |
![]() | double getGridScalesXmin(void) : returns the horizontal minimum scale for the grid; |
![]() | double getGridScalesYmin(void) : returns the vertical minimum scale for the grid; |
![]() | double getGridScalesXmax(void) : returns the horizontal maximum scale for the grid; |
![]() | double getGridScalesYmax(void) : returns the grid maximum vertical scale; |
![]() | void setGridScales(double xmin, double xmax, double ymin, double ymax) : sets the grid scales with the values defined by the parameters; |
![]() | void setTitle(string title) : sets the graph title with the string title; |
![]() | void setSubTitle(string title) : sets the graph subtitle with the string subtitle; |
![]() | string getTitle(void) : returns the string for the graph title; |
![]() | string getSubTitle(void) : returns the string for the graph subtitle; |
![]() | void setHorizontalAxisTitle(string title) : sets the horizontal axis label with the string title; |
![]() | void setVerticalAxisTitle(string title) : sets the vertical axis label with the string title; |
![]() | string getHorizontalAxisTitle(void) : returns the horizontal axis |
![]() | string getVerticalAxisTitle(void) : returns the title of the vertical axis; |
![]() | void setHorizontalAxisTitleStyle(AxisTitleStyle sty) : sets the horizontal axis label style based on the enumeration parameter sty; |
![]() | void setVerticalAxisTitleStyle(AxisTitleStyle sty) : sets the vertical axis label style based on the enumeration parameter sty; |
![]() | AxisTitleStyle getHorizontalAxisTitleStyle(void) : returns the horizontal axis label style (see AxisTitleStyle enumeration); |
![]() | AxisTitleStyle getVerticalAxisTitleStyle(void) : returns the vertical axis label style (see AxisTitleStyle enumeration); |
![]() | void setHorizontalAxisScaleOrientation(AxisScaleOrientation ori) : sets the horizontal axis scale orientation (see AxisScaleOrientation); |
![]() | void setVerticalAxisScaleOrientation(AxisScaleOrientation ori) : sets the horizontal axis scale orientation (see AxisScaleOrientation); |
![]() | AxisScaleOrientation getHorizontalAxisScaleOrientation(void) : returns the scale orientation of the horizontal axis; |
![]() | AxisScaleOrientation getVerticalAxisScaleOrientation(void) : returns the scale orientation of the vertical axis; |
![]() | void setZoom(double xratio, double yratio) : sets the specified zoom ratio to the current graph scales. If the a ratio value is less than 1 (one), the result will be a zoom out; otherwise the result is a zoom in. The horizontal and vertical factors are independent and are set by the xratio and yratio parameters respectively; |
![]() | void fitHorizontalScale(void) : adjust the horizontal scale to fit all curves' data points; |
![]() | void fitVerticalScale(void) : adjust the vertical scale to fit all curves' data points; |
![]() | void fitAllScales(void) : adjust all graph scales to fit all curve points; |
![]() | void setAxesLayout(SimpleGraphLayout new_layout) : adjusts the axis position based on the new_layout parameters (see SimpleGraphLayout enumeration for details); |
![]() | double getHorizontalAxisStep(void) : returns the horizontal axis step; |
![]() | double getVerticalAxisStep(void) : returns the vertical axis step; |
![]() | void setAxesSteps(double sx, double sy) : sets both horizontal and vertical steps to sx and sy respectively; |
![]() | double getHorizontalGridStep(void) : returns the horizontal grid step; |
![]() | double getVerticalGridStep(void) : returns the vertical grid step; |
![]() | void setGridsSteps(double sx, double sy) : sets both horizontal and vertical steps to sx and sy respectively; |
![]() | double getHorizontalGridAutoMultipleStep(void) : returns the horizontal automatic step; |
![]() | double getVerticalGridAutoMultipleStep(void) : returns the vertical automatic step; |
![]() | void setGridsAutoMultipleSteps(double smx, double smy) : sets the grids automatic steps to smx and smy (horizontal and vertical grids respectively); |
![]() | void redrawGraph(void) : invalidate to current graph drawing thus causing a full repaint; |
![]() | void printGraph(boolean ask) : send the graph drawing to the printer. If the ask parameter flag is set, the graph will show a printer configuration dialog; |
![]() | void copyGraph(int width, int height) : copies the current graph drawing to clipboard (width x height pixels dimension); |
![]() | void attachCurveById(int id) : attaches a curve to the graph, supplied the id of the curve; |
![]() | void detachCurveById(int id) : detaches a curve of the graph, supplied the id of the curve; |
![]() | void destroyGraph(void) : destroys the graph window; |
![]() | void showGraph(void) : shows the graph window; |
![]() | void hideGraph(void) : hides the graph window, but does not destroy it; |
![]() | void setWindowTitle(string title) : sets the title of the window to title; |
![]() | void setStatusLine(string msg) : sets the of the status line dialog to msg; |
by André Luiz Clinio and Vinícius Almendra
This paged was last updated in
20/10/03 13:48