source: tags/1.3.0/Project.pas

Last change on this file was 145, checked in by chronos, 18 months ago
  • Modified: Remove U prefix from unit names.
  • Modified: Updated Common package.
File size: 1017 bytes
Line 
1unit Project;
2
3interface
4
5uses
6 Classes, SysUtils, fgl;
7
8type
9 TProjectItem = class
10 Name: string;
11 end;
12
13 TProjectItems = class(TFPGObjectList<TProjectItem>)
14 end;
15
16 TProjectFile = class(TProjectItem)
17 end;
18
19 TProjectDirectory = class(TProjectItem)
20 end;
21
22 { TProject }
23
24 TProject = class
25 private
26 FOpenned: Boolean;
27 procedure SetOpenned(AValue: Boolean);
28 public
29 Items: TProjectItems;
30 Modified: Boolean;
31 FileName: string;
32 constructor Create;
33 destructor Destroy; override;
34 property Openned: Boolean read FOpenned write SetOpenned;
35 end;
36
37const
38 LazFuckProjectExt = '.lfp';
39
40
41implementation
42
43{ TProject }
44
45procedure TProject.SetOpenned(AValue: Boolean);
46begin
47 if FOpenned = AValue then Exit;
48 FOpenned := AValue;
49 if AValue then begin
50 Modified := False;
51 end else begin
52 FileName := '';
53 end;
54end;
55
56constructor TProject.Create;
57begin
58 Items := TProjectItems.Create;
59end;
60
61destructor TProject.Destroy;
62begin
63 FreeAndNil(Items);
64 inherited;
65end;
66
67end.
68
Note: See TracBrowser for help on using the repository browser.