Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | unit DragDropDesign; |
2 | // ----------------------------------------------------------------------------- |
||
3 | // |
||
4 | // NOT FOR RELEASE |
||
5 | // |
||
6 | // ----------------------------------------------------------------------------- |
||
7 | // Project: Drag and Drop Component Suite |
||
8 | // Module: DragDropDesign |
||
9 | // Description: Contains design-time support for the drag and drop |
||
10 | // components. |
||
11 | // Version: 4.0 |
||
12 | // Date: 25-JUN-2000 |
||
13 | // Target: Win32, Delphi 3-6 and C++ Builder 3-5 |
||
14 | // Authors: Angus Johnson, ajohnson@rpi.net.au |
||
15 | // Anders Melander, anders@melander.dk, http://www.melander.dk |
||
16 | // Copyright © 1997-2000 Angus Johnson & Anders Melander |
||
17 | // ----------------------------------------------------------------------------- |
||
18 | |||
19 | interface |
||
20 | |||
21 | procedure Register; |
||
22 | |||
23 | implementation |
||
24 | |||
25 | {$include DragDrop.inc} |
||
26 | |||
27 | uses |
||
28 | DragDrop, |
||
29 | {$ifndef VER14_PLUS} |
||
30 | DsgnIntf, |
||
31 | {$else} |
||
32 | DesignIntf, |
||
33 | DesignEditors, |
||
34 | {$endif} |
||
35 | Classes; |
||
36 | |||
37 | type |
||
38 | TDataFormatNameEditor = class(TStringProperty) |
||
39 | public |
||
40 | function GetAttributes: TPropertyAttributes; override; |
||
41 | procedure GetValues(Proc: TGetStrProc); override; |
||
42 | end; |
||
43 | |||
44 | procedure Register; |
||
45 | begin |
||
46 | RegisterPropertyEditor(TypeInfo(string), TDataFormatAdapter, 'DataFormatName', |
||
47 | TDataFormatNameEditor); |
||
48 | end; |
||
49 | |||
50 | { TDataFormatNameEditor } |
||
51 | |||
52 | function TDataFormatNameEditor.GetAttributes: TPropertyAttributes; |
||
53 | begin |
||
54 | Result := [paValueList, paSortList, paMultiSelect]; |
||
55 | end; |
||
56 | |||
57 | type |
||
58 | TDataFormatClassesCracker = class(TDataFormatClasses); |
||
59 | |||
60 | procedure TDataFormatNameEditor.GetValues(Proc: TGetStrProc); |
||
61 | var |
||
62 | i : Integer; |
||
63 | begin |
||
64 | for i := 0 to TDataFormatClassesCracker.Instance.Count-1 do |
||
65 | Proc(TDataFormatClassesCracker.Instance[i].ClassName); |
||
66 | end; |
||
67 | |||
68 | end. |