private package Claw.Low_Wnd_Proc is
--
-- CLAW - Class Library for Ada and Windows.
--
-- This package contains shared code for common Wnd_Proc processing.
--
-- Copyright 1996, 1997 R.R. Software, Inc.
-- P.O. Box 1512, Madison WI 53701
-- All rights reserved.
--
-- Note: This file cannot have an Elaborate_Body pragma, since it
-- withs packages which indirectly with it. We depend on some of
-- it's withs Elaborating it.
type Result_Type is (Do_Default, Finished,
Finished_return_True,
Unknown_Message);
-- Note: Finished_return_True is the same as Finished, except that
-- for (regular) windows, the value True (1) is returned instead of
-- the normal 0 return. (Windows sure is consistent!).
procedure Subclass_Control_Wnd_Proc(Control_Window : in out Root_Control_Type'Class);
procedure Process_Child_Command(Wnd_Obj : in Any_Window_Access_Type;
L_Param : in Claw.Win32.LParam;
Command : in Notification_Code_Type;
Id : in Identifier_Type;
Unknown_Command : in out Boolean);
-- Call When_Notify(child control @ L_Param) if possible.
-- If not possible, or When_Notify returns Unknown_Command,
-- then call When_Child_Notify(parent).
-- Assume Wnd_Obj already checked to be non-null, active
-- and L_Param /= 0, since this is an internal claw procedure.
function Process_Init_Dialog (Dialog_Obj : in Long;
Wnd : in Claw.Win32.HWnd) return
Claw.Win32.LResult;
-- Process an Init_Dialog message.
-- Sets the handle, reposition if needed, set up child controls, and
-- dispatch to When_Initialize.
function Check_Message (Wnd_Obj : in CLAW.Any_Window_Access_Type;
Message : in UInt;
W_Param : in Claw.Win32.WParam;
L_Param : in Claw.Win32.LParam) return Result_Type;
-- This routine returns:
-- Do_Default if the When_xxx returned Do_Default = True
-- Finished if the When_xxx returned Do_Default = False
-- Unknown_Message if Message is not among
-- WM_SIZE
-- WM_CHAR
-- WM_KEYDOWN
-- WM_SYSCHAR
-- WM_SYSKEYDOWN
-- WM_MOUSEMOVE
-- WM_LBUTTONDBLCLK
-- WM_LBUTTONDOWN
-- WM_LBUTTONUP
-- WM_MBUTTONDBLCLK
-- WM_MBUTTONDOWN
-- WM_MBUTTONUP
-- WM_RBUTTONDBLCLK
-- WM_RBUTTONDOWN
-- WM_RBUTTONUP
-- WM_HSCROLL
-- WM_VSCROLL
-- WM_DRAWITEM
-- WM_COMMAND
-- WM_NOTIFY
-- WM_DELETEITEM
-- WM_INITMENU
-- WM_INITMENUPOPUP
-- WM_MENUSELECT
-- Note: It is OK to process one of these messages locally; just insure
-- that it is done instead of calling this routine, and that all of the
-- appropriate actions are executed.
procedure Check_Result_Message (Wnd_Obj : in CLAW.Any_Window_Access_Type;
Message : in UInt;
W_Param : in Claw.Win32.WParam;
L_Param : in Claw.Win32.LParam;
Result_Value : out Claw.Win32.LResult;
Result_Kind : out Result_Type);
-- This routine returns:
-- Do_Default if the When_xxx returned Do_Default = True
-- Finished if the When_xxx returned Do_Default = False
-- in this case, Result_Value should be returned as
-- as the result of the message.
-- Unknown_Message if Message is not among
-- WM_CTLCOLORBTN
-- WM_CTLCOLORDLG
-- WM_CTLCOLOREDIT
-- WM_CTLCOLORLISTBOX
-- WM_CTLCOLORSCROLLBAR
-- WM_CTLCOLORSTATIC
-- WM_COMPAREITEM
-- Note: It is OK to process one of these messages locally; just insure
-- that it is done instead of calling this routine, and that all of the
-- appropriate actions are executed.
end Claw.Low_Wnd_Proc;