diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-11-10 18:56:47 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-11-10 18:56:47 +1100 |
commit | de5a891d0049a85e85e243979e5fc116a03e5c6d (patch) | |
tree | be72c69165b5662c672ad5d826cda89abda7ea62 /src/fltk_binding/fltk-popups.adb | |
parent | 300d6ba8fd25fc518117114bca7a0201c360c84a (diff) |
Renamed popups to dialogs
Diffstat (limited to 'src/fltk_binding/fltk-popups.adb')
-rw-r--r-- | src/fltk_binding/fltk-popups.adb | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/src/fltk_binding/fltk-popups.adb b/src/fltk_binding/fltk-popups.adb deleted file mode 100644 index d6ac8e9..0000000 --- a/src/fltk_binding/fltk-popups.adb +++ /dev/null @@ -1,110 +0,0 @@ - - -with Interfaces.C; -with Interfaces.C.Strings; -use type Interfaces.C.Strings.chars_ptr; - - -package body FLTK.Popups is - - - procedure popup_fl_alert - (M : in Interfaces.C.char_array); - pragma Import (C, popup_fl_alert, "popup_fl_alert"); - - function popup_fl_choice - (M, A, B, C : in Interfaces.C.char_array) - return Interfaces.C.int; - pragma Import (C, popup_fl_choice, "popup_fl_choice"); - - function popup_fl_file_chooser - (M, P, D : in Interfaces.C.char_array; - R : in Interfaces.C.int) - return Interfaces.C.Strings.chars_ptr; - pragma Import (C, popup_fl_file_chooser, "popup_fl_file_chooser"); - - function popup_fl_input - (M, D : in Interfaces.C.char_array) - return Interfaces.C.Strings.chars_ptr; - pragma Import (C, popup_fl_input, "popup_fl_input"); - - procedure popup_fl_message - (M : in Interfaces.C.char_array); - pragma Import (C, popup_fl_message, "popup_fl_message"); - - - - - procedure Alert - (Message : String) is - begin - popup_fl_alert (Interfaces.C.To_C (Message)); - end Alert; - - - - - function Three_Way_Choice - (Message, Button1, Button2, Button3 : in String) - return Choice - is - Result : Interfaces.C.int := popup_fl_choice - (Interfaces.C.To_C (Message), - Interfaces.C.To_C (Button1), - Interfaces.C.To_C (Button2), - Interfaces.C.To_C (Button3)); - begin - return Choice'Val (Result); - end Three_Way_Choice; - - - - - function File_Chooser - (Message, Filter_Pattern, Default : in String; - Relative : in Boolean := False) - return String - is - Result : Interfaces.C.Strings.chars_ptr := popup_fl_file_chooser - (Interfaces.C.To_C (Message), - Interfaces.C.To_C (Filter_Pattern), - Interfaces.C.To_C (Default), - Boolean'Pos (Relative)); - begin - if Result = Interfaces.C.Strings.Null_Ptr then - return ""; - else - return Interfaces.C.Strings.Value (Result); - end if; - end File_Chooser; - - - - - function Text_Input - (Message, Default : in String) - return String - is - Result : Interfaces.C.Strings.chars_ptr := popup_fl_input - (Interfaces.C.To_C (Message), - Interfaces.C.To_C (Default)); - begin - if Result = Interfaces.C.Strings.Null_Ptr then - return ""; - else - return Interfaces.C.Strings.Value (Result); - end if; - end Text_Input; - - - - - procedure Message_Box - (Message : in String) is - begin - popup_fl_message (Interfaces.C.To_C (Message)); - end Message_Box; - - -end FLTK.Popups; - |