… | |
… | |
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/window.hh> |
|
|
9 | |
|
|
10 | #include <ndk/application.hh> |
|
|
11 | |
8 | #include <stdexcept> |
12 | #include <stdexcept> |
9 | |
|
|
10 | #include <ndk++/window.hh> |
|
|
11 | |
13 | |
12 | using ndk::window; |
14 | using ndk::window; |
13 | |
15 | |
14 | window::window () |
16 | window::window () |
15 | : win_ (newwin (1, 1, 0, 0), delwin) |
17 | : win_ (newwin (1, 1, 0, 0), delwin) |
16 | { |
18 | { |
17 | if (!win_) |
19 | if (!win_) |
18 | throw std::runtime_error ("newwin call failed"); |
20 | throw std::runtime_error ("newwin call failed"); |
19 | keypad (win (), TRUE); /* initialize advanced keycodes for this window */ |
21 | app->enable_keypad (win ()); |
20 | } |
22 | } |
21 | |
23 | |
22 | window::~window () |
24 | window::~window () |
23 | { |
25 | { |
24 | } |
26 | } |
25 | |
27 | |
26 | void |
28 | void |
27 | window::set_scroll (bool res) |
29 | window::set_scroll (bool res) |
28 | { |
30 | { |
29 | scrollok (win (), res); /* don't use ::, 'cause scrollok may be a macro */ |
31 | scrollok (win (), res); /* don't use ::, because scrollok may be a macro */ |
30 | } |
32 | } |
31 | |
33 | |
32 | void |
34 | void |
33 | window::resize (int w, int h) |
35 | window::resize (int w, int h) |
34 | { |
36 | { |