From 329d2b5b2df376904c2468738630b9d052d283e5 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 31 May 2017 17:22:20 +1000 Subject: More methods added to Window widget --- src/fltk-widgets-groups-windows.ads | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) (limited to 'src/fltk-widgets-groups-windows.ads') diff --git a/src/fltk-widgets-groups-windows.ads b/src/fltk-widgets-groups-windows.ads index eea2a6e..ac943c5 100644 --- a/src/fltk-widgets-groups-windows.ads +++ b/src/fltk-widgets-groups-windows.ads @@ -1,6 +1,7 @@ with FLTK.Images.RGB; +private with Interfaces.C; package FLTK.Widgets.Groups.Windows is @@ -12,6 +13,14 @@ package FLTK.Widgets.Groups.Windows is type Border_State is (None, Visible); + type Cursor is + (Default, Arrow, Crosshair, Wait, + Insert, Hand, Help, Move, + NS, WE, NWSE, NESW, + N, NE, E, SE, S, SW, W, NW, + None); + + function Create (X, Y, W, H : in Integer; Text : in String) @@ -31,6 +40,10 @@ package FLTK.Widgets.Groups.Windows is (This : in Window); + procedure Make_Current + (This : in out Window); + + function Get_Border (This : in Window) return Border_State; @@ -66,6 +79,36 @@ package FLTK.Widgets.Groups.Windows is (This : in out Window); + procedure Set_Cursor + (This : in out Window; + To : in Cursor); + + + procedure Set_Default_Cursor + (This : in out Window; + To : in Cursor); + + + function Get_X_Root + (This : in Window) + return Integer; + + + function Get_Y_Root + (This : in Window) + return Integer; + + + function Get_Decorated_W + (This : in Window) + return Integer; + + + function Get_Decorated_H + (This : in Window) + return Integer; + + procedure Draw (This : in out Window); @@ -86,5 +129,31 @@ private (This : in out Window); + -- What delightful magic numbers FLTK cursors are! + -- (These correspond to the enum found in Enumerations.H) + Cursor_Values : array (Cursor) of Interfaces.C.int := + (Default => 0, + Arrow => 35, + Crosshair => 66, + Wait => 76, + Insert => 77, + Hand => 31, + Help => 47, + Move => 27, + NS => 78, + WE => 79, + NWSE => 80, + NESW => 81, + N => 70, + NE => 69, + E => 49, + SE => 8, + S => 9, + SW => 7, + W => 36, + NW => 68, + None => 255); + + end FLTK.Widgets.Groups.Windows; -- cgit