home *** CD-ROM | disk | FTP | other *** search
- -- $Source: /home/harp/1/proto/monoBANK/winnt/wxform_util.ads,v $
- -- $Revision: 1.5 $ $Date: 96/03/21 12:15:49 $ $Author: stm $
-
-
- with Win32; use Win32;
- with Win32.WinDef; use Win32.WinDef;
- with Win32.WinUser;
- with Win32.WinGdi;
-
- with Interfaces.C.Strings;
- with Ada.Unchecked_Conversion;
-
-
- package Wxform_Util is
-
- -- /* dialog id's for the Transform dialog */
- IDD_EM11 : constant := 101;
- IDD_EM12 : constant := 102;
- IDD_EDX : constant := 103;
- IDD_EM21 : constant := 104;
- IDD_EM22 : constant := 105;
- IDD_EDY : constant := 106;
- IDD_13 : constant := 107;
- IDD_23 : constant := 108;
- IDD_33 : constant := 109;
- IDD_SETXFORM : constant := 110;
- IDD_IDENTITY : constant := 111;
-
- -- /* dialog id's for the Mouse dialog */
- IDD_SCREENX : constant := 201;
- IDD_SCREENY : constant := 202;
- IDD_DEVICEX : constant := 203;
- IDD_DEVICEY : constant := 204;
- IDD_WORLDX : constant := 205;
- IDD_WORLDY : constant := 206;
-
-
- -- /* special messages for doTrackobject(). */
- TROB_NEW : constant := WinUser.WM_USER+1;
- TROB_DELETE : constant := WinUser.WM_USER+2;
- TROB_PAINT : constant := WinUser.WM_USER+3;
- TROB_HITTEST : constant := WinUser.WM_USER+5;
- TROB_CENTER : constant := WinUser.WM_USER+6;
- TROB_SETXFORM : constant := WinUser.WM_USER+7;
-
- -- /* special user message for two of the dialogs */
- WM_PUTUPFLOATS : constant := WinUser.WM_USER+1;
-
- -- /* Different "Track modes." */
- TMNONE : constant := 16#0000#;
- TMMOVE : constant := 16#0001#;
- TMSIZEX : constant := 16#0002#;
- TMSIZEY : constant := 16#0004#;
- TMSIZEXY : constant := 16#0006#;
- TMSHEARX : constant := 16#0010#;
- TMSHEARY : constant := 16#0020#;
- TMROTATE : constant := 16#0008#;
-
- -- /* misc. defines for drawing and formating */
- TICKSPACE : constant := 20;
- MAXCHARS : constant := 32;
- INC : constant := 5;
- GRIDCOLOR : constant := 16#01000006#; --(COLORREF)
-
- function New_LPCSTR (S: String) return Win32.LPCSTR;
-
- FORMATFLOAT : LPCSTR := New_LPCSTR("%1.2f");
- FORMATD : LPCSTR := New_LPCSTR("%d");
-
- -- /* Record for the track object. c.f. ptoRect */
- type TrackObject;
- type TrackObject_Ptr is access all TrackObject;
- type TrackObject is record
- rect : aliased WinDef.RECT;
- xfmChange : aliased WinGdi.XFORM; -- World coordinate transform
- xfmDown : aliased WinGdi.XFORM; -- transform when mouse down occurs
- hdc_value : aliased HDC;
- Mode : aliased UINT; -- TMROTATE, TMSIZEXY, TMMOVE, ...
- Next : aliased TrackObject_Ptr;
- end record;
-
- -- /* Global variables. */
- showTransform, showMouse, showHelp : BOOL;
- hwndTransform, hwndMouse, hwndHelp : HWND;
-
- ptoRect : TrackObject;
- hInst : HINSTANCE;
- hwndMain : HWND;
-
- hPenGrid : HPEN;
-
- -- /* function prototypes. */
- procedure doTrackObject (msg : UINT;
- hwnd : HWND;
- lParam : LONG);
-
- procedure MouseMove (msg : UINT;
- hwnd : HWND;
- location : POINT);
-
- procedure CenterOrigin (hWnd : WinDef.HWND;
- the_hDc : HDC);
-
- function MainWndProc (hwnd : HWND;
- message : UINT;
- wParam : WPARAM;
- lParam : LPARAM) return LRESULT;
- pragma Convention (Stdcall, MainWndProc);
-
- function TransformDlgProc (hwnd : HWND;
- message : UINT;
- wParam : WPARAM;
- lParam : LPARAM) return BOOL;
- pragma Convention (Stdcall, TransformDlgProc);
-
- function MouseDlgProc (hwnd : HWND;
- message : UINT;
- wParam : WPARAM;
- lParam : LPARAM) return BOOL;
- pragma Convention (Stdcall, MouseDlgProc);
-
- function Null_Dlgproc (hwnd : HWND;
- message : UINT;
- wParam : WPARAM;
- lParam : LPARAM) return BOOL;
- pragma Convention (Stdcall, Null_Dlgproc);
-
- -------------------------------------------------------------------------------
- --
- -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
- -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
- -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
- -- FITNESS FOR A PARTICULAR PURPOSE. The user assumes the entire risk as to
- -- the accuracy and the use of this file. This file may be used, copied,
- -- modified and distributed only by licensees of Microsoft Corporation's
- -- WIN32 Software Development Kit in accordance with the terms of the
- -- licensee's End-User License Agreement for Microsoft Software for the
- -- WIN32 Development Kit.
- --
- -- Copyright (c) Intermetrics, Inc. 1995
- -- Portions (c) 1985-1994 Microsoft Corporation with permission.
- -- Microsoft is a registered trademark and Windows and Windows NT are
- -- trademarks of Microsoft Corporation.
- --
- -------------------------------------------------------------------------------
-
- end Wxform_Util;
-