summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2018-03-20 01:41:49 +1100
committerJed Barber <jjbarber@y7mail.com>2018-03-20 01:41:49 +1100
commit09d9f2f6fc83af3bdc76717941eb13b77b2b1613 (patch)
tree82b57130cd381b9a0b261eabdc4239c09dcc17f2 /src
parentc1dcb4c61e79b1ddd98c0ef84f2d36be7f7fd736 (diff)
Moved several Widgets from the Partially list to the Done list
Diffstat (limited to 'src')
-rw-r--r--src/c_fl_file_input.cpp19
-rw-r--r--src/c_fl_file_input.h8
-rw-r--r--src/c_fl_input.cpp66
-rw-r--r--src/c_fl_input.h20
-rw-r--r--src/c_fl_slider.cpp15
-rw-r--r--src/c_fl_slider.h1
-rw-r--r--src/c_fl_valuator.cpp32
-rw-r--r--src/c_fl_valuator.h2
-rw-r--r--src/fltk-widgets-groups-color_choosers.adb7
-rw-r--r--src/fltk-widgets-groups-color_choosers.ads3
-rw-r--r--src/fltk-widgets-inputs-file.adb57
-rw-r--r--src/fltk-widgets-inputs-file.ads19
-rw-r--r--src/fltk-widgets-inputs.adb221
-rw-r--r--src/fltk-widgets-inputs.ads73
-rw-r--r--src/fltk-widgets-valuators-sliders.adb24
-rw-r--r--src/fltk-widgets-valuators-sliders.ads7
-rw-r--r--src/fltk-widgets-valuators.adb26
-rw-r--r--src/fltk-widgets-valuators.ads8
18 files changed, 590 insertions, 18 deletions
diff --git a/src/c_fl_file_input.cpp b/src/c_fl_file_input.cpp
index 03f941c..50b600f 100644
--- a/src/c_fl_file_input.cpp
+++ b/src/c_fl_file_input.cpp
@@ -68,3 +68,22 @@ void free_fl_file_input(FILE_INPUT i) {
}
+
+
+int fl_file_input_get_down_box(FILE_INPUT i) {
+ return reinterpret_cast<Fl_File_Input*>(i)->down_box();
+}
+
+void fl_file_input_set_down_box(FILE_INPUT i, int t) {
+ reinterpret_cast<Fl_File_Input*>(i)->down_box(static_cast<Fl_Boxtype>(t));
+}
+
+unsigned int fl_file_input_get_errorcolor(FILE_INPUT i) {
+ return reinterpret_cast<Fl_File_Input*>(i)->errorcolor();
+}
+
+void fl_file_input_set_errorcolor(FILE_INPUT i, unsigned int t) {
+ reinterpret_cast<Fl_File_Input*>(i)->errorcolor(t);
+}
+
+
diff --git a/src/c_fl_file_input.h b/src/c_fl_file_input.h
index d2a7b73..18d977e 100644
--- a/src/c_fl_file_input.h
+++ b/src/c_fl_file_input.h
@@ -23,5 +23,13 @@ extern "C" FILE_INPUT new_fl_file_input(int x, int y, int w, int h, char* label)
extern "C" void free_fl_file_input(FILE_INPUT i);
+
+
+extern "C" int fl_file_input_get_down_box(FILE_INPUT i);
+extern "C" void fl_file_input_set_down_box(FILE_INPUT i, int t);
+extern "C" unsigned int fl_file_input_get_errorcolor(FILE_INPUT i);
+extern "C" void fl_file_input_set_errorcolor(FILE_INPUT i, unsigned int t);
+
+
#endif
diff --git a/src/c_fl_input.cpp b/src/c_fl_input.cpp
index cb0b849..7e106e2 100644
--- a/src/c_fl_input.cpp
+++ b/src/c_fl_input.cpp
@@ -70,7 +70,73 @@ void free_fl_input(INPUT i) {
+int fl_input_copy(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->copy(1);
+}
+
+int fl_input_cut(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->cut();
+}
+
+int fl_input_cut2(INPUT i, int b) {
+ return reinterpret_cast<Fl_Input*>(i)->cut(b);
+}
+
+int fl_input_cut3(INPUT i, int a, int b) {
+ return reinterpret_cast<Fl_Input*>(i)->cut(a,b);
+}
+
+int fl_input_copy_cuts(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->copy_cuts();
+}
+
+
+
+
+int fl_input_get_readonly(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->readonly();
+}
+
+void fl_input_set_readonly(INPUT i, int t) {
+ reinterpret_cast<Fl_Input*>(i)->readonly(t);
+}
+
+
+
+
const char * fl_input_get_value(INPUT i) {
return reinterpret_cast<Fl_Input*>(i)->value();
}
+void fl_input_set_value(INPUT i, char * s, int len) {
+ reinterpret_cast<Fl_Input*>(i)->value(s,len);
+}
+
+
+
+
+unsigned int fl_input_get_textcolor(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->textcolor();
+}
+
+void fl_input_set_textcolor(INPUT i, unsigned int t) {
+ reinterpret_cast<Fl_Input*>(i)->textcolor(t);
+}
+
+int fl_input_get_textfont(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->textfont();
+}
+
+void fl_input_set_textfont(INPUT i, int t) {
+ reinterpret_cast<Fl_Input*>(i)->textfont(t);
+}
+
+int fl_input_get_textsize(INPUT i) {
+ return reinterpret_cast<Fl_Input*>(i)->textsize();
+}
+
+void fl_input_set_textsize(INPUT i, int t) {
+ reinterpret_cast<Fl_Input*>(i)->textsize(t);
+}
+
+
diff --git a/src/c_fl_input.h b/src/c_fl_input.h
index cb9935a..4ffbea4 100644
--- a/src/c_fl_input.h
+++ b/src/c_fl_input.h
@@ -25,7 +25,27 @@ extern "C" void free_fl_input(INPUT i);
+extern "C" int fl_input_copy(INPUT i);
+extern "C" int fl_input_cut(INPUT i);
+extern "C" int fl_input_cut2(INPUT i, int b);
+extern "C" int fl_input_cut3(INPUT i, int a, int b);
+extern "C" int fl_input_copy_cuts(INPUT i);
+
+
+extern "C" int fl_input_get_readonly(INPUT i);
+extern "C" void fl_input_set_readonly(INPUT i, int t);
+
+
extern "C" const char * fl_input_get_value(INPUT i);
+extern "C" void fl_input_set_value(INPUT i, char * s, int len);
+
+
+extern "C" unsigned int fl_input_get_textcolor(INPUT i);
+extern "C" void fl_input_set_textcolor(INPUT i, unsigned int t);
+extern "C" int fl_input_get_textfont(INPUT i);
+extern "C" void fl_input_set_textfont(INPUT i, int t);
+extern "C" int fl_input_get_textsize(INPUT i);
+extern "C" void fl_input_set_textsize(INPUT i, int t);
#endif
diff --git a/src/c_fl_slider.cpp b/src/c_fl_slider.cpp
index 8fdf2da..fe30e2b 100644
--- a/src/c_fl_slider.cpp
+++ b/src/c_fl_slider.cpp
@@ -71,22 +71,27 @@ void free_fl_slider(SLIDER s) {
void fl_slider_set_bounds(SLIDER s, double a, double b) {
- reinterpret_cast<My_Slider*>(s)->bounds(a,b);
+ reinterpret_cast<Fl_Slider*>(s)->bounds(a,b);
}
int fl_slider_get_slider(SLIDER s) {
- return reinterpret_cast<My_Slider*>(s)->slider();
+ return reinterpret_cast<Fl_Slider*>(s)->slider();
}
void fl_slider_set_slider(SLIDER s, int t) {
- reinterpret_cast<My_Slider*>(s)->slider(static_cast<Fl_Boxtype>(t));
+ reinterpret_cast<Fl_Slider*>(s)->slider(static_cast<Fl_Boxtype>(t));
}
float fl_slider_get_slider_size(SLIDER s) {
- return reinterpret_cast<My_Slider*>(s)->slider_size();
+ return reinterpret_cast<Fl_Slider*>(s)->slider_size();
}
void fl_slider_set_slider_size(SLIDER s, float t) {
- reinterpret_cast<My_Slider*>(s)->slider_size(t);
+ reinterpret_cast<Fl_Slider*>(s)->slider_size(t);
}
+int fl_slider_scrollvalue(SLIDER s, int p, int z, int f, int t) {
+ return reinterpret_cast<Fl_Slider*>(s)->scrollvalue(p,z,f,t);
+}
+
+
diff --git a/src/c_fl_slider.h b/src/c_fl_slider.h
index b3955f5..c06f209 100644
--- a/src/c_fl_slider.h
+++ b/src/c_fl_slider.h
@@ -30,6 +30,7 @@ extern "C" int fl_slider_get_slider(SLIDER s);
extern "C" void fl_slider_set_slider(SLIDER s, int t);
extern "C" float fl_slider_get_slider_size(SLIDER s);
extern "C" void fl_slider_set_slider_size(SLIDER s, float t);
+extern "C" int fl_slider_scrollvalue(SLIDER s, int p, int z, int f, int t);
#endif
diff --git a/src/c_fl_valuator.cpp b/src/c_fl_valuator.cpp
index 523379b..37f8ad8 100644
--- a/src/c_fl_valuator.cpp
+++ b/src/c_fl_valuator.cpp
@@ -62,53 +62,61 @@ void free_fl_valuator(VALUATOR v) {
double fl_valuator_clamp(VALUATOR v, double a) {
- return reinterpret_cast<My_Valuator*>(v)->clamp(a);
+ return reinterpret_cast<Fl_Valuator*>(v)->clamp(a);
}
double fl_valuator_round(VALUATOR v, double a) {
- return reinterpret_cast<My_Valuator*>(v)->round(a);
+ return reinterpret_cast<Fl_Valuator*>(v)->round(a);
}
double fl_valuator_increment(VALUATOR v, double a, int s) {
- return reinterpret_cast<My_Valuator*>(v)->increment(a,s);
+ return reinterpret_cast<Fl_Valuator*>(v)->increment(a,s);
}
double fl_valuator_get_minimum(VALUATOR v) {
- return reinterpret_cast<My_Valuator*>(v)->minimum();
+ return reinterpret_cast<Fl_Valuator*>(v)->minimum();
}
void fl_valuator_set_minimum(VALUATOR v, double t) {
- reinterpret_cast<My_Valuator*>(v)->minimum(t);
+ reinterpret_cast<Fl_Valuator*>(v)->minimum(t);
}
double fl_valuator_get_maximum(VALUATOR v) {
- return reinterpret_cast<My_Valuator*>(v)->maximum();
+ return reinterpret_cast<Fl_Valuator*>(v)->maximum();
}
void fl_valuator_set_maximum(VALUATOR v, double t) {
- reinterpret_cast<My_Valuator*>(v)->maximum(t);
+ reinterpret_cast<Fl_Valuator*>(v)->maximum(t);
+}
+
+double fl_valuator_get_step(VALUATOR v) {
+ return reinterpret_cast<Fl_Valuator*>(v)->step();
+}
+
+void fl_valuator_set_step(VALUATOR v, double t) {
+ reinterpret_cast<Fl_Valuator*>(v)->step(t);
}
double fl_valuator_get_value(VALUATOR v) {
- return reinterpret_cast<My_Valuator*>(v)->value();
+ return reinterpret_cast<Fl_Valuator*>(v)->value();
}
void fl_valuator_set_value(VALUATOR v, double t) {
- reinterpret_cast<My_Valuator*>(v)->value(t);
+ reinterpret_cast<Fl_Valuator*>(v)->value(t);
}
void fl_valuator_bounds(VALUATOR v, double a, double b) {
- reinterpret_cast<My_Valuator*>(v)->bounds(a,b);
+ reinterpret_cast<Fl_Valuator*>(v)->bounds(a,b);
}
void fl_valuator_precision(VALUATOR v, int s) {
- reinterpret_cast<My_Valuator*>(v)->precision(s);
+ reinterpret_cast<Fl_Valuator*>(v)->precision(s);
}
void fl_valuator_range(VALUATOR v, double a, double b) {
- reinterpret_cast<My_Valuator*>(v)->range(a,b);
+ reinterpret_cast<Fl_Valuator*>(v)->range(a,b);
}
diff --git a/src/c_fl_valuator.h b/src/c_fl_valuator.h
index 867e030..4a6bbe9 100644
--- a/src/c_fl_valuator.h
+++ b/src/c_fl_valuator.h
@@ -35,6 +35,8 @@ extern "C" double fl_valuator_get_minimum(VALUATOR v);
extern "C" void fl_valuator_set_minimum(VALUATOR v, double t);
extern "C" double fl_valuator_get_maximum(VALUATOR v);
extern "C" void fl_valuator_set_maximum(VALUATOR v, double t);
+extern "C" double fl_valuator_get_step(VALUATOR v);
+extern "C" void fl_valuator_set_step(VALUATOR v, double t);
extern "C" double fl_valuator_get_value(VALUATOR v);
extern "C" void fl_valuator_set_value(VALUATOR v, double t);
extern "C" void fl_valuator_bounds(VALUATOR v, double a, double b);
diff --git a/src/fltk-widgets-groups-color_choosers.adb b/src/fltk-widgets-groups-color_choosers.adb
index c47533a..dabcf00 100644
--- a/src/fltk-widgets-groups-color_choosers.adb
+++ b/src/fltk-widgets-groups-color_choosers.adb
@@ -240,6 +240,13 @@ package body FLTK.Widgets.Groups.Color_Choosers is
end Color_Was_Changed;
+ procedure Clear_Changed
+ (This : in out Color_Chooser) is
+ begin
+ This.Was_Changed := False;
+ end Clear_Changed;
+
+
function Get_Mode
diff --git a/src/fltk-widgets-groups-color_choosers.ads b/src/fltk-widgets-groups-color_choosers.ads
index 3cf4386..3af3fa4 100644
--- a/src/fltk-widgets-groups-color_choosers.ads
+++ b/src/fltk-widgets-groups-color_choosers.ads
@@ -64,6 +64,9 @@ package FLTK.Widgets.Groups.Color_Choosers is
(This : in Color_Chooser)
return Boolean;
+ procedure Clear_Changed
+ (This : in out Color_Chooser);
+
diff --git a/src/fltk-widgets-inputs-file.adb b/src/fltk-widgets-inputs-file.adb
index 4f7ffdf..cdbeca5 100644
--- a/src/fltk-widgets-inputs-file.adb
+++ b/src/fltk-widgets-inputs-file.adb
@@ -37,6 +37,29 @@ package body FLTK.Widgets.Inputs.File is
+ function fl_file_input_get_down_box
+ (F : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_file_input_get_down_box, "fl_file_input_get_down_box");
+
+ procedure fl_file_input_set_down_box
+ (F : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_file_input_set_down_box, "fl_file_input_set_down_box");
+
+ function fl_file_input_get_errorcolor
+ (F : in System.Address)
+ return Interfaces.C.unsigned;
+ pragma Import (C, fl_file_input_get_errorcolor, "fl_file_input_get_errorcolor");
+
+ procedure fl_file_input_set_errorcolor
+ (F : in System.Address;
+ T : in Interfaces.C.unsigned);
+ pragma Import (C, fl_file_input_set_errorcolor, "fl_file_input_set_errorcolor");
+
+
+
+
procedure fl_file_input_draw
(W : in System.Address);
pragma Import (C, fl_file_input_draw, "fl_file_input_draw");
@@ -92,6 +115,40 @@ package body FLTK.Widgets.Inputs.File is
+ function Get_Down_Box
+ (This : in File_Input)
+ return Box_Kind is
+ begin
+ return Box_Kind'Val (fl_file_input_get_down_box (This.Void_Ptr));
+ end Get_Down_Box;
+
+
+ procedure Set_Down_Box
+ (This : in out File_Input;
+ To : in Box_Kind) is
+ begin
+ fl_file_input_set_down_box (This.Void_Ptr, Box_Kind'Pos (To));
+ end Set_Down_Box;
+
+
+ function Get_Error_Color
+ (This : in File_Input)
+ return Color is
+ begin
+ return Color (fl_file_input_get_errorcolor (This.Void_Ptr));
+ end Get_Error_Color;
+
+
+ procedure Set_Error_Color
+ (This : in out File_Input;
+ To : in Color) is
+ begin
+ fl_file_input_set_errorcolor (This.Void_Ptr, Interfaces.C.unsigned (To));
+ end Set_Error_Color;
+
+
+
+
procedure Draw
(This : in out File_Input) is
begin
diff --git a/src/fltk-widgets-inputs-file.ads b/src/fltk-widgets-inputs-file.ads
index e3bdb45..3ef3561 100644
--- a/src/fltk-widgets-inputs-file.ads
+++ b/src/fltk-widgets-inputs-file.ads
@@ -20,6 +20,25 @@ package FLTK.Widgets.Inputs.File is
+ function Get_Down_Box
+ (This : in File_Input)
+ return Box_Kind;
+
+ procedure Set_Down_Box
+ (This : in out File_Input;
+ To : in Box_Kind);
+
+ function Get_Error_Color
+ (This : in File_Input)
+ return Color;
+
+ procedure Set_Error_Color
+ (This : in out File_Input;
+ To : in Color);
+
+
+
+
procedure Draw
(This : in out File_Input);
diff --git a/src/fltk-widgets-inputs.adb b/src/fltk-widgets-inputs.adb
index b5134ae..7e57a3e 100644
--- a/src/fltk-widgets-inputs.adb
+++ b/src/fltk-widgets-inputs.adb
@@ -7,6 +7,7 @@ with
use type
+ Interfaces.C.int,
System.Address;
@@ -37,6 +38,91 @@ package body FLTK.Widgets.Inputs is
+ function fl_input_copy
+ (I : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_copy, "fl_input_copy");
+
+ function fl_input_cut
+ (I : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_cut, "fl_input_cut");
+
+ function fl_input_cut2
+ (I : in System.Address;
+ B : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_cut2, "fl_input_cut2");
+
+ function fl_input_cut3
+ (I : in System.Address;
+ A, B : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_cut3, "fl_input_cut3");
+
+ function fl_input_copy_cuts
+ (I : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_copy_cuts, "fl_input_copy_cuts");
+
+
+
+
+ function fl_input_get_readonly
+ (I : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_get_readonly, "fl_input_get_readonly");
+
+ procedure fl_input_set_readonly
+ (I : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_input_set_readonly, "fl_input_set_readonly");
+
+
+
+
+ procedure fl_input_set_value
+ (I : in System.Address;
+ T : in Interfaces.C.char_array;
+ L : in Interfaces.C.int);
+ pragma Import (C, fl_input_set_value, "fl_input_set_value");
+
+
+
+
+ function fl_input_get_textcolor
+ (I : in System.Address)
+ return Interfaces.C.unsigned;
+ pragma Import (C, fl_input_get_textcolor, "fl_input_get_textcolor");
+
+ procedure fl_input_set_textcolor
+ (I : in System.Address;
+ T : in Interfaces.C.unsigned);
+ pragma Import (C, fl_input_set_textcolor, "fl_input_set_textcolor");
+
+ function fl_input_get_textfont
+ (I : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_get_textfont, "fl_input_get_textfont");
+
+ procedure fl_input_set_textfont
+ (I : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_input_set_textfont, "fl_input_set_textfont");
+
+ function fl_input_get_textsize
+ (I : in System.Address)
+ return Interfaces.C.int;
+ pragma Import (C, fl_input_get_textsize, "fl_input_get_textsize");
+
+ procedure fl_input_set_textsize
+ (I : in System.Address;
+ T : in Interfaces.C.int);
+ pragma Import (C, fl_input_set_textsize, "fl_input_set_textsize");
+
+
+
+
procedure fl_input_draw
(W : in System.Address);
pragma Import (C, fl_input_draw, "fl_input_draw");
@@ -94,6 +180,83 @@ package body FLTK.Widgets.Inputs is
+ procedure Copy
+ (This : in out Input) is
+ begin
+ This.Was_Changed := fl_input_copy (This.Void_Ptr) /= 0;
+ end Copy;
+
+
+ procedure Cut
+ (This : in out Input) is
+ begin
+ This.Was_Changed := fl_input_cut (This.Void_Ptr) /= 0;
+ end Cut;
+
+
+ procedure Cut
+ (This : in out Input;
+ Num_Bytes : in Integer) is
+ begin
+ This.Was_Changed := fl_input_cut2
+ (This.Void_Ptr,
+ Interfaces.C.int (Num_Bytes)) /= 0;
+ end Cut;
+
+
+ procedure Cut
+ (This : in out Input;
+ Start, Finish : in Integer) is
+ begin
+ This.Was_Changed := fl_input_cut3
+ (This.Void_Ptr,
+ Interfaces.C.int (Start),
+ Interfaces.C.int (Finish)) /= 0;
+ end Cut;
+
+
+ procedure Copy_Cuts
+ (This : in out Input) is
+ begin
+ This.Was_Changed := fl_input_copy_cuts (This.Void_Ptr) /= 0;
+ end Copy_Cuts;
+
+
+
+
+ function Has_Changed
+ (This : in Input)
+ return Boolean is
+ begin
+ return This.Was_Changed;
+ end Has_Changed;
+
+
+ procedure Clear_Changed
+ (This : in out Input) is
+ begin
+ This.Was_Changed := False;
+ end Clear_Changed;
+
+
+ function Is_Readonly
+ (This : in Input)
+ return Boolean is
+ begin
+ return fl_input_get_readonly (This.Void_Ptr) /= 0;
+ end Is_Readonly;
+
+
+ procedure Set_Readonly
+ (This : in out Input;
+ To : in Boolean) is
+ begin
+ fl_input_set_readonly (This.Void_Ptr, Boolean'Pos (To));
+ end Set_Readonly;
+
+
+
+
function Get_Value
(This : in Input)
return String is
@@ -102,6 +265,64 @@ package body FLTK.Widgets.Inputs is
end Get_Value;
+ procedure Set_Value
+ (This : in out Input;
+ To : in String) is
+ begin
+ fl_input_set_value (This.Void_Ptr, Interfaces.C.To_C (To), To'Length);
+ end Set_Value;
+
+
+
+
+ function Get_Text_Color
+ (This : in Input)
+ return Color is
+ begin
+ return Color (fl_input_get_textcolor (This.Void_Ptr));
+ end Get_Text_Color;
+
+
+ procedure Set_Text_Color
+ (This : in out Input;
+ To : in Color) is
+ begin
+ fl_input_set_textcolor (This.Void_Ptr, Interfaces.C.unsigned (To));
+ end Set_Text_Color;
+
+
+ function Get_Text_Font
+ (This : in Input)
+ return Font_Kind is
+ begin
+ return Font_Kind'Val (fl_input_get_textfont (This.Void_Ptr));
+ end Get_Text_Font;
+
+
+ procedure Set_Text_Font
+ (This : in out Input;
+ To : in Font_Kind) is
+ begin
+ fl_input_set_textfont (This.Void_Ptr, Font_Kind'Pos (To));
+ end Set_Text_Font;
+
+
+ function Get_Text_Size
+ (This : in Input)
+ return Font_Size is
+ begin
+ return Font_Size (fl_input_get_textsize (This.Void_Ptr));
+ end Get_Text_Size;
+
+
+ procedure Set_Text_Size
+ (This : in out Input;
+ To : in Font_Size) is
+ begin
+ fl_input_set_textsize (This.Void_Ptr, Interfaces.C.int (To));
+ end Set_Text_Size;
+
+
procedure Draw
diff --git a/src/fltk-widgets-inputs.ads b/src/fltk-widgets-inputs.ads
index 2531cfa..fc7b980 100644
--- a/src/fltk-widgets-inputs.ads
+++ b/src/fltk-widgets-inputs.ads
@@ -29,10 +29,79 @@ package FLTK.Widgets.Inputs is
+ procedure Copy
+ (This : in out Input);
+
+ procedure Cut
+ (This : in out Input);
+
+ procedure Cut
+ (This : in out Input;
+ Num_Bytes : in Integer);
+
+ procedure Cut
+ (This : in out Input;
+ Start, Finish : in Integer);
+
+ procedure Copy_Cuts
+ (This : in out Input);
+
+
+
+
+ function Has_Changed
+ (This : in Input)
+ return Boolean;
+
+ procedure Clear_Changed
+ (This : in out Input);
+
+ function Is_Readonly
+ (This : in Input)
+ return Boolean;
+
+ procedure Set_Readonly
+ (This : in out Input;
+ To : in Boolean);
+
+
+
+
function Get_Value
(This : in Input)
return String;
+ procedure Set_Value
+ (This : in out Input;
+ To : in String);
+
+
+
+
+ function Get_Text_Color
+ (This : in Input)
+ return Color;
+
+ procedure Set_Text_Color
+ (This : in out Input;
+ To : in Color);
+
+ function Get_Text_Font
+ (This : in Input)
+ return Font_Kind;
+
+ procedure Set_Text_Font
+ (This : in out Input;
+ To : in Font_Kind);
+
+ function Get_Text_Size
+ (This : in Input)
+ return Font_Size;
+
+ procedure Set_Text_Size
+ (This : in out Input;
+ To : in Font_Size);
+
@@ -48,7 +117,9 @@ package FLTK.Widgets.Inputs is
private
- type Input is new Widget with null record;
+ type Input is new Widget with record
+ Was_Changed : Boolean := False;
+ end record;
overriding procedure Finalize
(This : in out Input);
diff --git a/src/fltk-widgets-valuators-sliders.adb b/src/fltk-widgets-valuators-sliders.adb
index 1a8dbce..752a5aa 100644
--- a/src/fltk-widgets-valuators-sliders.adb
+++ b/src/fltk-widgets-valuators-sliders.adb
@@ -62,6 +62,12 @@ package body FLTK.Widgets.Valuators.Sliders is
T : in Interfaces.C.C_float);
pragma Import (C, fl_slider_set_slider_size, "fl_slider_set_slider_size");
+ function fl_slider_scrollvalue
+ (S : in System.Address;
+ P, Z, F, T : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_slider_scrollvalue, "fl_slider_scrollvalue");
+
@@ -163,6 +169,24 @@ package body FLTK.Widgets.Valuators.Sliders is
end Set_Slide_Size;
+ procedure Set_Scrollvalue
+ (This : in out Slider;
+ Pos_First_Line : in Natural;
+ Lines_In_Window : in Natural;
+ First_Line_Num : in Natural;
+ Total_Lines : in Natural)
+ is
+ Ignore_Me : Interfaces.C.int;
+ begin
+ Ignore_Me := fl_slider_scrollvalue
+ (This.Void_Ptr,
+ Interfaces.C.int (Pos_First_Line),
+ Interfaces.C.int (Lines_In_Window),
+ Interfaces.C.int (First_Line_Num),
+ Interfaces.C.int (Total_Lines));
+ end Set_Scrollvalue;
+
+
procedure Draw
diff --git a/src/fltk-widgets-valuators-sliders.ads b/src/fltk-widgets-valuators-sliders.ads
index 48be83d..fda69d2 100644
--- a/src/fltk-widgets-valuators-sliders.ads
+++ b/src/fltk-widgets-valuators-sliders.ads
@@ -40,6 +40,13 @@ package FLTK.Widgets.Valuators.Sliders is
(This : in out Slider;
To : in Float);
+ procedure Set_Scrollvalue
+ (This : in out Slider;
+ Pos_First_Line : in Natural;
+ Lines_In_Window : in Natural;
+ First_Line_Num : in Natural;
+ Total_Lines : in Natural);
+
diff --git a/src/fltk-widgets-valuators.adb b/src/fltk-widgets-valuators.adb
index 47c6f06..5cb821d 100644
--- a/src/fltk-widgets-valuators.adb
+++ b/src/fltk-widgets-valuators.adb
@@ -79,6 +79,16 @@ package body FLTK.Widgets.Valuators is
D : in Interfaces.C.double);
pragma Import (C, fl_valuator_set_maximum, "fl_valuator_set_maximum");
+ function fl_valuator_get_step
+ (V : in System.Address)
+ return Interfaces.C.double;
+ pragma Import (C, fl_valuator_get_step, "fl_valuator_get_step");
+
+ procedure fl_valuator_set_step
+ (V : in System.Address;
+ T : in Interfaces.C.double);
+ pragma Import (C, fl_valuator_set_step, "fl_valuator_set_step");
+
function fl_valuator_get_value
(V : in System.Address)
return Interfaces.C.double;
@@ -223,6 +233,22 @@ package body FLTK.Widgets.Valuators is
end Set_Maximum;
+ function Get_Step
+ (This : in Valuator)
+ return Long_Float is
+ begin
+ return Long_Float (fl_valuator_get_step (This.Void_Ptr));
+ end Get_Step;
+
+
+ procedure Set_Step
+ (This : in out Valuator;
+ To : in Long_Float) is
+ begin
+ fl_valuator_set_step (This.Void_Ptr, Interfaces.C.double (To));
+ end Set_Step;
+
+
function Get_Value
(This : in Valuator)
return Long_Float is
diff --git a/src/fltk-widgets-valuators.ads b/src/fltk-widgets-valuators.ads
index dafcfc3..da22f79 100644
--- a/src/fltk-widgets-valuators.ads
+++ b/src/fltk-widgets-valuators.ads
@@ -55,6 +55,14 @@ package FLTK.Widgets.Valuators is
(This : in out Valuator;
To : in Long_Float);
+ function Get_Step
+ (This : in Valuator)
+ return Long_Float;
+
+ procedure Set_Step
+ (This : in out Valuator;
+ To : in Long_Float);
+
function Get_Value
(This : in Valuator)
return Long_Float;