wxWidgets: wxGridCellCoords Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxGridCellCoords Class Reference

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-4.x86_64/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.
| wxGridCellCoords (int row, int col)
| Constructor taking a row and a column.
int | GetRow () const
| Return the row of the coordinate.
void | SetRow (int n)
| Set the row of the coordinate.
int | GetCol () const
| Return the column of the coordinate.
void | SetCol (int n)
| Set the column of the coordinate.
void | Set (int row, int col)
| Set the row and column of the coordinate.
wxGridCellCoords & | operator= (const wxGridCellCoords &other)
| Assignment operator for coordinate types.
bool | operator== (const wxGridCellCoords &other) const
| Equality operator.
bool | operator!= (const wxGridCellCoords &other) const
| Inequality operator.
bool | operator! () const
| Checks whether the coordinates are invalid.

## 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.