ReactOS 0.4.15-dev-7834-g00c4b3d
genlist.c File Reference
#include "usetup.h"
#include <debug.h>
Include dependency graph for genlist.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID InitGenericListUi (IN OUT PGENERIC_LIST_UI ListUi, IN PGENERIC_LIST List, IN PGET_ENTRY_DESCRIPTION GetEntryDescriptionProc)
 
VOID RestoreGenericListUiState (IN PGENERIC_LIST_UI ListUi)
 
static VOID DrawListFrame (IN PGENERIC_LIST_UI ListUi)
 
static VOID DrawListEntries (IN PGENERIC_LIST_UI ListUi)
 
static VOID DrawScrollBarGenericList (IN PGENERIC_LIST_UI ListUi)
 
static VOID CenterCurrentListItem (IN PGENERIC_LIST_UI ListUi)
 
VOID DrawGenericList (IN PGENERIC_LIST_UI ListUi, IN SHORT Left, IN SHORT Top, IN SHORT Right, IN SHORT Bottom)
 
VOID DrawGenericListCurrentItem (IN PGENERIC_LIST List, IN PGET_ENTRY_DESCRIPTION GetEntryDescriptionProc, IN SHORT Left, IN SHORT Top)
 
VOID ScrollDownGenericList (IN PGENERIC_LIST_UI ListUi)
 
VOID ScrollUpGenericList (IN PGENERIC_LIST_UI ListUi)
 
VOID ScrollPageDownGenericList (IN PGENERIC_LIST_UI ListUi)
 
VOID ScrollPageUpGenericList (IN PGENERIC_LIST_UI ListUi)
 
VOID ScrollToPositionGenericList (IN PGENERIC_LIST_UI ListUi, IN ULONG uIndex)
 
VOID RedrawGenericList (IN PGENERIC_LIST_UI ListUi)
 
VOID GenericListKeyPress (IN PGENERIC_LIST_UI ListUi, IN CHAR AsciiChar)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 31 of file genlist.c.

Function Documentation

◆ CenterCurrentListItem()

static VOID CenterCurrentListItem ( IN PGENERIC_LIST_UI  ListUi)
static

Definition at line 277 of file genlist.c.

279{
280 PGENERIC_LIST List = ListUi->List;
282 ULONG MaxVisibleItems, ItemCount, i;
283
284 if ((ListUi->Top == 0 && ListUi->Bottom == 0) ||
285 IsListEmpty(&List->ListHead) ||
286 List->CurrentEntry == NULL)
287 {
288 return;
289 }
290
291 MaxVisibleItems = (ULONG)(ListUi->Bottom - ListUi->Top - 1);
292
293/*****************************************
294 ItemCount = 0;
295 Entry = List->ListHead.Flink;
296 while (Entry != &List->ListHead)
297 {
298 ItemCount++;
299 Entry = Entry->Flink;
300 }
301*****************************************/
302 ItemCount = List->NumOfEntries; // GetNumberOfListEntries(List);
303
304 if (ItemCount > MaxVisibleItems)
305 {
306 Entry = &List->CurrentEntry->Entry;
307 for (i = 0; i < MaxVisibleItems / 2; i++)
308 {
309 if (Entry->Blink != &List->ListHead)
310 Entry = Entry->Blink;
311 }
312
313 ListUi->FirstShown = Entry;
314
315 for (i = 0; i < MaxVisibleItems; i++)
316 {
317 if (Entry->Flink != &List->ListHead)
318 Entry = Entry->Flink;
319 }
320
321 ListUi->LastShown = Entry;
322 }
323}
#define NULL
Definition: types.h:112
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
base of all file and directory entries
Definition: entries.h:83
Entry(ENTRY_TYPE etype)
Definition: entries.cpp:35
Definition: typedefs.h:120
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550

Referenced by DrawGenericList().

◆ DrawGenericList()

VOID DrawGenericList ( IN PGENERIC_LIST_UI  ListUi,
IN SHORT  Left,
IN SHORT  Top,
IN SHORT  Right,
IN SHORT  Bottom 
)

Definition at line 326 of file genlist.c.

332{
333 PGENERIC_LIST List = ListUi->List;
334
335 ListUi->FirstShown = List->ListHead.Flink;
336 ListUi->Left = Left;
337 ListUi->Top = Top;
338 ListUi->Right = Right;
339 ListUi->Bottom = Bottom;
340
341 DrawListFrame(ListUi);
342
343 if (IsListEmpty(&List->ListHead))
344 return;
345
346 CenterCurrentListItem(ListUi);
347
348 DrawListEntries(ListUi);
350}
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53
LIST_ENTRY ListHead
Definition: genlist.h:20
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
static VOID DrawListFrame(IN PGENERIC_LIST_UI ListUi)
Definition: genlist.c:70
static VOID DrawScrollBarGenericList(IN PGENERIC_LIST_UI ListUi)
Definition: genlist.c:229
static VOID CenterCurrentListItem(IN PGENERIC_LIST_UI ListUi)
Definition: genlist.c:277
static VOID DrawListEntries(IN PGENERIC_LIST_UI ListUi)
Definition: genlist.c:153

Referenced by ComputerSettingsPage(), DisplaySettingsPage(), KeyboardSettingsPage(), LanguagePage(), LayoutSettingsPage(), and UpgradeRepairPage().

◆ DrawGenericListCurrentItem()

VOID DrawGenericListCurrentItem ( IN PGENERIC_LIST  List,
IN PGET_ENTRY_DESCRIPTION  GetEntryDescriptionProc,
IN SHORT  Left,
IN SHORT  Top 
)

Definition at line 353 of file genlist.c.

358{
359 CHAR CurrentItemText[256];
360
361 if (GetEntryDescriptionProc &&
363 {
364 GetEntryDescriptionProc(GetCurrentListEntry(List),
365 CurrentItemText,
366 ARRAYSIZE(CurrentItemText));
367 CONSOLE_SetTextXY(Left, Top, CurrentItemText);
368 }
369 else
370 {
371 CONSOLE_SetTextXY(Left, Top, "");
372 }
373}
VOID CONSOLE_SetTextXY(IN SHORT x, IN SHORT y, IN LPCSTR Text)
Definition: consup.c:320
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
PGENERIC_LIST_ENTRY GetCurrentListEntry(IN PGENERIC_LIST List)
Definition: genlist.c:97
ULONG GetNumberOfListEntries(IN PGENERIC_LIST List)
Definition: genlist.c:140
char CHAR
Definition: xmlstorage.h:175

Referenced by DeviceSettingsPage().

◆ DrawListEntries()

static VOID DrawListEntries ( IN PGENERIC_LIST_UI  ListUi)
static

Definition at line 153 of file genlist.c.

155{
156 PGENERIC_LIST List = ListUi->List;
157 PGENERIC_LIST_ENTRY ListEntry;
159 COORD coPos;
160 DWORD Written;
162
163 coPos.X = ListUi->Left + 1;
164 coPos.Y = ListUi->Top + 1;
165 Width = ListUi->Right - ListUi->Left - 1;
166
167 Entry = ListUi->FirstShown;
168 while (Entry != &List->ListHead)
169 {
171
172 if (coPos.Y == ListUi->Bottom)
173 break;
174 ListUi->LastShown = Entry;
175
176 ListUi->CurrentItemText[0] = ANSI_NULL;
177 if (ListUi->GetEntryDescriptionProc)
178 {
179 ListUi->GetEntryDescriptionProc(ListEntry,
180 ListUi->CurrentItemText,
181 ARRAYSIZE(ListUi->CurrentItemText));
182 }
183
185 (List->CurrentEntry == ListEntry) ?
188 Width,
189 coPos,
190 &Written);
191
193 ' ',
194 Width,
195 coPos,
196 &Written);
197
198 coPos.X++;
200 ListUi->CurrentItemText,
201 min(strlen(ListUi->CurrentItemText), (SIZE_T)Width - 2),
202 coPos,
203 &Written);
204 coPos.X--;
205
206 coPos.Y++;
207 Entry = Entry->Flink;
208 }
209
210 while (coPos.Y < ListUi->Bottom)
211 {
214 Width,
215 coPos,
216 &Written);
217
219 ' ',
220 Width,
221 coPos,
222 &Written);
223 coPos.Y++;
224 }
225}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, IN LPCSTR lpCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
Definition: console.c:407
BOOL WINAPI FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, IN CHAR cCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
Definition: console.c:560
BOOL WINAPI FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN WORD wAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
Definition: console.c:525
#define BACKGROUND_BLUE
Definition: blue.h:65
#define FOREGROUND_BLUE
Definition: blue.h:61
HANDLE StdOutput
Definition: consup.c:37
#define FOREGROUND_WHITE
Definition: consup.h:29
#define BACKGROUND_WHITE
Definition: consup.h:31
unsigned long DWORD
Definition: ntddk_ex.h:95
#define min(a, b)
Definition: monoChain.cc:55
#define ANSI_NULL
unsigned short USHORT
Definition: pedump.c:61
Definition: bl.h:1338
ULONG Y
Definition: bl.h:1340
ULONG X
Definition: bl.h:1339
Definition: genlist.h:11
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89

Referenced by DrawGenericList(), GenericListKeyPress(), RedrawGenericList(), ScrollDownGenericList(), ScrollPageDownGenericList(), ScrollPageUpGenericList(), ScrollToPositionGenericList(), and ScrollUpGenericList().

◆ DrawListFrame()

static VOID DrawListFrame ( IN PGENERIC_LIST_UI  ListUi)
static

Definition at line 70 of file genlist.c.

72{
73 COORD coPos;
74 DWORD Written;
75 SHORT i;
76
77 /* Draw upper left corner */
78 coPos.X = ListUi->Left;
79 coPos.Y = ListUi->Top;
81 CharUpperLeftCorner, // '+',
82 1,
83 coPos,
84 &Written);
85
86 /* Draw upper edge */
87 coPos.X = ListUi->Left + 1;
88 coPos.Y = ListUi->Top;
90 CharHorizontalLine, // '-',
91 ListUi->Right - ListUi->Left - 1,
92 coPos,
93 &Written);
94
95 /* Draw upper right corner */
96 coPos.X = ListUi->Right;
97 coPos.Y = ListUi->Top;
100 1,
101 coPos,
102 &Written);
103
104 /* Draw left and right edge */
105 for (i = ListUi->Top + 1; i < ListUi->Bottom; i++)
106 {
107 coPos.X = ListUi->Left;
108 coPos.Y = i;
110 CharVerticalLine, // '|',
111 1,
112 coPos,
113 &Written);
114
115 coPos.X = ListUi->Right;
117 CharVerticalLine, //'|',
118 1,
119 coPos,
120 &Written);
121 }
122
123 /* Draw lower left corner */
124 coPos.X = ListUi->Left;
125 coPos.Y = ListUi->Bottom;
127 CharLowerLeftCorner, // '+',
128 1,
129 coPos,
130 &Written);
131
132 /* Draw lower edge */
133 coPos.X = ListUi->Left + 1;
134 coPos.Y = ListUi->Bottom;
136 CharHorizontalLine, // '-',
137 ListUi->Right - ListUi->Left - 1,
138 coPos,
139 &Written);
140
141 /* Draw lower right corner */
142 coPos.X = ListUi->Right;
143 coPos.Y = ListUi->Bottom;
145 CharLowerRightCorner, // '+',
146 1,
147 coPos,
148 &Written);
149}
short SHORT
Definition: pedump.c:59
CHAR CharHorizontalLine
Definition: mui.c:39
CHAR CharUpperRightCorner
Definition: mui.c:42
CHAR CharLowerRightCorner
Definition: mui.c:44
CHAR CharUpperLeftCorner
Definition: mui.c:41
CHAR CharVerticalLine
Definition: mui.c:40
CHAR CharLowerLeftCorner
Definition: mui.c:43

Referenced by DrawGenericList().

◆ DrawScrollBarGenericList()

static VOID DrawScrollBarGenericList ( IN PGENERIC_LIST_UI  ListUi)
static

Definition at line 229 of file genlist.c.

231{
232 PGENERIC_LIST List = ListUi->List;
233 COORD coPos;
234 DWORD Written;
235
236 coPos.X = ListUi->Right + 1;
237 coPos.Y = ListUi->Top;
238
239 if (ListUi->FirstShown != List->ListHead.Flink)
240 {
243 1,
244 coPos,
245 &Written);
246 }
247 else
248 {
250 ' ',
251 1,
252 coPos,
253 &Written);
254 }
255
256 coPos.Y = ListUi->Bottom;
257 if (ListUi->LastShown != List->ListHead.Blink)
258 {
261 1,
262 coPos,
263 &Written);
264 }
265 else
266 {
268 ' ',
269 1,
270 coPos,
271 &Written);
272 }
273}
CHAR CharDownArrow
Definition: mui.c:38
CHAR CharUpArrow
Definition: mui.c:37

Referenced by DrawGenericList(), GenericListKeyPress(), RedrawGenericList(), ScrollDownGenericList(), ScrollPageDownGenericList(), ScrollPageUpGenericList(), ScrollToPositionGenericList(), and ScrollUpGenericList().

◆ GenericListKeyPress()

VOID GenericListKeyPress ( IN PGENERIC_LIST_UI  ListUi,
IN CHAR  AsciiChar 
)

Definition at line 525 of file genlist.c.

528{
529 PGENERIC_LIST List = ListUi->List;
530 PGENERIC_LIST_ENTRY ListEntry;
531 PGENERIC_LIST_ENTRY OldListEntry;
533
534 ListEntry = List->CurrentEntry;
535 OldListEntry = List->CurrentEntry;
536
537 ListUi->Redraw = FALSE;
538
539 ListUi->CurrentItemText[0] = ANSI_NULL;
540 if (ListUi->GetEntryDescriptionProc)
541 {
542 ListUi->GetEntryDescriptionProc(ListEntry,
543 ListUi->CurrentItemText,
544 ARRAYSIZE(ListUi->CurrentItemText));
545 }
546
547 if ((strlen(ListUi->CurrentItemText) > 0) && (tolower(ListUi->CurrentItemText[0]) == AsciiChar) &&
548 (List->CurrentEntry->Entry.Flink != &List->ListHead))
549 {
550 ScrollDownGenericList(ListUi);
551 ListEntry = List->CurrentEntry;
552
553 ListUi->CurrentItemText[0] = ANSI_NULL;
554 if (ListUi->GetEntryDescriptionProc)
555 {
556 ListUi->GetEntryDescriptionProc(ListEntry,
557 ListUi->CurrentItemText,
558 ARRAYSIZE(ListUi->CurrentItemText));
559 }
560
561 if ((strlen(ListUi->CurrentItemText) > 0) && (tolower(ListUi->CurrentItemText[0]) == AsciiChar))
562 goto End;
563 }
564
565 while (List->CurrentEntry->Entry.Blink != &List->ListHead)
566 ScrollUpGenericList(ListUi);
567
568 ListEntry = List->CurrentEntry;
569
570 for (;;)
571 {
572 ListUi->CurrentItemText[0] = ANSI_NULL;
573 if (ListUi->GetEntryDescriptionProc)
574 {
575 ListUi->GetEntryDescriptionProc(ListEntry,
576 ListUi->CurrentItemText,
577 ARRAYSIZE(ListUi->CurrentItemText));
578 }
579
580 if ((strlen(ListUi->CurrentItemText) > 0) && (tolower(ListUi->CurrentItemText[0]) == AsciiChar))
581 {
582 Flag = TRUE;
583 break;
584 }
585
586 if (List->CurrentEntry->Entry.Flink == &List->ListHead)
587 break;
588
589 ScrollDownGenericList(ListUi);
590 ListEntry = List->CurrentEntry;
591 }
592
593 if (!Flag)
594 {
595 while (List->CurrentEntry->Entry.Blink != &List->ListHead)
596 {
597 if (List->CurrentEntry != OldListEntry)
598 ScrollUpGenericList(ListUi);
599 else
600 break;
601 }
602 }
603
604End:
605 DrawListEntries(ListUi);
607
608 ListUi->Redraw = TRUE;
609}
unsigned char BOOLEAN
int tolower(int c)
Definition: utclib.c:902
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
Definition: xml2sdb.h:80
VOID ScrollUpGenericList(IN PGENERIC_LIST_UI ListUi)
Definition: genlist.c:404
VOID ScrollDownGenericList(IN PGENERIC_LIST_UI ListUi)
Definition: genlist.c:376

Referenced by HandleGenericList(), LanguagePage(), and UpgradeRepairPage().

◆ InitGenericListUi()

VOID InitGenericListUi ( IN OUT PGENERIC_LIST_UI  ListUi,
IN PGENERIC_LIST  List,
IN PGET_ENTRY_DESCRIPTION  GetEntryDescriptionProc 
)

Definition at line 37 of file genlist.c.

41{
42 ListUi->List = List;
43 ListUi->FirstShown = NULL;
44 ListUi->LastShown = NULL;
45 ListUi->BackupEntry = NULL;
46
47 ListUi->GetEntryDescriptionProc = GetEntryDescriptionProc;
48
49 ListUi->Left = 0;
50 ListUi->Top = 0;
51 ListUi->Right = 0;
52 ListUi->Bottom = 0;
53 ListUi->Redraw = TRUE;
54
55 ListUi->CurrentItemText[0] = ANSI_NULL;
56
57 /* SaveGenericListUiState(ListUi); */
58 ListUi->BackupEntry = ListUi->List->CurrentEntry;
59}

Referenced by ComputerSettingsPage(), DisplaySettingsPage(), KeyboardSettingsPage(), LanguagePage(), LayoutSettingsPage(), and UpgradeRepairPage().

◆ RedrawGenericList()

VOID RedrawGenericList ( IN PGENERIC_LIST_UI  ListUi)

Definition at line 511 of file genlist.c.

513{
514 if (ListUi->List->CurrentEntry == NULL)
515 return;
516
517 if (ListUi->Redraw)
518 {
519 DrawListEntries(ListUi);
521 }
522}

Referenced by HandleGenericList(), LanguagePage(), and UpgradeRepairPage().

◆ RestoreGenericListUiState()

VOID RestoreGenericListUiState ( IN PGENERIC_LIST_UI  ListUi)

Definition at line 62 of file genlist.c.

64{
65 ListUi->List->CurrentEntry = ListUi->BackupEntry;
66}

Referenced by HandleGenericList(), and UpgradeRepairPage().

◆ ScrollDownGenericList()

VOID ScrollDownGenericList ( IN PGENERIC_LIST_UI  ListUi)

Definition at line 376 of file genlist.c.

378{
379 PGENERIC_LIST List = ListUi->List;
381
382 if (List->CurrentEntry == NULL)
383 return;
384
385 if (List->CurrentEntry->Entry.Flink != &List->ListHead)
386 {
387 Entry = List->CurrentEntry->Entry.Flink;
388 if (ListUi->LastShown == &List->CurrentEntry->Entry)
389 {
390 ListUi->FirstShown = ListUi->FirstShown->Flink;
391 ListUi->LastShown = ListUi->LastShown->Flink;
392 }
394
395 if (ListUi->Redraw)
396 {
397 DrawListEntries(ListUi);
399 }
400 }
401}

Referenced by GenericListKeyPress(), HandleGenericList(), LanguagePage(), ScrollPageDownGenericList(), and UpgradeRepairPage().

◆ ScrollPageDownGenericList()

VOID ScrollPageDownGenericList ( IN PGENERIC_LIST_UI  ListUi)

Definition at line 432 of file genlist.c.

434{
435 SHORT i;
436
437 /* Suspend auto-redraw */
438 ListUi->Redraw = FALSE;
439
440 for (i = ListUi->Top + 1; i < ListUi->Bottom - 1; i++)
441 {
442 ScrollDownGenericList(ListUi);
443 }
444
445 /* Update user interface */
446 DrawListEntries(ListUi);
448
449 /* Re enable auto-redraw */
450 ListUi->Redraw = TRUE;
451}

Referenced by HandleGenericList(), LanguagePage(), and UpgradeRepairPage().

◆ ScrollPageUpGenericList()

VOID ScrollPageUpGenericList ( IN PGENERIC_LIST_UI  ListUi)

Definition at line 454 of file genlist.c.

456{
457 SHORT i;
458
459 /* Suspend auto-redraw */
460 ListUi->Redraw = FALSE;
461
462 for (i = ListUi->Bottom - 1; i > ListUi->Top + 1; i--)
463 {
464 ScrollUpGenericList(ListUi);
465 }
466
467 /* Update user interface */
468 DrawListEntries(ListUi);
470
471 /* Re enable auto-redraw */
472 ListUi->Redraw = TRUE;
473}

Referenced by HandleGenericList(), LanguagePage(), and UpgradeRepairPage().

◆ ScrollToPositionGenericList()

VOID ScrollToPositionGenericList ( IN PGENERIC_LIST_UI  ListUi,
IN ULONG  uIndex 
)

Definition at line 476 of file genlist.c.

479{
480 PGENERIC_LIST List = ListUi->List;
482 ULONG uCount = 0;
483
484 if (List->CurrentEntry == NULL || uIndex == 0)
485 return;
486
487 do
488 {
489 if (List->CurrentEntry->Entry.Flink != &List->ListHead)
490 {
491 Entry = List->CurrentEntry->Entry.Flink;
492 if (ListUi->LastShown == &List->CurrentEntry->Entry)
493 {
494 ListUi->FirstShown = ListUi->FirstShown->Flink;
495 ListUi->LastShown = ListUi->LastShown->Flink;
496 }
498 }
499 uCount++;
500 }
501 while (uIndex != uCount);
502
503 if (ListUi->Redraw)
504 {
505 DrawListEntries(ListUi);
507 }
508}

Referenced by LanguagePage().

◆ ScrollUpGenericList()

VOID ScrollUpGenericList ( IN PGENERIC_LIST_UI  ListUi)

Definition at line 404 of file genlist.c.

406{
407 PGENERIC_LIST List = ListUi->List;
409
410 if (List->CurrentEntry == NULL)
411 return;
412
413 if (List->CurrentEntry->Entry.Blink != &List->ListHead)
414 {
415 Entry = List->CurrentEntry->Entry.Blink;
416 if (ListUi->FirstShown == &List->CurrentEntry->Entry)
417 {
418 ListUi->FirstShown = ListUi->FirstShown->Blink;
419 ListUi->LastShown = ListUi->LastShown->Blink;
420 }
422
423 if (ListUi->Redraw)
424 {
425 DrawListEntries(ListUi);
427 }
428 }
429}

Referenced by GenericListKeyPress(), HandleGenericList(), LanguagePage(), ScrollPageUpGenericList(), and UpgradeRepairPage().