summaryrefslogtreecommitdiff
path: root/body/fltk-widgets-groups-browsers-textline-file.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-02-06 19:28:33 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-02-06 19:28:33 +1300
commit547e538476a788dfeb5974f9b8ad29441d18980b (patch)
tree00a3c7d80ee403969971bc4b814876b4399f3ada /body/fltk-widgets-groups-browsers-textline-file.adb
parentbefe66a0a98a58e0bdb31bb8c2db4a975a744072 (diff)
Slightly better / more consistent comments
Diffstat (limited to 'body/fltk-widgets-groups-browsers-textline-file.adb')
-rw-r--r--body/fltk-widgets-groups-browsers-textline-file.adb66
1 files changed, 47 insertions, 19 deletions
diff --git a/body/fltk-widgets-groups-browsers-textline-file.adb b/body/fltk-widgets-groups-browsers-textline-file.adb
index 5585b6d..b437bae 100644
--- a/body/fltk-widgets-groups-browsers-textline-file.adb
+++ b/body/fltk-widgets-groups-browsers-textline-file.adb
@@ -27,6 +27,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
-- Functions From C --
------------------------
+ -- Errors, File Data --
+
function get_error_message
return Interfaces.C.Strings.chars_ptr;
pragma Import (C, get_error_message, "get_error_message");
@@ -42,6 +44,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Allocation --
+
function new_fl_file_browser
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
@@ -57,6 +61,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Directory --
+
function fl_file_browser_load
(B : in Storage.Integer_Address;
D : in Interfaces.C.char_array;
@@ -68,6 +74,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Settings --
+
function fl_file_browser_get_filetype
(B : in Storage.Integer_Address)
return Interfaces.C.int;
@@ -119,6 +127,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Item Implementation --
+
function fl_file_browser_item_width
(B, I : in Storage.Integer_Address)
return Interfaces.C.int;
@@ -194,6 +204,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- List Implementation --
+
function fl_file_browser_full_width
(B : in Storage.Integer_Address)
return Interfaces.C.int;
@@ -221,6 +233,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Drawing, Events --
+
procedure fl_file_browser_draw
(B : in Storage.Integer_Address);
pragma Import (C, fl_file_browser_draw, "fl_file_browser_draw");
@@ -236,6 +250,32 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -------------
+ -- Hooks --
+ -------------
+
+ Current_Sort : FLTK.Filenames.Compare_Function;
+
+ function Compare_Hook
+ (DA, DB : in Storage.Integer_Address)
+ return Interfaces.C.int;
+
+ pragma Convention (C, Compare_Hook);
+
+ function Compare_Hook
+ (DA, DB : in Storage.Integer_Address)
+ return Interfaces.C.int
+ is
+ Result : FLTK.Filenames.Comparison := Current_Sort
+ (Interfaces.C.Strings.Value (filename_dname (DA, 0)),
+ Interfaces.C.Strings.Value (filename_dname (DB, 0)));
+ begin
+ return FLTK.Filenames.Comparison'Pos (Result) - 1;
+ end Compare_Hook;
+
+
+
+
-------------------
-- Destructors --
-------------------
@@ -338,25 +378,7 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
-- API Subprograms --
-----------------------
- Current_Sort : FLTK.Filenames.Compare_Function;
-
- function Compare_Hook
- (DA, DB : in Storage.Integer_Address)
- return Interfaces.C.int;
-
- pragma Convention (C, Compare_Hook);
-
- function Compare_Hook
- (DA, DB : in Storage.Integer_Address)
- return Interfaces.C.int
- is
- Result : FLTK.Filenames.Comparison := Current_Sort
- (Interfaces.C.Strings.Value (filename_dname (DA, 0)),
- Interfaces.C.Strings.Value (filename_dname (DB, 0)));
- begin
- return FLTK.Filenames.Comparison'Pos (Result) - 1;
- end Compare_Hook;
-
+ -- Directory --
function Load
(This : in out File_Browser;
@@ -397,6 +419,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Settings --
+
function Get_File_Kind
(This : in File_Browser)
return File_Kind
@@ -476,6 +500,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- List Implementation --
+
function Full_List_Height
(This : in File_Browser)
return Integer is
@@ -494,6 +520,8 @@ package body FLTK.Widgets.Groups.Browsers.Textline.File is
+ -- Item Implementation --
+
function Item_Width
(This : in File_Browser;
Item : in Item_Cursor)