Type Summary
Action_Event |
Base_Window_Access |
Base_Window_Type derived from Limited_Controlled |
| Overridden Operations: |
Finalize
|
| New Operations: |
Accelerator_Handle,
Accelerator_Handle,
Accelerator_Table,
Attach,
Attach_Control,
Attach_Dialog,
Attach_Dialog_Item,
Border,
Border,
Capture_Mouse,
Center,
Center,
Child,
Client_Area_Height,
Client_Area_Height,
Client_Area_Size,
Client_Area_Width,
Client_Area_Width,
Close,
Control,
Controlling_Parent,
Create_Control,
Disable,
Dock,
Dock,
Enable,
Enabled,
Enabled,
End_Dialog,
Enumerate_Children,
Fire_On_Context_Menu,
Fire_On_Create,
Fire_On_Destroy,
Fire_On_Horizontal_Scroll,
Fire_On_Pre_Create,
Fire_On_Vertical_Scroll,
First_Window,
Focus,
Focus,
Freeze,
Get_Canvas,
Get_Font,
Get_Full_Window_Canvas,
Group,
Group,
Handle,
Height,
Height,
Hide,
Horizontal_Scroll_Bar,
Horizontal_Scroll_Bar,
ID,
Is_Dialog,
Is_Dialog,
Is_Modal,
Is_Modal,
Keyboard_Support,
Keyboard_Support,
Last_Window,
Left,
Left,
MDI_Client_Window,
MDI_Client_Window,
Modal_Result,
Modal_Result,
Move,
Next_Tab_Stop,
Next_Window,
On_Command,
On_Context_Menu,
On_Context_Menu_Handler,
On_Create,
On_Create_Handler,
On_Destroy,
On_Destroy_Handler,
On_Draw_Item,
On_Filter_Message,
On_Horizontal_Scroll,
On_Horizontal_Scroll_Handler,
On_Message,
On_Notify,
On_Pre_Create,
On_Pre_Create_Handler,
On_Vertical_Scroll,
On_Vertical_Scroll_Handler,
Order,
Order,
Parent,
Parent,
Point_To_Client,
Point_To_Desktop,
Previous_Tab_Stop,
Previous_Window,
Redraw,
Set_Font,
Show,
Size,
Tab_Stop,
Tab_Stop,
Text,
Text,
Text_Length,
Thaw,
Top,
Top,
Valid,
Vertical_Scroll_Bar,
Vertical_Scroll_Bar,
Visible,
Visible,
Width,
Width
|
| Inherited Operations: |
Initialize
|
Dock_Type |
Enumerate_Function |
Link_Type_Type |
Location_Action_Event |
Notification |
Order_Position_Type |
Pointer_To_Base_Window_Class |
Pointer_To_Notification |
Pre_Create_Event |
Scroll_Event |
Scroll_Request_Type |
WNDCLASS |
| Primitive Operations: |
Register_Class
|
|
Constants and Named Numbers
CS_BYTEALIGNCLIENT : constant := 4096;
|
|
Class style: Align client area on x byte boundary
|
CS_BYTEALIGNWINDOW : constant := 8192;
|
|
Class style: Align window on x byte boundary
|
CS_CLASSDC : constant := 64;
|
|
Class style: DC shared by class
|
CS_DBLCLKS : constant := 8;
|
|
Class style: Send double click message to window
|
CS_GLOBALCLASS : constant := 16384;
|
|
Class style: Application global
|
CS_HREDRAW : constant := 2;
|
|
Class style: Redraw for horizontal change
|
CS_IME : constant := 65536;
|
CS_KEYCVTWINDOW : constant := 4;
|
CS_NOCLOSE : constant := 512;
|
|
Class style: Inhibit close on system menu
|
CS_NOKEYCVT : constant := 256;
|
CS_OWNDC : constant := 32;
|
|
Class style: DC for each window instance
|
CS_PARENTDC : constant := 128;
|
|
Class style: Use DC of parent
|
CS_SAVEBITS : constant := 2048;
|
|
Class style: Save screen image behind window
|
CS_VREDRAW : constant := 1;
|
|
Class style: Redraw for vertical change
|
|
Other Items:
|
use type Interfaces.C.unsigned;
|
Base_Window_Type
Base_Window_Type is the parent Class of all GWindows GUIs widgets.
It is generally not used directly
|
|
|
|
|
procedure Finalize (Object : in out Base_Window_Type);
|
|
Cleans resources for dynamicly created windows. Will also close window
if it is open.
|
|
procedure Accelerator_Table
(Window : in out Base_Window_Type;
Name : in GString);
|
|
Set accelerator table for window from resource Name
To specify a numeric resource use #XXXX where XXXX is the resource ID
|
|
|
|
|
|
function Dock (Window : in Base_Window_Type) return Dock_Type;
|
|
Set requested docking location of this object
GWindows.Windows provides a procedure Dock_Children
that is called in the default On_Size handler that
will dock windows based on this property
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Valid (Window : in Base_Window_Type) return Boolean;
|
|
If is a valid window object, ie. if it has been created and has
not been destroyed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Size (Window : in out Base_Window_Type;
Width : in Natural;
Height : in Natural);
|
|
Change size of window
|
|
procedure Client_Area_Size (Window : in out Base_Window_Type;
Width : in Natural;
Height : in Natural);
|
|
Change size of window so that the client area will be widthxheight
|
|
|
|
|
|
|
|
|
function Child (Window : in Base_Window_Type) return Boolean;
|
|
Returns true if window is a child of another window
|
|
|
|
function Modal_Result (Window : in Base_Window_Type) return Integer;
|
|
Modal result is set automaticly by the GWindows.Events.Do_Dialog_*
events
|
|
function ID (Window : in Base_Window_Type) return Integer;
|
|
Returns the ID set for the control or window at the time of creation
|
|
|
|
|
|
|
procedure Redraw (Window : in out Base_Window_Type;
Erase : in Boolean := False;
Redraw_Now : in Boolean := False);
|
|
Async. requests of a redraw of window
|
|
|
|
|
|
|
|
procedure Move (Window : in out Base_Window_Type;
Left : in Integer;
Top : in Integer);
|
|
Move location of window
|
|
|
|
|
|
|
|
procedure End_Dialog (Window : in out Base_Window_Type;
Result : in Integer);
|
|
Ends a dialog or modal window and sets modal result
Should be called in the On_Destroy message of any
windows to be displayed as a dialog
|
|
|
|
|
|
|
|
type Pre_Create_Event is access
procedure (Window : in out GWindows.Base.Base_Window_Type'Class;
dwStyle : in out Interfaces.C.unsigned;
dwExStyle : in out Interfaces.C.unsigned);
|
Base_Window_Type - Event Handlers
See Event Methods for details on each event
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Fire_On_Vertical_Scroll
(Window : in out Base_Window_Type;
Request : in Scroll_Request_Type);
|
Base_Window_Type - Event Methods
When overiding events, to insure that the event handlers will still
be executed when set by users, call the base class or fire the event
handler directly.
|
|
|
procedure On_Pre_Create (Window : in out Base_Window_Type;
dwStyle : in out Interfaces.C.unsigned;
dwExStyle : in out Interfaces.C.unsigned);
|
|
Called before creation of window to allow customizaion of the
generic GWindows styles for creating a window.
The GUI element of Window has not yet been created by the OS
so most GUI related methods will have no effect on it.
|
|
|
procedure On_Context_Menu (Window : in out Base_Window_Type;
X : in Integer;
Y : in Integer);
|
|
Called when the right mouse button is clicked on a window, or menu
key on 102 keyboard is hit or Shift+F10
X and Y are -1 if not generated by a mouse click
NOTE: Coordinates are relative to desktop
|
|
|
|
procedure On_Command (Window : in out Base_Window_Type;
Code : in Integer;
ID : in Integer;
Control : in Pointer_To_Base_Window_Class);
|
|
Called when a control is pushed, menu selected, or accelerator keyed
Default implementation redirects message to control and if a dialog
box process default buttons, ie. those with control IDs between
1 and 9
|
|
|
|
|
|
procedure On_Filter_Message
(Window : in out Base_Window_Type;
message : in Interfaces.C.unsigned;
wParam : in Interfaces.C.int;
lParam : in Interfaces.C.int;
Return_Value : in out Interfaces.C.long;
Continue : out Boolean);
|
|
Called to allow pre processing of messages
|
|
procedure On_Message
(Window : in out Base_Window_Type;
message : in Interfaces.C.unsigned;
wParam : in Interfaces.C.int;
lParam : in Interfaces.C.int;
Return_Value : in out Interfaces.C.long);
|
|
Called for all unhandled messages
|
|
|
|
|
|
|
|
|
|
|
function Is_Modal (Window : in Base_Window_Type) return Boolean;
|
|
Returns true if window is being displayed using show_modal
|
|
|
|
|
|
|
|
procedure Create_Control
(Window : in out Base_Window_Type;
Parent : in out Base_Window_Type'Class;
Win_Class : in GString;
Text : in GString;
Left : in Integer;
Top : in Integer;
Width : in Integer;
Height : in Integer;
ID : in Integer := 0;
Styles : in Interfaces.C.unsigned := 0;
Is_Dynamic : in Boolean := False);
|
|
Create a Win32 child control window
Note: Win32 controls should generally be created through bindings to
the various win32 controls.
|
|
function WndProc
(hwnd : GWindows.Types.Handle;
message : Interfaces.C.unsigned;
wParam : Interfaces.C.int;
lParam : Interfaces.C.int)
return Interfaces.C.long;
pragma Convention (Stdcall, WndProc);
|
|
GWindows Implementation of Win32 Procedure Call Back
Procedure and Message Dispatch
|
|
function WndProc_Control
(hwnd : GWindows.Types.Handle;
message : Interfaces.C.unsigned;
wParam : Interfaces.C.int;
lParam : Interfaces.C.int)
return Interfaces.C.long;
pragma Convention (Stdcall, WndProc_Control);
|
|
GWindows Implementation of Win32 Procedure Call Back
Procedure and Message Dispatch for controls
|
|
|
procedure Register_Class (Custom_Class : WNDCLASS);
|
|
Registers a custom Win32 Widnows Class. The class name can then be
passed in to create procedures that accept a custom class name.
Note: In order to insure that the GWindows frame work will handle
messages for Windows created with your custom class, you must use
either WndProc or WndProc_Control for lpfnWndProc
|
|
|
private
|