x4Trace Documentation v1.0
Loading...
Searching...
No Matches
IGraphics.Grid.IGrid Class Reference

Represents a grid, operating system independent. More...

Public Member Functions

 IGrid ()
 Constructor.
 
void Draw (IGraphics.GInterface.IGraphics gr)
 Draws the grid.
 
virtual void ColumnAdded ()
 Runs when a column added. Adds cells to rows.
 
virtual void ColumnInserted (int index)
 Runs when column inserted.
 
virtual void ColumnRemoved (int index)
 Runs when a column removed.
 
virtual void Refresh ()
 Refreshes the grid. Runs request of refresh.
 
void AutoResizeColumns ()
 Adjust all columns to width of control.
 
virtual void AddControl (IGridControl control)
 Fires addcontrol event.
 
virtual void RemoveControl (IGridControl control)
 Fires remove control event.
 
void DoEdit ()
 Enforces the edit of current cell.
 
virtual void ProcessMessages ()
 Processes the messages after draw.
 
void OnSizeChanged ()
 Fire sizechanged event.
 
void OnDrawingAreaChanged ()
 Fires drawing area changed event.
 
void OnCellMouseDown (ICell cell)
 Fires moude down event of cell.
 
void OnRowAdded (ICellList cells)
 Fires on row added event.
 
void OnRowAdding (ICellList cells, ref bool can)
 Fires event of adding row.
 
void OnRowDeleting (ICellList cells)
 Fires deleting of row.
 
void OnColumnClick (IColumn column)
 Fires column click event.
 
void OnCellDataChanged (ICell cell, string oldValue, string newValue)
 Fires data change event of cell.
 
void OnCurrentCellChanged (ICell oldCell, ICell newCell)
 Fires current cell changed event.
 
void OnCursorChanged (IGraphics.Cursor cursor)
 Fires cursor changed event.
 
virtual void MouseDown (int x, int y)
 Hadndels the mouse down event.
 
virtual void MouseMove (int x, int y)
 Handles mouse move event.
 
virtual void MouseUp (int x, int y)
 Handles mouse up event.
 
virtual void MouseWheel (int delta)
 Handles scroll of mouse.
 
virtual void OnVerticalScrollChanged (int val)
 Fires vertical scroll changed event.
 
virtual void OnHorizontalScrollChanged (int val)
 Fires horizontal scroll changed event.
 
virtual bool NavigationUp ()
 Navigates the current cell to up.
 
virtual bool NavigationDown ()
 Navigates the current cell to down.
 
virtual bool NavigationLeft ()
 Navigates the current cell to left.
 
virtual bool NavigationRight ()
 Navigates the current cell to right.
 

Public Attributes

bool isWheelEnabled = true
 Enables the scroll.
 
List< object > imageList = new List<object>()
 List of images.
 

Protected Member Functions

virtual void Draw1 (IGraphics.GInterface.IGraphics gr, bool enforceDraw)
 Draws the grid.
 
void OnRefreshRequest ()
 Fires refresh request event.
 

Protected Attributes

IColor currentCellBackGroundColor = IColor.Black
 Background color of current cell.
 
IColor currentCellForeGroundColor = IColor.White
 Foregroud color of cell.
 
IColor currentCellLineColor = IColor.Black
 Line color of current cell.
 
int currentCellLineWidth = 3
 Border line width of current cell.
 
IColor currentRowBackColor = IColor.LightSkyBlue
 Row color of current cell.
 
IColor currentRowForeColor = IColor.Black
 Fore color of current row.
 
IColor separatorLineColor = IColor.Black
 Color of separator line.
 
IColor cellBackgroundColor1 = IColor.White
 Background color 1 in flip mode.
 
IColor cellBackgroundColor2 = IColor.LightGreen
 Background color 2 in flip mode.
 
GInterface.IFont currentFont = new GInterface.IFont("Arial", 10)
 Current cell font.
 
CurrentCellDrawingMode currentCellDrawingMode = CurrentCellDrawingMode.Fill
 Drawing mode of current cell.
 
int separatorLineHeight = 10
 Height of separator line.
 
IColumns columns
 List of columns.
 
IRows rows
 List of rows.
 
int rowHeight = 21
 Height of current row.
 
int columnLineWidth = 1
 Line width of border of column.
 
IColor columnLineColor = IColor.Black
 Border color of column;.
 
int cellLineWidth = 1
 Border line width of cell.
 
IColor cellLineColor = IColor.Black
 Border line color of cell.
 
bool mousedown = false
 Mouse button is pressed.
 
bool isShiftdown = false
 Shift button is pressed.
 
bool isControlDown = false
 Control button is pressed.
 
bool enableRightClickToSelectCell = false
 Enables the right mouse button to select cell.
 
bool enablePopupMenu = false
 Visibility of popup menu.
 
IColumn resizableColumn = null
 Current column to resize.
 
bool columnAdjustToFullWidth = false
 Automarically adjust the columns to width of control.
 
int ex = 0
 Mouse x position.
 
int ey = 0
 Mouse y position.
 
bool isReadOnly = false
 The grid is readonly.
 
int wheelValue = 1
 Scroll value of mouse.
 
bool fullRowSelect = false
 Enables the foll row selection.
 
bool multiSelect = true
 Enables the multi row selection.
 
bool isDrawColumn = true
 Enables the drawing of columns.
 
bool isEnableEvents = true
 Enables the events.
 
bool isEnableInvalidate = true
 Enables the invalidate.
 
int zoom = 100
 Value of scaling.
 
int horizontalScrollValue = 0
 Current value of horizontal scrollbar.
 
int verticalScrollValue = 0
 Current value of vertical scrollbar.
 
int maxVerticalScrollValue = 0
 Maximum value of vertical scroll value.
 
int controlWidth = 100
 Width of control.
 
int controlHeight = 100
 Height of control.
 
bool showOnlyTheSelectedRow = false
 Shows the selected row only.
 
bool isFlipBackgroundColor = false
 Switches on flip background color mode.
 
int startFlipIndex = 1
 Index of start flip.
 

Properties

bool ColumnAdjustToFullWidth [get, set]
 Adjust width of columns to width of control.
 
List< object > ImageList [get]
 List of images.
 
bool IsEnableInvalidate [get, set]
 Enables invalidate.
 
int WidthZoom [get]
 Width of control times with zoom.
 
int HeightZoom [get]
 Heigth of control times with zoom.
 
double ScaleFactor [get]
 Scale of control.
 
double ScaleFactorReverse [get]
 Invert of scale.
 
int Zoom [get, set]
 Zoom of control.
 
IColor CurrentCellLineColor [get, set]
 Line color of current cell.
 
int WheelValue [get, set]
 Scroll value of mouse.
 
bool MultiSelect [get, set]
 Enables the multi row selection.
 
bool FullRowSelect [get, set]
 Enables the foll row selection.
 
IRows Rows [get]
 List of rows.
 
IColor CurrentCellBackGroundColor [get, set]
 Background color of current cell.
 
IColor CurrentCellForeGroundColor [get, set]
 Foregroud color of cell.
 
GInterface.IFont CurrentFont [get, set]
 Current cell font.
 
int RowHeight [get, set]
 Height of current row.
 
int ColumnLineWidth [get, set]
 Line width of border of column.
 
IColor ColumnLineColor [get, set]
 Border color of column;.
 
int CellLineWidth [get, set]
 Border line width of cell.
 
IColor CellLineColor [get, set]
 Border line color of cell.
 
IColumns Columns [get]
 List of columns.
 
bool IsShiftDown [get, set]
 Shift button is pressed.
 
bool IsControlDown [get, set]
 Control button is pressed.
 
bool IsReadOnly [get, set]
 The grid is readonly.
 
IColor CurrentRowBackColor [get, set]
 Row color of current cell.
 
IColor CurrentRowForeColor [get, set]
 
CurrentCellDrawingMode CurrentCellDrawingMode [get, set]
 Fore color of current row.
 
int CurrentCellLineWidth [get, set]
 Border line width of current cell.
 
bool EnableRightClickToSelectCell [get, set]
 Enables the right mouse button to select cell.
 
bool EnablePopupMenu [get, set]
 Visibility of popup menu.
 
int EX [get]
 Mouse X coordinate.
 
int EY [get]
 Mouse Y coordinate.
 
int SeparatorLineHeight [get, set]
 Height of separator line.
 
IColor SeparatorLineColor [get, set]
 Color of separator line.
 
bool IsDrawColumn [get, set]
 Enables the drawing of columns.
 
int ControlWidth [get, set]
 Width of control.
 
int ControlHeight [get, set]
 Height of control.
 
int HorizontalScrollValue [get, set]
 Current value of horizontal scrollbar.
 
int VerticalScrollValue [get, set]
 Current value of vertical scrollbar.
 
int MaxVerticalScrollValue [get, set]
 Maximum value of vertical scroll value.
 
bool IsEnableEvents [get, set]
 Enables the events.
 
bool ShowOnlyTheSelectedRow [get, set]
 Shows the selected row only.
 
IColor CellBackgroundColor1 [get, set]
 Background color 1 in flip mode.
 
IColor CellBackgroundColor2 [get, set]
 Background color 2 in flip mode.
 
bool IsFlipBackgroundColor [get, set]
 Switches on flip background color mode.
 
int StartFlipIndex [get, set]
 Index of start flip.
 
virtual int MessageCount [get]
 Count of messages to process.
 

Events

RefreshRequest RefreshRequest
 Event of refresh. Calls when grid needs refresh.
 
DrawingAreaChanged DrawingAreaChanged
 Event of drawing area changed.
 
CursorChanged CursorChanged
 Event of cursor changed.
 
EventCurrentCellChanged CurrentCellChanged
 Event of current cell changed.
 
EventCellDataChanged CellDataChanged
 Event of data changed.
 
EventColumnClick ColumnClick
 Event of column click.
 
EventRowDeleting RowDeleting
 Event of deleting of row.
 
EventRowAdded RowAdded
 Event of row added.
 
EventRowAdding RowAdding
 Event of addig row.
 
EventCellMouseDown CellMouseDown
 Event of mousedown of cell.
 
KeyDownEvent KeyPressdEvent
 Event of keypressed.
 
VerticalScrollChanged VerticalScrollChanged
 Event of vertical scroll changed.
 
HorizontalScrollChanged HorizontalScrollChanged
 Event of horizontal scroll changed.
 
AddControlEvt AddControlEvt
 Event of control add.
 
RemoveControlEvt RemoveControlEvt
 Event of remove control.
 

Private Member Functions

void Endresizecolumn ()
 Finishes resize of column.
 

Detailed Description

Represents a grid, operating system independent.

Member Function Documentation

◆ AddControl()

virtual void IGraphics.Grid.IGrid.AddControl ( IGridControl control)
virtual

Fires addcontrol event.

Parameters
controlThe control.

◆ ColumnInserted()

virtual void IGraphics.Grid.IGrid.ColumnInserted ( int index)
virtual

Runs when column inserted.

Parameters
indexIndex of insert.

◆ ColumnRemoved()

virtual void IGraphics.Grid.IGrid.ColumnRemoved ( int index)
virtual

Runs when a column removed.

Parameters
indexIndex of remove.

◆ Draw()

void IGraphics.Grid.IGrid.Draw ( IGraphics.GInterface.IGraphics gr)

Draws the grid.

Parameters
grGraphics to draw.

◆ Draw1()

virtual void IGraphics.Grid.IGrid.Draw1 ( IGraphics.GInterface.IGraphics gr,
bool enforceDraw )
protectedvirtual

Draws the grid.

Parameters
grGraphics to draw.
enforceDrawEnforce draw.

◆ MouseDown()

virtual void IGraphics.Grid.IGrid.MouseDown ( int x,
int y )
virtual

Hadndels the mouse down event.

Parameters
xX coordinate.
yY coordinate.

◆ MouseMove()

virtual void IGraphics.Grid.IGrid.MouseMove ( int x,
int y )
virtual

Handles mouse move event.

Parameters
xX coordinate.
yY coordinate.

◆ MouseUp()

virtual void IGraphics.Grid.IGrid.MouseUp ( int x,
int y )
virtual

Handles mouse up event.

Parameters
xX coordinate.
yY coordinate.

◆ MouseWheel()

virtual void IGraphics.Grid.IGrid.MouseWheel ( int delta)
virtual

Handles scroll of mouse.

Parameters
deltaValue of scroll.

◆ NavigationDown()

virtual bool IGraphics.Grid.IGrid.NavigationDown ( )
virtual

Navigates the current cell to down.

Returns
True when a control was acivated.

◆ NavigationLeft()

virtual bool IGraphics.Grid.IGrid.NavigationLeft ( )
virtual

Navigates the current cell to left.

Returns
True when a control was acivated.

◆ NavigationRight()

virtual bool IGraphics.Grid.IGrid.NavigationRight ( )
virtual

Navigates the current cell to right.

Returns
True when a control was acivated.

◆ NavigationUp()

virtual bool IGraphics.Grid.IGrid.NavigationUp ( )
virtual

Navigates the current cell to up.

Returns
True when a control was acivated.

◆ OnCellDataChanged()

void IGraphics.Grid.IGrid.OnCellDataChanged ( ICell cell,
string oldValue,
string newValue )

Fires data change event of cell.

Parameters
cellCell.
oldValueOld value.
newValueNew value.

◆ OnCellMouseDown()

void IGraphics.Grid.IGrid.OnCellMouseDown ( ICell cell)

Fires moude down event of cell.

Parameters
cellThe cell.

◆ OnColumnClick()

void IGraphics.Grid.IGrid.OnColumnClick ( IColumn column)

Fires column click event.

Parameters
columnThe column.

◆ OnCurrentCellChanged()

void IGraphics.Grid.IGrid.OnCurrentCellChanged ( ICell oldCell,
ICell newCell )

Fires current cell changed event.

Parameters
oldCellOld cell.
newCellNew cell.

◆ OnCursorChanged()

void IGraphics.Grid.IGrid.OnCursorChanged ( IGraphics.Cursor cursor)

Fires cursor changed event.

Parameters
cursorThe cursor.

◆ OnHorizontalScrollChanged()

virtual void IGraphics.Grid.IGrid.OnHorizontalScrollChanged ( int val)
virtual

Fires horizontal scroll changed event.

Parameters
valValue of change.

◆ OnRowAdded()

void IGraphics.Grid.IGrid.OnRowAdded ( ICellList cells)

Fires on row added event.

Parameters
cellsList of cells.

◆ OnRowAdding()

void IGraphics.Grid.IGrid.OnRowAdding ( ICellList cells,
ref bool can )

Fires event of adding row.

Parameters
cellsList of cells.
canIf you set it false the add will be cancelled.

◆ OnRowDeleting()

void IGraphics.Grid.IGrid.OnRowDeleting ( ICellList cells)

Fires deleting of row.

Parameters
cellsList of cells.

◆ OnVerticalScrollChanged()

virtual void IGraphics.Grid.IGrid.OnVerticalScrollChanged ( int val)
virtual

Fires vertical scroll changed event.

Parameters
valValue of change.

◆ RemoveControl()

virtual void IGraphics.Grid.IGrid.RemoveControl ( IGridControl control)
virtual

Fires remove control event.

Parameters
controlThe control.

The documentation for this class was generated from the following file: