3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
12 #ifndef __FELIB_LIST_H__
13 #define __FELIB_LIST_H__
27 struct felistdescription
;
30 typedef void (*entrydrawer
) (bitmap
*Bitmap
, v2 Pos
, uInt
);
34 felist (cfestring
&Topic
, col16 TopicColor
=WHITE
, uInt Maximum
=0);
36 void AddEntry (cfestring
&Str
, col16 Color
, uInt Marginal
=0, uInt Key
=NO_IMAGE
, truth Selectable
=true, feuLong udata
=0);
37 void AddDescription (cfestring
&Str
, col16 Color
=WHITE
);
39 void QuickDraw (bitmap
*Bitmap
, uInt PageLength
) const;
41 void EmptyDescription () { Description
.resize(1); }
42 void Load (inputfile
&SaveFile
);
43 void Save (outputfile
&SaveFile
) const;
44 uInt
GetSelected () const { return Selected
; }
45 void SetSelected (uInt What
) { Selected
= What
; }
46 void EditSelected (int What
) { Selected
+= What
; }
47 truth
DrawPage (bitmap
*Bitmap
) const;
49 static void CreateQuickDrawFontCaches (rawbitmap
*Font
, col16 Color
, uInt PageLength
);
50 void PrintToFile (cfestring
&SaveFile
);
51 void SetPos (v2 What
) { Pos
= What
; }
52 void SetWidth (uInt What
) { Width
= What
; }
53 void SetPageLength (uInt What
) { PageLength
= What
; }
54 void SetBackColor (col16 What
) { BackColor
= What
; }
55 void SetFlags (uInt What
) { Flags
= What
; }
56 void AddFlags (uInt What
) { Flags
|= What
; }
57 void RemoveFlags (uInt What
) { Flags
&= ~What
; }
58 void SetUpKey (uInt What
) { UpKey
= What
; }
59 void SetDownKey (uInt What
) { DownKey
= What
; }
60 void SetEntryDrawer (entrydrawer What
) { EntryDrawer
= What
; }
61 truth
IsEmpty () const { return Entry
.empty(); }
62 uInt
GetLength () const { return Entry
.size(); }
63 uInt
GetLastEntryIndex () const { return Entry
.size()-1; }
64 festring
GetEntry (uInt I
) const;
65 truth
IsEntrySelectable (uInt idx
) const;
66 feuLong
GetEntryUData (uInt idx
) const;
67 void SetEntryUData (uInt idx
, feuLong udata
);
68 col16
GetColor (uInt I
) const;
69 void SetColor (uInt I
, col16 What
);
71 static truth
GetFastListMode ();
72 static void SetFastListMode (truth modeon
);
74 truth
isSaveSelector () const { return mSaveSelector
; }
75 void ResetSaveSelector () { mSaveSelector
= false; }
76 void SetSaveSelector (cfestring
&dir
) { mSaveDir
= dir
; mSaveSelector
= true; }
79 void DrawDescription (bitmap
*Bitmap
) const;
84 std::vector
<felistentry
*> Entry
;
85 std::vector
<felistdescription
*> Description
;
96 entrydrawer EntryDrawer
;