StringGridWidgetBase

Undocumented in source.

Constructors

this
this(string ID)
Undocumented in source.

Members

Functions

cellText
UIString cellText(int col, int row)

get cell text

colTitle
UIString colTitle(int col)

returns row header title

rowTitle
UIString rowTitle(int row)

returns row header title

setCellText
StringGridWidgetBase setCellText(int col, int row, UIString text)

set cell text

setColTitle
StringGridWidgetBase setColTitle(int col, UIString title)

set col header title

setRowTitle
StringGridWidgetBase setRowTitle(int row, UIString title)

set row header title

Inherited Members

From GridWidgetBase

cellSelected
Listener!CellSelectedHandler cellSelected;

Callback to handle selection change

cellActivated
Listener!CellActivatedHandler cellActivated;

Callback to handle cell double click

viewScrolled
Listener!ViewScrolledHandler viewScrolled;

Callback for handling of view scroll (top left visible cell change)

headerCellClicked
Listener!HeaderCellClickHandler headerCellClicked;

Callback for handling header cell click

_customCellAdapter
CustomGridCellAdapter _customCellAdapter;
Undocumented in source.
customCellAdapter
CustomGridCellAdapter customCellAdapter [@property getter]

Get adapter to override drawing of some particular cells

customCellAdapter
CustomGridCellAdapter customCellAdapter [@property setter]

Set adapter to override drawing of some particular cells

_gridModelAdapter
GridModelAdapter _gridModelAdapter;
Undocumented in source.
gridModelAdapter
GridModelAdapter gridModelAdapter [@property getter]

Get adapter to hold grid model data

gridModelAdapter
GridModelAdapter gridModelAdapter [@property setter]

Set adapter to hold grid model data

_smoothHScroll
bool _smoothHScroll;
Undocumented in source.
smoothHScroll
bool smoothHScroll [@property getter]

Get smooth horizontal scroll flag - when true - scrolling by pixels, when false - by cells

smoothHScroll
bool smoothHScroll [@property setter]

Get smooth horizontal scroll flag - when true - scrolling by pixels, when false - by cells

_smoothVScroll
bool _smoothVScroll;
Undocumented in source.
smoothVScroll
bool smoothVScroll [@property getter]

Get smooth vertical scroll flag - when true - scrolling by pixels, when false - by cells

smoothVScroll
bool smoothVScroll [@property setter]

Get smooth vertical scroll flag - when true - scrolling by pixels, when false - by cells

_cols
int _cols;

column count (including header columns and fixed columns)

_rows
int _rows;

row count (including header rows and fixed rows)

_colWidths
int[] _colWidths;

column widths

_colCumulativeWidths
int[] _colCumulativeWidths;

total width from first column to right of this

_rowHeights
int[] _rowHeights;

row heights

_rowCumulativeHeights
int[] _rowCumulativeHeights;

total height from first row to bottom of this

_showColHeaders
bool _showColHeaders;

when true, shows col headers row

_showRowHeaders
bool _showRowHeaders;

when true, shows row headers column

_headerRows
int _headerRows;

number of header rows (e.g. like col name A, B, C... in excel; 0 for no header row)

_headerCols
int _headerCols;

number of header columns (e.g. like row number in excel; 0 for no header column)

_fixedCols
int _fixedCols;

number of fixed (non-scrollable) columns

_fixedRows
int _fixedRows;

number of fixed (non-scrollable) rows

_scrollX
int _scrollX;

scroll X offset in pixels

_scrollY
int _scrollY;

scroll Y offset in pixels

_selection
RedBlackTree!Point _selection;

selected cells when multiselect is enabled

_col
int _col;

selected cell column

_row
int _row;

selected cell row

_multiSelect
bool _multiSelect;

when true, allows multi cell selection

_rowSelect
bool _rowSelect;

when true, allows to select only whole row

_defColumnWidth
int _defColumnWidth;

default column width - for newly added columns

_defRowHeight
int _defRowHeight;

default row height - for newly added rows

selection
RedBlackTree!Point selection [@property getter]

selected cells when multiselect is enabled

col
int col [@property getter]

selected column

row
int row [@property getter]

selected row

cols
int cols [@property getter]

column count

cols
int cols [@property setter]

set column count

rows
int rows [@property getter]

row count

rows
int rows [@property setter]

set row count

_allowColResizing
bool _allowColResizing;
Undocumented in source.
allowColResizing
bool allowColResizing [@property getter]

get col resizing flag; when true, allow resizing of column with mouse

allowColResizing
bool allowColResizing [@property setter]

set col resizing flag; when true, allow resizing of column with mouse

_selectionColor
uint _selectionColor;
Undocumented in source.
_selectionColorRowSelect
uint _selectionColorRowSelect;
Undocumented in source.
_fixedCellBackgroundColor
uint _fixedCellBackgroundColor;
Undocumented in source.
_fixedCellBorderColor
uint _fixedCellBorderColor;
Undocumented in source.
_cellBorderColor
uint _cellBorderColor;
Undocumented in source.
_cellHeaderBorderColor
uint _cellHeaderBorderColor;
Undocumented in source.
_cellHeaderBackgroundColor
uint _cellHeaderBackgroundColor;
Undocumented in source.
_cellHeaderSelectedBackgroundColor
uint _cellHeaderSelectedBackgroundColor;
Undocumented in source.
_cellHeaderBackgroundDrawable
DrawableRef _cellHeaderBackgroundDrawable;
Undocumented in source.
_cellHeaderSelectedBackgroundDrawable
DrawableRef _cellHeaderSelectedBackgroundDrawable;
Undocumented in source.
_cellRowHeaderBackgroundDrawable
DrawableRef _cellRowHeaderBackgroundDrawable;
Undocumented in source.
_cellRowHeaderSelectedBackgroundDrawable
DrawableRef _cellRowHeaderSelectedBackgroundDrawable;
Undocumented in source.
headerCols
int headerCols [@property getter]

row header column count

headerCols
int headerCols [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
headerRows
int headerRows [@property getter]

col header row count

headerRows
int headerRows [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fixedCols
int fixedCols [@property getter]

fixed (non-scrollable) data column count

fixedCols
int fixedCols [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fixedRows
int fixedRows [@property getter]

fixed (non-scrollable) data row count

fixedRows
int fixedRows [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
defColumnWidth
int defColumnWidth [@property getter]

default column width - for newly added columns

defColumnWidth
int defColumnWidth [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
defRowHeight
int defRowHeight [@property getter]

default row height - for newly added rows

defRowHeight
int defRowHeight [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
multiSelect
bool multiSelect [@property getter]

when true, allows multi cell selection

multiSelect
bool multiSelect [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
rowSelect
bool rowSelect [@property getter]

when true, allows only select the whole row

rowSelect
bool rowSelect [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
showColHeaders
bool showColHeaders [@property getter]

flag to enable column headers

showColHeaders
bool showColHeaders [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
showRowHeaders
bool showRowHeaders [@property getter]

flag to enable row headers

showRowHeaders
bool showRowHeaders [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
_changedSize
bool _changedSize;
Undocumented in source.
updateCumulativeSizes
void updateCumulativeSizes()

recalculate colCumulativeWidths, rowCumulativeHeights after resizes

resize
void resize(int c, int r)

set new size

nonScrollCols
int nonScrollCols [@property getter]

count of non-scrollable columns (header + fixed)

nonScrollRows
int nonScrollRows [@property getter]

count of non-scrollable rows (header + fixed)

fullAreaPixels
Point fullAreaPixels [@property getter]

return all (fixed + scrollable) cells size in pixels

nonScrollAreaPixels
Point nonScrollAreaPixels [@property getter]

non-scrollable area size in pixels

scrollAreaPixels
Point scrollAreaPixels [@property getter]

scrollable area size in pixels

cellRectNoScroll
Rect cellRectNoScroll(int x, int y)

get cell rectangle (relative to client area) not counting scroll position

cellRectScroll
Rect cellRectScroll(int x, int y)

get cell rectangle moved by scroll pixels (may overlap non-scroll cols!)

colVisible
bool colVisible(int x)

returns true if column is inside client area and not overlapped outside scroll area

rowVisible
bool rowVisible(int y)

returns true if row is inside client area and not overlapped outside scroll area

setColWidth
void setColWidth(int x, int w)
Undocumented in source. Be warned that the author may not have intended to support it.
setRowHeight
void setRowHeight(int y, int w)
Undocumented in source. Be warned that the author may not have intended to support it.
colWidth
int colWidth(int col)

get column width, 0 is header column

rowHeight
int rowHeight(int row)

get row height, 0 is header row

cellRect
Rect cellRect(int x, int y)

returns cell rectangle relative to client area; row 0 is col headers row; col 0 is row headers column

pointToCell
bool pointToCell(int x, int y, int col, int row, Rect cellRect)

converts client rect relative coordinates to cell coordinates

updateScrollBars
void updateScrollBars()

update scrollbar positions

findPosIndex
int findPosIndex(int[] cumulativeSizes, int pos)

search for index of position inside cumulative sizes array

colByAbsoluteX
int colByAbsoluteX(int x)

column by X, ignoring scroll position

rowByAbsoluteY
int rowByAbsoluteY(int y)

row by Y, ignoring scroll position

scrollCol
int scrollCol()

returns first fully visible column in scroll area

lastScrollCol
int lastScrollCol()

returns last fully visible column in scroll area

scrollRow
int scrollRow()

returns first fully visible row in scroll area

lastScrollRow
int lastScrollRow()

returns last fully visible row in scroll area

scrollBy
bool scrollBy(int dx, int dy)

move scroll position horizontally by dx, and vertically by dy; returns true if scrolled

handleClientRectLayout
void handleClientRectLayout(Rect rc)

override to support modification of client rect after change, e.g. apply offset

correctScrollPos
void correctScrollPos()
Undocumented in source. Be warned that the author may not have intended to support it.
scrollTo
bool scrollTo(int x, int y, GridWidgetBase source, bool doNotify)

set scroll position to show specified cell as top left in scrollable area; col or row -1 value means no change

onHScroll
bool onHScroll(ScrollEvent event)

process horizontal scrollbar event

onVScroll
bool onVScroll(ScrollEvent event)

process vertical scrollbar event

makeCellVisible
void makeCellVisible(int col, int row)

ensure that cell is visible (scroll if necessary)

multiSelectCell
bool multiSelectCell(int col, int row, bool expandExisting)
Undocumented in source. Be warned that the author may not have intended to support it.
selectCell
bool selectCell(int col, int row, bool makeVisible, GridWidgetBase source, bool needNotification)

move selection to specified cell

activateCell
bool activateCell(int col, int row)

Select cell and call onCellActivated handler

cellPopupMenu
Signal!CellPopupMenuHandler cellPopupMenu;

cell popup menu

menuItemAction
Signal!MenuItemActionHandler menuItemAction;

popup menu item action

getCellPopupMenu
MenuItem getCellPopupMenu(int col, int row)
Undocumented in source. Be warned that the author may not have intended to support it.
onMenuItemAction
bool onMenuItemAction(Action action)

handle popup menu action

canShowPopupMenu
bool canShowPopupMenu(int x, int y)

returns true if widget can show popup menu (e.g. by mouse right click at point x,y)

showPopupMenu
void showPopupMenu(int xx, int yy)

shows popup menu at (x,y)

getCursorType
uint getCursorType(int x, int y)

returns mouse cursor type for widget

_colResizingIndex
int _colResizingIndex;
Undocumented in source.
_colResizingStartX
int _colResizingStartX;
Undocumented in source.
_colResizingStartWidth
int _colResizingStartWidth;
Undocumented in source.
startColResize
void startColResize(int col, int x)
Undocumented in source. Be warned that the author may not have intended to support it.
processColResize
void processColResize(int x)
Undocumented in source. Be warned that the author may not have intended to support it.
endColResize
void endColResize()
Undocumented in source. Be warned that the author may not have intended to support it.
isColumnResizingPoint
int isColumnResizingPoint(int x, int y)

return column index to resize if point is in column resize area in header row, -1 if outside resize area

onMouseEvent
bool onMouseEvent(MouseEvent event)

handle mouse wheel events

_fullColumnOnLeft
bool _fullColumnOnLeft;
Undocumented in source.
fullColumnOnLeft
bool fullColumnOnLeft [@property getter]

Extends scroll area to show full column at left when scrolled to rightmost column

fullColumnOnLeft
bool fullColumnOnLeft [@property setter]

Extends scroll area to show full column at left when scrolled to rightmost column

_fullRowOnTop
bool _fullRowOnTop;
Undocumented in source.
fullRowOnTop
bool fullRowOnTop [@property getter]

Extends scroll area to show full row at top when scrolled to end row

fullRowOnTop
bool fullRowOnTop [@property setter]

Extends scroll area to show full row at top when scrolled to end row

calcScrollableAreaPos
void calcScrollableAreaPos()

calculate scrollable area info

_maxScrollCol
int _maxScrollCol;
Undocumented in source.
_maxScrollRow
int _maxScrollRow;
Undocumented in source.
handleAction
bool handleAction(Action a)
Undocumented in source. Be warned that the author may not have intended to support it.
fullContentSize
Point fullContentSize()

calculate full content size in pixels

_minVisibleCols
int _minVisibleCols;
Undocumented in source.
_minVisibleRows
int _minVisibleRows;
Undocumented in source.
minVisibleCols
int minVisibleCols [@property getter]

returns number of columns from 0 that are taken to measure minimum visible width

minVisibleCols
int minVisibleCols [@property setter]

sets number of columns from 0 that are taken to measure minimum visible width

minVisibleRows
int minVisibleRows [@property getter]

returns number of rows from 0 that are taken to measure minimum visible height

minVisibleRows
int minVisibleRows [@property setter]

sets number of rows from 0 that are taken to measure minimum visible height, if there are too little rows last row height is multiplied

minimumVisibleContentSize
Point minimumVisibleContentSize()

calculate minimum size of widget

drawClient
void drawClient(DrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
drawCell
void drawCell(DrawBuf buf, Rect rc, int col, int row)

draw data cell content

drawHeaderCell
void drawHeaderCell(DrawBuf buf, Rect rc, int col, int row)

draw header cell content

drawCellBackground
void drawCellBackground(DrawBuf buf, Rect rc, int col, int row)

draw data cell background

drawHeaderCellBackground
void drawHeaderCellBackground(DrawBuf buf, Rect rc, int col, int row)

draw header cell background

measureCell
Point measureCell(int x, int y)
Undocumented in source. Be warned that the author may not have intended to support it.
measureColWidth
int measureColWidth(int x)
Undocumented in source. Be warned that the author may not have intended to support it.
measureRowHeight
int measureRowHeight(int y)
Undocumented in source. Be warned that the author may not have intended to support it.
autoFitColumnWidth
void autoFitColumnWidth(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
fillColumnWidth
void fillColumnWidth(int colIndex)

extend specified column width to fit client area if grid width

autoFitColumnWidths
void autoFitColumnWidths()
Undocumented in source. Be warned that the author may not have intended to support it.
autoFitRowHeight
void autoFitRowHeight(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
autoFitRowHeights
void autoFitRowHeights()
Undocumented in source. Be warned that the author may not have intended to support it.
autoFit
void autoFit()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta