summaryrefslogtreecommitdiff
path: root/ycurses/src/curses/coordinate.cpp
diff options
context:
space:
mode:
authorPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-15 11:49:02 +0100
committerPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-15 11:49:02 +0100
commit3a96ab7e91145b367d05e98533b5f426f762f83f (patch)
treeac7758a706066e14b785ab6e5f7071a54baa856b /ycurses/src/curses/coordinate.cpp
parent332d7b2107833018b3ef67b64ffe121bff1ef4fb (diff)
add packagespackages
Diffstat (limited to 'ycurses/src/curses/coordinate.cpp')
-rw-r--r--ycurses/src/curses/coordinate.cpp134
1 files changed, 0 insertions, 134 deletions
diff --git a/ycurses/src/curses/coordinate.cpp b/ycurses/src/curses/coordinate.cpp
deleted file mode 100644
index efdf9e2..0000000
--- a/ycurses/src/curses/coordinate.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-#ifndef COORDONATE_CPP
-#define COORDONATE_CPP
-
-#include "coordinate.h"
-
-coordinate::coordinate()
-{
- y = x = 0;
-}
-
-coordinate::coordinate(coordinate_type type, dummy_window& r_win)
-{
- set(type, r_win);
-}
-
-coordinate::coordinate(coordinate_type type)
-{
- set(type);
-}
-
-coordinate::coordinate(int y, int x)
-{
- this->y = y;
- this->x = x;
-}
-
-coordinate&
-coordinate::set(coordinate_type type, dummy_window& r_win)
-{
- switch (type)
- {
- case Absolutecoord:
- getyx(r_win.get_WINDOW(), y, x);
- break;
-
- case Relativecoord:
- getparyx(r_win.get_WINDOW(), y, x);
- break;
-
- case Beginningcoord:
- getbegyx(r_win.get_WINDOW(), y, x);
- break;
-
- case windowSize:
- getmaxyx(r_win.get_WINDOW(), y, x);
- break;
-
- default:
- set(type);
- }
-
- return *this;
-}
-
-coordinate&
-coordinate::set(coordinate_type type)
-{
- switch (type)
- {
- case TerminalSize:
- y = COLS;
- x = LINES;
- break;
-
- case TerminalCenter:
- y = static_cast<int>(COLS / 2);
- x = static_cast<int>(LINES / 2);
- break;
- }
-
- return *this;
-}
-
-coordinate&
-coordinate::left()
-{
- return left(1);
-}
-
-coordinate&
-coordinate::right()
-{
- return right(1);
-}
-
-coordinate&
-coordinate::up()
-{
- return up(1);
-}
-
-coordinate&
-coordinate::down()
-{
- return down(1);
-}
-
-coordinate&
-coordinate::left(int i)
-{
- x -= i;
- return *this;
-}
-
-coordinate&
-coordinate::right(int i)
-{
- x += i;
- return *this;
-}
-
-coordinate&
-coordinate::up(int i)
-{
- y -= i;
- return *this;
-}
-
-coordinate&
-coordinate::down(int i)
-{
- y += i;
- return *this;
-}
-
-coordinate&
-coordinate::displace(int i_y, int i_x)
-{
- y += i_y;
- x += i_x;
- return *this;
-}
-
-#endif