aboutsummaryrefslogtreecommitdiff
path: root/body/fltk-widgets-valuators-value_inputs.adb
diff options
context:
space:
mode:
Diffstat (limited to 'body/fltk-widgets-valuators-value_inputs.adb')
-rw-r--r--body/fltk-widgets-valuators-value_inputs.adb58
1 files changed, 38 insertions, 20 deletions
diff --git a/body/fltk-widgets-valuators-value_inputs.adb b/body/fltk-widgets-valuators-value_inputs.adb
index 6091d55..1909c1c 100644
--- a/body/fltk-widgets-valuators-value_inputs.adb
+++ b/body/fltk-widgets-valuators-value_inputs.adb
@@ -7,7 +7,7 @@
with
FLTK.Widgets.Groups,
- Interfaces.C.Strings;
+ Interfaces.C;
use type
@@ -21,6 +21,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
-- Functions From C --
------------------------
+ -- Allocation --
+
function new_fl_value_input
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
@@ -36,6 +38,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Attributes --
+
function fl_value_input_get_input
(V : in Storage.Integer_Address)
return Storage.Integer_Address;
@@ -45,6 +49,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Cursors --
+
function fl_value_input_get_cursor_color
(TD : in Storage.Integer_Address)
return Interfaces.C.unsigned;
@@ -60,6 +66,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Shortcut --
+
function fl_value_input_get_shortcut
(B : in Storage.Integer_Address)
return Interfaces.C.int;
@@ -75,6 +83,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Allow Outside Range --
+
function fl_value_input_is_soft
(A : in Storage.Integer_Address)
return Interfaces.C.int;
@@ -90,6 +100,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Text Settings --
+
function fl_value_input_get_text_color
(TD : in Storage.Integer_Address)
return Interfaces.C.unsigned;
@@ -129,6 +141,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Dimensions --
+
procedure fl_value_input_resize
(TD : in Storage.Integer_Address;
X, Y, W, H : in Interfaces.C.int);
@@ -138,6 +152,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Drawing, Events --
+
procedure fl_value_input_draw
(W : in Storage.Integer_Address);
pragma Import (C, fl_value_input_draw, "fl_value_input_draw");
@@ -157,17 +173,9 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
-- Destructors --
-------------------
- -- Making a long distance telephone call
- procedure fl_text_input_extra_final
- (Ada_Obj : in Storage.Integer_Address);
- pragma Import (C, fl_text_input_extra_final, "fl_text_input_extra_final");
- pragma Inline (fl_text_input_extra_final);
-
-
procedure Extra_Final
(This : in out Value_Input) is
begin
- fl_text_input_extra_final (Storage.To_Integer (This.My_Input'Address));
Extra_Final (Valuator (This));
end Extra_Final;
@@ -233,11 +241,11 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
begin
return This : Value_Input do
This.Void_Ptr := new_fl_value_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;
@@ -259,9 +267,11 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
- ------------------
+ -----------------------
+ -- API Subprograms --
+ -----------------------
+
-- Attributes --
- ------------------
function Text_Field
(This : in out Value_Input)
@@ -273,9 +283,7 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
- -----------------------
- -- API Subprograms --
- -----------------------
+ -- Cursors --
function Get_Cursor_Color
(This : in Value_Input)
@@ -295,11 +303,13 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Shortcut --
+
function Get_Shortcut
(This : in Value_Input)
return Key_Combo is
begin
- return To_Ada (fl_value_input_get_shortcut (This.Void_Ptr));
+ return To_Ada (Interfaces.C.unsigned (fl_value_input_get_shortcut (This.Void_Ptr)));
end Get_Shortcut;
@@ -313,6 +323,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Allow Outside Range --
+
function Is_Soft
(This : in Value_Input)
return Boolean is
@@ -331,6 +343,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Text Settings --
+
function Get_Text_Color
(This : in Value_Input)
return Color is
@@ -381,6 +395,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Dimensions --
+
procedure Resize
(This : in out Value_Input;
X, Y, W, H : in Integer) is
@@ -396,6 +412,8 @@ package body FLTK.Widgets.Valuators.Value_Inputs is
+ -- Drawing, Events --
+
procedure Draw
(This : in out Value_Input) is
begin