LZScene

Форк
0
/
RegisterXCollection.pas 
82 строки · 2.2 Кб
1
//
2
// This unit is part of the GLScene Engine https://github.com/glscene
3
//
4
{
5
   Register TGLXCollection property editor
6

7
	 History :  
8
       20/05/10 - Yar - Fixes for Linux x64
9
       11/11/09 - DaStr - Improved FPC compatibility
10
                             (thanks Predator) (BugtrackerID = 2893580)
11
       03/07/04 - LR - Removed ..\ from the GLScene.inc
12
       16/04/00 - Egg - Creation
13
	 
14
}
15
unit RegisterXCollection;
16

17
interface
18

19
{$I GLScene.inc}
20

21
uses
22
  Classes, GLXCollection,
23
     componenteditors, propedits;
24

25
type
26

27
	// TGLXCollectionProperty
28
	//
29
	TGLXCollectionProperty = class(TClassProperty)
30
		public
31
			 
32
			function GetAttributes: TPropertyAttributes; override;
33
			procedure Edit; override;
34
	end;
35

36
procedure Register;
37

38
// ------------------------------------------------------------------
39
// ------------------------------------------------------------------
40
// ------------------------------------------------------------------
41
implementation
42
// ------------------------------------------------------------------
43
// ------------------------------------------------------------------
44
// ------------------------------------------------------------------
45
uses FXCollectionEditor;
46

47

48
procedure Register;
49
begin
50
  RegisterPropertyEditor(TypeInfo(TGLXCollection), nil, '', TGLXCollectionProperty);
51
end;
52

53
//----------------- TGLXCollectionProperty ------------------------------------
54

55
// GetAttributes
56
//
57
function TGLXCollectionProperty.GetAttributes: TPropertyAttributes;
58
begin
59
	Result:=[paDialog];
60
end;
61

62
// Edit
63
//
64
procedure TGLXCollectionProperty.Edit;
65
begin
66
   with XCollectionEditor do begin
67
      SetXCollection(TGLXCollection(GetObjectValue));
68
      Show;
69
   end;
70
end;
71

72
// ------------------------------------------------------------------
73
// ------------------------------------------------------------------
74
// ------------------------------------------------------------------
75
initialization
76
// ------------------------------------------------------------------
77
// ------------------------------------------------------------------
78
// ------------------------------------------------------------------
79

80
	// class registrations
81
   
82
end.
83

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.