summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-menus.ads
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-05-01 22:56:51 +1000
committerJed Barber <jjbarber@y7mail.com>2017-05-01 22:56:51 +1000
commitfbdef14a42388934067427854b6f5559bef31e8d (patch)
treea6d8cd4df18aaeb8b5293e60d0c0120abbcd035c /src/fltk-widgets-menus.ads
parent727cd771facf506910ddbb63532b3b6af7fb1b77 (diff)
Draw method implemented for Groups, Menus, although Menus are now no longer abstract even though they should be
Diffstat (limited to 'src/fltk-widgets-menus.ads')
-rw-r--r--src/fltk-widgets-menus.ads22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/fltk-widgets-menus.ads b/src/fltk-widgets-menus.ads
index d01f02e..c745273 100644
--- a/src/fltk-widgets-menus.ads
+++ b/src/fltk-widgets-menus.ads
@@ -8,7 +8,11 @@ private with System;
package FLTK.Widgets.Menus is
- type Menu is abstract new Widget with private;
+ -- still abstract, really, because if the Draw procedure isn't
+ -- overridden it'll call the abstract C++ method
+ type Menu is new Widget with private;
+
+
type Menu_Cursor (Data : access Menu'Class) is limited null record
with Implicit_Dereference => Data;
@@ -34,7 +38,7 @@ package FLTK.Widgets.Menus is
function Create
(X, Y, W, H : in Integer;
Text : in String)
- return Menu is abstract;
+ return Menu;
procedure Add
@@ -72,7 +76,16 @@ package FLTK.Widgets.Menus is
private
- type Menu is abstract new Widget with null record;
+ -- must be overridden in any derived types
+ procedure Draw
+ (This : in out Menu);
+
+
+ type Menu is new Widget with null record;
+
+
+ overriding procedure Finalize
+ (This : in out Menu);
type Menu_Item is tagged limited
@@ -93,5 +106,8 @@ private
Flag_Divider : constant Menu_Flag := 2#10000000#;
+ package Menu_Convert is new System.Address_To_Access_Conversions (Menu'Class);
+
+
end FLTK.Widgets.Menus;