--
-- Sample application using CLAW.
--
-- Edit History:
--
-- 5/ 5/96 - RLB - Created prototype version.
-- 6/13/96 - RLB - Added When_Close as suggested by Wu Wang.
-- 7/ 3/96 - RLB - Merged Wu's changes; redid termination code.
-- 7/ 7/96 - RLB - Corrected bug noted by Tom Moran.
-- 7/19/96 - RLB - Changed for many changes.
-- 7/20/96 - RLB - Redid for Modal_Dialog_Box changes.
-- 7/24/96 - W W - Made Modeless Dialog sample.
-- 7/28/96 - RLB - Merged changes.
-- 8/20/96 - RLB - Removed Open_File dialog in favor of a separate
-- program for that.
-- 8/23/96 - RLB - Updated for Tim's changes.
-- 9/ 5/96 - RLB - Updated for canvas changes.
-- 9/24/96 - RLB - Updated for exception name and other changes.
-- 9/28/96 - RLB - Updated for various changes.
-- 10/ 2/96 - RLB - Updated for still more changes.
-- 10/ 3/96 - RLB - Improved code somewhat.
-- 2/ 3/97 - RLB - Adjusted for changes.
-- 3/ 6/97 - RLB - Updated for repackaging changes.
-- 3/28/97 - RLB - Updated to use dialog autopositioning.
-- 5/23/97 - RLB - Added menu checkmarks, popup (context) menu, and
-- redid main program.
-- 5/30/97 - RLB - Fixed Popup menus not to raise an exception if already
-- open.
-- 7/ 3/97 - RLB - Redid radio buttons to use Claw.Radio_Button_Set.
-- 7/ 8/97 - RLB - Updated to use When_Popup_Menu.
-- 8/20/97 - RLB - Updated for various changes.
-- 9/11/97 - RLB - Updated mode for When_Draw. Added missing ellipses.
-- 10/ 8/97 - RLB - Revised names.
-- 10/29/97 - RLB - Made demo version, added color selection box.
----------------- Modal Dialog Test -------
with Claw.Dialog.Modal, Claw.Dialog, Claw.Radio_Button_Set;
with Claw; use Claw;
package Shape_Select is
pragma Elaborate_Body;
type Shape_Select_Type is new Claw.Dialog.Modal.Modal_Dialog_Type with private;
type Shape_Type is (Ellipses, Rectangles, Pie);
procedure Select_Shape (Window : in out CLAW.Root_Window_Type'Class;
Selected_Shape : in out Shape_Type);
-- Select a shape; the default shape is passed in, and the selected
-- shape is returned in Selected_Shape.
-- Inherits many routines, including End_Dialog.
private
package Shape_Radio_Buttons is new Claw.Radio_Button_Set (Shape_Type);
type Shape_Select_Type is new Claw.Dialog.Modal.Modal_Dialog_Type with record
Selected_Shape : Shape_Type;
Radio_Buttons : Shape_Radio_Buttons.Radio_Button_Set_Type;
end record;
-- We override the following in the private part, since the user of this
-- package does not need to know that they are overridden.
procedure When_OK (Dialog : in out Shape_Select_Type);
procedure When_Initialize (Dialog : in out Shape_Select_Type;
Windows_Set_Focus : in out Boolean);
end Shape_Select;