]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/entry.cpp
Rename Widget::on_geometry_change to on_size_change
[libs/gltk.git] / source / entry.cpp
index 6554f7cb1b5ada9e52cf6cad423baedc9f30337d..3a91f50dad4e4178cf308aa88c1a40c603559a68 100644 (file)
@@ -298,6 +298,18 @@ bool Entry::key_press(unsigned key, unsigned mod)
                text.offset_to_coords(edit_pos, row, col);
                set_edit_position(text.coords_to_offset(row, 0), mod==MOD_SHIFT);
        }
+       else if(key==Input::KEY_PGUP)
+       {
+               unsigned row, col;
+               text.offset_to_coords(edit_pos, row, col);
+               set_edit_position(text.coords_to_offset((row<visible_rows ? 0 : row-visible_rows), col), mod==MOD_SHIFT);
+       }
+       else if(key==Input::KEY_PGDN)
+       {
+               unsigned row, col;
+               text.offset_to_coords(edit_pos, row, col);
+               set_edit_position(text.coords_to_offset(row+visible_rows, col), mod==MOD_SHIFT);
+       }
        else if(key==Input::KEY_LEFT && mod==MOD_SHIFT)
                move_edit_position(NAV_LEFT, true);
        else if(key==Input::KEY_RIGHT && mod==MOD_SHIFT)
@@ -357,7 +369,7 @@ void Entry::animate(const Time::TimeDelta &)
        rebuild();
 }
 
-void Entry::on_geometry_change()
+void Entry::on_size_change()
 {
        if(multiline)
                check_view_range();