1 | /* edit.cc |
1 | /* edit.cc |
2 | * This file is part of NDK++ library |
2 | * This file is part of NDK++ library |
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 libndk++ as the file COPYING. |
6 | * which should be included with libndk as the file COPYING. |
7 | */ |
7 | */ |
8 | #include <ndk++/application.hh> |
8 | #include <ndk/application.hh> |
9 | #include <ndk++/edit.hh> |
9 | #include <ndk/edit.hh> |
10 | #include <ndk++/packer.hh> |
10 | #include <ndk/packer.hh> |
11 | #include <ndk++/palette.hh> |
11 | #include <ndk/palette.hh> |
12 | |
12 | |
13 | #include <ndk++/pen.hh> |
13 | #include <ndk/pen.hh> |
14 | |
14 | |
15 | #include <cctype> |
15 | #include <cctype> |
16 | |
16 | |
17 | |
17 | |
18 | using ndk::edit; |
18 | using ndk::edit; |
… | |
… | |
76 | break; |
76 | break; |
77 | default: |
77 | default: |
78 | break; |
78 | break; |
79 | } |
79 | } |
80 | |
80 | |
|
|
81 | if (begin_ > out.length ()) |
|
|
82 | begin_ = out.length (); |
|
|
83 | |
81 | label::draw (out, begin_); /* and draw */ |
84 | label::draw (out, begin_); /* and draw */ |
82 | set_cursor (); /* and finally update cursor position */ |
85 | set_cursor (); /* and finally update cursor position */ |
83 | pen (*this).commit (); /* commit changes to the screen */ |
86 | pen (*this).commit (); /* commit changes to the screen */ |
84 | } |
87 | } |
85 | |
88 | |
86 | ndk::event::result |
89 | ndk::event::result |
87 | edit::at_system (event const &ev) |
90 | edit::at_system (event const &ev) |
88 | { |
91 | { |