diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2024-12-22 21:21:51 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2024-12-22 21:21:51 +1300 |
commit | 28cbb294051d47a1dd0731333dd103132b6ae793 (patch) | |
tree | e47d1b8f0be8e549184455016ea51e3aafeff650 /src/fltk-widgets-groups-browsers-textline-file.ads | |
parent | c7e4f58a5fb0d62c4af3b82dabb1b52e72f99743 (diff) |
Added Fl_File_Browser
Diffstat (limited to 'src/fltk-widgets-groups-browsers-textline-file.ads')
-rw-r--r-- | src/fltk-widgets-groups-browsers-textline-file.ads | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-browsers-textline-file.ads b/src/fltk-widgets-groups-browsers-textline-file.ads new file mode 100644 index 0000000..11093d3 --- /dev/null +++ b/src/fltk-widgets-groups-browsers-textline-file.ads @@ -0,0 +1,118 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +with + + FLTK.Filenames; + + +package FLTK.Widgets.Groups.Browsers.Textline.File is + + + type File_Browser is new Textline_Browser with private; + + type File_Browser_Reference (Data : not null access File_Browser'Class) is + limited null record with Implicit_Dereference => Data; + + type File_Kind is (Files, Directories); + + type Icon_Size is mod 256; + + + + + package Forge is + + function Create + (X, Y, W, H : in Integer; + Text : in String := "") + return File_Browser; + + end Forge; + + + + + function Load + (This : in out File_Browser; + Dir : in String; + Sort : in not null FLTK.Filenames.Compare_Function := + FLTK.Filenames.Numeric_Sort'Access) + return Natural; + + procedure Load + (This : in out File_Browser; + Dir : in String; + Sort : in not null FLTK.Filenames.Compare_Function := + FLTK.Filenames.Numeric_Sort'Access); + + + + + function Get_File_Kind + (This : in File_Browser) + return File_Kind; + + procedure Set_File_Kind + (This : in out File_Browser; + Value : in File_Kind); + + function Get_Filter + (This : in File_Browser) + return String; + + procedure Set_Filter + (This : in out File_Browser; + Value : in String); + + function Get_Icon_Size + (This : in File_Browser) + return Icon_Size; + + procedure Set_Icon_Size + (This : in out File_Browser; + Value : in Icon_Size); + + function Get_Text_Size + (This : in File_Browser) + return Font_Size; + + procedure Set_Text_Size + (This : in out File_Browser; + Size : in Font_Size); + + +private + + + type File_Browser is new Textline_Browser with null record; + + overriding procedure Initialize + (This : in out File_Browser); + + overriding procedure Finalize + (This : in out File_Browser); + + procedure Extra_Init + (This : in out File_Browser; + X, Y, W, H : in Integer; + Text : in String); + + procedure Extra_Final + (This : in out File_Browser); + + + pragma Inline (Set_File_Kind); + pragma Inline (Set_Filter); + pragma Inline (Get_Icon_Size); + pragma Inline (Set_Icon_Size); + pragma Inline (Get_Text_Size); + pragma Inline (Set_Text_Size); + + +end FLTK.Widgets.Groups.Browsers.Textline.File; + + |