diff options
36 files changed, 1440 insertions, 101 deletions
diff --git a/doc/fl_adjuster.html b/doc/fl_adjuster.html new file mode 100644 index 0000000..3fdbfa9 --- /dev/null +++ b/doc/fl_adjuster.html @@ -0,0 +1,110 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Adjuster Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Adjuster Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Adjuster</td> + <td>FLTK.Widgets.Valuators.Adjusters</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Adjuster</td> + <td>Adjuster</td> + </tr> + + <tr> + <td> </td> + <td>Adjuster_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Adjuster(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 Adjuster; +</pre></td> + </tr> + + <tr> +<td><pre> +void draw(); +</pre></td> +<td><pre> +procedure Draw + (This : in out Adjuster); +</pre></td> + </tr> + + <tr> +<td><pre> +int handle(int); +</pre></td> +<td><pre> +function Handle + (This : in out Adjuster; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + + <tr> +<td><pre> +void soft(int s); +</pre></td> +<td><pre> +procedure Set_Soft + (This : in out Adjuster; + To : in Boolean); +</pre></td> + </tr> + + <tr> +<td><pre> +int soft() const; +</pre></td> +<td><pre> +function Is_Soft + (This : in Adjuster) + return Boolean; +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_counter.html b/doc/fl_counter.html new file mode 100644 index 0000000..fce7fa4 --- /dev/null +++ b/doc/fl_counter.html @@ -0,0 +1,203 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Counter Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Counter Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Counter</td> + <td>FLTK.Widgets.Valuators.Counters</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Counter</td> + <td>Counter</td> + </tr> + + <tr> + <td> </td> + <td>Counter_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Counter(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 Counter; +</pre></td> + </tr> + + <tr> +<td><pre> +void draw(); +</pre></td> +<td><pre> +procedure Draw + (This : in out Counter); +</pre></td> + </tr> + + <tr> +<td><pre> +int handle(int); +</pre></td> +<td><pre> +function Handle + (This : in out Counter; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + + <tr> +<td><pre> +void lstep(double a); +</pre></td> +<td><pre> +procedure Set_Long_Step + (This : in out Counter; + To : in Long_Float); +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +function Get_Long_Step + (This : in Counter) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +void step(double a, double b); +</pre></td> +<td> </td> + </tr> + + <tr> +<td><pre> +void step(double a); +</pre></td> +<td><pre> +procedure Set_Step + (This : in out Counter; + To : in Long_Float); +</pre></td> + </tr> + + <tr> +<td><pre> +double step() const; +</pre></td> +<td><pre> +function Get_Step + (This : in Counter) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +Fl_Color textcolor() const; +</pre></td> +<td><pre> +function Get_Text_Color + (This : in Counter) + return Color; +</pre></td> + </tr> + + <tr> +<td><pre> +void textcolor(Fl_Color s); +</pre></td> +<td><pre> +procedure Set_Text_Color + (This : in out Counter; + To : in Color); +</pre></td> + </tr> + + <tr> +<td><pre> +Fl_Font textfont() const; +</pre></td> +<td><pre> +function Get_Text_Font + (This : in Counter) + 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 Counter; + To : in Font_Kind); +</pre></td> + </tr> + + <tr> +<td><pre> +Fl_Fontsize textsize() const; +</pre></td> +<td><pre> +function Get_Text_Size + (This : in Counter) + 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 Counter; + To : in Font_Size); +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_dial.html b/doc/fl_dial.html new file mode 100644 index 0000000..9c54e4b --- /dev/null +++ b/doc/fl_dial.html @@ -0,0 +1,166 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Dial Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Dial Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Dial</td> + <td>FLTK.Widgets.Valuators.Dials</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Dial</td> + <td>Dial</td> + </tr> + + <tr> + <td> </td> + <td>Dial_Reference</td> + </tr> + + <tr> + <td> </td> + <td>Dial_Kind</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Dial(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 Dial; +</pre></td> + </tr> + + <tr> +<td><pre> +short angle1() const; +</pre></td> +<td><pre> +function Get_First_Angle + (This : in Dial) + return Integer; +</pre></td> + </tr> + + <tr> +<td><pre> +void angle1(short a); +</pre></td> +<td><pre> +procedure Set_First_Angle + (This : in out Dial; + To : in Integer); +</pre></td> + </tr> + + <tr> +<td><pre> +short angle2() const; +</pre></td> +<td><pre> +function Get_Second_Angle + (This : in Dial) + return Integer; +</pre></td> + </tr> + + <tr> +<td><pre> +void angle2(short a); +</pre></td> +<td><pre> +procedure Set_Second_Angle + (This : in out Dial; + To : in Integer); +</pre></td> + </tr> + + <tr> +<td><pre> +void angles(short a, short b); +</pre></td> +<td><pre> +procedure Set_Angles + (This : in out Dial; + One, Two : in Integer); +</pre></td> + </tr> + + <tr> +<td><pre> +void draw(); +</pre></td> +<td><pre> +procedure Draw + (This : in out Dial); +</pre></td> + </tr> + + <tr> +<td><pre> +int handle(int); +</pre></td> +<td><pre> +function Handle + (This : in out Dial; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + + <tr> +<td>See type() methods for Fl_Widget</td> +<td><pre> +function Get_Dial_Type + (This : in Dial) + return Dial_Kind; +</pre></td> + </tr> + + <tr> +<td>See type() methods for Fl_Widget</td> +<td><pre> +procedure Set_Dial_Type + (This : in out Dial; + To : in Dial_Kind); +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_fill_dial.html b/doc/fl_fill_dial.html new file mode 100644 index 0000000..26c50b5 --- /dev/null +++ b/doc/fl_fill_dial.html @@ -0,0 +1,84 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Fill_Dial Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Fill_Dial Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Fill_Dial</td> + <td>FLTK.Widgets.Valuators.Dials.Fill</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Fill_Dial</td> + <td>Fill_Dial</td> + </tr> + + <tr> + <td> </td> + <td>Fill_Dial_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Fill_Dial(int X, int Y, int W, int H, const char *L); +</pre></td> +<td><pre> +function Create + (X, Y, W, H : in Integer; + Text : in String) + return Fill_Dial; +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +procedure Draw + (This : in out Fill_Dial); +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +function Handle + (This : in out Fill_Dial; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_line_dial.html b/doc/fl_line_dial.html new file mode 100644 index 0000000..9020bad --- /dev/null +++ b/doc/fl_line_dial.html @@ -0,0 +1,84 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Line_Dial Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Line_Dial Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Line_Dial</td> + <td>FLTK.Widgets.Valuators.Dials.Line</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Line_Dial</td> + <td>Line_Dial</td> + </tr> + + <tr> + <td> </td> + <td>Line_Dial_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Line_Dial(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 Line_Dial; +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +procedure Draw + (This : in out Line_Dial); +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +function Handle + (This : in out Line_Dial; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_roller.html b/doc/fl_roller.html new file mode 100644 index 0000000..fb0b6cc --- /dev/null +++ b/doc/fl_roller.html @@ -0,0 +1,88 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Roller Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Roller Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Roller</td> + <td>FLTK.Widgets.Valuators.Rollers</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Roller</td> + <td>Roller</td> + </tr> + + <tr> + <td> </td> + <td>Roller_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Roller(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 Roller; +</pre></td> + </tr> + + <tr> +<td><pre> +void draw(); +</pre></td> +<td><pre> +procedure Draw + (This : in out Roller); +</pre></td> + </tr> + + <tr> +<td><pre> +int handle(int); +</pre></td> +<td><pre> +function Handle + (This : in out Roller; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_simple_counter.html b/doc/fl_simple_counter.html new file mode 100644 index 0000000..2961598 --- /dev/null +++ b/doc/fl_simple_counter.html @@ -0,0 +1,84 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Simple_Counter Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Simple_Counter Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Simple_Counter</td> + <td>FLTK.Widgets.Valuators.Counters.Simple</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Simple_Counter</td> + <td>Simple_Counter</td> + </tr> + + <tr> + <td> </td> + <td>Simple_Counter_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Simple_Counter(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 Simple_Counter; +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +procedure Draw + (This : in out Simple_Counter); +</pre></td> + </tr> + + <tr> +<td> </td> +<td><pre> +function Handle + (This : in out Simple_Counter; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/doc/fl_valuator.html b/doc/fl_valuator.html new file mode 100644 index 0000000..81e374b --- /dev/null +++ b/doc/fl_valuator.html @@ -0,0 +1,255 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Fl_Valuator Binding Map</title> + <link href="map.css" rel="stylesheet"> + </head> + + <body> + + +<h2>Fl_Valuator Binding Map</h2> + + +<table class="package"> + <tr><th colspan="2">Package name</th></tr> + + <tr> + <td>Fl_Valuator</td> + <td>FLTK.Widgets.Valuators</td> + </tr> + +</table> + + + +<table class="type"> + <tr><th colspan="2">Types</th></tr> + + <tr> + <td>Fl_Valuator</td> + <td>Valuator</td> + </tr> + + <tr> + <td> </td> + <td>Valuator_Reference</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + + <tr> +<td><pre> +Fl_Valuator(int X, int Y, int W, int H, const char *L); +</pre></td> +<td><pre> +function Create + (X, Y, W, H : in Integer; + Text : in String) + return Valuator; +</pre></td> + </tr> + + <tr> +<td><pre> +void bounds(double a, double b); +</pre></td> +<td><pre> +procedure Set_Bounds + (This : in out Valuator; + Min, Max : in Long_Float); +</pre></td> + </tr> + + <tr> +<td><pre> +double clamp(double); +</pre></td> +<td><pre> +function Clamp + (This : in Valuator; + Input : in Long_Float) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +virtual int format(char *); +</pre></td> +<td> </td> + </tr> + + <tr> +<td> </td> +<td><pre> +function Handle + (This : in out Valuator; + Event : in Event_Kind) + return Event_Outcome; +</pre></td> + </tr> + + <tr> +<td><pre> +double increment(double, int); +</pre></td> +<td><pre> +function Increment + (This : in Valuator; + Input : in Long_Float; + Step : in Integer) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +double maximum() const; +</pre></td> +<td><pre> +function Get_Maximum + (This : in Valuator) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +void maximum(double a); +</pre></td> +<td><pre> +procedure Set_Maximum + (This : in out Valuator; + To : in Long_Float); +</pre></td> + </tr> + + <tr> +<td><pre> +double minimum() const; +</pre></td> +<td><pre> +function Get_Minimum + (This : in Valuator) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +void minimum(double a); +</pre></td> +<td><pre> +procedure Set_Minimum + (This : in out Valuator; + To : in Long_Float); +</pre></td> + </tr> + + <tr> +<td><pre> +void precision(int digits); +</pre></td> +<td><pre> +procedure Set_Precision + (This : in out Valuator; + To : in Integer); +</pre></td> + </tr> + + <tr> +<td><pre> +void range(double a, double b); +</pre></td> +<td><pre> +procedure Set_Range + (This : in out Valuator; + Min, Max : in Long_Float); +</pre></td> + </tr> + + <tr> +<td><pre> +double round(double; +</pre></td> +<td><pre> +function Round + (This : in Valuator; + Input : in Long_Float) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +void step(int a); +</pre></td> +<td> </td> + </tr> + + <tr> +<td><pre> +void step(double a, int b); +</pre></td> +<td> </td> + </tr> + + <tr> +<td><pre> +void step(double s); +</pre></td> +<td><pre> +procedure Set_Step + (This : in out Valuator; + To : in Long_Float); +</pre></td> + </tr> + + <tr> +<td><pre> +double step() const; +</pre></td> +<td><pre> +function Get_Step + (This : in Valuator) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +double value() const; +</pre></td> +<td><pre> +function Get_Value + (This : in Valuator) + return Long_Float; +</pre></td> + </tr> + + <tr> +<td><pre> +int value(double); +</pre></td> +<td><pre> +procedure Set_Value + (This : in out Valuator; + To : in Long_Float); +</pre></td> + </tr> + +</table> + + + </body> +</html> + diff --git a/progress.txt b/progress.txt index 75c5bc4..6bbb47b 100644 --- a/progress.txt +++ b/progress.txt @@ -40,6 +40,14 @@ FLTK.Widgets.Inputs.Multiline FLTK.Widgets.Inputs.Outputs FLTK.Widgets.Inputs.Outputs.Multiline FLTK.Widgets.Inputs.Secret +FLTK.Widgets.Valuators +FLTK.Widgets.Valuators.Adjusters +FLTK.Widgets.Valuators.Counters +FLTK.Widgets.Valuators.Counters.Simple +FLTK.Widgets.Valuators.Dials +FLTK.Widgets.Valuators.Dials.Fill +FLTK.Widgets.Valuators.Dials.Line +FLTK.Widgets.Valuators.Rollers @@ -73,14 +81,6 @@ FLTK.Widgets.Groups.Wizards FLTK.Widgets.Menus.Menu_Bars FLTK.Widgets.Menus.Menu_Buttons FLTK.Widgets.Progress_Bars -FLTK.Widgets.Valuators -FLTK.Widgets.Valuators.Adjusters -FLTK.Widgets.Valuators.Counters -FLTK.Widgets.Valuators.Counters.Simple -FLTK.Widgets.Valuators.Dials -FLTK.Widgets.Valuators.Dials.Fill -FLTK.Widgets.Valuators.Dials.Line -FLTK.Widgets.Valuators.Rollers FLTK.Widgets.Valuators.Sliders FLTK.Widgets.Valuators.Sliders.Fill FLTK.Widgets.Valuators.Sliders.Hor_Fill diff --git a/src/c_fl_adjuster.cpp b/src/c_fl_adjuster.cpp index 36d7858..209058c 100644 --- a/src/c_fl_adjuster.cpp +++ b/src/c_fl_adjuster.cpp @@ -71,10 +71,10 @@ void free_fl_adjuster(ADJUSTER a) { int fl_adjuster_is_soft(ADJUSTER a) { - return reinterpret_cast<My_Adjuster*>(a)->soft(); + return reinterpret_cast<Fl_Adjuster*>(a)->soft(); } void fl_adjuster_set_soft(ADJUSTER a, int t) { - reinterpret_cast<My_Adjuster*>(a)->soft(t); + reinterpret_cast<Fl_Adjuster*>(a)->soft(t); } diff --git a/src/c_fl_adjuster.h b/src/c_fl_adjuster.h index 53a84eb..61cc549 100644 --- a/src/c_fl_adjuster.h +++ b/src/c_fl_adjuster.h @@ -11,22 +11,22 @@ typedef void* ADJUSTER; -extern "C" void adjuster_set_draw_hook(ADJUSTER a, void * d); -extern "C" void fl_adjuster_draw(ADJUSTER a); -extern "C" void adjuster_set_handle_hook(ADJUSTER a, void * h); -extern "C" int fl_adjuster_handle(ADJUSTER a, int e); +extern "C" inline void adjuster_set_draw_hook(ADJUSTER a, void * d); +extern "C" inline void fl_adjuster_draw(ADJUSTER a); +extern "C" inline void adjuster_set_handle_hook(ADJUSTER a, void * h); +extern "C" inline int fl_adjuster_handle(ADJUSTER a, int e); -extern "C" ADJUSTER new_fl_adjuster(int x, int y, int w, int h, char* label); -extern "C" void free_fl_adjuster(ADJUSTER a); +extern "C" inline ADJUSTER new_fl_adjuster(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_adjuster(ADJUSTER a); -extern "C" int fl_adjuster_is_soft(ADJUSTER a); -extern "C" void fl_adjuster_set_soft(ADJUSTER a, int t); +extern "C" inline int fl_adjuster_is_soft(ADJUSTER a); +extern "C" inline void fl_adjuster_set_soft(ADJUSTER a, int t); #endif diff --git a/src/c_fl_counter.cpp b/src/c_fl_counter.cpp index 1b18374..7e594f2 100644 --- a/src/c_fl_counter.cpp +++ b/src/c_fl_counter.cpp @@ -71,41 +71,41 @@ void free_fl_counter(COUNTER c) { double fl_counter_get_step(COUNTER c) { - return reinterpret_cast<My_Counter*>(c)->step(); + return reinterpret_cast<Fl_Counter*>(c)->step(); } void fl_counter_set_step(COUNTER c, double t) { - reinterpret_cast<My_Counter*>(c)->step(t); + reinterpret_cast<Fl_Counter*>(c)->step(t); } void fl_counter_set_lstep(COUNTER c, double t) { - reinterpret_cast<My_Counter*>(c)->lstep(t); + reinterpret_cast<Fl_Counter*>(c)->lstep(t); } unsigned int fl_counter_get_textcolor(COUNTER c) { - return reinterpret_cast<My_Counter*>(c)->textcolor(); + return reinterpret_cast<Fl_Counter*>(c)->textcolor(); } void fl_counter_set_textcolor(COUNTER c, unsigned int t) { - reinterpret_cast<My_Counter*>(c)->textcolor(t); + reinterpret_cast<Fl_Counter*>(c)->textcolor(t); } int fl_counter_get_textfont(COUNTER c) { - return reinterpret_cast<My_Counter*>(c)->textfont(); + return reinterpret_cast<Fl_Counter*>(c)->textfont(); } void fl_counter_set_textfont(COUNTER c, int t) { - reinterpret_cast<My_Counter*>(c)->textfont(t); + reinterpret_cast<Fl_Counter*>(c)->textfont(t); } int fl_counter_get_textsize(COUNTER c) { - return reinterpret_cast<My_Counter*>(c)->textsize(); + return reinterpret_cast<Fl_Counter*>(c)->textsize(); } void fl_counter_set_textsize(COUNTER c, int t) { - reinterpret_cast<My_Counter*>(c)->textsize(t); + reinterpret_cast<Fl_Counter*>(c)->textsize(t); } diff --git a/src/c_fl_counter.h b/src/c_fl_counter.h index 97e7a50..b4a8031 100644 --- a/src/c_fl_counter.h +++ b/src/c_fl_counter.h @@ -11,31 +11,31 @@ typedef void* COUNTER; -extern "C" void counter_set_draw_hook(COUNTER c, void * d); -extern "C" void fl_counter_draw(COUNTER c); -extern "C" void counter_set_handle_hook(COUNTER c, void * h); -extern "C" int fl_counter_handle(COUNTER c, int e); +extern "C" inline void counter_set_draw_hook(COUNTER c, void * d); +extern "C" inline void fl_counter_draw(COUNTER c); +extern "C" inline void counter_set_handle_hook(COUNTER c, void * h); +extern "C" inline int fl_counter_handle(COUNTER c, int e); -extern "C" COUNTER new_fl_counter(int x, int y, int w, int h, char* label); -extern "C" void free_fl_counter(COUNTER c); +extern "C" inline COUNTER new_fl_counter(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_counter(COUNTER c); -extern "C" double fl_counter_get_step(COUNTER c); -extern "C" void fl_counter_set_step(COUNTER c, double t); -extern "C" void fl_counter_set_lstep(COUNTER c, double t); +extern "C" inline double fl_counter_get_step(COUNTER c); +extern "C" inline void fl_counter_set_step(COUNTER c, double t); +extern "C" inline void fl_counter_set_lstep(COUNTER c, double t); -extern "C" unsigned int fl_counter_get_textcolor(COUNTER c); -extern "C" void fl_counter_set_textcolor(COUNTER c, unsigned int t); -extern "C" int fl_counter_get_textfont(COUNTER c); -extern "C" void fl_counter_set_textfont(COUNTER c, int t); -extern "C" int fl_counter_get_textsize(COUNTER c); -extern "C" void fl_counter_set_textsize(COUNTER c, int t); +extern "C" inline unsigned int fl_counter_get_textcolor(COUNTER c); +extern "C" inline void fl_counter_set_textcolor(COUNTER c, unsigned int t); +extern "C" inline int fl_counter_get_textfont(COUNTER c); +extern "C" inline void fl_counter_set_textfont(COUNTER c, int t); +extern "C" inline int fl_counter_get_textsize(COUNTER c); +extern "C" inline void fl_counter_set_textsize(COUNTER c, int t); #endif diff --git a/src/c_fl_dial.cpp b/src/c_fl_dial.cpp index 1e88750..3ec28a0 100644 --- a/src/c_fl_dial.cpp +++ b/src/c_fl_dial.cpp @@ -70,23 +70,34 @@ void free_fl_dial(DIAL v) { +int fl_dial_get_type(DIAL v) { + return reinterpret_cast<Fl_Dial*>(v)->type(); +} + +void fl_dial_set_type(DIAL v, int t) { + reinterpret_cast<Fl_Dial*>(v)->type(t); +} + + + + int fl_dial_get_angle1(DIAL v) { - return reinterpret_cast<My_Dial*>(v)->angle1(); + return reinterpret_cast<Fl_Dial*>(v)->angle1(); } void fl_dial_set_angle1(DIAL v, int t) { - reinterpret_cast<My_Dial*>(v)->angle1(t); + reinterpret_cast<Fl_Dial*>(v)->angle1(t); } int fl_dial_get_angle2(DIAL v) { - return reinterpret_cast<My_Dial*>(v)->angle2(); + return reinterpret_cast<Fl_Dial*>(v)->angle2(); } void fl_dial_set_angle2(DIAL v, int t) { - reinterpret_cast<My_Dial*>(v)->angle2(t); + reinterpret_cast<Fl_Dial*>(v)->angle2(t); } void fl_dial_set_angles(DIAL v, int a, int b) { - reinterpret_cast<My_Dial*>(v)->angles(a,b); + reinterpret_cast<Fl_Dial*>(v)->angles(a,b); } diff --git a/src/c_fl_dial.h b/src/c_fl_dial.h index 888dcca..f134e78 100644 --- a/src/c_fl_dial.h +++ b/src/c_fl_dial.h @@ -11,25 +11,29 @@ typedef void* DIAL; -extern "C" void dial_set_draw_hook(DIAL v, void * d); -extern "C" void fl_dial_draw(DIAL v); -extern "C" void dial_set_handle_hook(DIAL v, void * h); -extern "C" int fl_dial_handle(DIAL v, int e); +extern "C" inline void dial_set_draw_hook(DIAL v, void * d); +extern "C" inline void fl_dial_draw(DIAL v); +extern "C" inline void dial_set_handle_hook(DIAL v, void * h); +extern "C" inline int fl_dial_handle(DIAL v, int e); -extern "C" DIAL new_fl_dial(int x, int y, int w, int h, char* label); -extern "C" void free_fl_dial(DIAL v); +extern "C" inline DIAL new_fl_dial(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_dial(DIAL v); -extern "C" int fl_dial_get_angle1(DIAL v); -extern "C" void fl_dial_set_angle1(DIAL v, int t); -extern "C" int fl_dial_get_angle2(DIAL v); -extern "C" void fl_dial_set_angle2(DIAL v, int t); -extern "C" void fl_dial_set_angles(DIAL v, int a, int b); +extern "C" inline int fl_dial_get_type(DIAL v); +extern "C" inline void fl_dial_set_type(DIAL v, int t); + + +extern "C" inline int fl_dial_get_angle1(DIAL v); +extern "C" inline void fl_dial_set_angle1(DIAL v, int t); +extern "C" inline int fl_dial_get_angle2(DIAL v); +extern "C" inline void fl_dial_set_angle2(DIAL v, int t); +extern "C" inline void fl_dial_set_angles(DIAL v, int a, int b); #endif diff --git a/src/c_fl_fill_dial.h b/src/c_fl_fill_dial.h index 39dced5..4830cf5 100644 --- a/src/c_fl_fill_dial.h +++ b/src/c_fl_fill_dial.h @@ -11,16 +11,16 @@ typedef void* FILL_DIAL; -extern "C" void fill_dial_set_draw_hook(FILL_DIAL v, void * d); -extern "C" void fl_fill_dial_draw(FILL_DIAL v); -extern "C" void fill_dial_set_handle_hook(FILL_DIAL v, void * h); -extern "C" int fl_fill_dial_handle(FILL_DIAL v, int e); +extern "C" inline void fill_dial_set_draw_hook(FILL_DIAL v, void * d); +extern "C" inline void fl_fill_dial_draw(FILL_DIAL v); +extern "C" inline void fill_dial_set_handle_hook(FILL_DIAL v, void * h); +extern "C" inline int fl_fill_dial_handle(FILL_DIAL v, int e); -extern "C" FILL_DIAL new_fl_fill_dial(int x, int y, int w, int h, char* label); -extern "C" void free_fl_fill_dial(FILL_DIAL v); +extern "C" inline FILL_DIAL new_fl_fill_dial(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_fill_dial(FILL_DIAL v); #endif diff --git a/src/c_fl_line_dial.h b/src/c_fl_line_dial.h index 0056939..ef2ce9f 100644 --- a/src/c_fl_line_dial.h +++ b/src/c_fl_line_dial.h @@ -11,16 +11,16 @@ typedef void* LINE_DIAL; -extern "C" void line_dial_set_draw_hook(LINE_DIAL v, void * d); -extern "C" void fl_line_dial_draw(LINE_DIAL v); -extern "C" void line_dial_set_handle_hook(LINE_DIAL v, void * h); -extern "C" int fl_line_dial_handle(LINE_DIAL v, int e); +extern "C" inline void line_dial_set_draw_hook(LINE_DIAL v, void * d); +extern "C" inline void fl_line_dial_draw(LINE_DIAL v); +extern "C" inline void line_dial_set_handle_hook(LINE_DIAL v, void * h); +extern "C" inline int fl_line_dial_handle(LINE_DIAL v, int e); -extern "C" LINE_DIAL new_fl_line_dial(int x, int y, int w, int h, char* label); -extern "C" void free_fl_line_dial(LINE_DIAL v); +extern "C" inline LINE_DIAL new_fl_line_dial(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_line_dial(LINE_DIAL v); #endif diff --git a/src/c_fl_roller.h b/src/c_fl_roller.h index 1820eee..fa76d24 100644 --- a/src/c_fl_roller.h +++ b/src/c_fl_roller.h @@ -11,16 +11,16 @@ typedef void* ROLLER; -extern "C" void roller_set_draw_hook(ROLLER r, void * d); -extern "C" void fl_roller_draw(ROLLER r); -extern "C" void roller_set_handle_hook(ROLLER r, void * h); -extern "C" int fl_roller_handle(ROLLER r, int e); +extern "C" inline void roller_set_draw_hook(ROLLER r, void * d); +extern "C" inline void fl_roller_draw(ROLLER r); +extern "C" inline void roller_set_handle_hook(ROLLER r, void * h); +extern "C" inline int fl_roller_handle(ROLLER r, int e); -extern "C" ROLLER new_fl_roller(int x, int y, int w, int h, char* label); -extern "C" void free_fl_roller(ROLLER r); +extern "C" inline ROLLER new_fl_roller(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_roller(ROLLER r); #endif diff --git a/src/c_fl_simple_counter.h b/src/c_fl_simple_counter.h index 54c5f19..732e8f3 100644 --- a/src/c_fl_simple_counter.h +++ b/src/c_fl_simple_counter.h @@ -11,16 +11,16 @@ typedef void* SIMPLE_COUNTER; -extern "C" void simple_counter_set_draw_hook(SIMPLE_COUNTER c, void * d); -extern "C" void fl_simple_counter_draw(SIMPLE_COUNTER c); -extern "C" void simple_counter_set_handle_hook(SIMPLE_COUNTER c, void * h); -extern "C" int fl_simple_counter_handle(SIMPLE_COUNTER c, int e); +extern "C" inline void simple_counter_set_draw_hook(SIMPLE_COUNTER c, void * d); +extern "C" inline void fl_simple_counter_draw(SIMPLE_COUNTER c); +extern "C" inline void simple_counter_set_handle_hook(SIMPLE_COUNTER c, void * h); +extern "C" inline int fl_simple_counter_handle(SIMPLE_COUNTER c, int e); -extern "C" SIMPLE_COUNTER new_fl_simple_counter(int x, int y, int w, int h, char* label); -extern "C" void free_fl_simple_counter(SIMPLE_COUNTER c); +extern "C" inline SIMPLE_COUNTER new_fl_simple_counter(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_simple_counter(SIMPLE_COUNTER c); #endif diff --git a/src/c_fl_valuator.h b/src/c_fl_valuator.h index 4a6bbe9..18218bc 100644 --- a/src/c_fl_valuator.h +++ b/src/c_fl_valuator.h @@ -11,37 +11,37 @@ typedef void* VALUATOR; -extern "C" void valuator_set_draw_hook(VALUATOR v, void * d); -extern "C" void valuator_set_handle_hook(VALUATOR v, void * h); -extern "C" int fl_valuator_handle(VALUATOR v, int e); +extern "C" inline void valuator_set_draw_hook(VALUATOR v, void * d); +extern "C" inline void valuator_set_handle_hook(VALUATOR v, void * h); +extern "C" inline int fl_valuator_handle(VALUATOR v, int e); -extern "C" VALUATOR new_fl_valuator(int x, int y, int w, int h, char* label); -extern "C" void free_fl_valuator(VALUATOR v); +extern "C" inline VALUATOR new_fl_valuator(int x, int y, int w, int h, char* label); +extern "C" inline void free_fl_valuator(VALUATOR v); -extern "C" double fl_valuator_clamp(VALUATOR v, double a); -extern "C" double fl_valuator_round(VALUATOR v, double a); -extern "C" double fl_valuator_increment(VALUATOR v, double a, int s); +extern "C" inline double fl_valuator_clamp(VALUATOR v, double a); +extern "C" inline double fl_valuator_round(VALUATOR v, double a); +extern "C" inline double fl_valuator_increment(VALUATOR v, double a, int s); -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); -extern "C" void fl_valuator_precision(VALUATOR v, int s); -extern "C" void fl_valuator_range(VALUATOR v, double a, double b); +extern "C" inline double fl_valuator_get_minimum(VALUATOR v); +extern "C" inline void fl_valuator_set_minimum(VALUATOR v, double t); +extern "C" inline double fl_valuator_get_maximum(VALUATOR v); +extern "C" inline void fl_valuator_set_maximum(VALUATOR v, double t); +extern "C" inline double fl_valuator_get_step(VALUATOR v); +extern "C" inline void fl_valuator_set_step(VALUATOR v, double t); +extern "C" inline double fl_valuator_get_value(VALUATOR v); +extern "C" inline void fl_valuator_set_value(VALUATOR v, double t); +extern "C" inline void fl_valuator_bounds(VALUATOR v, double a, double b); +extern "C" inline void fl_valuator_precision(VALUATOR v, int s); +extern "C" inline void fl_valuator_range(VALUATOR v, double a, double b); #endif diff --git a/src/fltk-widgets-valuators-adjusters.adb b/src/fltk-widgets-valuators-adjusters.adb index 569f6dd..f91ffff 100644 --- a/src/fltk-widgets-valuators-adjusters.adb +++ b/src/fltk-widgets-valuators-adjusters.adb @@ -17,10 +17,12 @@ package body FLTK.Widgets.Valuators.Adjusters is procedure adjuster_set_draw_hook (W, D : in System.Address); pragma Import (C, adjuster_set_draw_hook, "adjuster_set_draw_hook"); + pragma Inline (adjuster_set_draw_hook); procedure adjuster_set_handle_hook (W, H : in System.Address); pragma Import (C, adjuster_set_handle_hook, "adjuster_set_handle_hook"); + pragma Inline (adjuster_set_handle_hook); @@ -30,10 +32,12 @@ package body FLTK.Widgets.Valuators.Adjusters is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_adjuster, "new_fl_adjuster"); + pragma Inline (new_fl_adjuster); procedure free_fl_adjuster (A : in System.Address); pragma Import (C, free_fl_adjuster, "free_fl_adjuster"); + pragma Inline (free_fl_adjuster); @@ -42,11 +46,13 @@ package body FLTK.Widgets.Valuators.Adjusters is (A : in System.Address) return Interfaces.C.int; pragma Import (C, fl_adjuster_is_soft, "fl_adjuster_is_soft"); + pragma Inline (fl_adjuster_is_soft); procedure fl_adjuster_set_soft (A : in System.Address; T : in Interfaces.C.int); pragma Import (C, fl_adjuster_set_soft, "fl_adjuster_set_soft"); + pragma Inline (fl_adjuster_set_soft); @@ -54,12 +60,14 @@ package body FLTK.Widgets.Valuators.Adjusters is procedure fl_adjuster_draw (W : in System.Address); pragma Import (C, fl_adjuster_draw, "fl_adjuster_draw"); + pragma Inline (fl_adjuster_draw); function fl_adjuster_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_adjuster_handle, "fl_adjuster_handle"); + pragma Inline (fl_adjuster_handle); diff --git a/src/fltk-widgets-valuators-adjusters.ads b/src/fltk-widgets-valuators-adjusters.ads index ee9e7ec..cba292c 100644 --- a/src/fltk-widgets-valuators-adjusters.ads +++ b/src/fltk-widgets-valuators-adjusters.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Adjusters is type Adjuster is new Valuator with private; + type Adjuster_Reference (Data : not null access Adjuster'Class) is + limited null record with Implicit_Dereference => Data; + @@ -49,5 +52,15 @@ private (This : in out Adjuster); + + + pragma Inline (Is_Soft); + pragma Inline (Set_Soft); + + + pragma Inline (Draw); + pragma Inline (Handle); + + end FLTK.Widgets.Valuators.Adjusters; diff --git a/src/fltk-widgets-valuators-counters-simple.adb b/src/fltk-widgets-valuators-counters-simple.adb index eaaf5d9..6b96062 100644 --- a/src/fltk-widgets-valuators-counters-simple.adb +++ b/src/fltk-widgets-valuators-counters-simple.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Counters.Simple is procedure simple_counter_set_draw_hook (W, D : in System.Address); pragma Import (C, simple_counter_set_draw_hook, "simple_counter_set_draw_hook"); + pragma Inline (simple_counter_set_draw_hook); procedure simple_counter_set_handle_hook (W, H : in System.Address); pragma Import (C, simple_counter_set_handle_hook, "simple_counter_set_handle_hook"); + pragma Inline (simple_counter_set_handle_hook); @@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Counters.Simple is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_simple_counter, "new_fl_simple_counter"); + pragma Inline (new_fl_simple_counter); procedure free_fl_simple_counter (A : in System.Address); pragma Import (C, free_fl_simple_counter, "free_fl_simple_counter"); + pragma Inline (free_fl_simple_counter); @@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Counters.Simple is procedure fl_simple_counter_draw (W : in System.Address); pragma Import (C, fl_simple_counter_draw, "fl_simple_counter_draw"); + pragma Inline (fl_simple_counter_draw); function fl_simple_counter_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_simple_counter_handle, "fl_simple_counter_handle"); + pragma Inline (fl_simple_counter_handle); diff --git a/src/fltk-widgets-valuators-counters-simple.ads b/src/fltk-widgets-valuators-counters-simple.ads index f1ddeb4..5b8a4eb 100644 --- a/src/fltk-widgets-valuators-counters-simple.ads +++ b/src/fltk-widgets-valuators-counters-simple.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Counters.Simple is type Simple_Counter is new Counter with private; + type Simple_Counter_Reference (Data : not null access Simple_Counter'Class) is + limited null record with Implicit_Dereference => Data; + @@ -38,5 +41,11 @@ private (This : in out Simple_Counter); + + + pragma Inline (Draw); + pragma Inline (Handle); + + end FLTK.Widgets.Valuators.Counters.Simple; diff --git a/src/fltk-widgets-valuators-counters.adb b/src/fltk-widgets-valuators-counters.adb index fa98637..a5bc3fe 100644 --- a/src/fltk-widgets-valuators-counters.adb +++ b/src/fltk-widgets-valuators-counters.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Counters is procedure counter_set_draw_hook (W, D : in System.Address); pragma Import (C, counter_set_draw_hook, "counter_set_draw_hook"); + pragma Inline (counter_set_draw_hook); procedure counter_set_handle_hook (W, H : in System.Address); pragma Import (C, counter_set_handle_hook, "counter_set_handle_hook"); + pragma Inline (counter_set_handle_hook); @@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Counters is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_counter, "new_fl_counter"); + pragma Inline (new_fl_counter); procedure free_fl_counter (A : in System.Address); pragma Import (C, free_fl_counter, "free_fl_counter"); + pragma Inline (free_fl_counter); @@ -41,16 +45,19 @@ package body FLTK.Widgets.Valuators.Counters is (C : in System.Address) return Interfaces.C.double; pragma Import (C, fl_counter_get_step, "fl_counter_get_step"); + pragma Inline (fl_counter_get_step); procedure fl_counter_set_step (C : in System.Address; T : in Interfaces.C.double); pragma Import (C, fl_counter_set_step, "fl_counter_set_step"); + pragma Inline (fl_counter_set_step); procedure fl_counter_set_lstep (C : in System.Address; T : in Interfaces.C.double); pragma Import (C, fl_counter_set_lstep, "fl_counter_set_lstep"); + pragma Inline (fl_counter_set_lstep); @@ -59,31 +66,37 @@ package body FLTK.Widgets.Valuators.Counters is (C : in System.Address) return Interfaces.C.unsigned; pragma Import (C, fl_counter_get_textcolor, "fl_counter_get_textcolor"); + pragma Inline (fl_counter_get_textcolor); procedure fl_counter_set_textcolor (C : in System.Address; T : in Interfaces.C.unsigned); pragma Import (C, fl_counter_set_textcolor, "fl_counter_set_textcolor"); + pragma Inline (fl_counter_set_textcolor); function fl_counter_get_textfont (C : in System.Address) return Interfaces.C.int; pragma Import (C, fl_counter_get_textfont, "fl_counter_get_textfont"); + pragma Inline (fl_counter_get_textfont); procedure fl_counter_set_textfont (C : in System.Address; T : in Interfaces.C.int); pragma Import (C, fl_counter_set_textfont, "fl_counter_set_textfont"); + pragma Inline (fl_counter_set_textfont); function fl_counter_get_textsize (C : in System.Address) return Interfaces.C.int; pragma Import (C, fl_counter_get_textsize, "fl_counter_get_textsize"); + pragma Inline (fl_counter_get_textsize); procedure fl_counter_set_textsize (C : in System.Address; T : in Interfaces.C.int); pragma Import (C, fl_counter_set_textsize, "fl_counter_set_textsize"); + pragma Inline (fl_counter_set_textsize); @@ -91,12 +104,14 @@ package body FLTK.Widgets.Valuators.Counters is procedure fl_counter_draw (W : in System.Address); pragma Import (C, fl_counter_draw, "fl_counter_draw"); + pragma Inline (fl_counter_draw); function fl_counter_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_counter_handle, "fl_counter_handle"); + pragma Inline (fl_counter_handle); diff --git a/src/fltk-widgets-valuators-counters.ads b/src/fltk-widgets-valuators-counters.ads index c7431d1..2e16169 100644 --- a/src/fltk-widgets-valuators-counters.ads +++ b/src/fltk-widgets-valuators-counters.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Counters is type Counter is new Valuator with private; + type Counter_Reference (Data : not null access Counter'Class) is + limited null record with Implicit_Dereference => Data; + @@ -88,5 +91,25 @@ private (This : in out Counter); + + + pragma Inline (Get_Step); + pragma Inline (Set_Step); + pragma Inline (Get_Long_Step); + pragma Inline (Set_Long_Step); + + + 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.Counters; diff --git a/src/fltk-widgets-valuators-dials-fill.adb b/src/fltk-widgets-valuators-dials-fill.adb index ae44c51..36172cd 100644 --- a/src/fltk-widgets-valuators-dials-fill.adb +++ b/src/fltk-widgets-valuators-dials-fill.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Dials.Fill is procedure fill_dial_set_draw_hook (W, D : in System.Address); pragma Import (C, fill_dial_set_draw_hook, "fill_dial_set_draw_hook"); + pragma Inline (fill_dial_set_draw_hook); procedure fill_dial_set_handle_hook (W, H : in System.Address); pragma Import (C, fill_dial_set_handle_hook, "fill_dial_set_handle_hook"); + pragma Inline (fill_dial_set_handle_hook); @@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Dials.Fill is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_fill_dial, "new_fl_fill_dial"); + pragma Inline (new_fl_fill_dial); procedure free_fl_fill_dial (D : in System.Address); pragma Import (C, free_fl_fill_dial, "free_fl_fill_dial"); + pragma Inline (free_fl_fill_dial); @@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Dials.Fill is procedure fl_fill_dial_draw (W : in System.Address); pragma Import (C, fl_fill_dial_draw, "fl_fill_dial_draw"); + pragma Inline (fl_fill_dial_draw); function fl_fill_dial_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_fill_dial_handle, "fl_fill_dial_handle"); + pragma Inline (fl_fill_dial_handle); diff --git a/src/fltk-widgets-valuators-dials-fill.ads b/src/fltk-widgets-valuators-dials-fill.ads index 848a1a2..00c0fe1 100644 --- a/src/fltk-widgets-valuators-dials-fill.ads +++ b/src/fltk-widgets-valuators-dials-fill.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Dials.Fill is type Fill_Dial is new Dial with private; + type Fill_Dial_Reference (Data : not null access Fill_Dial'Class) is + limited null record with Implicit_Dereference => Data; + @@ -38,5 +41,11 @@ private (This : in out Fill_Dial); + + + pragma Inline (Draw); + pragma Inline (Handle); + + end FLTK.Widgets.Valuators.Dials.Fill; diff --git a/src/fltk-widgets-valuators-dials-line.adb b/src/fltk-widgets-valuators-dials-line.adb index 423f5c7..9868495 100644 --- a/src/fltk-widgets-valuators-dials-line.adb +++ b/src/fltk-widgets-valuators-dials-line.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Dials.Line is procedure line_dial_set_draw_hook (W, D : in System.Address); pragma Import (C, line_dial_set_draw_hook, "line_dial_set_draw_hook"); + pragma Inline (line_dial_set_draw_hook); procedure line_dial_set_handle_hook (W, H : in System.Address); pragma Import (C, line_dial_set_handle_hook, "line_dial_set_handle_hook"); + pragma Inline (line_dial_set_handle_hook); @@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Dials.Line is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_line_dial, "new_fl_line_dial"); + pragma Inline (new_fl_line_dial); procedure free_fl_line_dial (D : in System.Address); pragma Import (C, free_fl_line_dial, "free_fl_line_dial"); + pragma Inline (free_fl_line_dial); @@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Dials.Line is procedure fl_line_dial_draw (W : in System.Address); pragma Import (C, fl_line_dial_draw, "fl_line_dial_draw"); + pragma Inline (fl_line_dial_draw); function fl_line_dial_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_line_dial_handle, "fl_line_dial_handle"); + pragma Inline (fl_line_dial_handle); diff --git a/src/fltk-widgets-valuators-dials-line.ads b/src/fltk-widgets-valuators-dials-line.ads index 25b7778..4bc0453 100644 --- a/src/fltk-widgets-valuators-dials-line.ads +++ b/src/fltk-widgets-valuators-dials-line.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Dials.Line is type Line_Dial is new Dial with private; + type Line_Dial_Reference (Data : not null access Line_Dial'Class) is + limited null record with Implicit_Dereference => Data; + @@ -38,5 +41,11 @@ private (This : in out Line_Dial); + + + pragma Inline (Draw); + pragma Inline (Handle); + + end FLTK.Widgets.Valuators.Dials.Line; diff --git a/src/fltk-widgets-valuators-dials.adb b/src/fltk-widgets-valuators-dials.adb index 46b2633..1f30034 100644 --- a/src/fltk-widgets-valuators-dials.adb +++ b/src/fltk-widgets-valuators-dials.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Dials is procedure dial_set_draw_hook (W, D : in System.Address); pragma Import (C, dial_set_draw_hook, "dial_set_draw_hook"); + pragma Inline (dial_set_draw_hook); procedure dial_set_handle_hook (W, H : in System.Address); pragma Import (C, dial_set_handle_hook, "dial_set_handle_hook"); + pragma Inline (dial_set_handle_hook); @@ -29,10 +31,27 @@ package body FLTK.Widgets.Valuators.Dials is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_dial, "new_fl_dial"); + pragma Inline (new_fl_dial); procedure free_fl_dial (D : in System.Address); pragma Import (C, free_fl_dial, "free_fl_dial"); + pragma Inline (free_fl_dial); + + + + + function fl_dial_get_type + (D : in System.Address) + return Interfaces.C.int; + pragma Import (C, fl_dial_get_type, "fl_dial_get_type"); + pragma Inline (fl_dial_get_type); + + procedure fl_dial_set_type + (D : in System.Address; + T : in Interfaces.C.int); + pragma Import (C, fl_dial_set_type, "fl_dial_set_type"); + pragma Inline (fl_dial_set_type); @@ -41,26 +60,31 @@ package body FLTK.Widgets.Valuators.Dials is (D : in System.Address) return Interfaces.C.int; pragma Import (C, fl_dial_get_angle1, "fl_dial_get_angle1"); + pragma Inline (fl_dial_get_angle1); procedure fl_dial_set_angle1 (D : in System.Address; T : in Interfaces.C.int); pragma Import (C, fl_dial_set_angle1, "fl_dial_set_angle1"); + pragma Inline (fl_dial_set_angle1); function fl_dial_get_angle2 (D : in System.Address) return Interfaces.C.int; pragma Import (C, fl_dial_get_angle2, "fl_dial_get_angle2"); + pragma Inline (fl_dial_get_angle2); procedure fl_dial_set_angle2 (D : in System.Address; T : in Interfaces.C.int); pragma Import (C, fl_dial_set_angle2, "fl_dial_set_angle2"); + pragma Inline (fl_dial_set_angle2); procedure fl_dial_set_angles (D : in System.Address; A, B : in Interfaces.C.int); pragma Import (C, fl_dial_set_angles, "fl_dial_set_angles"); + pragma Inline (fl_dial_set_angles); @@ -68,12 +92,14 @@ package body FLTK.Widgets.Valuators.Dials is procedure fl_dial_draw (W : in System.Address); pragma Import (C, fl_dial_draw, "fl_dial_draw"); + pragma Inline (fl_dial_draw); function fl_dial_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_dial_handle, "fl_dial_handle"); + pragma Inline (fl_dial_handle); @@ -120,6 +146,14 @@ package body FLTK.Widgets.Valuators.Dials is + function Get_Dial_Type + (This : in Dial) + return Dial_Kind is + begin + return Dial_Kind'Val (fl_dial_get_type (This.Void_Ptr)); + end Get_Dial_Type; + + function Get_First_Angle (This : in Dial) return Integer is @@ -179,5 +213,21 @@ package body FLTK.Widgets.Valuators.Dials is end Handle; + + + package body Extra is + + procedure Set_Dial_Type + (This : in out Dial; + To : in Dial_Kind) is + begin + fl_dial_set_type (This.Void_Ptr, Dial_Kind'Pos (To)); + end Set_Dial_Type; + + pragma Inline (Set_Dial_Type); + + end Extra; + + end FLTK.Widgets.Valuators.Dials; diff --git a/src/fltk-widgets-valuators-dials.ads b/src/fltk-widgets-valuators-dials.ads index cd22ec5..67b5aa7 100644 --- a/src/fltk-widgets-valuators-dials.ads +++ b/src/fltk-widgets-valuators-dials.ads @@ -5,6 +5,11 @@ package FLTK.Widgets.Valuators.Dials is type Dial is new Valuator with private; + type Dial_Reference (Data : not null access Dial'Class) is limited null record + with Implicit_Dereference => Data; + + type Dial_Kind is (Normal_Kind, Line_Kind, Fill_Kind); + @@ -20,6 +25,10 @@ package FLTK.Widgets.Valuators.Dials is + function Get_Dial_Type + (This : in Dial) + return Dial_Kind; + function Get_First_Angle (This : in Dial) return Integer; @@ -52,6 +61,17 @@ package FLTK.Widgets.Valuators.Dials is return Event_Outcome; + + + package Extra is + + procedure Set_Dial_Type + (This : in out Dial; + To : in Dial_Kind); + + end Extra; + + private @@ -61,5 +81,21 @@ private (This : in out Dial); + + + pragma Inline (Get_Dial_Type); + + + pragma Inline (Get_First_Angle); + pragma Inline (Set_First_Angle); + pragma Inline (Get_Second_Angle); + pragma Inline (Set_Second_Angle); + pragma Inline (Set_Angles); + + + pragma Inline (Draw); + pragma Inline (Handle); + + end FLTK.Widgets.Valuators.Dials; diff --git a/src/fltk-widgets-valuators-rollers.adb b/src/fltk-widgets-valuators-rollers.adb index 658bee7..4cce295 100644 --- a/src/fltk-widgets-valuators-rollers.adb +++ b/src/fltk-widgets-valuators-rollers.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators.Rollers is procedure roller_set_draw_hook (W, D : in System.Address); pragma Import (C, roller_set_draw_hook, "roller_set_draw_hook"); + pragma Inline (roller_set_draw_hook); procedure roller_set_handle_hook (W, H : in System.Address); pragma Import (C, roller_set_handle_hook, "roller_set_handle_hook"); + pragma Inline (roller_set_handle_hook); @@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators.Rollers is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_roller, "new_fl_roller"); + pragma Inline (new_fl_roller); procedure free_fl_roller (D : in System.Address); pragma Import (C, free_fl_roller, "free_fl_roller"); + pragma Inline (free_fl_roller); @@ -40,12 +44,14 @@ package body FLTK.Widgets.Valuators.Rollers is procedure fl_roller_draw (W : in System.Address); pragma Import (C, fl_roller_draw, "fl_roller_draw"); + pragma Inline (fl_roller_draw); function fl_roller_handle (W : in System.Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_roller_handle, "fl_roller_handle"); + pragma Inline (fl_roller_handle); diff --git a/src/fltk-widgets-valuators-rollers.ads b/src/fltk-widgets-valuators-rollers.ads index 8a6d045..e5d9a97 100644 --- a/src/fltk-widgets-valuators-rollers.ads +++ b/src/fltk-widgets-valuators-rollers.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators.Rollers is type Roller is new Valuator with private; + type Roller_Reference (Data : not null access Roller'Class) is + limited null record with Implicit_Dereference => Data; + @@ -38,5 +41,11 @@ private (This : in out Roller); + + + pragma Inline (Draw); + pragma Inline (Handle); + + end FLTK.Widgets.Valuators.Rollers; diff --git a/src/fltk-widgets-valuators.adb b/src/fltk-widgets-valuators.adb index 5cb821d..5f12949 100644 --- a/src/fltk-widgets-valuators.adb +++ b/src/fltk-widgets-valuators.adb @@ -16,10 +16,12 @@ package body FLTK.Widgets.Valuators is procedure valuator_set_draw_hook (W, D : in System.Address); pragma Import (C, valuator_set_draw_hook, "valuator_set_draw_hook"); + pragma Inline (valuator_set_draw_hook); procedure valuator_set_handle_hook (W, H : in System.Address); pragma Import (C, valuator_set_handle_hook, "valuator_set_handle_hook"); + pragma Inline (valuator_set_handle_hook); @@ -29,10 +31,12 @@ package body FLTK.Widgets.Valuators is Text : in Interfaces.C.char_array) return System.Address; pragma Import (C, new_fl_valuator, "new_fl_valuator"); + pragma Inline (new_fl_valuator); procedure free_fl_valuator (V : in System.Address); pragma Import (C, free_fl_valuator, "free_fl_valuator"); + pragma Inline (free_fl_valuator); @@ -42,12 +46,14 @@ package body FLTK.Widgets.Valuators is D : in Interfaces.C.double) return Interfaces.C.double; pragma Import (C, fl_valuator_clamp, "fl_valuator_clamp"); + pragma Inline (fl_valuator_clamp); function fl_valuator_round (V : in System.Address; D : in Interfaces.C.double) return Interfaces.C.double; pragma Import (C, fl_valuator_round, "fl_valuator_round"); + pragma Inline (fl_valuator_round); function fl_valuator_increment (V : in System.Address; @@ -55,6 +61,7 @@ package body FLTK.Widgets.Valuators is S : in Interfaces.C.int) return Interfaces.C.double; pragma Import (C, fl_valuator_increment, "fl_valuator_increment"); + pragma Inline (fl_valuator_increment); @@ -63,56 +70,67 @@ package body FLTK.Widgets.Valuators is (V : in System.Address) return Interfaces.C.double; pragma Import (C, fl_valuator_get_minimum, "fl_valuator_get_minimum"); + pragma Inline (fl_valuator_get_minimum); procedure fl_valuator_set_minimum (V : in System.Address; D : in Interfaces.C.double); pragma Import (C, fl_valuator_set_minimum, "fl_valuator_set_minimum"); + pragma Inline (fl_valuator_set_minimum); function fl_valuator_get_maximum (V : in System.Address) return Interfaces.C.double; pragma Import (C, fl_valuator_get_maximum, "fl_valuator_get_maximum"); + pragma Inline (fl_valuator_get_maximum); procedure fl_valuator_set_maximum (V : in System.Address; D : in Interfaces.C.double); pragma Import (C, fl_valuator_set_maximum, "fl_valuator_set_maximum"); + pragma Inline (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"); + pragma Inline (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"); + pragma Inline (fl_valuator_set_step); function fl_valuator_get_value (V : in System.Address) return Interfaces.C.double; pragma Import (C, fl_valuator_get_value, "fl_valuator_get_value"); + pragma Inline (fl_valuator_get_value); procedure fl_valuator_set_value (V : in System.Address; D : in Interfaces.C.double); pragma Import (C, fl_valuator_set_value, "fl_valuator_set_value"); + pragma Inline (fl_valuator_set_value); procedure fl_valuator_bounds (V : in System.Address; A, B : in Interfaces.C.double); pragma Import (C, fl_valuator_bounds, "fl_valuator_bounds"); + pragma Inline (fl_valuator_bounds); procedure fl_valuator_precision (V : in System.Address; D : in Interfaces.C.int); pragma Import (C, fl_valuator_precision, "fl_valuator_precision"); + pragma Inline (fl_valuator_precision); procedure fl_valuator_range (V : in System.Address; A, B : in Interfaces.C.double); pragma Import (C, fl_valuator_range, "fl_valuator_range"); + pragma Inline (fl_valuator_range); @@ -122,6 +140,7 @@ package body FLTK.Widgets.Valuators is E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_valuator_handle, "fl_valuator_handle"); + pragma Inline (fl_valuator_handle); diff --git a/src/fltk-widgets-valuators.ads b/src/fltk-widgets-valuators.ads index da22f79..fc9423c 100644 --- a/src/fltk-widgets-valuators.ads +++ b/src/fltk-widgets-valuators.ads @@ -5,6 +5,9 @@ package FLTK.Widgets.Valuators is type Valuator is new Widget with private; + type Valuator_Reference (Data : not null access Valuator'Class) is + limited null record with Implicit_Dereference => Data; + @@ -101,5 +104,28 @@ private (This : in out Valuator); + + + pragma Inline (Clamp); + pragma Inline (Round); + pragma Inline (Increment); + + + pragma Inline (Get_Minimum); + pragma Inline (Set_Minimum); + pragma Inline (Get_Maximum); + pragma Inline (Set_Maximum); + pragma Inline (Get_Step); + pragma Inline (Set_Step); + pragma Inline (Get_Value); + pragma Inline (Set_Value); + pragma Inline (Set_Bounds); + pragma Inline (Set_Precision); + pragma Inline (Set_Range); + + + pragma Inline (Handle); + + end FLTK.Widgets.Valuators; |