diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fltk-widgets-groups-tables-row.ads | 137 | ||||
-rw-r--r-- | spec/fltk-widgets-groups-tables.ads | 6 |
2 files changed, 141 insertions, 2 deletions
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; + + diff --git a/spec/fltk-widgets-groups-tables.ads b/spec/fltk-widgets-groups-tables.ads index 7d398b5..5b52623 100644 --- a/spec/fltk-widgets-groups-tables.ads +++ b/spec/fltk-widgets-groups-tables.ads @@ -11,7 +11,8 @@ with private with - Interfaces.C; + Interfaces.C, + System; package FLTK.Widgets.Groups.Tables is @@ -31,7 +32,7 @@ package FLTK.Widgets.Groups.Tables is type Tab_Navigation is (Widget_Focus, Navigate_Cells); - Out_Of_Range_Error : exception; + Range_Error : exception; @@ -493,6 +494,7 @@ private type Table is new Group with record Horizon, Vertigo : aliased Valuators.Sliders.Scrollbars.Scrollbar; Playing_Area : aliased Scrolls.Scroll; + Draw_Cell_Ptr : System.Address; end record; overriding procedure Initialize |