X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fhtml%2Fada%2Fterminal_interface-curses-forms-field_types__adb.htm;h=3d876e3e18c9a09927db19ca639755427a46bcfc;hb=db5f7f4f146a91ba8ec7f1df8e9d7f9d2d7c74fd;hp=ccf3a7acaa98a59d2b49d3f92c5d58bc32ae8d02;hpb=fe7c48d7d5115212f09b4ec0d84b189a76953f0d;p=ncurses.git
diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm
index ccf3a7ac..3d876e3e 100644
--- a/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm
+++ b/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm
@@ -52,8 +52,8 @@
-
-
+
+
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -93,9 +93,10 @@
return null;
else
if Low_Level = M_Builtin_Router or else
- Low_Level = M_Generic_Type or else
- Low_Level = M_Choice_Router or else
- Low_Level = M_Generic_Choice then
+ Low_Level = M_Generic_Type or else
+ Low_Level = M_Choice_Router or else
+ Low_Level = M_Generic_Choice
+ then
Arg := Argument_Access
(Argument_Conversions.To_Pointer (Get_Arg (Fld)));
if Arg = null then
@@ -109,124 +110,124 @@
end if;
end Get_Type;
- function Copy_Arg (Usr : System.Address) return System.Address
+ function Copy_Arg (Usr : System.Address) return System.Address
is
begin
return Usr;
end Copy_Arg;
- procedure Free_Arg (Usr : System.Address)
+ procedure Free_Arg (Usr : System.Address)
is
procedure Free_Type is new Ada.Unchecked_Deallocation
(Field_Type'Class, Field_Type_Access);
procedure Freeargs is new Ada.Unchecked_Deallocation
(Argument, Argument_Access);
- To_Be_Free : Argument_Access
+ To_Be_Free : Argument_Access
:= Argument_Access (Argument_Conversions.To_Pointer (Usr));
- Low_Level : C_Field_Type;
+ Low_Level : C_Field_Type;
begin
- if To_Be_Free /= null then
- if To_Be_Free.all.Usr /= System.Null_Address then
- Low_Level := To_Be_Free.all.Cft;
- if Low_Level.all.Freearg /= null then
- Low_Level.all.Freearg (To_Be_Free.all.Usr);
+ if To_Be_Free /= null then
+ if To_Be_Free.all.Usr /= System.Null_Address then
+ Low_Level := To_Be_Free.all.Cft;
+ if Low_Level.all.Freearg /= null then
+ Low_Level.all.Freearg (To_Be_Free.all.Usr);
end if;
end if;
- if To_Be_Free.all.Typ /= null then
- Free_Type (To_Be_Free.all.Typ);
+ if To_Be_Free.all.Typ /= null then
+ Free_Type (To_Be_Free.all.Typ);
end if;
- Freeargs (To_Be_Free);
+ Freeargs (To_Be_Free);
end if;
end Free_Arg;
- procedure Wrap_Builtin (Fld : Field;
- Typ : Field_Type'Class;
- Cft : C_Field_Type := C_Builtin_Router)
+ procedure Wrap_Builtin (Fld : Field;
+ Typ : Field_Type'Class;
+ Cft : C_Field_Type := C_Builtin_Router)
is
- Usr_Arg : constant System.Address := Get_Arg (Fld);
- Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
- Arg : Argument_Access;
- function Set_Fld_Type (F : Field := Fld;
- Cf : C_Field_Type := Cft;
- Arg1 : Argument_Access) return Eti_Error;
+ Usr_Arg : constant System.Address := Get_Arg (Fld);
+ Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
+ Arg : Argument_Access;
+ function Set_Fld_Type (F : Field := Fld;
+ Cf : C_Field_Type := Cft;
+ Arg1 : Argument_Access) return Eti_Error;
pragma Import (C, Set_Fld_Type, "set_field_type_user");
begin
- pragma Assert (Low_Level /= Null_Field_Type);
+ pragma Assert (Low_Level /= Null_Field_Type);
if Cft /= C_Builtin_Router and then Cft /= C_Choice_Router then
raise Form_Exception;
else
- Arg := new Argument'(Usr => System.Null_Address,
+ Arg := new Argument'(Usr => System.Null_Address,
Typ => new Field_Type'Class'(Typ),
Cft => Get_Fieldtype (Fld));
- if Usr_Arg /= System.Null_Address then
- if Low_Level.all.Copyarg /= null then
- Arg.all.Usr := Low_Level.all.Copyarg (Usr_Arg);
+ if Usr_Arg /= System.Null_Address then
+ if Low_Level.all.Copyarg /= null then
+ Arg.all.Usr := Low_Level.all.Copyarg (Usr_Arg);
else
- Arg.all.Usr := Usr_Arg;
+ Arg.all.Usr := Usr_Arg;
end if;
end if;
- Eti_Exception (Set_Fld_Type (Arg1 => Arg));
+ Eti_Exception (Set_Fld_Type (Arg1 => Arg));
end if;
end Wrap_Builtin;
- function Field_Check_Router (Fld : Field;
- Usr : System.Address) return Curses_Bool
+ function Field_Check_Router (Fld : Field;
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access
+ Arg : constant Argument_Access
:= Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
- and then Arg.all.Typ /= null);
- if Arg.all.Cft.all.Fcheck /= null then
- return Arg.all.Cft.all.Fcheck (Fld, Arg.all.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Fcheck /= null then
+ return Arg.all.Cft.all.Fcheck (Fld, Arg.all.Usr);
else
return 1;
end if;
end Field_Check_Router;
- function Char_Check_Router (Ch : C_Int;
- Usr : System.Address) return Curses_Bool
+ function Char_Check_Router (Ch : C_Int;
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access
+ Arg : constant Argument_Access
:= Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
- and then Arg.all.Typ /= null);
- if Arg.all.Cft.all.Ccheck /= null then
- return Arg.all.Cft.all.Ccheck (Ch, Arg.all.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Ccheck /= null then
+ return Arg.all.Cft.all.Ccheck (Ch, Arg.all.Usr);
else
return 1;
end if;
end Char_Check_Router;
- function Next_Router (Fld : Field;
- Usr : System.Address) return Curses_Bool
+ function Next_Router (Fld : Field;
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access
+ Arg : constant Argument_Access
:= Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
- and then Arg.all.Typ /= null);
- if Arg.all.Cft.all.Next /= null then
- return Arg.all.Cft.all.Next (Fld, Arg.all.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Next /= null then
+ return Arg.all.Cft.all.Next (Fld, Arg.all.Usr);
else
return 1;
end if;
end Next_Router;
- function Prev_Router (Fld : Field;
- Usr : System.Address) return Curses_Bool
+ function Prev_Router (Fld : Field;
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access :=
+ Arg : constant Argument_Access :=
Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
- and then Arg.all.Typ /= null);
- if Arg.all.Cft.all.Prev /= null then
- return Arg.all.Cft.all.Prev (Fld, Arg.all.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Prev /= null then
+ return Arg.all.Cft.all.Prev (Fld, Arg.all.Usr);
else
return 1;
end if;
@@ -234,22 +235,22 @@
- function C_Builtin_Router return C_Field_Type
+ function C_Builtin_Router return C_Field_Type
is
- T : C_Field_Type;
+ T : C_Field_Type;
begin
if M_Builtin_Router = Null_Field_Type then
- T := New_Fieldtype (Field_Check_Router'Access,
+ T := New_Fieldtype (Field_Check_Router'Access,
Char_Check_Router'Access);
- if T = Null_Field_Type then
+ if T = Null_Field_Type then
raise Form_Exception;
else
- Eti_Exception (Set_Fieldtype_Arg (T,
+ Eti_Exception (Set_Fieldtype_Arg (T,
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access));
end if;
- M_Builtin_Router := T;
+ M_Builtin_Router := T;
end if;
pragma Assert (M_Builtin_Router /= Null_Field_Type);
return M_Builtin_Router;
@@ -257,26 +258,26 @@
- function C_Choice_Router return C_Field_Type
+ function C_Choice_Router return C_Field_Type
is
- T : C_Field_Type;
+ T : C_Field_Type;
begin
if M_Choice_Router = Null_Field_Type then
- T := New_Fieldtype (Field_Check_Router'Access,
+ T := New_Fieldtype (Field_Check_Router'Access,
Char_Check_Router'Access);
- if T = Null_Field_Type then
+ if T = Null_Field_Type then
raise Form_Exception;
else
- Eti_Exception (Set_Fieldtype_Arg (T,
+ Eti_Exception (Set_Fieldtype_Arg (T,
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access));
- Eti_Exception (Set_Fieldtype_Choice (T,
+ Eti_Exception (Set_Fieldtype_Choice (T,
Next_Router'Access,
Prev_Router'Access));
end if;
- M_Choice_Router := T;
+ M_Choice_Router := T;
end if;
pragma Assert (M_Choice_Router /= Null_Field_Type);
return M_Choice_Router;