IupMatrix

IUP - Portable User Interface

IupMatrix Attributes

Cell Attributes

L:C: Text of the cell located in line L and column C, where L and C are integer numbers.
L:0: Title of line L.
0:C: Title of column C.
0:0: Title of the area between the line and column titles.

These are valid only in normal mode. No redraw is done for all cases, the application must explicity set the REDRAW attribute.

ALIGNMENTN: Alignment of the cells in column N, where n must be replaced by the wished column number (n >= 0). No redraw is done. Possible values:

"ALEFT", "ACENTER" or "ARIGHT". Default: "ALEFT".

BGCOLOR: Background color of the matrix.
BGCOLORL:*: Background color of the cells in line L (no redraw is done for this case).
BGCOLOR*:C: Background color of the cells in column C (no redraw is done for this case).
BGCOLORL:C: Background color of the cell in line L and column C (no redraw is done for this case).

When more than one of the four types of attributes that define the background color are defined, or if two of them are in conflict, the color of a cell will be selected following this priority: BGCOLORL:C, BGCOLORL:*, BGCOLOR*:C, and last BGCOLOR. (L or C >= 0, but only the second forms is valid for titles.)

FGCOLOR: Text color.
FGCOLORL:*: Text color of the cells in line L (no redraw is done for this case).
FGCOLOR*:C: Text color of the cells in column C (no redraw is done for this case).
FGCOLORL:C: Text color of the cell in line L and column C (no redraw is done for this case).

When more than one of the four types of attributes that define the text color are defined, or if two of them are in conflict, the text color of a cell will be selected following this priority: FGCOLORL:C, FGCOLORL:*, FGCOLOR*:C, and last FGCOLOR. (L or C >= 0, but only the second forms is valid for titles.)

FONT: Character font of the text.
FONTL:*: Text font of the cells in line L (no redraw is done for this case).
FONT*:C: Text font of the cells in column C (no redraw is done for this case).
FONTL:C: Text font of the cell in line L and column C (no redraw is done for this case).

This attribute must be set before the control is showed. It affects the calculation of the size of all the matrix cells. The cell size is always calculated from the base FONT attribute.

FOCUS_CELL: Defines the currently focused cell.

Two numbers in the “L:C” format,  (L and C>=1). Default: "1:1".

VALUE: Allows setting or verifying the value of the current cell. Is the same as using the “L:C” attribute, L and C corresponding to the current cell’s line and column.  (L and C>=0). When retrieved inside the EDITION_CB callback when mode is 0, then the return value is the new value that will be updated in the cell.

SORTSIGNC: Shows a sort sign (up or down arrow) in the column C title. Possible values: "UP", "DOWN" and "NO". Default: NO.

Size Attributes

NUMCOL: Defines the number of columns in the matrix.

Must be an integer number. Default: "0".

NUMCOL_VISIBLE: When set defines the minimum number of visible columns in the matrix. When retrieved returns the current number of visible lines. The remaining columns will be accessible only by using the scrollbar.

Must be an integer number. Default: "4".

NUMLIN: Defines the number of lines in the matrix.

Must be an integer number. Default: "0".

NUMLIN_VISIBLE: When set defines the minimum number of visible lines in the matrix. When retrieved returns the current number of visible lines. The remaining lines will be accessible only by using the scrollbar.

Must be an integer number. Default: "3".

WIDTHDEF: Default column width.

Must be an integer number. Default: Width corresponding to 20 characters.

WIDTHn: Width of column n, where n is the number of the wished column (n>=0). If the width value is 0, the column will not be shown on the screen.

Must be an integer number. Default: Width defined in the WIDTHDEF attribute.

HEIGHTn: Height of column n, where n is the number of the wished column (n>=0). If the height value is 0, the column will not be shown on the screen.

RESIZEMATRIX: Defines if the width of a column can be interactively changed. When this is possible, the user can change the size of a column by dragging the column title right border. Possible values:

"YES" or "NO". Default: "NO" (does not allow interactive width change).

Mark Attributes

AREA: Defines if the area to be interactively marked by the user will be continuous or not. Possible values:

"CONTINUOUS" or "NOT_CONTINUOUS". Default: "CONTINUOUS".

MARK_MODE: Defines the entity that can be marked: none, lines, columns, lines and/or columns, and cells. Possible values:

"NO", "LIN", "COL", "LINCOL" or "CELL". Default: "NO" (no mark).

MARKED: Vector of “0” or “1” characters, informing which cells are marked (indicated by value “1”). The NULL value indicates there is no marked cell. The format of this character vector depends on the value of the MARK_MODE attribute: if its value is CELL, the vector will have NUMLIN x NUMCOL positions, corresponding to all the cells in the matrix. If its value is LIN, the vector will begin with letter “L” and will have further NUMLIN positions, each one corresponding to a line in the matrix. If its value is COL, the vector will begin with letter “C” and will have further NUMCOL positions, each one corresponding to a column in the matrix. If its value is LINCOL, the first letter, which can be either “L” or “C”, will indicate which of the above formats is being used.

The values must be numbers in a vector of characters “0” and “1. Default: NULL.

MULTIPLE: Defines if more than one entity defined by MARK_MODE can be marked. Possible values:

"YES" or "NO". Default: "NO".

Action Attributes

ADDCOL: Adds a new column to the matrix after the number of the specified column. To insert a column at the top of the spreadsheet, value 0 must be used. To add more than one column, use format "C-C", where the first number corresponds to the base column and the second number corresponds to the number of columns to be added. It is valid only in normal mode.

The value must be a column number.

ADDLIN: Adds a new line to the matrix after the number of the specified line. To insert a line at the top of the spreadsheet, value 0 must be used. To add more than one line, use format "L-L", where the first number corresponds to the base line and the second number corresponds to the number of lines to be added. It is valid only in normal mode.

The value must be a line number.

DELCOL: Removes the given column from the matrix. To remove more than one column, use format "C-C", where the first number corresponds to the base column and the second number corresponds to the number of columns to be removed. It is valid only in normal mode.

The value must be a column number.

DELLIN: Removes the given line from the matrix. To remove more than one line, use format "L-L", where the first number corresponds to the base line and the second number corresponds to the number of lines to be removed. It is valid only in normal mode.

The value must be a line number.

EDIT_MODE: When set to YES, programatically puts the current cell in edition mode, allowing the user to modify its value. When consulted informs if the the current cell is being edited. Possible values:

"YES" or "NO".

ORIGIN: Scroll the visible area to the given cell. Returns the cell at the upper left corner. To move only a line or a column, use a value such as “L:*”or “*:C (L and C>=1). Possible values: two numbers in the “L:C” format.

REDRAW: The user can inform the matrix that the data has changed, and it must be redrawn. Values:

"ALL": Redraws the whole matrix.
"L%d": Redraws the given line (e. g.: “L3” redraws line 3)
"L%d:%d": Redraws the lines in the given region (e.g.: “L2:4” redraws lines 2, 3 and 4)
"C%d": Redraws the given column (e.g.: “C3” redraws column 3)
"C%d:%d": Redraws the columns in the given region (e.g: “C2:4” redraws columns 2, 3 and 4)

No redraw is done when the application sets cell, line or column graphics attributes attributes: 0:0, 0:C, L:0, L:C, ALIGNMENTn, BGCOLORL:*, BGCOLOR*:C, BGCOLORL:C, FGCOLORL:*, FGCOLOR*:C, FGCOLORL:C, FONTL:*, FONT*:C, FONTL:C. Global and size attributes always automatically redraw the matrix.

General Attributes

CURSOR: Default cursor used by the matrix. The default cursor is a symbol that looks like a cross. If you need to refer to this default cursor, use name “matrx_img_cur_excel.

FRAMECOLOR: Sets the color to be used in the matrix's frame lines.

SCROLLBAR: Associates a horizontal and/or vertical scrollbar to the matrix. Is only effective if defined before the matrix is mapped. Default is YES.

CARET: Allows specifying and verifying the caret’s position of the text box in edition mode.

SELECTION: Allows specifying and verifying selection interval of the text box in edition mode.

HIDEFOCUS: do not show the focus mark when drawing the matrix. Default is NO.