File: basic2.adb

package info (click to toggle)
libtexttools 2.1.0-30
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 932 kB
  • sloc: ada: 11,394; ansic: 529; makefile: 106; sed: 78; sh: 12
file content (42 lines) | stat: -rw-r--r-- 923 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
with Common, OS, UserIO, Controls, Windows;
use  Common, OS, UserIO, Controls, Windows;

procedure basic2 is
  line1 : aliased AStaticLine;
  line2 : aliased AStaticLine;
  ok    : aliased ASimpleButton;
  DT    : aDialogTaskRecord;
begin
  StartupCommon( "TIA", "tia" );
  StartupOS;
  StartupUserIO;
  StartupControls;
  StartupWindows;

  OpenWindow( "Basic Window 2", 0, 0, 40, 20, normal, false );
  DrawWindow;

  Init( line1, 2, 2, 38, 2 );
  SetText( line1, "This is a basic TextTools window." );
  AddControl( line1'unchecked_access );

  Init( line2, 2, 3, 38, 3 );
  SetText( line2,  "It contains controls." );
  AddControl( line2'unchecked_access );

  Init( ok, 2, 18, 30, 18, 'o' );
  SetText( ok, "OK" );
  AddControl( ok'unchecked_access );

  DoDialog( DT );
  pragma Unreferenced (DT);
  CloseWindow;

  ShutdownWindows;
  ShutdownControls;
  ShutdownUserIO;
  ShutdownOS;
  ShutdownCommon;

end basic2;