mirror of
https://github.com/reactos/reactos.git
synced 2025-06-22 18:00:23 +00:00
improve visual scroll behavior (arrow-up/-down hints) of the generic list (first step setup)
svn path=/trunk/; revision=33491
This commit is contained in:
parent
5fc4e8a5f9
commit
7bcc8fccde
1 changed files with 45 additions and 0 deletions
|
@ -238,7 +238,25 @@ DrawListEntries(PGENERIC_LIST GenericList)
|
||||||
ListEntry = CONTAINING_RECORD (Entry, GENERIC_LIST_ENTRY, Entry);
|
ListEntry = CONTAINING_RECORD (Entry, GENERIC_LIST_ENTRY, Entry);
|
||||||
|
|
||||||
if (coPos.Y == GenericList->Bottom)
|
if (coPos.Y == GenericList->Bottom)
|
||||||
|
{
|
||||||
|
coPos.X = GenericList->Right - 4;
|
||||||
|
coPos.Y = GenericList->Top;
|
||||||
|
WriteConsoleOutputCharacterA (StdOutput,
|
||||||
|
(LPCTSTR)"(\x18)",
|
||||||
|
3,
|
||||||
|
coPos,
|
||||||
|
&Written);
|
||||||
|
|
||||||
|
coPos.X = GenericList->Right - 4;
|
||||||
|
coPos.Y = GenericList->Bottom;
|
||||||
|
WriteConsoleOutputCharacterA (StdOutput,
|
||||||
|
(LPCTSTR)"(\x19)",
|
||||||
|
3,
|
||||||
|
coPos,
|
||||||
|
&Written);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
GenericList->LastShown = Entry;
|
GenericList->LastShown = Entry;
|
||||||
|
|
||||||
FillConsoleOutputAttribute (StdOutput,
|
FillConsoleOutputAttribute (StdOutput,
|
||||||
|
@ -311,12 +329,26 @@ VOID
|
||||||
ScrollDownGenericList (PGENERIC_LIST List)
|
ScrollDownGenericList (PGENERIC_LIST List)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY Entry;
|
PLIST_ENTRY Entry;
|
||||||
|
COORD coPos;
|
||||||
|
DWORD Written;
|
||||||
|
|
||||||
if (List->CurrentEntry == NULL)
|
if (List->CurrentEntry == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (List->CurrentEntry->Entry.Flink != &List->ListHead)
|
if (List->CurrentEntry->Entry.Flink != &List->ListHead)
|
||||||
{
|
{
|
||||||
|
if (List->LastShown != &List->ListHead)
|
||||||
|
{
|
||||||
|
/* Draw lower edge */
|
||||||
|
coPos.X = List->Left + 1;
|
||||||
|
coPos.Y = List->Bottom;
|
||||||
|
FillConsoleOutputCharacterA (StdOutput,
|
||||||
|
0xC4, // '-',
|
||||||
|
List->Right - List->Left - 1,
|
||||||
|
coPos,
|
||||||
|
&Written);
|
||||||
|
}
|
||||||
|
|
||||||
Entry = List->CurrentEntry->Entry.Flink;
|
Entry = List->CurrentEntry->Entry.Flink;
|
||||||
if (List->LastShown == &List->CurrentEntry->Entry)
|
if (List->LastShown == &List->CurrentEntry->Entry)
|
||||||
{
|
{
|
||||||
|
@ -333,6 +365,8 @@ VOID
|
||||||
ScrollUpGenericList (PGENERIC_LIST List)
|
ScrollUpGenericList (PGENERIC_LIST List)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY Entry;
|
PLIST_ENTRY Entry;
|
||||||
|
COORD coPos;
|
||||||
|
DWORD Written;
|
||||||
|
|
||||||
if (List->CurrentEntry == NULL)
|
if (List->CurrentEntry == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -348,6 +382,17 @@ ScrollUpGenericList (PGENERIC_LIST List)
|
||||||
List->CurrentEntry = CONTAINING_RECORD (Entry, GENERIC_LIST_ENTRY, Entry);
|
List->CurrentEntry = CONTAINING_RECORD (Entry, GENERIC_LIST_ENTRY, Entry);
|
||||||
DrawListEntries(List);
|
DrawListEntries(List);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Draw upper edge */
|
||||||
|
coPos.X = List->Left + 1;
|
||||||
|
coPos.Y = List->Top;
|
||||||
|
FillConsoleOutputCharacterA (StdOutput,
|
||||||
|
0xC4, // '-',
|
||||||
|
List->Right - List->Left - 1,
|
||||||
|
coPos,
|
||||||
|
&Written);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue