wxWidgets: wxGridCellCoords Class Reference

| Version: 3.1.5

Public Member Functions | List of all members
wxGridCellCoords Class Reference

`#include </home/Hamis/wxwidgets-3.1/wxWidgets3.1-3.1.5-1.i686/src/wxWidgets-3.1.5/interface/wx/grid.h>`

## Detailed Description

Represents coordinates of a grid cell.

An object of this class is simply a (row, column) pair.

## Public Member Functions
| wxGridCellCoords ()
| Default constructor initializes the object to invalid state. More...
| wxGridCellCoords (int row, int col)
| Constructor taking a row and a column. More...
int | GetRow () const
| Return the row of the coordinate. More...
void | SetRow (int n)
| Set the row of the coordinate. More...
int | GetCol () const
| Return the column of the coordinate. More...
void | SetCol (int n)
| Set the column of the coordinate. More...
void | Set (int row, int col)
| Set the row and column of the coordinate. More...
wxGridCellCoords & | operator= (const wxGridCellCoords &other)
| Assignment operator for coordinate types. More...
bool | operator== (const wxGridCellCoords &other) const
| Equality operator. More...
bool | operator!= (const wxGridCellCoords &other) const
| Inequality operator. More...
bool | operator! () const
| Checks whether the coordinates are invalid. More...

## Constructor & Destructor Documentation

## ◆ wxGridCellCoords() [1/2]

wxGridCellCoords::wxGridCellCoords | ( |  | ) |

Default constructor initializes the object to invalid state.

Initially the row and column are both invalid (-1) and so operator!() for an uninitialized wxGridCellCoords returns false.

## ◆ wxGridCellCoords() [2/2]

wxGridCellCoords::wxGridCellCoords | ( | int | row,
|  | int | col
| ) |  |

Constructor taking a row and a column.

## Member Function Documentation

## ◆ GetCol()

int wxGridCellCoords::GetCol | ( |  | ) | const

Return the column of the coordinate.

## ◆ GetRow()

int wxGridCellCoords::GetRow | ( |  | ) | const

Return the row of the coordinate.

## ◆ operator!()

bool wxGridCellCoords::operator! | ( |  | ) | const

Checks whether the coordinates are invalid.

Returns false only if both row and column are -1. Notice that if either row or column (but not both) are -1, this method returns true even if the object is invalid. This is done because objects in such state should actually never exist, i.e. either both coordinates should be -1 or none of them should be -1.

## ◆ operator!=()

bool wxGridCellCoords::operator!= | ( | const wxGridCellCoords & | other | ) | const

Inequality operator.

## ◆ operator=()

wxGridCellCoords & wxGridCellCoords::operator= | ( | const wxGridCellCoords & | other | ) |

Assignment operator for coordinate types.

## ◆ operator==()

bool wxGridCellCoords::operator== | ( | const wxGridCellCoords & | other | ) | const

Equality operator.

## ◆ Set()

void wxGridCellCoords::Set | ( | int | row,
|  | int | col
| ) |  |

Set the row and column of the coordinate.

## ◆ SetCol()

void wxGridCellCoords::SetCol | ( | int | n | ) |

Set the column of the coordinate.

## ◆ SetRow()

void wxGridCellCoords::SetRow | ( | int | n | ) |

Set the row of the coordinate.