diff options
Diffstat (limited to 'body/fltk-widgets-inputs-text-floating_point.adb')
-rw-r--r-- | body/fltk-widgets-inputs-text-floating_point.adb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/body/fltk-widgets-inputs-text-floating_point.adb b/body/fltk-widgets-inputs-text-floating_point.adb index c7982d2..6a7925c 100644 --- a/body/fltk-widgets-inputs-text-floating_point.adb +++ b/body/fltk-widgets-inputs-text-floating_point.adb @@ -21,6 +21,8 @@ package body FLTK.Widgets.Inputs.Text.Floating_Point is -- Functions From C -- ------------------------ + -- Allocation -- + function new_fl_float_input (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -36,6 +38,8 @@ package body FLTK.Widgets.Inputs.Text.Floating_Point is + -- Drawing, Events -- + procedure fl_float_input_draw (W : in Storage.Integer_Address); pragma Import (C, fl_float_input_draw, "fl_float_input_draw"); @@ -105,11 +109,11 @@ package body FLTK.Widgets.Inputs.Text.Floating_Point is begin return This : Float_Input do This.Void_Ptr := new_fl_float_input - (Interfaces.C.int (X), - Interfaces.C.int (Y), - Interfaces.C.int (W), - Interfaces.C.int (H), - Interfaces.C.To_C (Text)); + (Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H), + Interfaces.C.To_C (Text)); Extra_Init (This, X, Y, W, H, Text); end return; end Create; @@ -135,11 +139,13 @@ package body FLTK.Widgets.Inputs.Text.Floating_Point is -- API Subprograms -- ----------------------- + -- Text Field -- + function Get_Value (This : in Float_Input) return Long_Float is - Ptr : Interfaces.C.Strings.chars_ptr := fl_input_get_value (This.Void_Ptr); + Ptr : constant Interfaces.C.Strings.chars_ptr := fl_input_get_value (This.Void_Ptr); begin if Ptr = Interfaces.C.Strings.Null_Ptr or else Interfaces.C.Strings.Value (Ptr) = "" |