1 | unit ubctest;
|
---|
2 |
|
---|
3 | {$mode objfpc}{$H+}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, Forms, Controls,
|
---|
9 | StdCtrls, types, LCLType, ExtCtrls,
|
---|
10 | BCButton, BCLabel, BCPanel, BGRAShape, BCSamples;
|
---|
11 |
|
---|
12 | type
|
---|
13 |
|
---|
14 | { TForm1 }
|
---|
15 |
|
---|
16 | TForm1 = class(TForm)
|
---|
17 | BCButton1: TBCButton;
|
---|
18 | BCButton2: TBCButton;
|
---|
19 | BCButton3: TBCButton;
|
---|
20 | BCButton4: TBCButton;
|
---|
21 | BCLabel1: TBCLabel;
|
---|
22 | BCPanel1: TBCPanel;
|
---|
23 | ComboBox1: TComboBox;
|
---|
24 | ListBox1: TListBox;
|
---|
25 | Shape1: TBGRAShape;
|
---|
26 | Shape10: TBGRAShape;
|
---|
27 | Shape11: TBGRAShape;
|
---|
28 | Shape12: TBGRAShape;
|
---|
29 | Shape13: TBGRAShape;
|
---|
30 | Shape14: TBGRAShape;
|
---|
31 | Shape15: TBGRAShape;
|
---|
32 | Shape16: TBGRAShape;
|
---|
33 | Shape17: TBGRAShape;
|
---|
34 | Shape18: TBGRAShape;
|
---|
35 | Shape19: TBGRAShape;
|
---|
36 | Shape2: TBGRAShape;
|
---|
37 | Shape20: TBGRAShape;
|
---|
38 | Shape21: TBGRAShape;
|
---|
39 | Shape22: TBGRAShape;
|
---|
40 | Shape23: TBGRAShape;
|
---|
41 | Shape24: TBGRAShape;
|
---|
42 | Shape25: TBGRAShape;
|
---|
43 | Shape26: TBGRAShape;
|
---|
44 | Shape3: TBGRAShape;
|
---|
45 | Shape4: TBGRAShape;
|
---|
46 | Shape5: TBGRAShape;
|
---|
47 | Shape6: TBGRAShape;
|
---|
48 | Shape7: TBGRAShape;
|
---|
49 | Shape8: TBGRAShape;
|
---|
50 | Shape9: TBGRAShape;
|
---|
51 | procedure FormCreate(Sender: TObject);
|
---|
52 | procedure ListDrawItem(Control: TWinControl; Index: integer;
|
---|
53 | ARect: TRect; State: TOwnerDrawState);
|
---|
54 | procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
|
---|
55 | procedure Shape23MouseDown(Sender: TObject; Button: TMouseButton;
|
---|
56 | Shift: TShiftState; X, Y: Integer);
|
---|
57 | procedure Shape2MouseUp(Sender: TObject; Button: TMouseButton;
|
---|
58 | Shift: TShiftState; X, Y: Integer);
|
---|
59 | private
|
---|
60 | { private declarations }
|
---|
61 | public
|
---|
62 | { public declarations }
|
---|
63 | end;
|
---|
64 |
|
---|
65 | var
|
---|
66 | Form1: TForm1;
|
---|
67 |
|
---|
68 | implementation
|
---|
69 |
|
---|
70 | {$R *.lfm}
|
---|
71 |
|
---|
72 | { TForm1 }
|
---|
73 |
|
---|
74 | procedure TForm1.FormCreate(Sender: TObject);
|
---|
75 | begin
|
---|
76 | Shape1.FillColor := clScheme1_Background;
|
---|
77 | Shape1.BorderColor := clScheme1_Selection;
|
---|
78 |
|
---|
79 | Shape2.FillColor := clScheme2_Background;
|
---|
80 | Shape2.BorderColor := clScheme2_Selection;
|
---|
81 |
|
---|
82 | Shape3.FillColor := clScheme3_Background;
|
---|
83 | Shape3.BorderColor := clScheme3_Selection;
|
---|
84 |
|
---|
85 | Shape4.FillColor := clScheme4_Background;
|
---|
86 | Shape4.BorderColor := clScheme4_Selection;
|
---|
87 |
|
---|
88 | Shape5.FillColor := clScheme5_Background;
|
---|
89 | Shape5.BorderColor := clScheme5_Selection;
|
---|
90 |
|
---|
91 | Shape6.FillColor := clScheme6_Background;
|
---|
92 | Shape6.BorderColor := clScheme6_Selection;
|
---|
93 |
|
---|
94 | Shape7.FillColor := clScheme7_Background;
|
---|
95 | Shape7.BorderColor := clScheme7_Selection;
|
---|
96 |
|
---|
97 | Shape8.FillColor := clScheme8_Background;
|
---|
98 | Shape8.BorderColor := clScheme8_Selection;
|
---|
99 |
|
---|
100 | Shape9.FillColor := clScheme9_Background;
|
---|
101 | Shape9.BorderColor := clScheme9_Selection;
|
---|
102 |
|
---|
103 | Shape10.FillColor := clScheme10_Background;
|
---|
104 | Shape10.BorderColor := clScheme10_Selection;
|
---|
105 |
|
---|
106 | Shape11.FillColor := clScheme11_Background;
|
---|
107 | Shape11.BorderColor := clScheme11_Selection;
|
---|
108 |
|
---|
109 | Shape12.FillColor := clScheme12_Background;
|
---|
110 | Shape12.BorderColor := clScheme12_Selection;
|
---|
111 |
|
---|
112 | Shape13.FillColor := clScheme13_Background;
|
---|
113 | Shape13.BorderColor := clScheme13_Selection;
|
---|
114 |
|
---|
115 | Shape14.FillColor := clScheme14_Background;
|
---|
116 | Shape14.BorderColor := clScheme14_Selection;
|
---|
117 |
|
---|
118 | Shape15.FillColor := clScheme15_Background;
|
---|
119 | Shape15.BorderColor := clScheme15_Selection;
|
---|
120 |
|
---|
121 | Shape16.FillColor := clScheme16_Background;
|
---|
122 | Shape16.BorderColor := clScheme16_Selection;
|
---|
123 |
|
---|
124 | Shape17.FillColor := clScheme17_Background;
|
---|
125 | Shape17.BorderColor := clScheme17_Selection;
|
---|
126 |
|
---|
127 | Shape18.FillColor := clScheme18_Background;
|
---|
128 | Shape18.BorderColor := clScheme18_Selection;
|
---|
129 |
|
---|
130 | Shape19.FillColor := clScheme19_Background;
|
---|
131 | Shape19.BorderColor := clScheme19_Selection;
|
---|
132 |
|
---|
133 | Shape20.FillColor := clScheme20_Background;
|
---|
134 | Shape20.BorderColor := clScheme20_Selection;
|
---|
135 |
|
---|
136 | Shape21.FillColor := clScheme21_Background;
|
---|
137 | Shape21.BorderColor := clScheme21_Selection;
|
---|
138 |
|
---|
139 | Shape22.FillColor := clScheme22_Background;
|
---|
140 | Shape22.BorderColor := clScheme22_Selection;
|
---|
141 |
|
---|
142 | Shape23.FillColor := clScheme23_Background;
|
---|
143 | Shape23.BorderColor := clScheme23_Selection;
|
---|
144 |
|
---|
145 | Shape24.FillColor := clScheme24_Background;
|
---|
146 | Shape24.BorderColor := clScheme24_Selection;
|
---|
147 |
|
---|
148 | Shape25.FillColor := clScheme25_Background;
|
---|
149 | Shape25.BorderColor := clScheme25_Selection;
|
---|
150 |
|
---|
151 |
|
---|
152 | BCSampleStyleStrList(ListBox1.Items);
|
---|
153 | BCSampleDrawingStrList(ComboBox1.Items);
|
---|
154 | end;
|
---|
155 |
|
---|
156 | procedure TForm1.ListDrawItem(Control: TWinControl; Index: integer;
|
---|
157 | ARect: TRect; State: TOwnerDrawState);
|
---|
158 | begin
|
---|
159 | DrawItem(Control, Index, ARect, State, StrToTBCSampleDrawing(ComboBox1.Caption));
|
---|
160 | end;
|
---|
161 |
|
---|
162 | procedure TForm1.ListBox1SelectionChange(Sender: TObject; User: boolean);
|
---|
163 | begin
|
---|
164 | StyleButtonsSample(Self, StrToTBCSampleStyle(ListBox1.GetSelectedText));
|
---|
165 | end;
|
---|
166 |
|
---|
167 | procedure TForm1.Shape23MouseDown(Sender: TObject; Button: TMouseButton;
|
---|
168 | Shift: TShiftState; X, Y: Integer);
|
---|
169 | begin
|
---|
170 |
|
---|
171 | end;
|
---|
172 |
|
---|
173 | procedure TForm1.Shape2MouseUp(Sender: TObject; Button: TMouseButton;
|
---|
174 | Shift: TShiftState; X, Y: Integer);
|
---|
175 | begin
|
---|
176 | BCPanel1.Background.Color := TBGRAShape(Sender).FillColor;
|
---|
177 | Shape26.FillColor := TBGRAShape(Sender).BorderColor;
|
---|
178 | end;
|
---|
179 |
|
---|
180 | end.
|
---|