From 86a0894a1c54e69ae56e147cc943893194664304 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 11 Dec 2024 17:25:21 +1300 Subject: Abstract_Browser now Browser, slight tweaks to Select and Sort subprograms --- doc/fl_browser_.html | 140 ++++++++++--------- src/fltk-widgets-groups-browsers.adb | 253 ++++++++++++++++++++--------------- src/fltk-widgets-groups-browsers.ads | 163 +++++++++++----------- 3 files changed, 309 insertions(+), 247 deletions(-) diff --git a/doc/fl_browser_.html b/doc/fl_browser_.html index 8c98c56..0f8c5fa 100644 --- a/doc/fl_browser_.html +++ b/doc/fl_browser_.html @@ -27,8 +27,9 @@

Note:

-As the name suggests, you will likely never actually touch Abstract_Browser directly. -Only through using or creating types derived from it.

+This Browser type should really be abstract but cannot be for technical binding reasons. +If you try to use it directly you will get exceptions. Either extend it or use types +already extended from it.

@@ -37,12 +38,12 @@ Only through using or creating types derived from it.

Fl_Browser_ - Abstract_Browser + Browser   - Abstract_Browser_Reference + Browser_Reference @@ -73,7 +74,7 @@ Fl_Scrollbar hscrollbar;
 function H_Bar
-       (This : in out Abstract_Browser)
+       (This : in out Browser)
     return Valuators.Sliders.Scrollbars.Scrollbar_Reference;
 
@@ -84,7 +85,7 @@ Fl_Scrollbar scrollbar;
 function V_Bar
-       (This : in out Abstract_Browser)
+       (This : in out Browser)
     return Valuators.Sliders.Scrollbars.Scrollbar_Reference;
 
@@ -104,7 +105,7 @@ Fl_Browser_(int X, int Y, int W, int H, const char *L=0); function Create (X, Y, W, H : in Integer; Text : in String := "") - return Abstract_Browser; + return Browser; @@ -121,9 +122,13 @@ int deselect(int docallbacks=0);
 function Deselect
-       (This         : in out Abstract_Browser;
+       (This         : in out Browser;
         Do_Callbacks : in     Boolean := False)
     return Boolean;
+
+procedure Deselect
+       (This         : in out Browser;
+        Do_Callbacks : in     Boolean := False);
 
@@ -133,7 +138,7 @@ void display(void *item);
 procedure Display
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         Item : in     Item_Cursor);
 
@@ -144,7 +149,7 @@ int handle(int event);
 function Handle
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Event : in     Event_Kind)
     return Event_Outcome;
 
@@ -156,7 +161,7 @@ uchar has_scrollbar() const;
 function Get_Scrollbar_Mode
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Scrollbar_Mode;
 
@@ -167,7 +172,7 @@ void has_scrollbar(uchar mode);
 procedure Set_Scrollbar_Mode
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         Mode : in     Scrollbar_Mode);
 
@@ -178,7 +183,7 @@ int hposition() const;
 function Get_H_Position
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -189,7 +194,7 @@ void hposition(int);
 procedure Set_H_Position
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Value : in     Integer);
 
@@ -200,7 +205,7 @@ int position() const;
 function Get_V_Position
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -211,7 +216,7 @@ void position(int pos);
 procedure Set_V_Position
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Value : in     Integer);
 
@@ -222,7 +227,7 @@ void resize(int X, int Y, int W, int H);
 procedure Resize
-       (This       : in out Abstract_Browser;
+       (This       : in out Browser;
         X, Y, W, H : in     Integer);
 
@@ -233,7 +238,7 @@ void scrollbar_left();
 procedure Set_Vertical_Left
-       (This : in out Abstract_Browser);
+       (This : in out Browser);
 
@@ -243,7 +248,7 @@ void scrollbar_right();
 procedure Set_Vertical_Right
-       (This : in out Abstract_Browser);
+       (This : in out Browser);
 
@@ -253,7 +258,7 @@ int scrollbar_size() const;
 function Get_Scrollbar_Size
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -264,7 +269,7 @@ void scrollbar_size(int newSize);
 procedure Set_Scrollbar_Size
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Value : in     Integer);
 
@@ -273,14 +278,14 @@ procedure Set_Scrollbar_Size
 int scrollbar_width() const;
 
-Deprecated, see scrollbar_size +Deprecated, see scrollbar_size();
 void scrollbar_width(int width);
 
-Deprecated, see scrollbar_size +Deprecated, see scrollbar_size(int width); @@ -289,11 +294,17 @@ int select(void *item, int val=1, int docallbacks=0);
 function Set_Select
-       (This         : in out Abstract_Browser;
+       (This         : in out Browser;
         Item         : in     Item_Cursor;
         State        : in     Boolean := True;
         Do_Callbacks : in     Boolean := False)
     return Boolean;
+
+procedure Set_Select
+       (This         : in out Browser;
+        Item         : in     Item_Cursor;
+        State        : in     Boolean := True;
+        Do_Callbacks : in     Boolean := False);
 
@@ -303,10 +314,15 @@ int select_only(void *item, int docallbacks=0);
 function Select_Only
-       (This         : in out Abstract_Browser;
+       (This         : in out Browser;
         Item         : in     Item_Cursor;
         Do_Callbacks : in     Boolean := False)
     return Boolean;
+
+procedure Select_Only
+       (This         : in out Browser;
+        Item         : in     Item_Cursor;
+        Do_Callbacks : in     Boolean := False);
 
@@ -316,7 +332,7 @@ void sort(int flags=0);
 procedure Sort
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Order : in     Sort_Order);
 
@@ -327,7 +343,7 @@ Fl_Color textcolor() const;
 function Get_Text_Color
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Color;
 
@@ -338,7 +354,7 @@ void textcolor(Fl_Color col);
 procedure Set_Text_Color
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Value : in     Color);
 
@@ -349,7 +365,7 @@ Fl_Font textfont() const;
 function Get_Text_Font
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Font_Kind;
 
@@ -360,7 +376,7 @@ void textfont(Fl_Font font);
 procedure Set_Text_Font
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         Font : in     Font_Kind);
 
@@ -371,7 +387,7 @@ Fl_Fontsize textsize() const;
 function Get_Text_Size
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Font_Size;
 
@@ -382,7 +398,7 @@ void textsize(Fl_Fontsize newSize);
 procedure Set_Text_Size
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         Size : in     Font_Size);
 
@@ -400,7 +416,7 @@ void bbox(int &X, int &Y, int &W, int &H) const;
 procedure Bounding_Box
-       (This       : in     Abstract_Browser;
+       (This       : in     Browser;
         X, Y, W, H :    out Integer);
 
@@ -411,7 +427,7 @@ void deleting(void *item);
 procedure Deleting
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         Item : in     Item_Cursor);
 
@@ -422,7 +438,7 @@ int displayed(void *item) const;
 function Is_Displayed
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Boolean;
 
@@ -434,7 +450,7 @@ void draw();
 procedure Draw
-       (This : in out Abstract_Browser);
+       (This : in out Browser);
 
@@ -444,7 +460,7 @@ void * find_item(int ypos);
 function Find_Item
-       (This  : in Abstract_Browser;
+       (This  : in Browser;
         Y_Pos : in Integer)
     return Item_Cursor;
 
@@ -456,7 +472,7 @@ virtual int full_height() const;
 function Full_List_Height
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -467,7 +483,7 @@ virtual int full_width() const;
 function Full_List_Width
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -478,7 +494,7 @@ virtual int incr_height() const;
 function Average_Item_Height
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -489,7 +505,7 @@ void inserting(void *a, void *b);
 procedure Inserting
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         A, B : in     Item_Cursor);
 
@@ -500,7 +516,7 @@ virtual void * item_at(int index) const;
 function Item_At
-       (This  : in Abstract_Browser;
+       (This  : in Browser;
         Index : in Positive)
     return Item_Cursor;
 
@@ -513,7 +529,7 @@ virtual void item_draw(void *item,
 procedure Item_Draw
-       (This       : in Abstract_Browser;
+       (This       : in Browser;
         Item       : in Item_Cursor;
         X, Y, W, H : in Integer);
 
@@ -525,7 +541,7 @@ virtual void * item_first() const =0;
 function Item_First
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Item_Cursor;
 
@@ -536,7 +552,7 @@ virtual int item_height(void *item) const =0;
 function Item_Height
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Integer;
 
@@ -548,7 +564,7 @@ virtual void * item_last() const;
 function Item_Last
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Item_Cursor;
 
@@ -559,7 +575,7 @@ virtual void * item_next(void *item) const =0;
 function Item_Next
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Item_Cursor;
 
@@ -571,7 +587,7 @@ virtual void * item_prev(void *item) const =0;
 function Item_Previous
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Item_Cursor;
 
@@ -583,7 +599,7 @@ virtual int item_quick_height(void *item) const;
 function Item_Quick_Height
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Integer;
 
@@ -595,7 +611,7 @@ virtual void item_select(void *item, int val=1);
 procedure Item_Select
-       (This  : in out Abstract_Browser;
+       (This  : in out Browser;
         Item  : in     Item_Cursor;
         State : in     Boolean := True);
 
@@ -607,7 +623,7 @@ virtual int item_selected(void *item) const;
 function Item_Selected
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Boolean;
 
@@ -619,7 +635,7 @@ virtual void item_swap(void *a, void *b);
 procedure Item_Swap
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         A, B : in     Item_Cursor);
 
@@ -630,7 +646,7 @@ virtual const char * item_text(void *item) const;
 function Item_Text
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return String;
 
@@ -642,7 +658,7 @@ virtual int item_width(void *item) const =0;
 function Item_Width
-       (This : in Abstract_Browser;
+       (This : in Browser;
         Item : in Item_Cursor)
     return Integer;
 
@@ -654,7 +670,7 @@ int leftedge() const;
 function Left_Edge
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Integer;
 
@@ -665,7 +681,7 @@ void new_list();
 procedure New_List
-       (This : in out Abstract_Browser);
+       (This : in out Browser);
 
@@ -675,7 +691,7 @@ void redraw_line(void *item);
 procedure Redraw_Line
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         Item : in     Item_Cursor);
 
@@ -686,7 +702,7 @@ void redraw_lines();
 procedure Redraw_List
-       (This : in out Abstract_Browser);
+       (This : in out Browser);
 
@@ -696,7 +712,7 @@ void replacing(void *a, void *b);
 procedure Replacing
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         A, B : in     Item_Cursor);
 
@@ -707,7 +723,7 @@ void * selection() const;
 function Current_Selection
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Item_Cursor;
 
@@ -718,7 +734,7 @@ void swapping(void *a, void *b);
 procedure Swapping
-       (This : in out Abstract_Browser;
+       (This : in out Browser;
         A, B : in     Item_Cursor);
 
@@ -729,7 +745,7 @@ void * top() const;
 function Top_Item
-       (This : in Abstract_Browser)
+       (This : in Browser)
     return Item_Cursor;
 
diff --git a/src/fltk-widgets-groups-browsers.adb b/src/fltk-widgets-groups-browsers.adb index bdf79e2..08ebd60 100644 --- a/src/fltk-widgets-groups-browsers.adb +++ b/src/fltk-widgets-groups-browsers.adb @@ -330,7 +330,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Exported Hooks -- ---------------------- - package Browser_Convert is new System.Address_To_Access_Conversions (Abstract_Browser'Class); + package Browser_Convert is new System.Address_To_Access_Conversions (Browser'Class); function Full_Width_Hook @@ -342,7 +342,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Interfaces.C.int (Ada_Object.Full_List_Width); @@ -358,7 +358,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Interfaces.C.int (Ada_Object.Full_List_Height); @@ -374,7 +374,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Interfaces.C.int (Ada_Object.Average_Item_Height); @@ -390,7 +390,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Interfaces.C.int (Ada_Object.Item_Quick_Height (Address_To_Cursor (Item_Ptr))); @@ -406,7 +406,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Interfaces.C.int (Ada_Object.Item_Width (Address_To_Cursor (Item_Ptr))); @@ -422,7 +422,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Interfaces.C.int (Ada_Object.Item_Height (Address_To_Cursor (Item_Ptr))); @@ -438,7 +438,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr : in Storage.Integer_Address) return Storage.Integer_Address is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Cursor_To_Address (Ada_Object.Item_First); @@ -454,7 +454,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr : in Storage.Integer_Address) return Storage.Integer_Address is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Cursor_To_Address (Ada_Object.Item_Last); @@ -470,7 +470,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Storage.Integer_Address is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Cursor_To_Address (Ada_Object.Item_Next (Address_To_Cursor (Item_Ptr))); @@ -486,7 +486,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Storage.Integer_Address is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Cursor_To_Address (Ada_Object.Item_Previous (Address_To_Cursor (Item_Ptr))); @@ -504,7 +504,7 @@ package body FLTK.Widgets.Groups.Browsers is Index : in Interfaces.C.int) return Storage.Integer_Address is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); use type Interfaces.C.int; begin @@ -521,7 +521,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address; Int_State : in Interfaces.C.int) is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); use type Interfaces.C.int; begin @@ -540,7 +540,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Interfaces.C.int is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin return Boolean'Pos (Ada_Object.Item_Selected (Address_To_Cursor (Item_Ptr))); @@ -554,7 +554,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Item_Swap_Hook (Ada_Addr, A_Ptr, B_Ptr : in Storage.Integer_Address) is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin Ada_Object.Item_Swap (Address_To_Cursor (A_Ptr), Address_To_Cursor (B_Ptr)); @@ -573,9 +573,6 @@ package body FLTK.Widgets.Groups.Browsers is -- At the time of writing this I have no idea how task safe FLTK is anyway. - Text_Hook_Storage : Interfaces.C.Strings.chars_ptr_array (1 .. 2); - Current_Text_Store : Interfaces.C.size_t := 1; - function Item_Text_Hook (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Interfaces.C.Strings.chars_ptr; @@ -585,18 +582,18 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address) return Interfaces.C.Strings.chars_ptr is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin - Interfaces.C.Strings.Free (Text_Hook_Storage (Current_Text_Store)); - Text_Hook_Storage (Current_Text_Store) := Interfaces.C.Strings.New_String + Interfaces.C.Strings.Free (Ada_Object.Text_Store (Ada_Object.Current)); + Ada_Object.Text_Store (Ada_Object.Current) := Interfaces.C.Strings.New_String (Ada_Object.Item_Text (Address_To_Cursor (Item_Ptr))); return C_Char_Is_Not_A_String : Interfaces.C.Strings.chars_ptr := - Text_Hook_Storage (Current_Text_Store) + Ada_Object.Text_Store (Ada_Object.Current) do - Current_Text_Store := Current_Text_Store + 1; - if Current_Text_Store > Text_Hook_Storage'Last then - Current_Text_Store := Text_Hook_Storage'First; + Ada_Object.Current := Ada_Object.Current + 1; + if Ada_Object.Current > Ada_Object.Text_Store'Last then + Ada_Object.Current := Ada_Object.Text_Store'First; end if; end return; end Item_Text_Hook; @@ -611,7 +608,7 @@ package body FLTK.Widgets.Groups.Browsers is (Ada_Addr, Item_Ptr : in Storage.Integer_Address; X, Y, W, H : in Interfaces.C.int) is - Ada_Object : access Abstract_Browser'Class := + Ada_Object : access Browser'Class := Browser_Convert.To_Pointer (Storage.To_Address (Ada_Addr)); begin Ada_Object.Item_Draw @@ -630,16 +627,19 @@ package body FLTK.Widgets.Groups.Browsers is ----------------------------------- procedure Extra_Final - (This : in out Abstract_Browser) is + (This : in out Browser) is begin Extra_Final (Widget (This.Horizon)); Extra_Final (Widget (This.Vertigo)); Extra_Final (Group (This)); + for Index in This.Text_Store'Range loop + Interfaces.C.Strings.Free (This.Text_Store (Index)); + end loop; end Extra_Final; procedure Finalize - (This : in out Abstract_Browser) is + (This : in out Browser) is begin Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then @@ -649,15 +649,6 @@ package body FLTK.Widgets.Groups.Browsers is end Finalize; - procedure Finalize - (This : in out Item_Text_Hook_Final_Controller) is - begin - for Index in Text_Hook_Storage'Range loop - Interfaces.C.Strings.Free (Text_Hook_Storage (Index)); - end loop; - end Finalize; - - --------------------------- @@ -665,7 +656,7 @@ package body FLTK.Widgets.Groups.Browsers is --------------------------- procedure Extra_Init - (This : in out Abstract_Browser; + (This : in out Browser; X, Y, W, H : in Integer; Text : in String) is begin @@ -696,9 +687,9 @@ package body FLTK.Widgets.Groups.Browsers is function Create (X, Y, W, H : in Integer; Text : in String := "") - return Abstract_Browser is + return Browser is begin - return This : Abstract_Browser do + return This : Browser do This.Void_Ptr := new_fl_abstract_browser (Interfaces.C.int (X), Interfaces.C.int (Y), @@ -717,7 +708,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Access to the Browser's self contained scrollbars function H_Bar - (This : in out Abstract_Browser) + (This : in out Browser) return Valuators.Sliders.Scrollbars.Scrollbar_Reference is begin return (Data => This.Horizon'Unchecked_Access); @@ -725,7 +716,7 @@ package body FLTK.Widgets.Groups.Browsers is function V_Bar - (This : in out Abstract_Browser) + (This : in out Browser) return Valuators.Sliders.Scrollbars.Scrollbar_Reference is begin return (Data => This.Vertigo'Unchecked_Access); @@ -737,7 +728,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Item related settings function Set_Select - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor; State : in Boolean := True; Do_Callbacks : in Boolean := False) @@ -756,8 +747,26 @@ package body FLTK.Widgets.Groups.Browsers is end Set_Select; + procedure Set_Select + (This : in out Browser; + Item : in Item_Cursor; + State : in Boolean := True; + Do_Callbacks : in Boolean := False) + is + Code : Interfaces.C.int := fl_abstract_browser_select + (This.Void_Ptr, + Cursor_To_Address (Item), + Boolean'Pos (State), + Boolean'Pos (Do_Callbacks)); + begin + if Code not in 0 .. 1 then + raise Internal_FLTK_Error; + end if; + end Set_Select; + + function Select_Only - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor; Do_Callbacks : in Boolean := False) return Boolean @@ -774,8 +783,24 @@ package body FLTK.Widgets.Groups.Browsers is end Select_Only; + procedure Select_Only + (This : in out Browser; + Item : in Item_Cursor; + Do_Callbacks : in Boolean := False) + is + Code : Interfaces.C.int := fl_abstract_browser_select_only + (This.Void_Ptr, + Cursor_To_Address (Item), + Boolean'Pos (Do_Callbacks)); + begin + if Code not in 0 .. 1 then + raise Internal_FLTK_Error; + end if; + end Select_Only; + + function Current_Selection - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor is begin return Address_To_Cursor (fl_abstract_browser_selection (This.Void_Ptr)); @@ -783,7 +808,7 @@ package body FLTK.Widgets.Groups.Browsers is function Deselect - (This : in out Abstract_Browser; + (This : in out Browser; Do_Callbacks : in Boolean := False) return Boolean is @@ -798,8 +823,22 @@ package body FLTK.Widgets.Groups.Browsers is end Deselect; + procedure Deselect + (This : in out Browser; + Do_Callbacks : in Boolean := False) + is + Code : Interfaces.C.int := fl_abstract_browser_deselect + (This.Void_Ptr, + Boolean'Pos (Do_Callbacks)); + begin + if Code not in 0 .. 1 then + raise Internal_FLTK_Error; + end if; + end Deselect; + + procedure Display - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor) is begin fl_abstract_browser_display (This.Void_Ptr, Cursor_To_Address (Item)); @@ -807,7 +846,7 @@ package body FLTK.Widgets.Groups.Browsers is function Is_Displayed - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Boolean is @@ -823,7 +862,7 @@ package body FLTK.Widgets.Groups.Browsers is function Find_Item - (This : in Abstract_Browser; + (This : in Browser; Y_Pos : in Integer) return Item_Cursor is begin @@ -833,7 +872,7 @@ package body FLTK.Widgets.Groups.Browsers is function Top_Item - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor is begin return Address_To_Cursor (fl_abstract_browser_top (This.Void_Ptr)); @@ -841,7 +880,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Sort - (This : in out Abstract_Browser; + (This : in out Browser; Order : in Sort_Order) is Code : Interfaces.C.int := @@ -858,7 +897,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Scrollbar related settings function Get_Scrollbar_Mode - (This : in Abstract_Browser) + (This : in Browser) return Scrollbar_Mode is begin return Uchar_To_Mode (fl_abstract_browser_get_has_scrollbar (This.Void_Ptr)); @@ -866,7 +905,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_Scrollbar_Mode - (This : in out Abstract_Browser; + (This : in out Browser; Mode : in Scrollbar_Mode) is begin fl_abstract_browser_set_has_scrollbar (This.Void_Ptr, Mode_To_Uchar (Mode)); @@ -874,7 +913,7 @@ package body FLTK.Widgets.Groups.Browsers is function Get_H_Position - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_get_hposition (This.Void_Ptr)); @@ -882,7 +921,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_H_Position - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Integer) is begin fl_abstract_browser_set_hposition @@ -892,7 +931,7 @@ package body FLTK.Widgets.Groups.Browsers is function Get_V_Position - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_get_position (This.Void_Ptr)); @@ -900,7 +939,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_V_Position - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Integer) is begin fl_abstract_browser_set_position @@ -910,21 +949,21 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_Vertical_Left - (This : in out Abstract_Browser) is + (This : in out Browser) is begin fl_abstract_browser_scrollbar_left (This.Void_Ptr); end Set_Vertical_Left; procedure Set_Vertical_Right - (This : in out Abstract_Browser) is + (This : in out Browser) is begin fl_abstract_browser_scrollbar_right (This.Void_Ptr); end Set_Vertical_Right; function Get_Scrollbar_Size - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_get_scrollbar_size (This.Void_Ptr)); @@ -932,7 +971,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_Scrollbar_Size - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Integer) is begin fl_abstract_browser_set_scrollbar_size @@ -946,7 +985,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Text related settings function Get_Text_Color - (This : in Abstract_Browser) + (This : in Browser) return Color is begin return Color (fl_abstract_browser_get_textcolor (This.Void_Ptr)); @@ -954,7 +993,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_Text_Color - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Color) is begin fl_abstract_browser_set_textcolor (This.Void_Ptr, Interfaces.C.unsigned (Value)); @@ -962,7 +1001,7 @@ package body FLTK.Widgets.Groups.Browsers is function Get_Text_Font - (This : in Abstract_Browser) + (This : in Browser) return Font_Kind is begin return Font_Kind'Val (fl_abstract_browser_get_textfont (This.Void_Ptr)); @@ -970,7 +1009,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_Text_Font - (This : in out Abstract_Browser; + (This : in out Browser; Font : in Font_Kind) is begin fl_abstract_browser_set_textfont (This.Void_Ptr, Font_Kind'Pos (Font)); @@ -978,7 +1017,7 @@ package body FLTK.Widgets.Groups.Browsers is function Get_Text_Size - (This : in Abstract_Browser) + (This : in Browser) return Font_Size is begin return Font_Size (fl_abstract_browser_get_textsize (This.Void_Ptr)); @@ -986,7 +1025,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Set_Text_Size - (This : in out Abstract_Browser; + (This : in out Browser; Size : in Font_Size) is begin fl_abstract_browser_set_textsize (This.Void_Ptr, Interfaces.C.int (Size)); @@ -998,7 +1037,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Graphical dimensions and redrawing procedure Resize - (This : in out Abstract_Browser; + (This : in out Browser; X, Y, W, H : in Integer) is begin fl_abstract_browser_resize @@ -1011,7 +1050,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Bounding_Box - (This : in Abstract_Browser; + (This : in Browser; X, Y, W, H : out Integer) is begin fl_abstract_browser_bbox @@ -1024,7 +1063,7 @@ package body FLTK.Widgets.Groups.Browsers is function Left_Edge - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_leftedge (This.Void_Ptr)); @@ -1032,7 +1071,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Redraw_Line - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor) is begin fl_abstract_browser_redraw_line (This.Void_Ptr, Cursor_To_Address (Item)); @@ -1040,7 +1079,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Redraw_List - (This : in out Abstract_Browser) is + (This : in out Browser) is begin fl_abstract_browser_redraw_lines (This.Void_Ptr); end Redraw_List; @@ -1051,7 +1090,7 @@ package body FLTK.Widgets.Groups.Browsers is -- Optional Override API function Full_List_Width - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_full_width (This.Void_Ptr)); @@ -1059,7 +1098,7 @@ package body FLTK.Widgets.Groups.Browsers is function Full_List_Height - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_full_height (This.Void_Ptr)); @@ -1067,7 +1106,7 @@ package body FLTK.Widgets.Groups.Browsers is function Average_Item_Height - (This : in Abstract_Browser) + (This : in Browser) return Integer is begin return Integer (fl_abstract_browser_incr_height (This.Void_Ptr)); @@ -1075,7 +1114,7 @@ package body FLTK.Widgets.Groups.Browsers is function Item_Quick_Height - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Integer is begin @@ -1090,96 +1129,96 @@ package body FLTK.Widgets.Groups.Browsers is -- Mandatory Override API function Item_Width - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Integer is begin - return raise Program_Error with "Abstract_Browser Item_Width must be overridden"; + return raise Program_Error with "Browser Item_Width must be overridden"; end Item_Width; function Item_Height - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Integer is begin - return raise Program_Error with "Abstract_Browser Item_Height must be overridden"; + return raise Program_Error with "Browser Item_Height must be overridden"; end Item_Height; function Item_First - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor is begin - return raise Program_Error with "Abstract_Browser Item_First must be overridden"; + return raise Program_Error with "Browser Item_First must be overridden"; end Item_First; function Item_Last - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor is begin - return raise Program_Error with "Abstract_Browser Item_Last must be overridden"; + return raise Program_Error with "Browser Item_Last must be overridden"; end Item_Last; function Item_Next - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Item_Cursor is begin - return raise Program_Error with "Abstract_Browser Item_Next must be overridden"; + return raise Program_Error with "Browser Item_Next must be overridden"; end Item_Next; function Item_Previous - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Item_Cursor is begin - return raise Program_Error with "Abstract_Browser Item_Previous must be overridden"; + return raise Program_Error with "Browser Item_Previous must be overridden"; end Item_Previous; function Item_At - (This : in Abstract_Browser; + (This : in Browser; Index : in Positive) return Item_Cursor is begin - return raise Program_Error with "Abstract_Browser Item_At must be overridden"; + return raise Program_Error with "Browser Item_At must be overridden"; end Item_At; procedure Item_Select - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor; State : in Boolean := True) is begin - raise Program_Error with "Abstract_Browser Item_Select must be overridden"; + raise Program_Error with "Browser Item_Select must be overridden"; end Item_Select; function Item_Selected - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Boolean is begin - return raise Program_Error with "Abstract_Browser Item_Selected must be overridden"; + return raise Program_Error with "Browser Item_Selected must be overridden"; end Item_Selected; procedure Item_Swap - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor) is begin - raise Program_Error with "Abstract_Browser Item_Swap must be overridden"; + raise Program_Error with "Browser Item_Swap must be overridden"; end Item_Swap; function Item_Text - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return String is begin - return raise Program_Error with "Abstract_Browser Item_Text must be overridden"; + return raise Program_Error with "Browser Item_Text must be overridden"; end Item_Text; procedure Item_Draw - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor; X, Y, W, H : in Integer) is begin - raise Program_Error with "Abstract_Browser Item_Draw must be overridden"; + raise Program_Error with "Browser Item_Draw must be overridden"; end Item_Draw; @@ -1188,14 +1227,14 @@ package body FLTK.Widgets.Groups.Browsers is -- Cache invalidation procedure New_List - (This : in out Abstract_Browser) is + (This : in out Browser) is begin fl_abstract_browser_new_list (This.Void_Ptr); end New_List; procedure Inserting - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor) is begin fl_abstract_browser_inserting @@ -1206,7 +1245,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Deleting - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor) is begin fl_abstract_browser_deleting @@ -1216,7 +1255,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Replacing - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor) is begin fl_abstract_browser_replacing @@ -1227,7 +1266,7 @@ package body FLTK.Widgets.Groups.Browsers is procedure Swapping - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor) is begin fl_abstract_browser_swapping @@ -1242,14 +1281,14 @@ package body FLTK.Widgets.Groups.Browsers is -- Standard Override API procedure Draw - (This : in out Abstract_Browser) is + (This : in out Browser) is begin fl_abstract_browser_draw (This.Void_Ptr); end Draw; function Handle - (This : in out Abstract_Browser; + (This : in out Browser; Event : in Event_Kind) return Event_Outcome is begin diff --git a/src/fltk-widgets-groups-browsers.ads b/src/fltk-widgets-groups-browsers.ads index 66cfdd3..1ba16dd 100644 --- a/src/fltk-widgets-groups-browsers.ads +++ b/src/fltk-widgets-groups-browsers.ads @@ -11,17 +11,16 @@ with private with - Ada.Finalization, Ada.Unchecked_Conversion, - Interfaces.C; + Interfaces.C.Strings; package FLTK.Widgets.Groups.Browsers is - type Abstract_Browser is new Group with private; + type Browser is new Group with private; - type Abstract_Browser_Reference (Data : not null access Abstract_Browser'Class) is + type Browser_Reference (Data : not null access Browser'Class) is limited null record with Implicit_Dereference => Data; type Item_Cursor is mod System.Memory_Size; @@ -44,7 +43,7 @@ package FLTK.Widgets.Groups.Browsers is function Create (X, Y, W, H : in Integer; Text : in String := "") - return Abstract_Browser; + return Browser; end Forge; @@ -54,11 +53,11 @@ package FLTK.Widgets.Groups.Browsers is -- Access to the Browser's self contained scrollbars function H_Bar - (This : in out Abstract_Browser) + (This : in out Browser) return Valuators.Sliders.Scrollbars.Scrollbar_Reference; function V_Bar - (This : in out Abstract_Browser) + (This : in out Browser) return Valuators.Sliders.Scrollbars.Scrollbar_Reference; @@ -67,49 +66,64 @@ package FLTK.Widgets.Groups.Browsers is -- Item related settings function Set_Select - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor; State : in Boolean := True; Do_Callbacks : in Boolean := False) return Boolean; + procedure Set_Select + (This : in out Browser; + Item : in Item_Cursor; + State : in Boolean := True; + Do_Callbacks : in Boolean := False); + function Select_Only - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor; Do_Callbacks : in Boolean := False) return Boolean; + procedure Select_Only + (This : in out Browser; + Item : in Item_Cursor; + Do_Callbacks : in Boolean := False); + function Current_Selection - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor; function Deselect - (This : in out Abstract_Browser; + (This : in out Browser; Do_Callbacks : in Boolean := False) return Boolean; + procedure Deselect + (This : in out Browser; + Do_Callbacks : in Boolean := False); + procedure Display - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor); function Is_Displayed - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Boolean; function Find_Item - (This : in Abstract_Browser; + (This : in Browser; Y_Pos : in Integer) return Item_Cursor; function Top_Item - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor; -- Not task safe due to internal issues with converting Ada Strings to char* in C. -- Unsure how much that matters since unsure how task safe FLTK is anyway. procedure Sort - (This : in out Abstract_Browser; + (This : in out Browser; Order : in Sort_Order); @@ -118,41 +132,41 @@ package FLTK.Widgets.Groups.Browsers is -- Scrollbar related settings function Get_Scrollbar_Mode - (This : in Abstract_Browser) + (This : in Browser) return Scrollbar_Mode; procedure Set_Scrollbar_Mode - (This : in out Abstract_Browser; + (This : in out Browser; Mode : in Scrollbar_Mode); function Get_H_Position - (This : in Abstract_Browser) + (This : in Browser) return Integer; procedure Set_H_Position - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Integer); function Get_V_Position - (This : in Abstract_Browser) + (This : in Browser) return Integer; procedure Set_V_Position - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Integer); procedure Set_Vertical_Left - (This : in out Abstract_Browser); + (This : in out Browser); procedure Set_Vertical_Right - (This : in out Abstract_Browser); + (This : in out Browser); function Get_Scrollbar_Size - (This : in Abstract_Browser) + (This : in Browser) return Integer; procedure Set_Scrollbar_Size - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Integer); @@ -161,27 +175,27 @@ package FLTK.Widgets.Groups.Browsers is -- Text related settings function Get_Text_Color - (This : in Abstract_Browser) + (This : in Browser) return Color; procedure Set_Text_Color - (This : in out Abstract_Browser; + (This : in out Browser; Value : in Color); function Get_Text_Font - (This : in Abstract_Browser) + (This : in Browser) return Font_Kind; procedure Set_Text_Font - (This : in out Abstract_Browser; + (This : in out Browser; Font : in Font_Kind); function Get_Text_Size - (This : in Abstract_Browser) + (This : in Browser) return Font_Size; procedure Set_Text_Size - (This : in out Abstract_Browser; + (This : in out Browser; Size : in Font_Size); @@ -190,23 +204,23 @@ package FLTK.Widgets.Groups.Browsers is -- Graphical dimensions and redrawing procedure Resize - (This : in out Abstract_Browser; + (This : in out Browser; X, Y, W, H : in Integer); procedure Bounding_Box - (This : in Abstract_Browser; + (This : in Browser; X, Y, W, H : out Integer); function Left_Edge - (This : in Abstract_Browser) + (This : in Browser) return Integer; procedure Redraw_Line - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor); procedure Redraw_List - (This : in out Abstract_Browser); + (This : in out Browser); @@ -215,83 +229,83 @@ package FLTK.Widgets.Groups.Browsers is -- even though these are called from within FLTK. function Full_List_Width - (This : in Abstract_Browser) + (This : in Browser) return Integer; function Full_List_Height - (This : in Abstract_Browser) + (This : in Browser) return Integer; function Average_Item_Height - (This : in Abstract_Browser) + (This : in Browser) return Integer; function Item_Quick_Height - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Integer; - -- You MUST override these subprograms if deriving a type from Abstract_Browser - -- or your program will crash, since they are called from within FLTK and do not - -- have any implementations given. By default here they will raise an exception. + -- You MUST override these subprograms if deriving a type from Browser or your + -- program will crash, since they are called from within FLTK and do not have + -- any implementations given. By default here they will raise an exception. function Item_Width - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Integer; function Item_Height - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Integer; function Item_First - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor; function Item_Last - (This : in Abstract_Browser) + (This : in Browser) return Item_Cursor; function Item_Next - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Item_Cursor; function Item_Previous - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Item_Cursor; function Item_At - (This : in Abstract_Browser; + (This : in Browser; Index : in Positive) return Item_Cursor; procedure Item_Select - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor; State : in Boolean := True); function Item_Selected - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return Boolean; procedure Item_Swap - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor); function Item_Text - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor) return String; procedure Item_Draw - (This : in Abstract_Browser; + (This : in Browser; Item : in Item_Cursor; X, Y, W, H : in Integer); @@ -301,22 +315,22 @@ package FLTK.Widgets.Groups.Browsers is -- Cache invalidation procedure New_List - (This : in out Abstract_Browser); + (This : in out Browser); procedure Inserting - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor); procedure Deleting - (This : in out Abstract_Browser; + (This : in out Browser; Item : in Item_Cursor); procedure Replacing - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor); procedure Swapping - (This : in out Abstract_Browser; + (This : in out Browser; A, B : in Item_Cursor); @@ -326,10 +340,10 @@ package FLTK.Widgets.Groups.Browsers is -- even though these are called from within FLTK. procedure Draw - (This : in out Abstract_Browser); + (This : in out Browser); function Handle - (This : in out Abstract_Browser; + (This : in out Browser; Event : in Event_Kind) return Event_Outcome; @@ -337,21 +351,23 @@ package FLTK.Widgets.Groups.Browsers is private - type Abstract_Browser is new Group with record - Horizon : aliased Valuators.Sliders.Scrollbars.Scrollbar; - Vertigo : aliased Valuators.Sliders.Scrollbars.Scrollbar; + type Browser is new Group with record + Horizon : aliased Valuators.Sliders.Scrollbars.Scrollbar; + Vertigo : aliased Valuators.Sliders.Scrollbars.Scrollbar; + Text_Store : Interfaces.C.Strings.chars_ptr_array (1 .. 2); + Current : Interfaces.C.size_t := 1; end record; overriding procedure Finalize - (This : in out Abstract_Browser); + (This : in out Browser); procedure Extra_Init - (This : in out Abstract_Browser; + (This : in out Browser; X, Y, W, H : in Integer; Text : in String); procedure Extra_Final - (This : in out Abstract_Browser); + (This : in out Browser); pragma Assert @@ -428,15 +444,6 @@ private pragma Inline (Handle); - -- Needed to ensure chars_ptr storage is properly cleaned up - type Item_Text_Hook_Final_Controller is new Ada.Finalization.Controlled with null record; - - overriding procedure Finalize - (This : in out Item_Text_Hook_Final_Controller); - - Cleanup : Item_Text_Hook_Final_Controller; - - end FLTK.Widgets.Groups.Browsers; -- cgit