C# Class trello.Interactions.PointIndex

Datei anzeigen Open project: Bunk/trellow Class Usage Examples

Public Methods

Method Description
Add ( Value item ) : void

Adds the specified value into the point index. The location in the index is determined by its y-coordinate relative to other items already in the list. The resulting index will be sorted from lowest y-coordinate to highest.

Get ( int index ) : Value

Returns the index value at the given index location.

GetPotentialItem ( Point targetPoint ) : Value

Returns the item if the target point has a hit test match in the index.

IndexOf ( Point point ) : int

Returns the index location for a given point in the index.

IndexOf ( Value point ) : int

Returns the index location of a given value in the index.

Remove ( string id ) : void
ShuffleItems ( int oldIndex, int newIndex ) : void

Swaps the indexed items beginning with the old index until the new index.

Private Methods

Method Description
Adjust ( int startIndex, double offset ) : void
FindSuitableIndex ( Rect position ) : int
SwapIndex ( int indexFrom, int indexTo ) : void

Method Details

Add() public method

Adds the specified value into the point index. The location in the index is determined by its y-coordinate relative to other items already in the list. The resulting index will be sorted from lowest y-coordinate to highest.
public Add ( Value item ) : void
item Value
return void

Get() public method

Returns the index value at the given index location.
public Get ( int index ) : Value
index int
return Value

GetPotentialItem() public method

Returns the item if the target point has a hit test match in the index.
public GetPotentialItem ( Point targetPoint ) : Value
targetPoint System.Windows.Point Point to do a hit test against
return Value

IndexOf() public method

Returns the index location for a given point in the index.
public IndexOf ( Point point ) : int
point System.Windows.Point The point to do a hit test against.
return int

IndexOf() public method

Returns the index location of a given value in the index.
public IndexOf ( Value point ) : int
point Value
return int

Remove() public method

public Remove ( string id ) : void
id string
return void

ShuffleItems() public method

Swaps the indexed items beginning with the old index until the new index.
public ShuffleItems ( int oldIndex, int newIndex ) : void
oldIndex int
newIndex int
return void