-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathada_gui-gnoga-gui-element-form.adb
1882 lines (1605 loc) · 56.9 KB
/
ada_gui-gnoga-gui-element-form.adb
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- Ada_GUI implementation based on Gnoga. Adapted 2021
-- --
-- GNOGA - The GNU Omnificent GUI for Ada --
-- --
-- G N O G A . G U I . E L E M E N T . F O R M --
-- --
-- S p e c --
-- --
-- --
-- Copyright (C) 2014 David Botton --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are --
-- granted additional permissions described in the GCC Runtime Library --
-- Exception, version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- For more information please go to http://www.gnoga.com --
------------------------------------------------------------------------------
package body Ada_GUI.Gnoga.Gui.Element.Form is
-------------------------------------------------------------------------
-- Form_Element_Type
-------------------------------------------------------------------------
------------
-- Create --
------------
procedure Create
(Form : in out Form_Type;
Parent : in out Gnoga.Gui.Base_Type'Class;
Action : in String := "";
Method : in Form_Method_Type := Get;
Target : in String := "_self";
ID : in String := "")
is
begin
Form.Create_From_HTML (Parent, Escape_Quotes ("<form action='" &
Escape_Inner_Quotes (Action) &
"' method='" & Method'Img &
"' target='" & Target &
"' />"), ID);
end Create;
------------
-- Action --
------------
procedure Action (Form : in out Form_Type; Value : in String) is
begin
Form.Property ("action", Value);
end Action;
------------
-- Action --
------------
function Action (Form : Form_Type) return String is
begin
return Form.Property ("action");
end Action;
------------
-- Method --
------------
procedure Method (Form : in out Form_Type; Value : in Form_Method_Type) is
begin
Form.Property ("method", Value'Img);
end Method;
------------
-- Method --
------------
function Method (Form : Form_Type) return Form_Method_Type is
Value : constant String := Form.Property ("method");
begin
if Value = "post" then
return Post;
else
return Get;
end if;
end Method;
--------------
-- Encoding --
--------------
procedure Encoding (Form : in out Form_Type; Value : in Encoding_Type) is
begin
if Value = URL_Encode then
Form.Property ("enctype", "application/x-www-form-urlencoded");
elsif Value = Multi_Part then
Form.Property ("enctype", "multipart/form-data");
else
Form.Property ("enctype", "text/plain");
end if;
end Encoding;
--------------
-- Encoding --
--------------
function Encoding (Form : Form_Type) return Encoding_Type is
Value : constant String := Form.Property ("enctype");
begin
if Value = "text/plain" then
return Text;
elsif Value = "multipart/form-data" then
return Multi_Part;
else
return URL_Encode;
end if;
end Encoding;
------------------
-- Autocomplete --
------------------
procedure Autocomplete
(Form : in out Form_Type;
Value : in Boolean := True)
is
begin
if Value then
Form.Property ("autocomplete", "on");
else
Form.Property ("autocomplete", "off");
end if;
end Autocomplete;
------------------
-- Autocomplete --
------------------
function Autocomplete (Form : Form_Type) return Boolean is
begin
return Form.Property ("autocomplete") = "on";
end Autocomplete;
------------------------
-- Validate_On_Submit --
------------------------
procedure Validate_On_Submit
(Form : in out Form_Type;
Value : in Boolean := True)
is
begin
Form.Property ("noValidate", not (Value));
end Validate_On_Submit;
------------------------
-- Validate_On_Submit --
------------------------
function Validate_On_Submit (Form : Form_Type) return Boolean is
begin
return not (Form.Property ("noValidate"));
end Validate_On_Submit;
--------------------------------
-- Number_Of_Elements_In_Form --
--------------------------------
function Number_Of_Elements_In_Form (Form : Form_Type) return Integer is
begin
return Form.Property ("length");
end Number_Of_Elements_In_Form;
------------
-- Target --
------------
procedure Target (Form : in out Form_Type; Value : in String) is
begin
Form.Property ("target", Value);
end Target;
------------
-- Target --
------------
function Target (Form : Form_Type) return String is
begin
return Form.Property ("target");
end Target;
------------
-- Submit --
------------
procedure Submit (Form : in out Form_Type) is
begin
Form.Execute ("submit();");
end Submit;
-----------
-- Reset --
-----------
procedure Reset (Form : in out Form_Type) is
begin
Form.Execute ("reset();");
end Reset;
------------
-- Create --
------------
procedure Create_Element (Element : in out Form_Element_Type;
Form : in out Form_Type'Class;
Input_Type : in String;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
function Is_Name return String;
function Is_Name return String is
begin
if Name /= "" then
return " name='" & Escape_Inner_Quotes (Name) & "'";
else
return "";
end if;
end Is_Name;
begin
Element.Create_From_HTML (Form, Escape_Quotes ("<input type='" & Input_Type & "' " &
"form='" & Form.ID & "' value='" &
Escape_Inner_Quotes (Value) & "' " &
Is_Name & "/>"), ID);
end Create_Element;
-------------------
-- Autocomplete --
-------------------
procedure Autocomplete
(Element : in out Form_Element_Type;
Value : in Boolean := True)
is
begin
if Value then
Element.Property ("autocomplete", "on");
else
Element.Property ("autocomplete", "off");
end if;
end Autocomplete;
-------------------
-- Autocomplete --
-------------------
function Autocomplete (Element : Form_Element_Type) return Boolean is
begin
return Element.Property ("autocomplete") = "on";
end Autocomplete;
----------------
-- Autofocus --
----------------
procedure Autofocus
(Element : in out Form_Element_Type;
Value : in Boolean := True)
is
begin
Element.Property ("autofocus", Value);
end Autofocus;
---------------
-- Autofocus --
---------------
function Autofocus (Element : Form_Element_Type) return Boolean is
begin
return Element.Property ("autofocus");
end Autofocus;
---------------
-- Data_List --
---------------
procedure Data_List (Element : in out Form_Element_Type;
Data_List : in out Data_List_Type'Class)
is
begin
Element.Attribute ("list", Data_List.ID);
end Data_List;
--------------
-- Disabled --
--------------
procedure Disabled
(Element : in out Form_Element_Type;
Value : in Boolean := True)
is
begin
Element.Property ("disabled", Value);
end Disabled;
--------------
-- Disabled --
--------------
function Disabled (Element : Form_Element_Type) return Boolean is
begin
return Element.Property ("disabled");
end Disabled;
---------------
-- Read_Only --
---------------
procedure Read_Only
(Element : in out Form_Element_Type;
Value : in Boolean := True)
is
begin
Element.Property ("readonly", Value);
end Read_Only;
---------------
-- Read_Only --
---------------
function Read_Only (Element : Form_Element_Type) return Boolean is
begin
return Element.Property ("readonly");
end Read_Only;
------------------------
-- Validate_On_Submit --
------------------------
procedure Validate_On_Submit
(Element : in out Form_Element_Type;
Value : in Boolean := True)
is
begin
Element.Property ("noValidate", not (Value));
end Validate_On_Submit;
------------------------
-- Validate_On_Submit --
------------------------
function Validate_On_Submit (Element : Form_Element_Type) return Boolean is
begin
return Element.Property ("noValidate");
end Validate_On_Submit;
----------
-- Name --
----------
procedure Name (Element : in out Form_Element_Type; Value : in String) is
begin
Element.Property ("name", Value);
end Name;
function Name (Element : Form_Element_Type) return String is
begin
return Element.Property ("name");
end Name;
-------------------
-- Default_Value --
-------------------
procedure Default_Value (Element : in out Form_Element_Type;
Value : in String)
is
begin
Element.Property ("defaultValue", Value);
end Default_Value;
procedure Default_Value (Element : in out Form_Element_Type;
Value : in Integer)
is
begin
Element.Property ("defaultValue", Value);
end Default_Value;
function Default_Value (Element : Form_Element_Type) return String is
begin
return Element.Property ("defaultValue");
end Default_Value;
function Default_Value (Element : Form_Element_Type) return Integer is
begin
return Element.Property ("defaultValue");
end Default_Value;
-----------
-- Value --
-----------
procedure Value (Element : in out Form_Element_Type; Value : in String) is
begin
Element.Property ("value", Value);
end Value;
procedure Value (Element : in out Form_Element_Type; Value : in Integer) is
begin
Element.Property ("value", Value);
end Value;
function Value (Element : Form_Element_Type) return String is
begin
return Element.Property ("value");
end Value;
function Value (Element : Form_Element_Type) return Integer is
begin
return Element.Property ("value");
end Value;
------------------
-- Place_Holder --
------------------
procedure Place_Holder (Element : in out Form_Element_Type;
Value : in String)
is
begin
Element.Property ("placeholder", Value);
end Place_Holder;
function Place_Holder (Element : Form_Element_Type) return String is
begin
return Element.Property ("placeholder");
end Place_Holder;
-------------
-- Pattern --
-------------
procedure Pattern (Element : in out Form_Element_Type; Value : in String) is
begin
Element.Property ("pattern", Value);
end Pattern;
function Pattern (Element : Form_Element_Type) return String is
begin
return Element.Property ("pattern");
end Pattern;
--------------
-- Required --
--------------
procedure Required (Element : in out Form_Element_Type;
Value : in Boolean := True)
is
begin
Element.Property ("required", Value);
end Required;
function Required (Element : Form_Element_Type) return Boolean is
begin
return Element.Property ("required");
end Required;
-------------
-- Minimum --
-------------
procedure Minimum (Element : in out Form_Element_Type; Value : in String) is
begin
Element.Property ("min", Value);
end Minimum;
procedure Minimum (Element : in out Form_Element_Type; Value : in Integer)
is
begin
Element.Property ("min", Value);
end Minimum;
function Minimum (Element : Form_Element_Type) return String is
begin
return Element.Property ("min");
end Minimum;
function Minimum (Element : Form_Element_Type) return Integer is
begin
return Element.Property ("min");
end Minimum;
-------------
-- Maximum --
-------------
procedure Maximum (Element : in out Form_Element_Type; Value : in String) is
begin
Element.Property ("max", Value);
end Maximum;
procedure Maximum (Element : in out Form_Element_Type; Value : in Integer)
is
begin
Element.Property ("max", Value);
end Maximum;
function Maximum (Element : Form_Element_Type) return String is
begin
return Element.Property ("max");
end Maximum;
function Maximum (Element : Form_Element_Type) return Integer is
begin
return Element.Property ("max");
end Maximum;
----------
-- Step --
----------
procedure Step (Element : in out Form_Element_Type; Value : in String) is
begin
Element.Property ("step", Value);
end Step;
procedure Step (Element : in out Form_Element_Type; Value : in Integer) is
begin
Element.Property ("step", Value);
end Step;
function Step (Element : Form_Element_Type) return String is
begin
return Element.Property ("step");
end Step;
function Step (Element : Form_Element_Type) return Integer is
begin
return Element.Property ("step");
end Step;
-----------------
-- Select_Text --
-----------------
procedure Select_Text (Element : in out Form_Element_Type) is
begin
Element.Execute ("select()");
end Select_Text;
-------------------------------------------------------------------------
-- Text_Area_Type
-------------------------------------------------------------------------
------------
-- Create --
------------
procedure Create (Element : in out Text_Area_Type;
Form : in out Form_Type'Class;
Columns : in Natural := 20;
Rows : in Natural := 2;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_From_HTML (Form, Escape_Quotes ("<textarea " &
"form='" & Form.ID & "' name='" &
Escape_Inner_Quotes (Name) & "' cols=" & Columns'Img &
" rows=" & Rows'Img & ">" &
Value &
"</textarea>"), ID);
end Create;
---------------
-- Word_Wrap --
---------------
procedure Word_Wrap (Element : in out Text_Area_Type;
Value : in Boolean := True)
is
begin
Element.Property ("wrap", Value);
end Word_Wrap;
function Word_Wrap (Element : Text_Area_Type) return Boolean is
begin
return Element.Property ("wrap");
end Word_Wrap;
-------------
-- Columns --
-------------
procedure Columns (Element : in out Text_Area_Type;
Value : in Integer)
is
begin
Element.Property ("cols", Value);
end Columns;
function Columns (Element : Text_Area_Type) return Integer
is
begin
return Element.Property ("cols");
end Columns;
----------
-- Rows --
----------
procedure Rows (Element : in out Text_Area_Type;
Value : in Integer)
is
begin
Element.Property ("rows", Value);
end Rows;
function Rows (Element : Text_Area_Type) return Integer is
begin
return Element.Property ("rows");
end Rows;
-------------------------------------------------------------------------
-- Hidden_Type
-------------------------------------------------------------------------
------------
-- Create --
------------
procedure Create (Element : in out Hidden_Type;
Form : in out Form_Type'Class;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "hidden",
Value => Value,
Name => Name,
ID => ID);
end Create;
-------------------------------------------------------------------------
-- Input_Button_Type
-------------------------------------------------------------------------
------------
-- Create --
------------
procedure Create (Element : in out Input_Button_Type;
Form : in out Form_Type'Class;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "button",
Value => Value,
Name => Name,
ID => ID);
end Create;
-------------------------------------------------------------------------
-- Submit_Button_Type
-------------------------------------------------------------------------
overriding
procedure Create (Element : in out Submit_Button_Type;
Form : in out Form_Type'Class;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "submit",
Value => Value,
Name => Name,
ID => ID);
end Create;
-------------------------------------------------------------------------
-- Reset_Button_Type
-------------------------------------------------------------------------
overriding
procedure Create (Element : in out Reset_Button_Type;
Form : in out Form_Type'Class;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "reset",
Value => Value,
Name => Name,
ID => ID);
end Create;
-------------------------------------------------------------------------
-- Input_Image_Type
-------------------------------------------------------------------------
procedure Create (Element : in out Input_Image_Type;
Form : in out Form_Type'Class;
Source : in String := "";
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "image",
Value => Value,
Name => Name,
ID => ID);
if Source /= "" then
Element.Source (Source);
end if;
end Create;
------------
-- Source --
------------
procedure Source (Element : in out Input_Image_Type; Value : String) is
begin
Element.Property ("src", Value);
end Source;
function Source (Element : Input_Image_Type) return String is
begin
return Element.Property ("src");
end Source;
-------------------------------------------------------------------------
-- Text_Type
-------------------------------------------------------------------------
procedure Create (Element : in out Text_Type;
Form : in out Form_Type'Class;
Size : in Integer := 20;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "text",
Value => Value,
Name => Name,
ID => ID);
Element.Size (Size);
end Create;
----------
-- Size --
----------
procedure Size (Element : in out Text_Type; Value : Integer) is
begin
Element.Property ("size", Value);
end Size;
function Size (Element : Text_Type) return Integer is
begin
return Element.Property ("size");
end Size;
--------------
-- Max_Size --
--------------
procedure Max_Length (Element : in out Text_Type; Value : Integer) is
begin
Element.Property ("maxLength", Value);
end Max_Length;
function Max_Length (Element : Text_Type) return Integer is
begin
return Element.Property ("maxLength");
end Max_Length;
-------------------------------------------------------------------------
-- Email_Type
-------------------------------------------------------------------------
overriding
procedure Create (Element : in out Email_Type;
Form : in out Form_Type'Class;
Size : in Integer := 20;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "email",
Value => Value,
Name => Name,
ID => ID);
Element.Size (Size);
end Create;
procedure Multiple_Emails (Element : in out Email_Type;
Value : in Boolean := True)
is
begin
Element.Property ("multiple", Value);
end Multiple_Emails;
function Multiple_Emails (Element : Email_Type) return Boolean is
begin
return Element.Property ("multiple");
end Multiple_Emails;
-------------------------------------------------------------------------
-- Password_Type
-------------------------------------------------------------------------
overriding
procedure Create (Element : in out Password_Type;
Form : in out Form_Type'Class;
Size : in Integer := 20;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "password",
Value => Value,
Name => Name,
ID => ID);
Element.Size (Size);
end Create;
-------------------------------------------------------------------------
-- Search_Type
-------------------------------------------------------------------------
overriding
procedure Create (Element : in out Search_Type;
Form : in out Form_Type'Class;
Size : in Integer := 20;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "search",
Value => Value,
Name => Name,
ID => ID);
Element.Size (Size);
end Create;
-------------------------------------------------------------------------
-- URL_Type
-------------------------------------------------------------------------
overriding
procedure Create (Element : in out URL_Type;
Form : in out Form_Type'Class;
Size : in Integer := 20;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "url",
Value => Value,
Name => Name,
ID => ID);
Element.Size (Size);
end Create;
-------------------------------------------------------------------------
-- Check_Box_Type
-------------------------------------------------------------------------
------------
-- Create --
------------
procedure Create (Element : in out Check_Box_Type;
Form : in out Form_Type'Class;
Checked : in Boolean := False;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "checkbox",
Value => Value,
Name => Name,
ID => ID);
Element.Checked (Checked);
end Create;
-------------------------------------------------------------------------
-- Check_Box_Type - Properties
-------------------------------------------------------------------------
--------------
-- Checked --
--------------
procedure Checked (Element : in out Check_Box_Type;
Value : in Boolean := True)
is
begin
Element.Property ("checked", Value);
end Checked;
function Checked (Element : Check_Box_Type) return Boolean is
begin
return Element.Property ("checked");
end Checked;
-------------------
-- Indeterminate --
-------------------
procedure Indeterminate (Element : in out Check_Box_Type;
Value : in Boolean := True)
is
begin
Element.Property ("indeterminate", Value);
end Indeterminate;
function Indeterminate (Element : Check_Box_Type) return Boolean is
begin
return Element.Property ("indeterminate");
end Indeterminate;
-------------------------------------------------------------------------
-- Radio_Button_Type
-------------------------------------------------------------------------
------------
-- Create --
------------
procedure Create (Element : in out Radio_Button_Type;
Form : in out Form_Type'Class;
Checked : in Boolean := False;
Value : in String := "";
Name : in String := "";
ID : in String := "")
is
begin
Element.Create_Element (Form => Form,
Input_Type => "radio",
Value => Value,
Name => Name,
ID => ID);
Element.Checked (Checked);
end Create;
-------------------------------------------------------------------------
-- Radio_Button_Type - Properties
-------------------------------------------------------------------------
--------------
-- Checked --
--------------
procedure Checked (Element : in out Radio_Button_Type;
Value : in Boolean := True)
is