From f5f624fd78421dbeb15fdda489caed6f210c730f Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Mon, 27 Jan 2025 15:27:42 +1300 Subject: Added Fl_Table_Row --- spec/fltk-widgets-groups-tables-row.ads | 137 ++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 spec/fltk-widgets-groups-tables-row.ads (limited to 'spec/fltk-widgets-groups-tables-row.ads') diff --git a/spec/fltk-widgets-groups-tables-row.ads b/spec/fltk-widgets-groups-tables-row.ads new file mode 100644 index 0000000..e51068a --- /dev/null +++ b/spec/fltk-widgets-groups-tables-row.ads @@ -0,0 +1,137 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +package FLTK.Widgets.Groups.Tables.Row is + + + type Row_Table is new Table with private; + + type Row_Table_Reference (Data : not null access Row_Table'Class) is limited null record + with Implicit_Dereference => Data; + + type Row_Select_Mode is (Select_None, Select_Single, Select_Multiple); + + type Selection_State is (Deselected, Selected, Toggle); + + + + + package Forge is + + function Create + (X, Y, W, H : in Integer; + Text : in String := "") + return Row_Table; + + function Create + (Parent : in out Groups.Group'Class; + X, Y, W, H : in Integer; + Text : in String := "") + return Row_Table; + + end Forge; + + + + + procedure Clear + (This : in out Row_Table); + + + + + function Get_Rows + (This : in Row_Table) + return Natural; + + procedure Set_Rows + (This : in out Row_Table; + Value : in Natural); + + + + + function Is_Row_Selected + (This : in Row_Table; + Row : in Positive) + return Boolean; + + procedure Select_Row + (This : in out Row_Table; + Row : in Positive; + Value : in Selection_State := Selected); + + function Select_Row + (This : in out Row_Table; + Row : in Positive; + Value : in Selection_State := Selected) + return Boolean; + + procedure Select_All_Rows + (This : in out Row_Table; + Value : in Selection_State := Selected); + + function Get_Row_Select_Mode + (This : in Row_Table) + return Row_Select_Mode; + + procedure Set_Row_Select_Mode + (This : in out Row_Table; + Value : in Row_Select_Mode); + + + + + procedure Cell_Dimensions + (This : in Row_Table; + Context : in Table_Context; + Row, Column : in Positive; + X, Y, W, H : out Integer); + + function Handle + (This : in out Row_Table; + Event : in Event_Kind) + return Event_Outcome; + + +private + + + type Row_Table is new Table with null record; + + overriding procedure Initialize + (This : in out Row_Table); + + overriding procedure Finalize + (This : in out Row_Table); + + procedure Extra_Init + (This : in out Row_Table; + X, Y, W, H : in Integer; + Text : in String) + with Inline; + + procedure Extra_Final + (This : in out Row_Table) + with Inline; + + + pragma Inline (Get_Rows); + pragma Inline (Set_Rows); + + pragma Inline (Is_Row_Selected); + pragma Inline (Select_Row); + pragma Inline (Select_All_Rows); + pragma Inline (Get_Row_Select_Mode); + pragma Inline (Set_Row_Select_Mode); + + pragma Inline (Cell_Dimensions); + pragma Inline (Handle); + + +end FLTK.Widgets.Groups.Tables.Row; + + -- cgit