diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-27 15:27:42 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-27 15:27:42 +1300 |
commit | f5f624fd78421dbeb15fdda489caed6f210c730f (patch) | |
tree | c6547ba84c217cff8e884956c89ffc24ebcd95ed /body/fltk-widgets-groups-tables.adb | |
parent | 47dc4ac9eccd2e808b4c4d8e9e2be3702e1a6444 (diff) |
Added Fl_Table_Row
Diffstat (limited to 'body/fltk-widgets-groups-tables.adb')
-rw-r--r-- | body/fltk-widgets-groups-tables.adb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/body/fltk-widgets-groups-tables.adb b/body/fltk-widgets-groups-tables.adb index 9e7fd38..30cc642 100644 --- a/body/fltk-widgets-groups-tables.adb +++ b/body/fltk-widgets-groups-tables.adb @@ -824,8 +824,9 @@ package body FLTK.Widgets.Groups.Tables is procedure Initialize (This : in out Table) is begin - This.Draw_Ptr := fl_table_draw'Address; - This.Handle_Ptr := fl_table_handle'Address; + This.Draw_Ptr := fl_table_draw'Address; + This.Handle_Ptr := fl_table_handle'Address; + This.Draw_Cell_Ptr := fl_table_draw_cell'Address; end Initialize; @@ -1804,6 +1805,12 @@ package body FLTK.Widgets.Groups.Tables is Row, Column : in Natural := 0; X, Y, W, H : in Integer := 0) is + procedure my_draw_cell + (T : in Storage.Integer_Address; + E, R, C, X, Y, W, H : in Interfaces.C.int); + for my_draw_cell'Address use This.Draw_Cell_Ptr; + pragma Import (Ada, my_draw_cell); + C_Row, C_Column : Interfaces.C.int; begin case Context is @@ -1820,7 +1827,7 @@ package body FLTK.Widgets.Groups.Tables is C_Row := Interfaces.C.int (Row); C_Column := Interfaces.C.int (Column); end case; - fl_table_draw_cell + my_draw_cell (This.Void_Ptr, To_Cint (Context), C_Row, C_Column, @@ -1884,7 +1891,7 @@ package body FLTK.Widgets.Groups.Tables is Interfaces.C.int (H)); begin if Result = -1 then - raise Out_Of_Range_Error with + raise Range_Error with "Row = " & Integer'Image (Row) & ", Column = " & Integer'Image (Column); else pragma Assert (Result = 0); |