… | |
… | |
3 | * Copyright (c) 2003,2004 by Stanislav Ievlev |
3 | * Copyright (c) 2003,2004 by Stanislav Ievlev |
4 | * |
4 | * |
5 | * This file is covered by the GNU Library General Public License, |
5 | * This file is covered by the GNU Library General Public License, |
6 | * which should be included with libncursesxx as the file COPYING. |
6 | * which should be included with libncursesxx as the file COPYING. |
7 | */ |
7 | */ |
8 | #include <ndk++/pad.hh> |
8 | #include <ndk/pad.hh> |
9 | |
9 | |
|
|
10 | #include <ndk/application.hh> |
10 | #include <ndk++/window.hh> |
11 | #include <ndk/window.hh> |
11 | |
12 | |
12 | #include <stdexcept> |
13 | #include <stdexcept> |
13 | |
14 | |
14 | using ndk::pad; |
15 | using ndk::pad; |
15 | |
16 | |
16 | pad::pad () |
17 | pad::pad () |
17 | : pad_ (newpad (1, 1), delwin) |
18 | : pad_ (newpad (1, 1), delwin) |
18 | { |
19 | { |
19 | if (!pad_) |
20 | if (!pad_) |
20 | throw std::runtime_error ("newpad failed"); |
21 | throw std::runtime_error ("newpad failed"); |
21 | keypad (win (), TRUE); /* initialize advanced keycodes for this window */ |
22 | app->enable_keypad (win ()); |
22 | } |
23 | } |
23 | |
24 | |
24 | pad::~pad () |
25 | pad::~pad () |
25 | { |
26 | { |
26 | } |
27 | } |