home *** CD-ROM | disk | FTP | other *** search
- (***************************************
- * WG-VISION 1.0 BEISPIELPROGRAMM *
- ****************************************
- * *
- * Umschalten von WG-VISION in den *
- * Textmodus und wieder zurück *
- * *
- *--------------------------------------*
- * Achtung: Nur VESA ! *
- ****************************************
- * (c) 1993 Dipl.Phys. Mathias Scholz *
- ***************************************)
-
- program AlphaTst;
-
- uses WApp,
- WDecl,
- WViews,
- WDlg,
- WDriver,
- WUtils,
- WEvent,
- crt;
-
- const cmTextMode = 101;
- cmNewWindow = 102;
-
- type TApplication=object(TApp)
- procedure InitMenuBar; virtual;
- procedure HandleEvent; virtual;
- procedure NewWindow;
- end;
-
- var MyApp:TApplication;
-
- {Implementation TApplication}
-
- procedure TApplication.InitMenuBar;
- begin
- MainMenu('~A~uswahl',0);
- SubMenu('~T~extmodus',cmTextMode,0,0,false,false);
- SubMenu('~F~enster aufblenden',cmNewWindow,0,0,false,false);
- NewLine;
- SubMenu('E~x~it <alt><x>',cmCloseApplication,0,45,false,false);
- end;
-
- procedure TApplication.HandleEvent;
- var i:integer;
- LfdPtr:PGroup;
- begin
- TProgram.HandleEvent;
- case Event.Command of
- cmTextMode : begin
- Mouse.HideMouse;
- Video.SetTextMode;
- TextColor(Yellow);
- gotoXY(10,3);write('Winkel Sinus Cosinus');
- TextColor(LightCyan);
- for i:=1 to 360 do
- begin
- gotoXY(10,5);write(i,' ',sin(i*Pi/180),' ',cos(i*Pi/180));
- delay(50);
- end;
- TextColor(LightRed);
- gotoXY(10,10);write('Bitte Taste drücken !');
- TextColor(White);
- repeat until keypressed;
- Video.ChangeGraficMode(M640x480);
- Draw;
- Mouse.ShowMouse;
- end;
- cmNewWindow : NewWindow;
- end; {case}
- end;
-
- procedure TApplication.NewWindow;
- var R:TRect;
- Window:PWindow;
- begin
- R.Assign(60,80,440,280);
- Window:=new(PWindow, Init(R,'Beispiel',winDouble+winPanel+winMenu+winKey));
- InsertDesktop(Window);
- end;
-
- {Hauptprogramm}
-
- begin
- MyApp.Init('Umschalten in den Alphamodus');
- MyApp.Run;
- MyApp.Done;
- END.
-