New features: ReplyLinkFloat & ReplyLinkShowAlways

This commit is contained in:
Stas Degteff
2005-09-20 18:57:30 +00:00
parent eb75fd337c
commit 5cab8ee60e
18 changed files with 99 additions and 20 deletions

View File

@@ -49,6 +49,8 @@ gwinpick::gwinpick() {
maximum_index = minimum_index = maximum_position = index = position = 0;
aborted = listwrap = false;
direction = 0;
replylinkfloat = 0;
}
@@ -150,7 +152,7 @@ void gwinpick::cursor_pagedown() {
while(not is_selectable(max_index)) --max_index;
uint max_position = max_index - index + position;
if(position < max_position) {
if(index == max_index) {
if(maximum_position < maximum_index) {
@@ -313,6 +315,18 @@ void gwinpick::display_page() {
uint n;
if (replylinkfloat)
{
if (h_offset == new_hoffset)
{
for (n=0; n<=maximum_position and n<=m; n++)
if (position == n)
print_line(index+n, n, true);
}
h_offset = new_hoffset;
}
for(n=0; n<=maximum_position and n<=m; n++)
print_line(index+n, n, (position == n));
@@ -486,6 +500,9 @@ int gwinpick::run_picker() {
keyok = default_handle_key();
if (replylinkfloat && (h_offset != new_hoffset))
display_page();
} while(keyok);
#ifdef GOLD_MOUSE

View File

@@ -56,6 +56,10 @@ protected:
gkey key;
bool keyok;
uint new_hoffset;
uint h_offset;
bool replylinkfloat; // in derived classes set this with CFG->replylinkfloat
// before call display_page() and run_picker()
void cursor_up();
void cursor_down();