summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/fl_value_input.html238
-rw-r--r--doc/index.html3
-rw-r--r--progress.txt4
-rw-r--r--src/c_fl_value_input.cpp137
-rw-r--r--src/c_fl_value_input.h52
-rw-r--r--src/fltk-widgets-valuators-value_inputs.adb340
-rw-r--r--src/fltk-widgets-valuators-value_inputs.ads154
7 files changed, 925 insertions, 3 deletions
diff --git a/doc/fl_value_input.html b/doc/fl_value_input.html
new file mode 100644
index 0000000..16d02b8
--- /dev/null
+++ b/doc/fl_value_input.html
@@ -0,0 +1,238 @@
+
+<!DOCTYPE html>
+
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Fl_Value_Input Binding Map</title>
+ <link href="map.css" rel="stylesheet">
+ </head>
+
+ <body>
+
+
+<h2>Fl_Value_Input Binding Map</h2>
+
+
+<table class="package">
+ <tr><th colspan="2">Package name</th></tr>
+
+ <tr>
+ <td>Fl_Value_Input</td>
+ <td>FLTK.Widgets.Valuators.Value_Inputs</td>
+ </tr>
+
+</table>
+
+
+
+<table class="type">
+ <tr><th colspan="2">Types</th></tr>
+
+ <tr>
+ <td>Fl_Value_Input</td>
+ <td>Value_Input</td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ <td>Value_Input_Reference</td>
+ </tr>
+
+</table>
+
+
+
+<table class="function">
+ <tr><th colspan="2">Functions and Procedures</th></tr>
+
+ <tr>
+<td><pre>
+Fl_Value_Input(int x, int y, int w, int h, const char *l=0);
+</pre></td>
+<td><pre>
+function Create
+ (X, Y, W, H : in Integer;
+ Text : in String)
+ return Value_Input;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+Fl_Color cursor_color() const;
+</pre></td>
+<td><pre>
+function Get_Cursor_Color
+ (This : in Value_Input)
+ return Color;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void cursor_color(Fl_Color n);
+</pre></td>
+<td><pre>
+procedure Set_Cursor_Color
+ (This : in out Value_Input;
+ Col : in Color);
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void draw();
+</pre></td>
+<td><pre>
+procedure Draw
+ (This : in out Value_Input);
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+int handle(int);
+</pre></td>
+<td><pre>
+function Handle
+ (This : in out Value_Input;
+ Event : in Event_Kind)
+ return Event_Outcome;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+Fl_Input input;
+</pre></td>
+<td><pre>
+function Input
+ (This : in Value_Input)
+ return FLTK.Widgets.Inputs.Input_Reference;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void resize(int, int, int, int);
+</pre></td>
+<td>&nbsp;</td>
+ </tr>
+
+ <tr>
+<td><pre>
+int shortcut() const;
+</pre></td>
+<td><pre>
+function Get_Shortcut
+ (This : in Value_Input)
+ return Key_Combo;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void shortcut(int s);
+</pre></td>
+<td><pre>
+procedure Set_Shortcut
+ (This : in out Value_Input;
+ Key : in Key_Combo);
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void soft(char s);
+</pre></td>
+<td><pre>
+procedure Set_Soft
+ (This : in out Value_Input;
+ To : in Boolean);
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+char soft() const;
+</pre></td>
+<td><pre>
+function Is_Soft
+ (This : in Value_Input)
+ return Boolean;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+Fl_Color textcolor() const;
+</pre></td>
+<td><pre>
+function Get_Text_Color
+ (This : in Value_Input)
+ return Color;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void textcolor(Fl_Color n);
+</pre></td>
+<td><pre>
+procedure Set_Text_Color
+ (This : in out Value_Input;
+ Col : in Color);
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+Fl_Font textfont() const;
+</pre></td>
+<td><pre>
+function Get_Text_Font
+ (This : in Value_Input)
+ return Font_Kind;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void textfont(Fl_Font s);
+</pre></td>
+<td><pre>
+procedure Set_Text_Font
+ (This : in out Value_Input;
+ Font : in Font_Kind);
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+Fl_Fontsize textsize() const;
+</pre></td>
+<td><pre>
+function Get_Text_Size
+ (This : in Value_Input)
+ return Font_Size;
+</pre></td>
+ </tr>
+
+ <tr>
+<td><pre>
+void textsize(Fl_Fontsize s);
+</pre></td>
+<td><pre>
+procedure Set_Text_Size
+ (This : in out Value_Input;
+ Size : in Font_Size);
+</pre></td>
+ </tr>
+
+</table>
+
+
+ </body>
+</html>
+
diff --git a/doc/index.html b/doc/index.html
index 4d83ae6..e9e3a78 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -118,7 +118,7 @@
<li><a href="fl_tooltip.html">Fl_Tooltip</a></li>
<li>Fl_Tree</li>
<li><a href="fl_valuator.html">Fl_Valuator</a></li>
- <li>Fl_Value_Input</li>
+ <li><a href="fl_value_input.html">Fl_Value_Input</a></li>
<li>Fl_Value_Output</li>
<li><a href="fl_value_slider.html">Fl_Value_Slider</a></li>
<li><a href="fl_widget.html">Fl_Widget</a></li>
@@ -217,6 +217,7 @@
<li><a href="fl_scrollbar.html">FLTK.Widgets.Valuators.Sliders.Scrollbars</a></li>
<li><a href="fl_value_slider.html">FLTK.Widgets.Valuators.Sliders.Value</a></li>
<li><a href="fl_hor_value_slider.html">FLTK.Widgets.Valuators.Sliders.Value.Horizontal</a></li>
+ <li><a href="fl_value_input.html">FLTK.Widgets.Valuators.Value_Inputs</a></li>
</ul>
</body>
diff --git a/progress.txt b/progress.txt
index 8368d9a..b3740bd 100644
--- a/progress.txt
+++ b/progress.txt
@@ -94,6 +94,7 @@ FLTK.Widgets.Valuators.Sliders.Nice
FLTK.Widgets.Valuators.Sliders.Scrollbars
FLTK.Widgets.Valuators.Sliders.Value
FLTK.Widgets.Valuators.Sliders.Value.Horizontal
+FLTK.Widgets.Valuators.Value_Inputs
@@ -136,7 +137,7 @@ FL_GL_Window
FL_Glut_Window
FL_Cairo_Window
Fl_Display_Device
-Fl_File_Chooser?
+Fl_File_Chooser
(all these have to be done to put something in the polished category)
@@ -184,7 +185,6 @@ Fl_Xlib_Graphics_Driver
Fl_Plugin
Fl_Plugin_Manager
Fl_Device_Plugin
-Fl_Label
diff --git a/src/c_fl_value_input.cpp b/src/c_fl_value_input.cpp
new file mode 100644
index 0000000..91404a6
--- /dev/null
+++ b/src/c_fl_value_input.cpp
@@ -0,0 +1,137 @@
+
+
+#include <FL/Fl_Value_Input.H>
+#include "c_fl_value_input.h"
+#include "c_fl_type.h"
+
+
+
+
+class My_Value_Input : public Fl_Value_Input {
+ public:
+ using Fl_Value_Input::Fl_Value_Input;
+ friend void value_input_set_draw_hook(VALUE_INPUT a, void * d);
+ friend void fl_value_input_draw(VALUE_INPUT a);
+ friend void value_input_set_handle_hook(VALUE_INPUT a, void * h);
+ friend int fl_value_input_handle(VALUE_INPUT a, int e);
+ protected:
+ void draw();
+ void real_draw();
+ int handle(int e);
+ int real_handle(int e);
+ d_hook_p draw_hook;
+ h_hook_p handle_hook;
+};
+
+void My_Value_Input::draw() {
+ (*draw_hook)(this->user_data());
+}
+
+void My_Value_Input::real_draw() {
+ Fl_Value_Input::draw();
+}
+
+int My_Value_Input::handle(int e) {
+ return (*handle_hook)(this->user_data(), e);
+}
+
+int My_Value_Input::real_handle(int e) {
+ return Fl_Value_Input::handle(e);
+}
+
+void value_input_set_draw_hook(VALUE_INPUT a, void * d) {
+ reinterpret_cast<My_Value_Input*>(a)->draw_hook = reinterpret_cast<d_hook_p>(d);
+}
+
+void fl_value_input_draw(VALUE_INPUT a) {
+ reinterpret_cast<My_Value_Input*>(a)->real_draw();
+}
+
+void value_input_set_handle_hook(VALUE_INPUT a, void * h) {
+ reinterpret_cast<My_Value_Input*>(a)->handle_hook = reinterpret_cast<h_hook_p>(h);
+}
+
+int fl_value_input_handle(VALUE_INPUT a, int e) {
+ return reinterpret_cast<My_Value_Input*>(a)->real_handle(e);
+}
+
+
+
+
+VALUE_INPUT new_fl_value_input(int x, int y, int w, int h, char* label) {
+ My_Value_Input *a = new My_Value_Input(x, y, w, h, label);
+ return a;
+}
+
+void free_fl_value_input(VALUE_INPUT a) {
+ delete reinterpret_cast<My_Value_Input*>(a);
+}
+
+
+
+
+void * fl_value_input_get_input(VALUE_INPUT v) {
+ return &(reinterpret_cast<Fl_Value_Input*>(v)->input);
+}
+
+
+
+
+unsigned int fl_value_input_get_cursor_color(VALUE_INPUT v) {
+ return reinterpret_cast<Fl_Value_Input*>(v)->cursor_color();
+}
+
+void fl_value_input_set_cursor_color(VALUE_INPUT v, unsigned int c) {
+ reinterpret_cast<Fl_Value_Input*>(v)->cursor_color(c);
+}
+
+
+
+
+int fl_value_input_get_shortcut(VALUE_INPUT v) {
+ return reinterpret_cast<Fl_Value_Input*>(v)->Fl_Value_Input::shortcut();
+}
+
+void fl_value_input_set_shortcut(VALUE_INPUT v, int k) {
+ reinterpret_cast<Fl_Value_Input*>(v)->Fl_Value_Input::shortcut(k);
+}
+
+
+
+
+int fl_value_input_is_soft(VALUE_INPUT a) {
+ return reinterpret_cast<Fl_Value_Input*>(a)->soft();
+}
+
+void fl_value_input_set_soft(VALUE_INPUT a, int t) {
+ reinterpret_cast<Fl_Value_Input*>(a)->soft(t);
+}
+
+
+
+
+unsigned int fl_value_input_get_text_color(VALUE_INPUT v) {
+ return reinterpret_cast<Fl_Value_Input*>(v)->textcolor();
+}
+
+void fl_value_input_set_text_color(VALUE_INPUT v, unsigned int c) {
+ reinterpret_cast<Fl_Value_Input*>(v)->textcolor(static_cast<Fl_Color>(c));
+}
+
+int fl_value_input_get_text_font(VALUE_INPUT v) {
+ return reinterpret_cast<Fl_Value_Input*>(v)->textfont();
+}
+
+void fl_value_input_set_text_font(VALUE_INPUT v, int f) {
+ reinterpret_cast<Fl_Value_Input*>(v)->textfont(static_cast<Fl_Font>(f));
+}
+
+int fl_value_input_get_text_size(VALUE_INPUT v) {
+ return reinterpret_cast<Fl_Value_Input*>(v)->textsize();
+}
+
+void fl_value_input_set_text_size(VALUE_INPUT v, int s) {
+ reinterpret_cast<Fl_Value_Input*>(v)->textsize(static_cast<Fl_Fontsize>(s));
+}
+
+
diff --git a/src/c_fl_value_input.h b/src/c_fl_value_input.h
new file mode 100644
index 0000000..ff360bd
--- /dev/null
+++ b/src/c_fl_value_input.h
@@ -0,0 +1,52 @@
+
+
+#ifndef FL_VALUE_INPUT_GUARD
+#define FL_VALUE_INPUT_GUARD
+
+
+
+
+typedef void* VALUE_INPUT;
+
+
+
+
+extern "C" void value_input_set_draw_hook(VALUE_INPUT a, void * d);
+extern "C" void fl_value_input_draw(VALUE_INPUT a);
+extern "C" void value_input_set_handle_hook(VALUE_INPUT a, void * h);
+extern "C" int fl_value_input_handle(VALUE_INPUT a, int e);
+
+
+
+
+extern "C" VALUE_INPUT new_fl_value_input(int x, int y, int w, int h, char* label);
+extern "C" void free_fl_value_input(VALUE_INPUT a);
+
+
+
+
+extern "C" void * fl_value_input_get_input(VALUE_INPUT v);
+
+
+extern "C" unsigned int fl_value_input_get_cursor_color(VALUE_INPUT v);
+extern "C" void fl_value_input_set_cursor_color(VALUE_INPUT v, unsigned int c);
+
+
+extern "C" int fl_value_input_get_shortcut(VALUE_INPUT v);
+extern "C" void fl_value_input_set_shortcut(VALUE_INPUT v, int k);
+
+
+extern "C" int fl_value_input_is_soft(VALUE_INPUT a);
+extern "C" void fl_value_input_set_soft(VALUE_INPUT a, int t);
+
+
+extern "C" unsigned int fl_value_input_get_text_color(VALUE_INPUT v);
+extern "C" void fl_value_input_set_text_color(VALUE_INPUT v, unsigned int c);
+extern "C" int fl_value_input_get_text_font(VALUE_INPUT v);
+extern "C" void fl_value_input_set_text_font(VALUE_INPUT v, int f);
+extern "C" int fl_value_input_get_text_size(VALUE_INPUT v);
+extern "C" void fl_value_input_set_text_size(VALUE_INPUT v, int s);
+
+
+#endif
+
diff --git a/src/fltk-widgets-valuators-value_inputs.adb b/src/fltk-widgets-valuators-value_inputs.adb
new file mode 100644
index 0000000..010906d
--- /dev/null
+++ b/src/fltk-widgets-valuators-value_inputs.adb
@@ -0,0 +1,340 @@
+
+
+with
+
+ Ada.Unchecked_Deallocation,
+ Interfaces.C.Strings,
+ System;
+
+use type
+
+ Interfaces.C.int,
+ System.Address;
+
+
+package body FLTK.Widgets.Valuators.Value_Inputs is
+
+
+ procedure value_input_set_draw_hook
+ (W, D : in System.Address);
+ pragma Import (C, value_input_set_draw_hook, "value_input_set_draw_hook");
+ pragma Inline (value_input_set_draw_hook);
+
+ procedure value_input_set_handle_hook
+ (W, H : in System.Address);
+ pragma Import (C, value_input_set_handle_hook, "value_input_set_handle_hook");
+ pragma Inline (value_input_set_handle_hook);
+
+
+
+
+ function new_fl_value_input
+ (X, Y, W, H : in Interfaces.C.int;
+ Text : in Interfaces.C.char_array)
+ return System.Address;
+ pragma Import (C, new_fl_value_input, "new_fl_value_input");
+ pragma Inline (new_fl_value_input);
+
+ procedure free_fl_value_input
+ (A : in System.Address);
+ pragma Import (C, free_fl_value_input, "free_fl_value_input");
+ pragma Inline (free_fl_value_input);
+
+
+
+
+ function fl_value_input_get_input
+ (V : in System.Address)
+ return System.Address;
+ pragma Import (C, fl_value_input_get_input, "fl_value_input_get_input");
+ pragma Inline (fl_value_input_get_input);
+
+
+
+
+ function fl_value_input_get_cursor_color
+ (TD : in System.Address)
+ return Interfaces.C.unsigned;
+ pragma Import (C, fl_value_input_get_cursor_color, "fl_value_input_get_cursor_color");
+ pragma Inline (fl_value_input_get_cursor_color);
+
+ procedure fl_value_input_set_cursor_color
+ (TD : in System.Address;
+ C : in Interfaces.C.unsigned);
+ pragma Import (C, fl_value_input_set_cursor_color, "fl_value_input_set_cursor_color");
+ pragma Inline (fl_value_input_set_cursor_color);
+
+
+
+
+ function fl_value_input_get_shortcut
+ (B : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_value_input_get_shortcut, "fl_value_input_get_shortcut");
+ pragma Inline (fl_value_input_get_shortcut);
+
+ procedure fl_value_input_set_shortcut
+ (B : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_value_input_set_shortcut, "fl_value_input_set_shortcut");
+ pragma Inline (fl_value_input_set_shortcut);
+
+
+
+
+ function fl_value_input_is_soft
+ (A : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_value_input_is_soft, "fl_value_input_is_soft");
+ pragma Inline (fl_value_input_is_soft);
+
+ procedure fl_value_input_set_soft
+ (A : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_value_input_set_soft, "fl_value_input_set_soft");
+ pragma Inline (fl_value_input_set_soft);
+
+
+
+
+ function fl_value_input_get_text_color
+ (TD : in System.Address)
+ return Interfaces.C.unsigned;
+ pragma Import (C, fl_value_input_get_text_color, "fl_value_input_get_text_color");
+ pragma Inline (fl_value_input_get_text_color);
+
+ procedure fl_value_input_set_text_color
+ (TD : in System.Address;
+ C : in Interfaces.C.unsigned);
+ pragma Import (C, fl_value_input_set_text_color, "fl_value_input_set_text_color");
+ pragma Inline (fl_value_input_set_text_color);
+
+ function fl_value_input_get_text_font
+ (TD : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_value_input_get_text_font, "fl_value_input_get_text_font");
+ pragma Inline (fl_value_input_get_text_font);
+
+ procedure fl_value_input_set_text_font
+ (TD : in System.Address;
+ F : in Interfaces.C.int);
+ pragma Import (C, fl_value_input_set_text_font, "fl_value_input_set_text_font");
+ pragma Inline (fl_value_input_set_text_font);
+
+ function fl_value_input_get_text_size
+ (TD : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_value_input_get_text_size, "fl_value_input_get_text_size");
+ pragma Inline (fl_value_input_get_text_size);
+
+ procedure fl_value_input_set_text_size
+ (TD : in System.Address;
+ S : in Interfaces.C.int);
+ pragma Import (C, fl_value_input_set_text_size, "fl_value_input_set_text_size");
+ pragma Inline (fl_value_input_set_text_size);
+
+
+
+
+ procedure fl_value_input_draw
+ (W : in System.Address);
+ pragma Import (C, fl_value_input_draw, "fl_value_input_draw");
+ pragma Inline (fl_value_input_draw);
+
+ function fl_value_input_handle
+ (W : in System.Address;
+ E : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_value_input_handle, "fl_value_input_handle");
+ pragma Inline (fl_value_input_handle);
+
+
+
+
+ procedure Free is new Ada.Unchecked_Deallocation
+ (INP.Input, Input_Access);
+
+
+
+
+ procedure Finalize
+ (This : in out Value_Input) is
+ begin
+ if This.Void_Ptr /= System.Null_Address and then
+ This in Value_Input'Class
+ then
+ free_fl_value_input (This.Void_Ptr);
+ Free (This.My_Input);
+ This.Void_Ptr := System.Null_Address;
+ end if;
+ Finalize (Valuator (This));
+ end Finalize;
+
+
+
+
+ package body Forge is
+
+ function Create
+ (X, Y, W, H : in Integer;
+ Text : in String)
+ return Value_Input 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));
+ fl_widget_set_user_data
+ (This.Void_Ptr,
+ Widget_Convert.To_Address (This'Unchecked_Access));
+ value_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
+ value_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
+
+ This.My_Input := new INP.Input;
+ Wrapper (This.My_Input.all).Void_Ptr :=
+ fl_value_input_get_input (This.Void_Ptr);
+ Wrapper (This.My_Input.all).Needs_Dealloc := False;
+ end return;
+ end Create;
+
+ end Forge;
+
+
+
+
+ function Input
+ (This : in Value_Input)
+ return FLTK.Widgets.Inputs.Input_Reference is
+ begin
+ return (Data => This.My_Input);
+ end Input;
+
+
+
+
+ function Get_Cursor_Color
+ (This : in Value_Input)
+ return Color is
+ begin
+ return Color (fl_value_input_get_cursor_color (This.Void_Ptr));
+ end Get_Cursor_Color;
+
+
+ procedure Set_Cursor_Color
+ (This : in out Value_Input;
+ Col : in Color) is
+ begin
+ fl_value_input_set_cursor_color (This.Void_Ptr, Interfaces.C.unsigned (Col));
+ end Set_Cursor_Color;
+
+
+
+
+ function Get_Shortcut
+ (This : in Value_Input)
+ return Key_Combo is
+ begin
+ return To_Ada (Interfaces.C.unsigned_long (fl_value_input_get_shortcut (This.Void_Ptr)));
+ end Get_Shortcut;
+
+
+ procedure Set_Shortcut
+ (This : in out Value_Input;
+ Key : in Key_Combo) is
+ begin
+ fl_value_input_set_shortcut (This.Void_Ptr, Interfaces.C.int (To_C (Key)));
+ end Set_Shortcut;
+
+
+
+
+ function Is_Soft
+ (This : in Value_Input)
+ return Boolean is
+ begin
+ return fl_value_input_is_soft (This.Void_Ptr) /= 0;
+ end Is_Soft;
+
+
+ procedure Set_Soft
+ (This : in out Value_Input;
+ To : in Boolean) is
+ begin
+ fl_value_input_set_soft (This.Void_Ptr, Boolean'Pos (To));
+ end Set_Soft;
+
+
+
+
+ function Get_Text_Color
+ (This : in Value_Input)
+ return Color is
+ begin
+ return Color (fl_value_input_get_text_color (This.Void_Ptr));
+ end Get_Text_Color;
+
+
+ procedure Set_Text_Color
+ (This : in out Value_Input;
+ Col : in Color) is
+ begin
+ fl_value_input_set_text_color (This.Void_Ptr, Interfaces.C.unsigned (Col));
+ end Set_Text_Color;
+
+
+ function Get_Text_Font
+ (This : in Value_Input)
+ return Font_Kind is
+ begin
+ return Font_Kind'Val (fl_value_input_get_text_font (This.Void_Ptr));
+ end Get_Text_Font;
+
+
+ procedure Set_Text_Font
+ (This : in out Value_Input;
+ Font : in Font_Kind) is
+ begin
+ fl_value_input_set_text_font (This.Void_Ptr, Font_Kind'Pos (Font));
+ end Set_Text_Font;
+
+
+ function Get_Text_Size
+ (This : in Value_Input)
+ return Font_Size is
+ begin
+ return Font_Size (fl_value_input_get_text_size (This.Void_Ptr));
+ end Get_Text_Size;
+
+
+ procedure Set_Text_Size
+ (This : in out Value_Input;
+ Size : in Font_Size) is
+ begin
+ fl_value_input_set_text_size (This.Void_Ptr, Interfaces.C.int (Size));
+ end Set_Text_Size;
+
+
+
+
+ procedure Draw
+ (This : in out Value_Input) is
+ begin
+ fl_value_input_draw (This.Void_Ptr);
+ end Draw;
+
+
+ function Handle
+ (This : in out Value_Input;
+ Event : in Event_Kind)
+ return Event_Outcome is
+ begin
+ return Event_Outcome'Val
+ (fl_value_input_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
+ end Handle;
+
+
+end FLTK.Widgets.Valuators.Value_Inputs;
+
diff --git a/src/fltk-widgets-valuators-value_inputs.ads b/src/fltk-widgets-valuators-value_inputs.ads
new file mode 100644
index 0000000..b56874c
--- /dev/null
+++ b/src/fltk-widgets-valuators-value_inputs.ads
@@ -0,0 +1,154 @@
+
+
+with
+
+ FLTK.Widgets.Inputs;
+
+
+package FLTK.Widgets.Valuators.Value_Inputs is
+
+
+ type Value_Input is new Valuator with private;
+
+ type Value_Input_Reference (Data : not null access Value_Input'Class) is
+ limited null record with Implicit_Dereference => Data;
+
+
+
+
+ package Forge is
+
+ function Create
+ (X, Y, W, H : in Integer;
+ Text : in String)
+ return Value_Input;
+
+ end Forge;
+
+
+
+
+ function Input
+ (This : in Value_Input)
+ return FLTK.Widgets.Inputs.Input_Reference;
+
+
+
+
+ function Get_Cursor_Color
+ (This : in Value_Input)
+ return Color;
+
+ procedure Set_Cursor_Color
+ (This : in out Value_Input;
+ Col : in Color);
+
+
+
+
+ function Get_Shortcut
+ (This : in Value_Input)
+ return Key_Combo;
+
+ procedure Set_Shortcut
+ (This : in out Value_Input;
+ Key : in Key_Combo);
+
+
+
+
+ function Is_Soft
+ (This : in Value_Input)
+ return Boolean;
+
+ procedure Set_Soft
+ (This : in out Value_Input;
+ To : in Boolean);
+
+
+
+
+ function Get_Text_Color
+ (This : in Value_Input)
+ return Color;
+
+ procedure Set_Text_Color
+ (This : in out Value_Input;
+ Col : in Color);
+
+ function Get_Text_Font
+ (This : in Value_Input)
+ return Font_Kind;
+
+ procedure Set_Text_Font
+ (This : in out Value_Input;
+ Font : in Font_Kind);
+
+ function Get_Text_Size
+ (This : in Value_Input)
+ return Font_Size;
+
+ procedure Set_Text_Size
+ (This : in out Value_Input;
+ Size : in Font_Size);
+
+
+
+
+ procedure Draw
+ (This : in out Value_Input);
+
+ function Handle
+ (This : in out Value_Input;
+ Event : in Event_Kind)
+ return Event_Outcome;
+
+
+private
+
+
+ package INP renames FLTK.Widgets.Inputs;
+
+
+ type Input_Access is access INP.Input;
+
+
+ type Value_Input is new Valuator with record
+ My_Input : Input_Access;
+ end record;
+
+ overriding procedure Finalize
+ (This : in out Value_Input);
+
+
+
+
+ pragma Inline (Input);
+
+
+ pragma Inline (Get_Cursor_Color);
+ pragma Inline (Set_Cursor_Color);
+
+
+ pragma Inline (Get_Shortcut);
+ pragma Inline (Set_Shortcut);
+
+
+ pragma Inline (Is_Soft);
+ pragma Inline (Set_Soft);
+
+
+ pragma Inline (Get_Text_Color);
+ pragma Inline (Set_Text_Color);
+ pragma Inline (Get_Text_Font);
+ pragma Inline (Set_Text_Font);
+ pragma Inline (Get_Text_Size);
+ pragma Inline (Set_Text_Size);
+
+
+ pragma Inline (Draw);
+ pragma Inline (Handle);
+
+
+end FLTK.Widgets.Valuators.Value_Inputs;
+