diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-13 20:48:27 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-13 20:48:27 +1300 |
commit | 41fca67267180571b5107bf7b9516eb669588b25 (patch) | |
tree | ff6800e3ed60a04d786af87e88a3142ebd65b9e0 /src | |
parent | c300ec0f456da533291b10db57d27a9c3bb8de9f (diff) |
Fl_Positioner added
Diffstat (limited to 'src')
-rw-r--r-- | src/c_fl_positioner.cpp | 166 | ||||
-rw-r--r-- | src/c_fl_positioner.h | 49 | ||||
-rw-r--r-- | src/fltk-widgets-positioners.adb | 525 | ||||
-rw-r--r-- | src/fltk-widgets-positioners.ads | 194 |
4 files changed, 934 insertions, 0 deletions
diff --git a/src/c_fl_positioner.cpp b/src/c_fl_positioner.cpp new file mode 100644 index 0000000..ce23b64 --- /dev/null +++ b/src/c_fl_positioner.cpp @@ -0,0 +1,166 @@ + + +// Programmed by Jedidiah Barber +// Released into the public domain + + +#include <FL/Fl_Positioner.H> +#include "c_fl_positioner.h" + + + + +// Exports from Ada + +extern "C" void widget_draw_hook(void * ud); +extern "C" int widget_handle_hook(void * ud, int e); + + + + +// Non-friend protected access + +class Friend_Positioner : Fl_Positioner { +public: + // Really only needed for the versions with (x,y,w,h) + using Fl_Positioner::draw; + using Fl_Positioner::handle; +}; + + + + +// Attaching all relevant hooks and friends + +class My_Positioner : public Fl_Positioner { +public: + using Fl_Positioner::Fl_Positioner; + + friend void fl_positioner_draw(POSITIONER p); + friend int fl_positioner_handle(POSITIONER p, int e); + + void draw(); + int handle(int e); +}; + +void My_Positioner::draw() { + widget_draw_hook(this->user_data()); +} + +int My_Positioner::handle(int e) { + return widget_handle_hook(this->user_data(), e); +} + + + + +// Flattened C API + +POSITIONER new_fl_positioner(int x, int y, int w, int h, char* label) { + My_Positioner *p = new My_Positioner(x, y, w, h, label); + return p; +} + +void free_fl_positioner(POSITIONER p) { + delete static_cast<My_Positioner*>(p); +} + + + + +int fl_positioner_set_value(POSITIONER p, double x, double y) { + return static_cast<Fl_Positioner*>(p)->value(x, y); +} + + + + +void fl_positioner_xbounds(POSITIONER p, double l, double h) { + static_cast<Fl_Positioner*>(p)->xbounds(l, h); +} + +void fl_positioner_xstep(POSITIONER p, double a) { + static_cast<Fl_Positioner*>(p)->xstep(a); +} + +double fl_positioner_get_xminimum(POSITIONER p) { + return static_cast<Fl_Positioner*>(p)->xminimum(); +} + +void fl_positioner_set_xminimum(POSITIONER p, double a) { + static_cast<Fl_Positioner*>(p)->xminimum(a); +} + +double fl_positioner_get_xmaximum(POSITIONER p) { + return static_cast<Fl_Positioner*>(p)->xmaximum(); +} + +void fl_positioner_set_xmaximum(POSITIONER p, double a) { + static_cast<Fl_Positioner*>(p)->xmaximum(a); +} + +double fl_positioner_get_xvalue(POSITIONER p) { + return static_cast<Fl_Positioner*>(p)->xvalue(); +} + +int fl_positioner_set_xvalue(POSITIONER p, double x) { + return static_cast<Fl_Positioner*>(p)->xvalue(x); +} + + + + +void fl_positioner_ybounds(POSITIONER p, double l, double h) { + static_cast<Fl_Positioner*>(p)->ybounds(l, h); +} + +void fl_positioner_ystep(POSITIONER p, double a) { + static_cast<Fl_Positioner*>(p)->ystep(a); +} + +double fl_positioner_get_yminimum(POSITIONER p) { + return static_cast<Fl_Positioner*>(p)->yminimum(); +} + +void fl_positioner_set_yminimum(POSITIONER p, double a) { + static_cast<Fl_Positioner*>(p)->yminimum(a); +} + +double fl_positioner_get_ymaximum(POSITIONER p) { + return static_cast<Fl_Positioner*>(p)->ymaximum(); +} + +void fl_positioner_set_ymaximum(POSITIONER p, double a) { + static_cast<Fl_Positioner*>(p)->ymaximum(a); +} + +double fl_positioner_get_yvalue(POSITIONER p) { + return static_cast<Fl_Positioner*>(p)->yvalue(); +} + +int fl_positioner_set_yvalue(POSITIONER p, double y) { + return static_cast<Fl_Positioner*>(p)->yvalue(y); +} + + + + +void fl_positioner_draw(POSITIONER p) { + static_cast<My_Positioner*>(p)->Fl_Positioner::draw(); +} + +void fl_positioner_draw2(POSITIONER p, int x, int y, int w, int h) { + void (Fl_Positioner::*mydraw)(int,int,int,int) = &Friend_Positioner::draw; + (static_cast<Fl_Positioner*>(p)->*mydraw)(x, y, w, h); +} + +int fl_positioner_handle(POSITIONER p, int e) { + return static_cast<My_Positioner*>(p)->Fl_Positioner::handle(e); +} + +int fl_positioner_handle2(POSITIONER p, int e, int x, int y, int w, int h) { + int (Fl_Positioner::*myhandle)(int,int,int,int,int) = &Friend_Positioner::handle; + return (static_cast<Fl_Positioner*>(p)->*myhandle)(e, x, y, w, h); +} + + diff --git a/src/c_fl_positioner.h b/src/c_fl_positioner.h new file mode 100644 index 0000000..9fd96d4 --- /dev/null +++ b/src/c_fl_positioner.h @@ -0,0 +1,49 @@ + + +// Programmed by Jedidiah Barber +// Released into the public domain + + +#ifndef FL_POSITIONER_GUARD +#define FL_POSITIONER_GUARD + + +typedef void* POSITIONER; + + +extern "C" POSITIONER new_fl_positioner(int x, int y, int w, int h, char* label); +extern "C" void free_fl_positioner(POSITIONER p); + + +extern "C" int fl_positioner_set_value(POSITIONER p, double x, double y); + + +extern "C" void fl_positioner_xbounds(POSITIONER p, double l, double h); +extern "C" void fl_positioner_xstep(POSITIONER p, double a); +extern "C" double fl_positioner_get_xminimum(POSITIONER p); +extern "C" void fl_positioner_set_xminimum(POSITIONER p, double a); +extern "C" double fl_positioner_get_xmaximum(POSITIONER p); +extern "C" void fl_positioner_set_xmaximum(POSITIONER p, double a); +extern "C" double fl_positioner_get_xvalue(POSITIONER p); +extern "C" int fl_positioner_set_xvalue(POSITIONER p, double x); + + +extern "C" void fl_positioner_ybounds(POSITIONER p, double l, double h); +extern "C" void fl_positioner_ystep(POSITIONER p, double a); +extern "C" double fl_positioner_get_yminimum(POSITIONER p); +extern "C" void fl_positioner_set_yminimum(POSITIONER p, double a); +extern "C" double fl_positioner_get_ymaximum(POSITIONER p); +extern "C" void fl_positioner_set_ymaximum(POSITIONER p, double a); +extern "C" double fl_positioner_get_yvalue(POSITIONER p); +extern "C" int fl_positioner_set_yvalue(POSITIONER p, double y); + + +extern "C" void fl_positioner_draw(POSITIONER p); +extern "C" void fl_positioner_draw2(POSITIONER p, int x, int y, int w, int h); +extern "C" int fl_positioner_handle(POSITIONER p, int e); +extern "C" int fl_positioner_handle2(POSITIONER p, int e, int x, int y, int w, int h); + + +#endif + + diff --git a/src/fltk-widgets-positioners.adb b/src/fltk-widgets-positioners.adb new file mode 100644 index 0000000..0e3dfb2 --- /dev/null +++ b/src/fltk-widgets-positioners.adb @@ -0,0 +1,525 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +with + + Ada.Assertions, + Interfaces.C; + + +package body FLTK.Widgets.Positioners is + + + package Chk renames Ada.Assertions; + + + + + ------------------------ + -- Functions From C -- + ------------------------ + + function new_fl_positioner + (X, Y, W, H : in Interfaces.C.int; + Text : in Interfaces.C.char_array) + return Storage.Integer_Address; + pragma Import (C, new_fl_positioner, "new_fl_positioner"); + pragma Inline (new_fl_positioner); + + procedure free_fl_positioner + (P : in Storage.Integer_Address); + pragma Import (C, free_fl_positioner, "free_fl_positioner"); + pragma Inline (free_fl_positioner); + + + + + function fl_positioner_set_value + (P : in Storage.Integer_Address; + X, Y : in Interfaces.C.double) + return Interfaces.C.int; + pragma Import (C, fl_positioner_set_value, "fl_positioner_set_value"); + pragma Inline (fl_positioner_set_value); + + + + + procedure fl_positioner_xbounds + (P : in Storage.Integer_Address; + L, H : in Interfaces.C.double); + pragma Import (C, fl_positioner_xbounds, "fl_positioner_xbounds"); + pragma Inline (fl_positioner_xbounds); + + procedure fl_positioner_xstep + (P : in Storage.Integer_Address; + A : in Interfaces.C.double); + pragma Import (C, fl_positioner_xstep, "fl_positioner_xstep"); + pragma Inline (fl_positioner_xstep); + + function fl_positioner_get_xminimum + (P : in Storage.Integer_Address) + return Interfaces.C.double; + pragma Import (C, fl_positioner_get_xminimum, "fl_positioner_get_xminimum"); + pragma Inline (fl_positioner_get_xminimum); + + procedure fl_positioner_set_xminimum + (P : in Storage.Integer_Address; + A : in Interfaces.C.double); + pragma Import (C, fl_positioner_set_xminimum, "fl_positioner_set_xminimum"); + pragma Inline (fl_positioner_set_xminimum); + + function fl_positioner_get_xmaximum + (P : in Storage.Integer_Address) + return Interfaces.C.double; + pragma Import (C, fl_positioner_get_xmaximum, "fl_positioner_get_xmaximum"); + pragma Inline (fl_positioner_get_xmaximum); + + procedure fl_positioner_set_xmaximum + (P : in Storage.Integer_Address; + A : in Interfaces.C.double); + pragma Import (C, fl_positioner_set_xmaximum, "fl_positioner_set_xmaximum"); + pragma Inline (fl_positioner_set_xmaximum); + + function fl_positioner_get_xvalue + (P : in Storage.Integer_Address) + return Interfaces.C.double; + pragma Import (C, fl_positioner_get_xvalue, "fl_positioner_get_xvalue"); + pragma Inline (fl_positioner_get_xvalue); + + function fl_positioner_set_xvalue + (P : in Storage.Integer_Address; + V : in Interfaces.C.double) + return Interfaces.C.int; + pragma Import (C, fl_positioner_set_xvalue, "fl_positioner_set_xvalue"); + pragma Inline (fl_positioner_set_xvalue); + + + + + procedure fl_positioner_ybounds + (P : in Storage.Integer_Address; + L, H : in Interfaces.C.double); + pragma Import (C, fl_positioner_ybounds, "fl_positioner_ybounds"); + pragma Inline (fl_positioner_ybounds); + + procedure fl_positioner_ystep + (P : in Storage.Integer_Address; + A : in Interfaces.C.double); + pragma Import (C, fl_positioner_ystep, "fl_positioner_ystep"); + pragma Inline (fl_positioner_ystep); + + function fl_positioner_get_yminimum + (P : in Storage.Integer_Address) + return Interfaces.C.double; + pragma Import (C, fl_positioner_get_yminimum, "fl_positioner_get_yminimum"); + pragma Inline (fl_positioner_get_yminimum); + + procedure fl_positioner_set_yminimum + (P : in Storage.Integer_Address; + A : in Interfaces.C.double); + pragma Import (C, fl_positioner_set_yminimum, "fl_positioner_set_yminimum"); + pragma Inline (fl_positioner_set_yminimum); + + function fl_positioner_get_ymaximum + (P : in Storage.Integer_Address) + return Interfaces.C.double; + pragma Import (C, fl_positioner_get_ymaximum, "fl_positioner_get_ymaximum"); + pragma Inline (fl_positioner_get_ymaximum); + + procedure fl_positioner_set_ymaximum + (P : in Storage.Integer_Address; + A : in Interfaces.C.double); + pragma Import (C, fl_positioner_set_ymaximum, "fl_positioner_set_ymaximum"); + pragma Inline (fl_positioner_set_ymaximum); + + function fl_positioner_get_yvalue + (P : in Storage.Integer_Address) + return Interfaces.C.double; + pragma Import (C, fl_positioner_get_yvalue, "fl_positioner_get_yvalue"); + pragma Inline (fl_positioner_get_yvalue); + + function fl_positioner_set_yvalue + (P : in Storage.Integer_Address; + V : in Interfaces.C.double) + return Interfaces.C.int; + pragma Import (C, fl_positioner_set_yvalue, "fl_positioner_set_yvalue"); + pragma Inline (fl_positioner_set_yvalue); + + + + + procedure fl_positioner_draw + (P : in Storage.Integer_Address); + pragma Import (C, fl_positioner_draw, "fl_positioner_draw"); + pragma Inline (fl_positioner_draw); + + procedure fl_positioner_draw2 + (P : in Storage.Integer_Address; + X, Y, W, H : in Interfaces.C.int); + pragma Import (C, fl_positioner_draw2, "fl_positioner_draw2"); + pragma Inline (fl_positioner_draw2); + + function fl_positioner_handle + (P : in Storage.Integer_Address; + E : in Interfaces.C.int) + return Interfaces.C.int; + pragma Import (C, fl_positioner_handle, "fl_positioner_handle"); + pragma Inline (fl_positioner_handle); + + function fl_positioner_handle2 + (P : in Storage.Integer_Address; + E, X, Y, W, H : in Interfaces.C.int) + return Interfaces.C.int; + pragma Import (C, fl_positioner_handle2, "fl_positioner_handle2"); + pragma Inline (fl_positioner_handle2); + + + + + ------------------- + -- Destructors -- + ------------------- + + procedure Extra_Final + (This : in out Positioner) is + begin + Extra_Final (Widget (This)); + end Extra_Final; + + + procedure Finalize + (This : in out Positioner) is + begin + Extra_Final (This); + if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then + free_fl_positioner (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; + end if; + end Finalize; + + + + + -------------------- + -- Constructors -- + -------------------- + + procedure Extra_Init + (This : in out Positioner; + X, Y, W, H : in Integer; + Text : in String) is + begin + Extra_Init (Widget (This), X, Y, W, H, Text); + end Extra_Init; + + + procedure Initialize + (This : in out Positioner) is + begin + This.Draw_Ptr := fl_positioner_draw'Address; + This.Handle_Ptr := fl_positioner_handle'Address; + end Initialize; + + + package body Forge is + + function Create + (X, Y, W, H : in Integer; + Text : in String := "") + return Positioner is + begin + return This : Positioner do + This.Void_Ptr := new_fl_positioner + (Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H), + Interfaces.C.To_C (Text)); + Extra_Init (This, X, Y, W, H, Text); + end return; + end Create; + + end Forge; + + + + + ----------------------- + -- API Subprograms -- + ----------------------- + + procedure Get_Coords + (This : in Positioner; + X, Y : out Long_Float) is + begin + X := This.Get_Ecks; + Y := This.Get_Why; + end Get_Coords; + + + procedure Set_Coords + (This : in out Positioner; + X, Y : in Long_Float) + is + Result : Interfaces.C.int := fl_positioner_set_value + (This.Void_Ptr, + Interfaces.C.double (X), + Interfaces.C.double (Y)); + begin + pragma Assert (Result in 0 .. 1); + exception + when Chk.Assertion_Error => raise Internal_FLTK_Error; + end Set_Coords; + + + function Set_Coords + (This : in out Positioner; + X, Y : in Long_Float) + return Boolean + is + Result : Interfaces.C.int := fl_positioner_set_value + (This.Void_Ptr, + Interfaces.C.double (X), + Interfaces.C.double (Y)); + begin + return Boolean'Val (Result); + exception + when Constraint_Error => raise Internal_FLTK_Error; + end Set_Coords; + + + + + procedure Set_Ecks_Bounds + (This : in out Positioner; + Low, High : in Long_Float) is + begin + fl_positioner_xbounds + (This.Void_Ptr, + Interfaces.C.double (Low), + Interfaces.C.double (High)); + end Set_Ecks_Bounds; + + + procedure Set_Ecks_Step + (This : in out Positioner; + Value : in Long_Float) is + begin + fl_positioner_xstep (This.Void_Ptr, Interfaces.C.double (Value)); + end Set_Ecks_Step; + + + function Get_Ecks_Minimum + (This : in Positioner) + return Long_Float is + begin + return Long_Float (fl_positioner_get_xminimum (This.Void_Ptr)); + end Get_Ecks_Minimum; + + + procedure Set_Ecks_Minimum + (This : in out Positioner; + Value : in Long_Float) is + begin + fl_positioner_set_xminimum (This.Void_Ptr, Interfaces.C.double (Value)); + end Set_Ecks_Minimum; + + + function Get_Ecks_Maximum + (This : in Positioner) + return Long_Float is + begin + return Long_Float (fl_positioner_get_xmaximum (This.Void_Ptr)); + end Get_Ecks_Maximum; + + + procedure Set_Ecks_Maximum + (This : in out Positioner; + Value : in Long_Float) is + begin + fl_positioner_set_xmaximum (This.Void_Ptr, Interfaces.C.double (Value)); + end Set_Ecks_Maximum; + + + function Get_Ecks + (This : in Positioner) + return Long_Float is + begin + return Long_Float (fl_positioner_get_xvalue (This.Void_Ptr)); + end Get_Ecks; + + + procedure Set_Ecks + (This : in out Positioner; + Value : in Long_Float) + is + Result : Interfaces.C.int := fl_positioner_set_xvalue + (This.Void_Ptr, + Interfaces.C.double (Value)); + begin + pragma Assert (Result in 0 .. 1); + exception + when Chk.Assertion_Error => raise Internal_FLTK_Error; + end Set_Ecks; + + + function Set_Ecks + (This : in out Positioner; + Value : in Long_Float) + return Boolean + is + Result : Interfaces.C.int := fl_positioner_set_xvalue + (This.Void_Ptr, + Interfaces.C.double (Value)); + begin + return Boolean'Val (Result); + exception + when Constraint_Error => raise Internal_FLTK_Error; + end Set_Ecks; + + + + + procedure Set_Why_Bounds + (This : in out Positioner; + Low, High : in Long_Float) is + begin + fl_positioner_ybounds + (This.Void_Ptr, + Interfaces.C.double (Low), + Interfaces.C.double (High)); + end Set_Why_Bounds; + + + procedure Set_Why_Step + (This : in out Positioner; + Value : in Long_Float) is + begin + fl_positioner_ystep (This.Void_Ptr, Interfaces.C.double (Value)); + end Set_Why_Step; + + + function Get_Why_Minimum + (This : in Positioner) + return Long_Float is + begin + return Long_Float (fl_positioner_get_yminimum (This.Void_Ptr)); + end Get_Why_Minimum; + + + procedure Set_Why_Minimum + (This : in out Positioner; + Value : in Long_Float) is + begin + fl_positioner_set_yminimum (This.Void_Ptr, Interfaces.C.double (Value)); + end Set_Why_Minimum; + + + function Get_Why_Maximum + (This : in Positioner) + return Long_Float is + begin + return Long_Float (fl_positioner_get_ymaximum (This.Void_Ptr)); + end Get_Why_Maximum; + + + procedure Set_Why_Maximum + (This : in out Positioner; + Value : in Long_Float) is + begin + fl_positioner_set_ymaximum (This.Void_Ptr, Interfaces.C.double (Value)); + end Set_Why_Maximum; + + + function Get_Why + (This : in Positioner) + return Long_Float is + begin + return Long_Float (fl_positioner_get_yvalue (This.Void_Ptr)); + end Get_Why; + + + procedure Set_Why + (This : in out Positioner; + Value : in Long_Float) + is + Result : Interfaces.C.int := fl_positioner_set_yvalue + (This.Void_Ptr, + Interfaces.C.double (Value)); + begin + pragma Assert (Result in 0 .. 1); + exception + when Chk.Assertion_Error => raise Internal_FLTK_Error; + end Set_Why; + + + function Set_Why + (This : in out Positioner; + Value : in Long_Float) + return Boolean + is + Result : Interfaces.C.int := fl_positioner_set_yvalue + (This.Void_Ptr, + Interfaces.C.double (Value)); + begin + return Boolean'Val (Result); + exception + when Constraint_Error => raise Internal_FLTK_Error; + end Set_Why; + + + + + procedure Draw + (This : in out Positioner) is + begin + Widget (This).Draw; + end Draw; + + + procedure Draw + (This : in out Positioner; + X, Y, W, H : in Integer) is + begin + fl_positioner_draw2 + (This.Void_Ptr, + Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H)); + end Draw; + + + function Handle + (This : in out Positioner; + Event : in Event_Kind) + return Event_Outcome is + begin + return Widget (This).Handle (Event); + end Handle; + + + function Handle + (This : in out Positioner; + Event : in Event_Kind; + X, Y, W, H : in Integer) + return Event_Outcome is + begin + return Event_Outcome'Val (fl_positioner_handle2 + (This.Void_Ptr, + Event_Kind'Pos (Event), + Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H))); + exception + when Constraint_Error => raise Internal_FLTK_Error; + end Handle; + + +end FLTK.Widgets.Positioners; + + diff --git a/src/fltk-widgets-positioners.ads b/src/fltk-widgets-positioners.ads new file mode 100644 index 0000000..1da99b9 --- /dev/null +++ b/src/fltk-widgets-positioners.ads @@ -0,0 +1,194 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +package FLTK.Widgets.Positioners is + + + type Positioner is new Widget with private; + + type Positioner_Reference (Data : not null access Positioner'Class) is limited null record + with Implicit_Dereference => Data; + + + + + package Forge is + + function Create + (X, Y, W, H : in Integer; + Text : in String := "") + return Positioner; + + end Forge; + + + + + procedure Get_Coords + (This : in Positioner; + X, Y : out Long_Float); + + procedure Set_Coords + (This : in out Positioner; + X, Y : in Long_Float); + + function Set_Coords + (This : in out Positioner; + X, Y : in Long_Float) + return Boolean; + + + + + procedure Set_Ecks_Bounds + (This : in out Positioner; + Low, High : in Long_Float); + + procedure Set_Ecks_Step + (This : in out Positioner; + Value : in Long_Float); + + function Get_Ecks_Minimum + (This : in Positioner) + return Long_Float; + + procedure Set_Ecks_Minimum + (This : in out Positioner; + Value : in Long_Float); + + function Get_Ecks_Maximum + (This : in Positioner) + return Long_Float; + + procedure Set_Ecks_Maximum + (This : in out Positioner; + Value : in Long_Float); + + function Get_Ecks + (This : in Positioner) + return Long_Float; + + procedure Set_Ecks + (This : in out Positioner; + Value : in Long_Float); + + function Set_Ecks + (This : in out Positioner; + Value : in Long_Float) + return Boolean; + + + + + procedure Set_Why_Bounds + (This : in out Positioner; + Low, High : in Long_Float); + + procedure Set_Why_Step + (This : in out Positioner; + Value : in Long_Float); + + function Get_Why_Minimum + (This : in Positioner) + return Long_Float; + + procedure Set_Why_Minimum + (This : in out Positioner; + Value : in Long_Float); + + function Get_Why_Maximum + (This : in Positioner) + return Long_Float; + + procedure Set_Why_Maximum + (This : in out Positioner; + Value : in Long_Float); + + function Get_Why + (This : in Positioner) + return Long_Float; + + procedure Set_Why + (This : in out Positioner; + Value : in Long_Float); + + function Set_Why + (This : in out Positioner; + Value : in Long_Float) + return Boolean; + + + + + procedure Draw + (This : in out Positioner); + + procedure Draw + (This : in out Positioner; + X, Y, W, H : in Integer); + + function Handle + (This : in out Positioner; + Event : in Event_Kind) + return Event_Outcome; + + function Handle + (This : in out Positioner; + Event : in Event_Kind; + X, Y, W, H : in Integer) + return Event_Outcome; + + +private + + + type Positioner is new Widget with null record; + + overriding procedure Initialize + (This : in out Positioner); + + overriding procedure Finalize + (This : in out Positioner); + + procedure Extra_Init + (This : in out Positioner; + X, Y, W, H : in Integer; + Text : in String) + with Inline; + + procedure Extra_Final + (This : in out Positioner) + with Inline; + + + pragma Inline (Get_Coords); + pragma Inline (Set_Coords); + + pragma Inline (Set_Ecks_Bounds); + pragma Inline (Set_Ecks_Step); + pragma Inline (Get_Ecks_Minimum); + pragma Inline (Set_Ecks_Minimum); + pragma Inline (Get_Ecks_Maximum); + pragma Inline (Set_Ecks_Maximum); + pragma Inline (Get_Ecks); + pragma Inline (Set_Ecks); + + pragma Inline (Set_Why_Bounds); + pragma Inline (Set_Why_Step); + pragma Inline (Get_Why_Minimum); + pragma Inline (Set_Why_Minimum); + pragma Inline (Get_Why_Maximum); + pragma Inline (Set_Why_Maximum); + pragma Inline (Get_Why); + pragma Inline (Set_Why); + + pragma Inline (Draw); + pragma Inline (Handle); + + +end FLTK.Widgets.Positioners; + + |