Skip to content

Commit

Permalink
[SUTK] Added CursorPosition::moveToNextColumn and moveToPrevColumn fu…
Browse files Browse the repository at this point in the history
…nctions
  • Loading branch information
ravi688 committed Aug 6, 2024
1 parent 2782dce commit a13694d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sutk/include/sutk/Text.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ namespace SUTK

void moveToNextLine(const T& max = std::numeric_limits<T>::max()) noexcept { if(m_line < max) m_line += 1; }
void moveToPrevLine(const T& min = std::numeric_limits<T>::min()) noexcept { if(m_line > min) m_line -= 1; }
void moveToNextColumn(const T& max = std::numeric_limits<T>::max()) noexcept { if(m_col < max) m_col += 1; }
void moveToPrevColumn(const T& min = std::numeric_limits<T>::min()) noexcept { if(m_col > min) m_col -= 1; }
void moveToLine(T line) noexcept { m_line = line; }
void moveToColumn(T col) noexcept { m_col = col; }
T getLine() const noexcept { return m_line; }
Expand Down

0 comments on commit a13694d

Please sign in to comment.