GWindows OEM.

" GWindows OEM" OEM GWindows/GNATCOM. , . :

1)                           GNAT GPL, Ada-2005/2012 IDE GPS.

2)                           ( , ).

3)                           "" , GWindows/GNATCOM.

GWindows/GNATCOM GPL 2004 (http://www.gnavi.org ). , , , , "" WIN32 ( 1) Ada. . [5] - FPGA . - Ada-95 GWindows/GNATCOM (. 27).

. 27. - GWindows/GNATCOM

GWindows "Professional Open Source Ada 95 Win32 RAD Framework". , OEM UNICOD-16, , OEM Win32 Ada ( ).

.

\oemtutorials-gui2010 ( \oemtutorials-gui, ) oemtutorials.gpr 21 . GPS .

, .

GPS . 28

. 28. GPS

"" Use external terminal . 29.

. 29. "" Use external terminal

1 OEM.GWindows.Message_Boxes.

, 2. :

 

with OEM.GWindows.GStrings;

with OEM.GWindows.Message_Boxes;

 

procedure Tutorial1 is

use OEM.GWindows.Message_Boxes;

 

Result : Message_Box_Result;

begin

Message_Box (Title =>

OEM.GWindows.GStrings.To_GString_From_String

("Tutorial1 - 1"),

Text => OEM.GWindows.GStrings.To_GString_From_String

(" OEM.GWindows Application"),

Icon => Exclamation_Icon);

 

Result := Message_Box (Title =>

OEM.GWindows.GStrings.To_GString_From_String

("Tutorial1 - 1"),

Text => "Nice GUI huh?",

Style => Yes_No_Box,

Icon => Question_Icon);

 

if Result = Yes then

Message_Box ("Cool....", "I like your answer");

else

Message_Box ("What....", "You have no taste");

end if;

 

for I in 1 .. 3 loop

Message_Box ("A Number",

OEM.GWindows.GStrings.To_GString_From_String (I'Img));

end loop;

end Tutorial1;

 

OEM.GWindows.GStrings . To_GString_From_String String UNICODE-16 GString ( , ).

OEM.GWindows.Message_Boxes :

.

.

( ) .

() (). . . OEM.GWindows.Message_Boxes .

GPS OEM.GWindows.Message_Boxes . . "Goto declaration of Message_Boxes" . 30. Style Icon, , , . "Goto body of Message_Boxes" "" . . , .

. 30.

GPS Help Using the GNAT Programming Studio.

2 GUI .

, , OEM.GWindows. :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Application;

with OEM.GWindows.GStrings;

 

procedure Tutorial2 is

pragma Linker_Options ("-mwindows");

 

Main_Window : Main_Window_Type;

begin

Create (Main_Window, OEM.GWindows.GStrings.To_GString_From_String

("My First Window - "));

Visible (Main_Window, True);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial2;

 

Main_Window_Type . MS Windows , "" . Base_Window_Type ( ) Main_Window_Type, . . , . Visible ( Win32 ‑ "ShowWindow").

Message_Loop OEM.GWindows.Application. MS Windows:

 

while GetMessage (pMSG, 0, 0, 0) /= 0 loop

Process_Message (pMSG, Window);

end loop;

 

(Task) , GUI, Message_Loop. "" ( Win32 ).

2, , , , "" GUI. , :

 

pragma Linker_Options ("-mwindows");

 

/ Ada.Text_IO , ( raise) /. .

3 .

, "" . Window_Access OEM.GWindows.Windows. :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Windows; use OEM.GWindows.Windows;

with OEM.GWindows.GStrings;

with OEM.GWindows.Application;

 

procedure Tutorial3 is

pragma Linker_Options ("-mwindows");

 

function "+"(S : String) return OEM.GWindows.GString

renames OEM.GWindows.GStrings.To_GString_From_String;

 

Main_Window : Main_Window_Type;

begin

Create (Main_Window, +"The Main Window - ");

Visible (Main_Window, True);

 

declare

A_Window : Window_Access;

begin

for N in 1 .. 3 loop

A_Window := new Window_Type;

 

Create (A_Window.all,

+("Dynamic Window - NEW" & N'Img),

Width => 375,

Height => 175,

Is_Dynamic => True);

Visible (A_Window.all);

end loop;

end;

 

OEM.GWindows.Application.Message_Loop;

end Tutorial3;

 

DECLARE. : A_Window := new Window_Type;, Create Is_Dynamic => True. A_Window , . OEM.GWindows Win32.

:

 

function "+"(S : String) return OEM.GWindows.GString

renames OEM.GWindows.GStrings.To_GString_From_String;

 

Tutorial3 To_GString_From_String +(). :

 

+("Dynamic Window - NEW" & N'Img)

 

[1].

4 .

, . .

OEM.GWindows :

1)      .

2)      .

, . .

:

 

type My_Window_Type is

new OEM.GWindows.Windows.Main.Main_Window_Type with private;

type My_Window_Access is access all My_Window_Type;

type Pointer_To_My_Window_Class is access all My_Window_Type'Class;

 

private

type My_Window_Type is

new OEM.GWindows.Windows.Main.Main_Window_Type with null record;

 

:

 

procedure On_Close (Window : in out My_Window_Type;

Can_Close : out Boolean);

 

( , ) [1]. :

( ):

with OEM.GWindows.Windows.Main;

 

package Tutorial4_Window is

 

type My_Window_Type is

new OEM.GWindows.Windows.Main.Main_Window_Type with private;

type My_Window_Access is access all My_Window_Type;

type Pointer_To_My_Window_Class is access all My_Window_Type'Class;

 

procedure On_Close (Window : in out My_Window_Type;

Can_Close : out Boolean);

 

private

type My_Window_Type is

new OEM.GWindows.Windows.Main.Main_Window_Type with null record;

end Tutorial4_Window;

 

:

with OEM.GWindows.Message_Boxes;

with OEM.GWindows.GStrings;

 

package body Tutorial4_Window is

function "+"(S : String) return OEM.GWindows.GString

renames OEM.GWindows.GStrings.To_GString_From_String;

 

--------------

-- On_Close --

--------------

 

procedure On_Close

(Window : in out My_Window_Type;

Can_Close : out Boolean)

is

use OEM.GWindows.Message_Boxes;

begin

Can_Close := Message_Box (Window, +("Tutorial4 - 4"),

+("Ok to close? - ?"),

Yes_No_Box, Question_Icon) = Yes;

end On_Close;

 

end Tutorial4_Window;

 

. Tutorial4_Window , , . . 31 Add . 32.

. 31. GPS

. 32.

( 2, GPS).

. 2.

2 , tutorial2_4.adb , . 33.

. 33. GPS.

:

1)      Tutorial2_4.

2)      . with Tutorial4_Window; use Tutorial4_Window;.

3)      Main_Window : My_Window_Type;.

4)      Tutorial2_4.adb.

:

 

with Tutorial4_Window; use Tutorial4_Window;

with OEM.GWindows.Application;

with OEM.GWindows.GStrings;

 

procedure Tutorial2_4 is

pragma Linker_Options ("-mwindows");

 

Main_Window : My_Window_Type;

begin

Create (Main_Window, OEM.GWindows.GStrings.To_GString_From_String

("My First Window - "));

Visible (Main_Window, True);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial2_4;

 

. 31. Tutorial2_4.adb Main files., Add Tutorial2_4.adb Select files . 34.

 

. 34. Main files .

. 35. . 28, . 29.

. 35. (build)

. 36.

. 36. , , .

, , , . ( ) , . , .

( OEM.GWindows):

1)      .

2)      .

, "_Handler" : . . :

:

procedure On_Close_Handler (Window : in out Window_Type;

Handler : in Close_Event);

 

On_Close . , :

 

type Close_Event is access

procedure (Window : in out GWindows.Base.Base_Window_Type'Class;

Can_Close : out Boolean);

 

Window : in out GWindows.Base.Base_Window_Type'Class . , , (- Win32). Can_Close. True, .

:

 

declare

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

 

procedure Do_On_Close

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

Can_Close : out Boolean)

is

use OEM.GWindows.Message_Boxes;

begin

Can_Close := Message_Box (Window, "Tutorial4", "Ok to close?",

Yes_No_Box, Question_Icon) = Yes;

end Do_On_Close;

 

begin

Create (Main_Window, "Event Handling Window - Version 2");

Visible (Main_Window, True);

On_Close_Handler (Main_Window, Do_On_Close'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end;

 

, Do_On_Close ( , DO_), Unrestricted_Access. Do_On_Close Main_Window .

:

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Windows; use OEM.GWindows.Windows;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

with OEM.GWindows.Message_Boxes;

 

with Tutorial4_Window; use Tutorial4_Window;

 

procedure Tutorial4 is

pragma Linker_Options ("-mwindows");

begin

 

declare

My_Window : Tutorial4_Window.My_Window_Type;

begin

Create (My_Window, "Event Handling Window - Version 1");

Visible (My_Window, True);

 

OEM.GWindows.Application.Message_Loop;

end;

 

declare

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

 

procedure Do_On_Close

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

Can_Close : out Boolean)

is

use OEM.GWindows.Message_Boxes;

begin

Can_Close := Message_Box (Window, "Tutorial4", "Ok to close?",

Yes_No_Box, Question_Icon) = Yes;

end Do_On_Close;

 

begin

Create (Main_Window, "Event Handling Window - Version 2");

Visible (Main_Window, True);

On_Close_Handler (Main_Window, Do_On_Close'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end;

 

end Tutorial4;

 

declare Message_Loop .

.

5 .

, OEM.GWindows , . , , .

5 . 5:

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Buttons; use OEM.GWindows.Buttons;

with OEM.GWindows.Edit_Boxes; use OEM.GWindows.Edit_Boxes;

with OEM.GWindows.Static_Controls; use OEM.GWindows.Static_Controls;

with OEM.GWindows.Message_Boxes;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial5 is

pragma Linker_Options ("-mwindows");

 

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

User_Name : OEM.GWindows.Edit_Boxes.Edit_Box_Type;

Disp_Button : OEM.GWindows.Buttons.Button_Type;

 

procedure Do_Display

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class)

is

begin

OEM.GWindows.Message_Boxes.Message_Box ("Controls Window", Text (User_Name));

end Do_Display;

 

begin

Create (Main_Window, "Controls Window", Width => 200, Height => 125);

Visible (Main_Window, True);

Keyboard_Support (Main_Window, True);

 

Create_Label (Main_Window, "Name :", 10, 10, 50, 25);

 

Create (User_Name, Main_Window, "", 70, 10, 100, 25);

 

Create (Disp_Button, Main_Window, "&Display", 10, 50, 75, 30);

On_Click_Handler (Disp_Button, Do_Display'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial5;

 

, , ( , , ). (: , , ..) , . Create Create_Label.. Label_Type (. 3).

, , Keyboard_Support. Keyboard_Support False. Keyboard_Support (Main_Window, True) , Tab hot key (" ").

, Do_Display. . , Do_On_Click.

6 Ѩ OEM.GWindows.Scroll_Panels.

OEM.GWindows.Scroll_Panels , , . Scroll Panel, , scroll bars. Scroll Panel , :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Scroll_Panels; use OEM.GWindows.Scroll_Panels;

with OEM.GWindows.Buttons; use OEM.GWindows.Buttons;

with OEM.GWindows.Edit_Boxes; use OEM.GWindows.Edit_Boxes;

with OEM.GWindows.Static_Controls; use OEM.GWindows.Static_Controls;

with OEM.GWindows.Message_Boxes;

with OEM.GWindows.Events;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial6 is

pragma Linker_Options ("-mwindows");

 

begin

-- Using a Scroll Panel as a Window

 

declare

Main_Window : OEM.GWindows.Scroll_Panels.Scroll_Panel_Type;

User_Name : OEM.GWindows.Edit_Boxes.Edit_Box_Type;

Disp_Button : OEM.GWindows.Buttons.Button_Type;

 

procedure Do_Display

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class)

is

begin

OEM.GWindows.Message_Boxes.Message_Box

("Scroll Window", Text (User_Name));

end Do_Display;

begin

Create (Main_Window, "Scroll Window", Width => 200, Height => 150);

Visible (Main_Window, True);

On_Destroy_Handler (Main_Window,

OEM.GWindows.Events.Do_End_Application'Access);

-- Since Scroll_Panel_Type is not derived from Main_Window_Type

-- it will not automaticly close the application when the window

-- is destroyed. This handler will do that for us.

 

Panel_Size (Main_Window, 500, 500);

 

Keyboard_Support (Main_Window.Panel, True);

 

Create_Label (Main_Window.Panel, "Name :", 150, 10, 50, 25);

 

Create (User_Name, Main_Window.Panel, "", 230, 10, 100, 25);

 

Create (Disp_Button, Main_Window.Panel, "&Display", 150, 50, 75, 30);

On_Click_Handler (Disp_Button, Do_Display'Unrestricted_Access);

 

Focus (User_Name);

 

OEM.GWindows.Application.Message_Loop;

end;

 

-- Using a Scroll Panel as a control

 

declare

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

Scroll_Panel : OEM.GWindows.Scroll_Panels.Scroll_Panel_Type;

User_Name : OEM.GWindows.Edit_Boxes.Edit_Box_Type;

Disp_Button : OEM.GWindows.Buttons.Button_Type;

 

procedure Do_Display

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class)

is

begin

OEM.GWindows.Message_Boxes.Message_Box

("Scroll Window", Text (User_Name));

end Do_Display;

begin

Create (Main_Window, "Scrolling Window 2", Width => 400, Height => 400);

Visible (Main_Window, True);

 

Create_As_Control (Scroll_Panel, Main_Window,

Top => 20,

Left => 20,

Width => 300,

Height => 300);

 

Panel_Size (Scroll_Panel, 500, 500);

 

Keyboard_Support (Scroll_Panel.Panel, True);

 

Create_Label (Scroll_Panel.Panel, "Name :", 150, 10, 50, 25);

 

Create (User_Name, Scroll_Panel.Panel, "", 230, 10, 100, 25);

 

Create (Disp_Button, Scroll_Panel.Panel, "&Display", 150, 50, 75, 30);

On_Click_Handler (Disp_Button, Do_Display'Unrestricted_Access);

 

Focus (User_Name);

 

OEM.GWindows.Application.Message_Loop;

end;

 

end Tutorial6;

 

Panel_Size OEM.GWindows.Scroll_Panels, Scroll_Panel_Type. Scroll_Panel_Type OEM.GWindows.Scroll_Panels. Main_Window_Type OEM.GWindows.Windows.Main, Scroll_Panel_Type "" , :

On_Destroy_Handler (Main_Window,

OEM.GWindows.Events.Do_End_Application'Access);

Scroll_Panel_Type , , , . Win32, Win32 Create (. 3).

Scroll_Panel_Type.

, OEM.GWindows.Windows.Window_Type , .

, ( Scroll_Panel_Type) /"" :

Focus (User_Name);

Edit_Box_Type.

7 OEM.GWindows.Drawing_Panels.

. OEM.GWindows :

1) Drawing_Panel.

2) .

, On_Paint, ( MS Windows). Drawing_Panel.

7 , Drawing_Panel. 8 On_Paint. OEM.GWindows.

7 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Drawing_Panels; use OEM.GWindows.Drawing_Panels;

with OEM.GWindows.Scroll_Panels; use OEM.GWindows.Scroll_Panels;

with OEM.GWindows.Drawing;

with OEM.GWindows.Colors; use OEM.GWindows.Colors;

with OEM.GWindows.Events;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial7 is

pragma Linker_Options ("-mwindows");

 

use OEM.GWindows.Drawing;

use OEM.GWindows.Drawing_Panels;

 

procedure Draw_Something

(Canvas : in out OEM.GWindows.Drawing.Canvas_Type'Class)

is

begin

for N in 1 .. 100 loop

Fill_Rectangle (Canvas,

(N * 2, N * 2, N + 20, N + 20),

COLOR_3DHILIGHT);

Fill_Rectangle (Canvas,

(N * 2 + 200, N * 2 + 200, N + 180, N + 180),

COLOR_DESKTOP);

end loop;

end Draw_Something;

 

begin

-- Using a Drawing Panel as a Window

 

declare

Main_Window : OEM.GWindows.Drawing_Panels.Drawing_Panel_Type;

Canvas : OEM.GWindows.Drawing_Panels.Drawing_Canvas_Type;

begin

Create (Main_Window, "Drawing Window", Width => 200, Height => 125);

Visible (Main_Window, True);

On_Destroy_Handler (Main_Window,

OEM.GWindows.Events.Do_End_Application'Access);

-- Since Drawing_Panel_Type is not derived from Main_Window_Type

-- it will not automaticly close the application when the window

-- is destroyed. This handler will do that for us.

 

Auto_Resize (Main_Window, False);

Resize_Canvas (Main_Window,

OEM.GWindows.Application.Desktop_Width,

OEM.GWindows.Application.Desktop_Height);

-- By turning off auto resize and setting canvas to the size of

-- of the desktop contents will be saved no matter how we

-- resize the window

 

Get_Canvas (Main_Window, Canvas);

 

Draw_Something (Canvas);

 

OEM.GWindows.Application.Message_Loop;

end;

 

-- Using a Drawing Panel as a Control

 

declare

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

Draw_Control : OEM.GWindows.Drawing_Panels.Drawing_Panel_Type;

Canvas : OEM.GWindows.Drawing_Panels.Drawing_Canvas_Type;

begin

Create (Main_Window, "Drawing Window", Width => 400, Height => 400);

Visible (Main_Window, True);

 

Create_As_Control (Draw_Control, Main_Window,

Top => 20,

Left => 20,

Width => 300,

Height => 300);

 

Get_Canvas (Draw_Control, Canvas);

 

Draw_Something (Canvas);

 

OEM.GWindows.Application.Message_Loop;

end;

 

-- Using a Drawing Panel in a Scroll Panel

 

declare

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

Scroll_Panel : OEM.GWindows.Scroll_Panels.Scroll_Panel_Type;

Draw_Control : OEM.GWindows.Drawing_Panels.Drawing_Panel_Type;

Canvas : OEM.GWindows.Drawing_Panels.Drawing_Canvas_Type;

begin

Create (Main_Window, "Drawing Window", Width => 400, Height => 400);

Visible (Main_Window, True);

 

Create_As_Control (Scroll_Panel, Main_Window,

Top => 20,

Left => 20,

Width => 300,

Height => 300);

 

Panel_Size (Scroll_Panel, 500, 500);

 

Create_As_Control (Draw_Control, Scroll_Panel.Panel,

Top => 0,

Left => 0,

Width => 0,

Height => 0);

Dock (Draw_Control, OEM.GWindows.Base.Fill);

Dock_Children (Scroll_Panel.Panel);

 

Get_Canvas (Draw_Control, Canvas);

 

Draw_Something (Canvas);

 

OEM.GWindows.Application.Message_Loop;

end;

 

end Tutorial7;

 

Drawing_Panel_Type Drawing_Canvas_Type OEM.GWindows.Drawing_Panels. OEM.GWindows.Drawing. Drawing_Canvas_Type OEM.GWindows.Drawing. Fill_Rectangle OEM.GWindows.Drawing Information_Canvas_Type ( ).

Dock Dock_Children.

8 .

Windows , Paint (. 4 ), ( Paint). OEM.GWindows Drawing Panels. 8 , :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Drawing;

with OEM.GWindows.Colors;

with OEM.GWindows.Types;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial8 is

pragma Linker_Options ("-mwindows");

 

procedure Do_Paint

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

Canvas : in out OEM.GWindows.Drawing.Canvas_Type;

Area : in OEM.GWindows.Types.Rectangle_Type)

is

use OEM.GWindows.Drawing;

use OEM.GWindows.Colors;

begin

for N in 1 .. 100 loop

Fill_Rectangle (Canvas,

(N * 2, N * 2, N + 20, N + 20),

COLOR_3DHILIGHT);

Fill_Rectangle (Canvas,

(N * 2 + 200, N * 2 + 200, N + 180, N + 180),

COLOR_DESKTOP);

end loop;

end Do_Paint;

 

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

begin

Create (Main_Window, "On_Paint Drawing Window",

Width => 200, Height => 200);

Visible (Main_Window, True);

On_Paint_Handler (Main_Window, Do_Paint'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial8;

 

, . , , "" (Canvas) (Area). "" Canvas_Type OEM.GWindows.Drawing. Canvas_Type Information_Canvas_Type OEM.GWindows.Drawing.

OEM.GWindows.Drawing .

9 Drawing Objects.

, MS Windows OEM.GWindows Canvas Drawing Object. Canvas Drawing Object. Canvas_Type OEM.GWindows Get_Canvas On_Paint On_Erase_Background ( ):

 

type Paint_Event is access

procedure (Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

Canvas : in out OEM.GWindows.Drawing.Canvas_Type;

Area : in OEM.GWindows.Types.Rectangle_Type);

 

Printer_Canvas_Type Choose_Printer Choose_Default_Printer OEM.GWindows.Common_Dialogs. Memory_Canvas_Type Drawing Panels.

OEM.GWindows.Drawing ( Information_Canvas_Type ).

GWindows.Drawing_Objects Drawing_Objects , canvas Select_Object. , ( ) , . Drawing_Objects Brushes, pens, bitmaps icons.

9 :

 

with OEM.GWindows.Drawing_Panels; use OEM.GWindows.Drawing_Panels;

with OEM.GWindows.Drawing_Objects; use OEM.GWindows.Drawing_Objects;

with OEM.GWindows.Colors; use OEM.GWindows.Colors;

with OEM.GWindows.Events;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial9 is

pragma Linker_Options ("-mwindows");

 

Main_Window : OEM.GWindows.Drawing_Panels.Drawing_Panel_Type;

Canvas : OEM.GWindows.Drawing_Panels.Drawing_Canvas_Type;

Brush : OEM.GWindows.Drawing_Objects.Brush_Type;

Pen : OEM.GWindows.Drawing_Objects.Pen_Type;

begin

Create (Main_Window, "On_Paint Drawing Window",

Width => 200, Height => 200);

Visible (Main_Window, True);

On_Destroy_Handler (Main_Window,

OEM.GWindows.Events.Do_End_Application'Access);

Auto_Resize (Main_Window, False);

Resize_Canvas (Main_Window,

OEM.GWindows.Application.Desktop_Width,

OEM.GWindows.Application.Desktop_Height,

False);

 

Get_Canvas (Main_Window, Canvas);

 

Create_Pen (Pen,

Style => Solid,

Width => 3,

Color => Blue);

Select_Object (Canvas, Pen);

 

Create_Solid_Brush (Brush,

Color => Orange);

Select_Object (Canvas, Brush);

 

Ellipse (Canvas,

10, 10,

Client_Area_Width (Main_Window) - 10,

Client_Area_Height (Main_Window) - 10);

 

Create_Hatch_Brush (Brush,

Style => Cross,

Color => Red);

Select_Object (Canvas, Brush);

 

Create_Stock_Pen (Pen, Null_Pen);

Select_Object (Canvas, Pen);

 

Rectangle (Canvas,

25, 25,

Client_Area_Width (Main_Window) - 25,

Client_Area_Height (Main_Window) - 25);

 

Redraw (Main_Window);

-- Tell windows that a redraw of the panel is needed.

 

OEM.GWindows.Application.Message_Loop;

end Tutorial9;

 

10 .

OEM.GWindows Canvas . OEM.GWindows.Common_Dialogs . Canvas , (spooler) Start_Document. Start_Page End_Page .

10 :

 

with Interfaces.C;

 

with OEM.GWindows.Drawing; use OEM.GWindows.Drawing;

with OEM.GWindows.Common_Dialogs; use OEM.GWindows.Common_Dialogs;

with OEM.GWindows.Message_Boxes;

with OEM.GWindows.Windows;

with OEM.GWindows.GStrings;

 

procedure Tutorial10 is

Canvas : OEM.GWindows.Drawing.Printer_Canvas_Type;

Settings : OEM.GWindows.Common_Dialogs.DEVMODE;

Flags : Interfaces.C.unsigned := 0;

From_Page : Natural := 1;

To_Page : Natural := 1;

Copies : Natural := 1;

Success : Boolean;

Null_Win : OEM.GWindows.Windows.Window_Type;

 

function "+"(S : String) return OEM.GWindows.GString

renames OEM.GWindows.GStrings.To_GString_From_String;

begin

Choose_Printer (Null_Win, Canvas, Settings, Flags,

From_Page, To_Page, 1, 1, Copies, Success);

 

if Success then

Start_Document (Canvas, "Tutorial10 Document");

Start_Page (Canvas);

 

Put (Canvas, 100, 100, "Hello World!");

 

Put (Canvas, 100, 800, +("Hello World! - "));

 

Ellipse (Canvas, 300, 300, 700, 700);

 

End_Page (Canvas);

End_Document (Canvas);

OEM.GWindows.Message_Boxes.Message_Box ("Tutorial 10", "Done");

else

OEM.GWindows.Message_Boxes.Message_Box ("Tutorial 10",

"Printing Canceled");

end if;

end Tutorial10;

 

11 .

OEM.GWindows . . :

 

pragma Linker_Options ("dlgtest.coff");

 

COFF windres.exe GNAT GPL 2010. windres.exe.

 

windres -i dlgtest.rc -o ./build/dlgtest.coff

 

MAKEFILE, MAKEFILE:

 

dialog_example.coff: dialog_example.rc

windres -i dialog_example.rc -o ./build/dialog_example.coff

 

dlgtest.coff: dlgtest.rc

windres -i dlgtest.rc -o ./build/dlgtest.coff

 

GPS . . 37 .

. 37. MAKEFILE GPS.

RC . (. \oemtools\ForTestGwindows\).

, / , . . 38 11 .

. 38. 11.

11 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Menus; use OEM.GWindows.Menus;

with OEM.GWindows.Application;

with OEM.GWindows.Base;

 

procedure Tutorial11 is

pragma Linker_Options ("-mwindows");

 

Main_Window : Main_Window_Type;

Main_Menu : Menu_Type := Create_Menu;

File_Menu : Menu_Type := Create_Popup;

Sub_Menu : Menu_Type := Create_Popup;

 

ID_Exit : constant := 100;

ID_Open : constant := 101;

ID_Save : constant := 102;

ID_About : constant := 103;

 

procedure Do_Menu_Select

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

Item : in Integer)

is

begin

case Item is

when ID_Exit =>

OEM.GWindows.Application.End_Application;

when others =>

null;

end case;

end Do_Menu_Select;

 

procedure Do_Context_Menu

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

X : in Integer;

Y : in Integer)

is

begin

Display_Context_Menu (Main_Window_Type (Window), File_Menu, 0, X, Y);

end Do_Context_Menu;

 

begin

Create (Main_Window, "My First Window");

Visible (Main_Window, True);

 

Append_Item (File_Menu, "&Open", ID_Open);

Append_Item (File_Menu, "&Save", ID_Save);

Append_Separator (File_Menu);

 

Append_Item (File_Menu, "E&xit", ID_Exit);

Append_Menu (Main_Menu, "&Files", File_Menu);

 

Append_Item (Sub_Menu, "A&bout", ID_About);

Append_Menu (File_Menu, "Other", Sub_Menu);

 

Menu (Main_Window, Main_Menu);

 

On_Menu_Select_Handler (Main_Window, Do_Menu_Select'Unrestricted_Access);

On_Context_Menu_Handler (Main_Window, Do_Context_Menu'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial11;

 

12 Windows.

, 5 Windows . , , System. OEM.GWindows Windows. , , .

5 ( Create) :

 

declare

Window_Font : OEM.GWindows.Drawing_Objects.Font_Type;

begin

-- Use Standard Windows GUI font instead of system font

OEM.GWindows.Drawing_Objects.Create_Stock_Font

(Window_Font, OEM.GWindows.Drawing_Objects.Default_GUI);

Set_Font (Main_Window, Window_Font);

end;

 

, . :

 

Set_Font (Disp_Button, Window_Font);

 

13 Z .

, , - Order. 13 , OEM.GWindows Ada , .. - Order TAB () . 13 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Windows; use OEM.GWindows.Windows;

with OEM.GWindows.Buttons; use OEM.GWindows.Buttons;

with OEM.GWindows.GStrings; use OEM.GWindows.GStrings;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial13 is

pragma Linker_Options ("-mwindows");

 

subtype Window_Number_Type is Positive range 1 .. 5;

 

type Window_Array_Type is array (Window_Number_Type'Range) of

OEM.GWindows.Windows.Window_Type;

 

Main_Window : OEM.GWindows.Windows.Main.Main_Window_Type;

Windows : Window_Array_Type;

Next_Button : OEM.GWindows.Buttons.Button_Type;

Current_Window : Window_Number_Type := Window_Number_Type'Last;

 

procedure Do_Click

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class)

is

begin

Order (Windows (Current_Window), OEM.GWindows.Base.Bottom);

if Current_Window = Window_Number_Type'Last then

Current_Window := Window_Number_Type'First;

else

Current_Window := Window_Number_Type'Succ (Current_Window);

end if;

end Do_Click;

 

begin

Create (Main_Window, "Z-Order Window", Width => 200, Height => 100);

Visible (Main_Window, True);

Center (Main_Window);

 

for N in Window_Array_Type'Range loop

Create (Windows (N), To_GString_From_String ("TEST" & N'Img),

Width => 175, Height => 75);

Visible (Windows (N));

end loop;

 

Create (Next_Button, Main_Window, "&Next", 10, 10,

Client_Area_Width (Main_Window) - 20,

Client_Area_Height (Main_Window) - 20);

On_Click_Handler (Next_Button, Do_Click'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial13;

 

14 .

OEM.GWindows . 14 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Buttons; use OEM.GWindows.Buttons;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial14 is

pragma Linker_Options ("-mwindows");

 

Window1 : Main_Window_Type;

Window2 : Main_Window_Type;

Jump_Button : Button_Type;

 

procedure Do_Click (Window : in out OEM.GWindows.Base.Base_Window_Type'Class) is

use OEM.GWindows.Base;

begin

if Text (Parent (Window).all) = "Window 1" then

Parent (Window, Window2);

else

Parent (Window, Window1);

end if;

end Do_Click;

 

begin

Create (Window1, "Window 1", Width => 100, Height => 100);

Visible (Window1, True);

 

Create (Window2, "Window 2",

Top => Top (Window1),

Left => Left (Window1) + 200,

Width => 100, Height => 100);

Visible (Window2, True);

 

Create (Jump_Button, Window1, "Jump!", 10, 10,

Client_Area_Width (Window1) - 20,

Client_Area_Height (Window1) - 20);

On_Click_Handler (Jump_Button, Do_Click'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial14;

 

15 .

Windows, . - Capture Release , ( Windows , ). 15 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Static_Controls; use OEM.GWindows.Static_Controls;

with OEM.GWindows.GStrings; use OEM.GWindows.GStrings;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial15 is

pragma Linker_Options ("-mwindows");

 

Main_Window : Main_Window_Type;

X_Label : Label_Type;

Y_Label : Label_Type;

 

procedure Do_Mouse_Move

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

X : in Integer;

Y : in Integer;

Keys : in OEM.GWindows.Windows.Mouse_Key_States)

is

begin

Text (X_Label, OEM.GWindows.GStrings.Image (X));

Text (Y_Label, OEM.GWindows.GStrings.Image (Y));

end Do_Mouse_Move;

 

procedure Do_Left_Mouse_Button_Down

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

X : in Integer;

Y : in Integer;

Keys : in OEM.GWindows.Windows.Mouse_Key_States)

is

begin

Capture_Mouse (Main_Window);

end Do_Left_Mouse_Button_Down;

 

procedure Do_Left_Mouse_Button_Up

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class;

X : in Integer;

Y : in Integer;

Keys : in OEM.GWindows.Windows.Mouse_Key_States)

is

begin

OEM.GWindows.Base.Release_Mouse;

end Do_Left_Mouse_Button_Up;

 

begin

Create (Main_Window, "Mouse Demo Window", Width => 200, Height => 200);

Visible (Main_Window, True);

 

Create (X_Label, Main_Window, "0", 10, 10, 40, 25, Center);

Create (Y_Label, Main_Window, "0", 60, 10, 40, 25, Center);

 

On_Mouse_Move_Handler (Main_Window, Do_Mouse_Move'Unrestricted_Access);

On_Left_Mouse_Button_Down_Handler (Main_Window,

Do_Left_Mouse_Button_Down'Unrestricted_Access);

On_Left_Mouse_Button_Up_Handler (Main_Window,

Do_Left_Mouse_Button_Up'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial15;

 

16 .

OEM.GWindows On_Cursor_Change Set_Cursor OEM.GWindows.Cursors. 16 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Cursors;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial16 is

pragma Linker_Options ("-mwindows");

 

Main_Window : Main_Window_Type;

 

procedure Do_Change_Cursor

(Window : in out OEM.GWindows.Base.Base_Window_Type'Class)

is

use OEM.GWindows.Cursors;

begin

Set_Cursor (Load_System_Cursor (IDC_CROSS));

end Do_Change_Cursor;

 

begin

Create (Main_Window, "Cursor Window", Width => 200, Height => 200);

Visible (Main_Window, True);

On_Change_Cursor_Handler (Main_Window,

Do_Change_Cursor'Unrestricted_Access);

 

OEM.GWindows.Application.Message_Loop;

end Tutorial16;

 

17 .

OEM.GWindows . Show_Dialog TRUE. Dialog_Button_Type, ID . 17 :

 

with OEM.GWindows.GStrings.IO; use OEM.GWindows.GStrings.IO;

 

with OEM.GWindows.Windows; use OEM.GWindows.Windows;

with OEM.GWindows.Buttons; use OEM.GWindows.Buttons;

with OEM.GWindows.Static_Controls; use OEM.GWindows.Static_Controls;

with OEM.GWindows.Application;

with OEM.GWindows.Constants; use OEM.GWindows.Constants;

 

procedure Tutorial17 is

Dialog : Window_Type;

OK_Button : Default_Button_Type;

Cancel_Button : Cancel_Button_Type;

More_Button : Dialog_Button_Type;

 

ID_MORE : constant := 101;

 

Result : Integer := ID_MORE;

 

begin

while Result = ID_MORE loop

Create_As_Dialog (Dialog, "My Dialog Window",

Width => 200, Height => 100);

 

Create_Label (Dialog, "Have you had enough yet?",

10, 10,

Client_Area_Width (Dialog) - 20,

25, Center);

 

Create (OK_Button, Dialog, "O&k",

10, Client_Area_Height (Dialog) - 40,

50, 25, ID => IDOK);

 

Create (Cancel_Button, Dialog, "&Cancel",

70, Client_Area_Height (Dialog) - 40,

50, 25, ID => IDCANCEL);

 

Create (More_Button, Dialog, "&More",

130, Client_Area_Height (Dialog) - 40,

50, 25, ID => ID_MORE);

 

Result := OEM.GWindows.Application.Show_Dialog (Dialog);

end loop;

 

if Result = IDOK then

Put_Line ("Have a nice day!");

else

Put_Line ("Sorry for the trouble...");

end if;

end Tutorial17;

 

(. 2 1).

18 ADO.

‑ , OEM OEM.GWindows. 18 COM ADO OLEDB ( Microsoft Office Access 2003). 18 :

 

with OEM.COM.Initialize;

with OEM.GWindows.GStrings.IO; use OEM.GWindows.GStrings.IO;

with OEM.GWindows.Databases; use OEM.GWindows.Databases;

 

procedure Tutorial18n is

Connection : Database_Type;

Recordset : Recordset_Type;

begin

OEM.COM.Initialize.Initialize_COM;

 

Open (Connection,

"Provider=Microsoft.Jet.OLEDB.4.0; " &

"Data Source=adotest.mdb");

 

Open (Recordset,

Connection,

"SELECT * FROM People",

Dynamic,

Optimistic);

 

while not EOF (Recordset) loop

for N in 1 .. Field_Count (Recordset) loop

Put_Line

(Field_Name (Recordset, N) & " = " & Field_Value (Recordset, N));

end loop;

 

if Field_Value (Recordset, "LastName") = "TestLName" then

Put_Line ("This record is being deleted");

Delete (Recordset);

end if;

Move_Next (Recordset);

New_Line;

end loop;

 

Add_New (Recordset);

Field_Value (Recordset, "LastName", "TestLName");

Field_Value (Recordset, "FirstName", "TestLName");

Update (Recordset);

 

Close (Recordset);

Close (Connection);

end Tutorial18n;

 

.

19 .

19 Database_Control_Type. . 19 :

 

with OEM.COM.Initialize;

with OEM.COM.IErrorInfo;

 

with OEM.GWindows.GStrings; use OEM.GWindows.GStrings;

with OEM.GWindows.Databases.Controls;

use OEM.GWindows.Databases.Controls; use OEM.GWindows.Databases;

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Edit_Boxes; use OEM.GWindows.Edit_Boxes;

with OEM.GWindows.Static_Controls; use OEM.GWindows.Static_Controls;

with OEM.GWindows.Message_Boxes; use OEM.GWindows.Message_Boxes;

with OEM.GWindows.Base; use OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial19n is

Main_Window : Main_Window_Type;

ID : aliased Edit_Box_Type;

LastName : aliased Edit_Box_Type;

FirstName : aliased Edit_Box_Type;

Address : aliased Edit_Box_Type;

City : aliased Edit_Box_Type;

State : aliased Edit_Box_Type;

Zip : aliased Edit_Box_Type;

Country : aliased Edit_Box_Type;

DB_Control : Database_Control_Type;

begin

OEM.COM.Initialize.Initialize_COM;

 

-- Setup Controls

Create (Main_Window, "Database Window", Width => 400, Height => 500);

Keyboard_Support (Main_Window);

Center (Main_Window);

 

Create_As_Control (DB_Control, Main_Window, "", 0, 0, 0, 30);

Dock (DB_Control, At_Top);

 

Create_Label (Main_Window, "ID", 10, 40, 100, 25);

Create_Label (Main_Window, "Last Name", 10, 80, 100, 25);

Create_Label (Main_Window, "First Name", 10, 120, 100, 25);

Create_Label (Main_Window, "Address", 10, 160, 100, 25);

Create_Label (Main_Window, "City", 10, 200, 100, 25);

Create_Label (Main_Window, "State", 10, 240, 100, 25);

Create_Label (Main_Window, "Zip", 10, 280, 100, 25);

Create_Label (Main_Window, "Country", 10, 320, 100, 25);

 

Create (ID, Main_Window, "",

120, 40, 200, 30);

Read_Only (ID);

Create (LastName, Main_Window, "",

120, 80, 200, 30);

Create (FirstName, Main_Window, "",

120, 120, 200, 30);

Create (Address, Main_Window, "",

120, 160, 200, 30);

Create (City, Main_Window, "",

120, 200, 200, 30);

Create (State, Main_Window, "",

120, 240, 200, 30);

Create (Zip, Main_Window, "",

120, 280, 200, 30);

Create (Country, Main_Window, "",

120, 320, 200, 30);

 

-- Setup Database and Bindings

 

Open (DB_Control.Database,

"Provider=Microsoft.Jet.OLEDB.4.0; " &

"Data Source=adotest.mdb");

 

Open (DB_Control.Recordset,

DB_Control.Database,

"SELECT * FROM People",

Dynamic,

Optimistic);

 

Bind_Text_Control (DB_Control.Recordset,

"ID",

ID'Unchecked_Access,

Read_Only);

Bind_Text_Control (DB_Control.Recordset,

"LastName",

LastName'Unchecked_Access);

Bind_Text_Control (DB_Control.Recordset,

"FirstName",

FirstName'Unchecked_Access);

Bind_Text_Control (DB_Control.Recordset,

"Address",

Address'Unchecked_Access);

Bind_Text_Control (DB_Control.Recordset,

"City",

City'Unchecked_Access);

Bind_Text_Control (DB_Control.Recordset,

"State",

State'Unchecked_Access);

Bind_Text_Control (DB_Control.Recordset,

"Zip",

Zip'Unchecked_Access);

Bind_Text_Control (DB_Control.Recordset,

"Country",

Country'Unchecked_Access);

 

-- Get Started

Fill_Bindings (DB_Control.Recordset);

Dock_Children (Main_Window);

Visible (Main_Window, True);

 

OEM.GWindows.Application.Message_Loop;

exception

when others =>

Message_Box ("Error",

To_GString_From_String (OEM.COM.IErrorInfo.Get_IErrorInfo),

Icon => Error_Icon);

end Tutorial19n;

 

20 .

OEM.GWindows / . 20 . 20 :

 

with OEM.GWindows.Windows.Main; use OEM.GWindows.Windows.Main;

with OEM.GWindows.Buttons; use OEM.GWindows.Buttons;

with OEM.GWindows.Static_Controls; use OEM.GWindows.Static_Controls;

with OEM.GWindows.Edit_Boxes; use OEM.GWindows.Edit_Boxes;

with OEM.GWindows.Packing_Boxes; use OEM.GWindows.Packing_Boxes;

with OEM.GWindows.Base;

with OEM.GWindows.Application;

 

procedure Tutorial20 is

Main_Window : Main_Window_Type;

Box : Packing_Box_Type;

Box2 : Packing_Box_Type;

Box3 : Packing_Box_Type;

Box4 : Packing_Box_Type;

Button1 : Button_Type;

Button2 : Button_Type;

Button3 : Button_Type;

Button4 : Button_Type;

Button5 : Button_Type;

Button6 : Button_Type;

Edit1 : Edit_Box_Type;

Edit2 : Edit_Box_Type;

Edit3 : Edit_Box_Type;

 

begin

Create (Main_Window, "Packing Boxes in a Window",

Width => 500, Height => 250);

 

Create (Box, Main_Window, 0, 0, 100, 0, Vertical);

Dock (Box, OEM.GWindows.Base.At_Left);

 

Fill_Width (Box);

Fill_Height (Box);

Padding (Box, 5);

Insets (Box, (10, 10, 10, 10));

 

Create (Box2, Main_Window, 0, 0, 0, 50, Horizontal);

Dock (Box2, OEM.GWindows.Base.At_Top);

 

Fill_Width (Box2);

Fill_Height (Box2);

Padding (Box2, 5);

Insets (Box2, (10, 10, 10, 10));

 

Create (Box3, Main_Window, 0, 0, 100, 0, Vertical);

Dock (Box3, OEM.GWindows.Base.At_Left);

 

Fill_Width (Box3);

Padding (Box3, 5);

Insets (Box3, (10, 15, 10, 10));

 

Create (Box4, Main_Window, 0, 0, 0, 0, Vertical);

Dock (Box4, OEM.GWindows.Base.Fill);

 

Fill_Width (Box4);

Padding (Box4, 5);

Insets (Box4, (10, 10, 10, 10));

 

Dock_Children (Main_Window);

 

Create (Button1, Box, "Button1", 0, 0, 0, 0);

Create (Button2, Box, "Button2", 0, 0, 0, 0);

Create (Button3, Box, "Button3", 0, 0, 0, 0);

 

Pack (Box);

 

Create (Button4, Box2, "Button3", 0, 0, 0, 0);

Create (Button5, Box2, "Button4", 0, 0, 0, 0);

Create (Button6, Box2, "Button5", 0, 0, 0, 0);

 

Pack (Box2);

 

Create_Label (Box3, "Field 1", 0, 0, 0, 30);

Create_Label (Box3, "Field 2", 0, 0, 0, 30);

Create_Label (Box3, "Field 3", 0, 0, 0, 30);

 

Pack (Box3);

 

Create (Edit1, Box4, "", 0, 0, 0, 30);

Create (Edit2, Box4, "", 0, 0, 0, 30);

Create (Edit3, Box4, "", 0, 0, 0, 30);

 

Pack (Box4);

 

Visible (Main_Window);

OEM.GWindows.Application.Message_Loop;

end Tutorial20;

 

21 .

OEM.GWindows , Windows. 21 , . 21 :

with OEM.GWindows.Multi_Media; use OEM.GWindows.Multi_Media;

 

procedure Tutorial21 is

begin

Play_Sound_From_Alias ("SystemStart");

Play_Sound_From_File ("hello.wav");

end Tutorial21;

(. 39) . (. 40).

. 39. " Windows".

. 40. .

GWindows OEM.

GWindows OEM \oemtools2010\ForTestGwindows. . IDE GPS. makefile. 3 . , GWindows OEM. 1 GWindows OEM.

1

control_test.gpr

\oemtools2010\ForTestGwindows\controls

1)      control_test.exe

2)      gtoolbar.exe

3)      tab_test.exe

4)      win_controls.exe

. .

db_view.gpr

\oemtools2010\ForTestGwindows\databases

1)      db_view.exe

 

tutorial19n

dlgtest.gpr

\oemtools2010\ForTestGwindows\dialogs

1)      dialog_example.exe

2)      dlgtest.exe

3)      getdir.exe

,

call_gw_dll.gpr

gw_in_a_dll.gpr

\oemtools2010\ForTestGwindows\dll

1)      call_gw_dll.exe

2)      gw_in_a_dll.dll

DLL DLL

DLL . makefile.

scribble2.gpr

\oemtools2010\ForTestGwindows\drawing

1)      scribble2.exe

 

""

DROW PANEL, .

scribble.gpr

\oemtools2010\ForTestGwindows\drawing

1)      scribble.adb

 

""

DROW PANEL

gbmanager.gpr

\oemtools2010\ForTestGwindows\gbmanager

1)      gbmanager.exe

 

, , . .

. bindcom.exe comscope.exe. makefile.

gnatreg.gpr

\oemtools2010\ForTestGwindows\gnatreg

1)      gnatreg.exe

 

, , , .

  . OEM Windows.. makefile.

mdi_example.gpr

\oemtools2010\ForTestGwindows\mdi

MDI

MDI . makefile.

cap_test.exe

\oemtools2010\ForTestGwindows\mouse

1)      cap_test.exe

 

"" . .

droptest.gpr

\oemtools2010\ForTestGwindows\mouse

1)      droptest.exe

 

Windows . Message_Box.

mscal_test.gpr

\oemtools2010\ForTestGwindows\mscaltest

1)      mscal_test.exe

C:\Program Files\Microsoft Office\OFFICE11\

1)      MSCAL.OCX 120192 03.05.07 16:52 MS Office 2003

 

COM OCX

gbmanager.exe. . .

mybutton.gpr

\oemtools2010\ForTestGwindows\ownerdraw

1)      mybutton.exe

 

.

print_hello.gpr

\oemtools2010\ForTestGwindows\printing

1)      print_hello.exe

 

.

dock_test.gpr

\oemtools2010\ForTestGwindows\simple

1)      dock_test.exe

 

  .

form_example.gpr

\oemtools2010\ForTestGwindows\simple

1)      form_example.exe

 

. makefile .

hello_world.gpr

\oemtools2010\ForTestGwindows\simple

1)      hello_world.exe

 

tutorial1 tutoria2 .

key_test.gpr

\oemtools2010\ForTestGwindows\simple

1)      key_test.exe

 

.

menu_example.gpr

\oemtools2010\ForTestGwindows\simple

1)      menu_example.exe

 

point_test.gpr

\oemtools2010\ForTestGwindows\simple

1)      point_test.exe

 

task_dialogs.gpr

\oemtools2010\ForTestGwindows\tasks

1)      task_dialogs.exe

 

, .

task_windows.gpr

\oemtools2010\ForTestGwindows\tasks

1)      task_windows.exe

 

. . " " .

thread_test.gpr

\oemtools2010\ForTestGwindows\tasks

1)      thread_test.exe

 

. , .

 

 

1.       . . . Ada-95. GNAT: [. ]. http://www.ada-ru.org.

2.       . ., . GNAT Pro . , PTS-2009, . [. ]. http://www.mediascan.by/index.files/GNAT-AdaCore.pdf .

3.       . ., .. . , PTS-2009, . [. ].  http://www.mediascan.by/index.files/adaedu.pdf .

4.       . ., . . , PTS-2009, . [. ]. http://www.mediascan.by/index.files/Ada-AdaCore.pdf .

5.       . ., . . : Ada. -: ² .. , 863 : . 㳿. , 12, . 129-142, , 2009.

6.       The GNAT Academic Program [. ]. http://www.adacore.com/home/academia/

7.       OEM [. ].  http://www.mediascan.by/index.files/CD_Ada-2009_OEM.zip