Last change
on this file was 238, checked in by chronos, 16 months ago |
- Modified: Removed U prefix from unit names.
- Fixed: Memory leaks.
|
File size:
488 bytes
|
Line | |
---|
1 | unit Message;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, Generics.Collections;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TMessage = class
|
---|
10 | Text: string;
|
---|
11 | Position: TPoint;
|
---|
12 | end;
|
---|
13 |
|
---|
14 | { TMessages }
|
---|
15 |
|
---|
16 | TMessages = class(TObjectList<TMessage>)
|
---|
17 | function AddMessage(Text: string; Pos: TPoint): TMessage;
|
---|
18 | end;
|
---|
19 |
|
---|
20 |
|
---|
21 | implementation
|
---|
22 |
|
---|
23 | { TMessages }
|
---|
24 |
|
---|
25 | function TMessages.AddMessage(Text: string; Pos: TPoint): TMessage;
|
---|
26 | begin
|
---|
27 | Result := TMessage.Create;
|
---|
28 | Result.Text := Text;
|
---|
29 | Result.Position := Pos;
|
---|
30 | Add(Result);
|
---|
31 | end;
|
---|
32 |
|
---|
33 | end.
|
---|
34 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.