C# Class SourceGrid.CellContext

Structure that represents a logical cell, composed by a ICellVirtual, a Position and a GridVirtual. This is an important structure used to manipulate the cell object, both virtual and real.
Show file Open project: zhuangyy/Motion Class Usage Examples

Public Properties

Property Type Description
Cell Cells.ICellVirtual
Empty CellContext
Grid GridVirtual
Position Position

Public Methods

Method Description
CellContext ( GridVirtual pGridVirtual, Position pPosition ) : System

Constructor

CellContext ( GridVirtual pGridVirtual, Position pPosition, Cells pCell ) : System

Constructor

EndEdit ( bool cancel ) : bool

Terminate the edit operation.

Equals ( CellContext other ) : bool

Equals ( object obj ) : bool

GetHashCode ( ) : int

GetHashCode

Invalidate ( ) : void

Invalidate this cell

IsEditing ( ) : bool

True if this cell is currently in edit state, otherwise false.

IsEmpty ( ) : bool

Returns true if the current struct is empty

Measure ( System maxLayoutArea ) : System.Drawing.Size

If the cell is not linked to a grid the result is not accurate (Font can be null). Call InternalGetRequiredSize with RowSpan and ColSpan = 1.

StartEdit ( ) : void

Start the edit operation with the current editor specified in the Model property.

ToString ( ) : string

operator ( ) : bool

Private Methods

Method Description
CellContext ( ) : System

Method Details

CellContext() public method

Constructor
public CellContext ( GridVirtual pGridVirtual, Position pPosition ) : System
pGridVirtual GridVirtual
pPosition Position
return System

CellContext() public method

Constructor
public CellContext ( GridVirtual pGridVirtual, Position pPosition, Cells pCell ) : System
pGridVirtual GridVirtual
pPosition Position
pCell Cells
return System

EndEdit() public method

Terminate the edit operation.
public EndEdit ( bool cancel ) : bool
cancel bool If true undo all the changes
return bool

Equals() public method

public Equals ( CellContext other ) : bool
other CellContext
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

GetHashCode
public GetHashCode ( ) : int
return int

Invalidate() public method

Invalidate this cell
public Invalidate ( ) : void
return void

IsEditing() public method

True if this cell is currently in edit state, otherwise false.
public IsEditing ( ) : bool
return bool

IsEmpty() public method

Returns true if the current struct is empty
public IsEmpty ( ) : bool
return bool

Measure() public method

If the cell is not linked to a grid the result is not accurate (Font can be null). Call InternalGetRequiredSize with RowSpan and ColSpan = 1.
public Measure ( System maxLayoutArea ) : System.Drawing.Size
maxLayoutArea System SizeF structure that specifies the maximum layout area for the text. If width or height are zero the value is set to a default maximum value.
return System.Drawing.Size

StartEdit() public method

Start the edit operation with the current editor specified in the Model property.
public StartEdit ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

operator() public static method

public static operator ( ) : bool
return bool

Property Details

Cell public property

public Cells.ICellVirtual Cell
return Cells.ICellVirtual

Empty public static property

An empty CellContext instance.
public static CellContext,SourceGrid Empty
return CellContext

Grid public property

public GridVirtual,SourceGrid Grid
return GridVirtual

Position public property

public Position,SourceGrid Position
return Position