Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::Coordinates Struct Reference

Coordinates representing a position in the text buffer, using a grid-based system where tabs are expanded to spaces according to the tab size setting. More...

#include "donner/editor/TextBuffer.h"

Public Member Functions

 Coordinates (int line, int column)
 Create a new coordinate pair at a given line and column.
bool operator== (const Coordinates &other) const =default
 Equality operator.
auto operator<=> (const Coordinates &other) const =default
 Spaceship comparison operator.

Static Public Member Functions

static Coordinates Invalid ()
 Get invalid coordinates for error cases.

Public Attributes

int line = 0
 Line number (0-based).
int column = 0
 Column number (0-based, in spaces).

Detailed Description

Coordinates representing a position in the text buffer, using a grid-based system where tabs are expanded to spaces according to the tab size setting.

Constructor & Destructor Documentation

◆ Coordinates()

donner::editor::Coordinates::Coordinates ( int line,
int column )
inline

Create a new coordinate pair at a given line and column.

Parameters
lineLine number (0-based)
columnColumn number (0-based, in spaces)

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