initial commit
[rofl0r-KOL.git] / main_tstrlistex.htm
blob0908ba563fb3b73e82aac7fc58844196093b8a96
1 <html>
2 <head>
3 <title>KOL Help: TStrListEx object (main frame)</title>
4 <base target="_top">
5 </head>
7 <body bgcolor="#FFFFEF" text="#000000" link="#008080" vlink="#008000" alink="#808000">
8 <p><font face="Courier" color="#800080"><b>TStrListEx( unit <a href=kol_pas.htm>KOL.pas</a> )
9 <font face="Wingdings">ï</font> <a href=tstrlist.htm>TStrList</a>
10 <font face="Wingdings">ï</font> <a href=tobj.htm>TObj</a>
11 <font face="Wingdings">ï</font> <a href=_tobj.htm>_TObj</a>
12 </b></font></p>
13 <p><b>
14 TStrListEx = object( <a href=tstrlist.htm target="_top">TStrList</a> )
15 </b></p>
16 Extended string list object. Has additional capability to associate
17 numbers or objects with string list items.
18 <h3 align="center"><font color="#FF8080">TStrListEx properties</font></h3>
19 <a name="objects"></a>
20 <p>
21 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Objects</b></font>[ Idx: <b>Integer</b> ]: <b>DWORD</b>;</font>
22 <br>
23 Objects are just 32-bit values. You can treat and use it as pointers to
24 any other data in the memory. But it is your task to free allocated
25 memory in such case therefore.
26 </p>
27 <h4 align="center"><font color="black">Properties, inherited from <a href="tstrlist.htm" target="_top">TStrList</a></font></h4>
28 <h3 align="center"><font color="#FF8080">TStrListEx methods</font></h3>
29 <a name="destroy"></a>
30 <p>
31 <font face="Courier" color="#800080"><b>destructor</b> <font color="#808000"><b>Destroy</b></font>; <b>virtual</b>;</font>
32 <br>
33 </p>
34 <a name="addstrings"></a>
35 <p>
36 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>AddStrings</b></font>( Strings: PStrListEx );</font>
37 <br>
38 Merges string list with given one. Very fast - more preferrable to
39 use than any loop with calling <a href=#add target="main">Add</a> method.
40 </p>
41 <a name="assign"></a>
42 <p>
43 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Assign</b></font>( Strings: PStrListEx );</font>
44 <br>
45 Fills string list with strings from other one. The same as <a href=#addstrings target="main">AddStrings</a>,
46 but <a href=#clear target="main">Clear</a> is called first.
47 </p>
48 <a name="clear"></a>
49 <p>
50 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Clear</b></font>;</font>
51 <br>
52 Makes string list empty.
53 </p>
54 <a name="delete"></a>
55 <p>
56 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Delete</b></font>( Idx: <b>integer</b> );</font>
57 <br>
58 Deletes string with given index (it *must* exist).
59 </p>
60 <a name="move"></a>
61 <p>
62 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Move</b></font>( CurIndex, NewIndex: <b>integer</b> );</font>
63 <br>
64 Moves string to another location.
65 </p>
66 <a name="swap"></a>
67 <p>
68 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Swap</b></font>( Idx1, Idx2: <b>Integer</b> );</font>
69 <br>
70 Swaps to strings with given indeces.
71 </p>
72 <a name="sort"></a>
73 <p>
74 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Sort</b></font>( CaseSensitive: <b>Boolean</b> );</font>
75 <br>
76 Call it to sort string list.
77 </p>
78 <a name="ansisort"></a>
79 <p>
80 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>AnsiSort</b></font>( CaseSensitive: <b>Boolean</b> );</font>
81 <br>
82 Call it to sort ANSI string list.
83 </p>
84 <a name="lastobj"></a>
85 <p>
86 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>LastObj</b></font>: <b>DWORD</b>;</font>
87 <br>
88 Object assotiated with the last string.
89 </p>
90 <a name="addobject"></a>
91 <p>
92 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>AddObject</b></font>( <b>const</b> S: <b>String</b>; Obj: <b>DWORD</b> ): <b>Integer</b>;</font>
93 <br>
94 Adds a string and associates given number with it. Index of the item added
95 is returned.
96 </p>
97 <a name="insertobject"></a>
98 <p>
99 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>InsertObject</b></font>( Before: <b>Integer</b>; <b>const</b> S: <b>String</b>; Obj: <b>DWORD</b> );</font>
100 <br>
101 Inserts a string together with object associated.
102 </p>
103 <a name="indexofobj"></a>
105 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>IndexOfObj</b></font>( Obj: <b>Pointer</b> ): <b>Integer</b>;</font>
106 <br>
107 Returns an index of a string associated with the object passed as a
108 parameter. If there are no such strings, -1 is returned.
109 </p>
110 <h4 align="center"><font color="black">Methods, inherited from <a href="tstrlist.htm" target="_top">TStrList</a></font></h4>
111 <h3 align="center"><font color="#FF8080">TStrListEx events</font></h3>
112 <h4 align="center"><font color="black">Events, inherited from <a href="tstrlist.htm" target="_top">TStrList</a></font></h4>
113 <h3 align="center"><font color="#FF8080">TStrListEx fields</font></h3>
114 <h4 align="center"><font color="black">Fields, inherited from <a href="tstrlist.htm" target="_top">TStrList</a></font></h4>
115 <hr>
116 <p align="center">[&nbsp;<a href=index.htm>Index</a>&nbsp;]</p>
117 <p align="center"><font face="Comic Sans MS"><small>This help is generated 22-Sep-2005 by KOL Help generator, (C) 2000-2001 by Vladimir Kladov<br>Modified (C) 2003 by Alexander Bartov</small></font></p>
118 </body>
119 </html>