-
Notifications
You must be signed in to change notification settings - Fork 2
/
msefiledialogres.pas
executable file
·61 lines (49 loc) · 1.36 KB
/
msefiledialogres.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ MSEgui Copyright (c) 1999-2011 by Martin Schreiber
See the file COPYING.MSE, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
unit msefiledialogres;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
interface
uses
mseclasses,msebitmap,msegui,msedatamodules;
type
filedialogiconty = (fdi_dir,fdi_diropen,fdi_file,fdi_direntry);
tfiledialogres = class(tmsedatamodule)
images: timagelist;
public
procedure getfileicon(const aimage: filedialogiconty; var imagelist: timagelist;
out imagenr: integer);
end;
function filedialogres: tfiledialogres;
implementation
uses
msefiledialogres_mfm,sysutils;
var
ffiledialogres: tfiledialogres;
function filedialogres: tfiledialogres;
begin
result:= ffiledialogres;
end;
{ tfiledialogres }
procedure tfiledialogres.getfileicon(const aimage: filedialogiconty;
var imagelist: timagelist; out imagenr: integer);
begin
if imagelist = nil then begin
imagelist:= images;
end;
imagenr:= ord(aimage);
end;
initialization
application.lock; //create application instance
try
createmodule(nil,tfiledialogres,ffiledialogres);
finally
application.unlock;
end;
finalization
freeandnil(ffiledialogres);
end.