home *** CD-ROM | disk | FTP | other *** search
- Program Jake;
- Uses WindObjs, Crt;
-
- var
- Main : PMain;
- View3, View2, View : PView;
- NewView : PView;
- NewButton : PButton;
- Button : PButton;
- Button2 : PButton;
- Button3 : PButton;
- Text : PText;
- Icon : PIcon;
- CheckBox : PCheckBox;
- Flags : ByteSet;
- A : integer;
-
- Procedure DoHalt; far;
- begin
- TextMode(3);
- Halt(0);
- end;
-
- Procedure AddView; far;
- var
- Icon2 : PIcon;
- begin
- New(NewView, Init(50,50,200,100,'Hard Drive',TheFlags));
- New(Icon2, Init('WindObjs.Ico',5,5,45,50,'Setup',donothing));
- NewView^.Insert(Icon2);
- Main^.Insert(NewView);
- Main^.ToFront(Main^.NumDialogs);
- Main^.DrawAll;
- end;
-
- Procedure ShowFonts; far;
- var
- Texts : PText;
- NView : PView;
- begin
- New(NView, Init(70,50,100,200,'Fonts',cmMove+CmClose));
- New(Texts, Init(5,5,0,0,'Default',donothing));
- NView^.Insert(Texts);
- New(Texts,Init(5,10,0,0,'TripleX',donothing));
- Texts^.Font := 1;
- NView^.Insert(Texts);
- New(Texts,Init(5,30,0,0,'Small',donothing));
- Texts^.Font := 2;
- Texts^.Size := 4;
- NView^.Insert(Texts);
- New(Texts,Init(5,35,0,0,'San Serif',donothing));
- Texts^.Font := 3;
- NView^.Insert(Texts);
- New(Texts, Init(5,50,0,0,'Gothic',donothing));
- Texts^.Font := 4;
- NView^.Insert(Texts);
- New(Texts, Init(5,62,0,0,'Script',donothing));
- Texts^.Font := 5;
- NView^.Insert(Texts);
- New(Texts, Init(5,80,0,0,'Simple',donothing));
- Texts^.font := 6;
- NView^.Insert(Texts);
- New(Texts, Init(5,100,0,0,'Italics',donothing));
- Texts^.Font := 7;
- NView^.Insert(texts);
- New(Texts, Init(5,115,0,0,'Lite',donothing));
- Texts^.Font := 8;
- NView^.Insert(Texts);
- New(Texts, Init(5,135,0,0,'Big',donothing));
- Texts^.Font := 9;
- NView^.Insert(Texts);
- Main^.Insert(Nview);
- Main^.ToFront(Main^.NumDialogs);
- NView^.Paint;
- end;
-
- begin
- New(Main, Init);
- New(CheckBox, Init(5,5,100,100,'CheckBox 1'));
- New(View, Init(10,10,340,190,'Demo Window',TheFlags+cmScroll));
- New(View2, Init(355,10,275,115,'Demo Window 2',TheFlags-CmSize));
- New(View3, Init(10,205,450,190,'Demo Window 3',TheFlags));
- New(Button, Init(5,5,100,15,'PUSH ME!',Donothing));
- New(Button3, Init(5,25,100,15,'Do Nothing',Donothing));
- New(Icon, Init('WindObjs.Ico',100,100,45,50,'Icon',Addview));
- New(Text, Init(5,-2,Length('Text Example')*8,8,'Text Examples',donothing));
- Text^.Font := 4;
- Text^.Size := 2;
- View2^.Insert(Text);
- New(Text, Init(5,25,0,0,' Different fonts and colors are',donothing));
- View2^.Insert(Text);
- New(Text, Init(5,35,0,0,'available through simple manipul-',donothing));
- View2^.Insert(Text);
- New(Text, Init(5,45,0,0,'ations.', donothing));
- View2^.Insert(Text);
- New(Button2, Init(90,75,100,15,'Show Fonts', ShowFonts));
- View2^.Insert(Button2);
- View^.Insert(Button);
- View^.Insert(Button3);
- View^.Insert(Icon);
- View3^.Insert(CheckBox);
- View^.Header := 20;
- View^.Border := true;
- Main^.Insert(View);
- Main^.Insert(View2);
- Main^.Insert(View3);
- View^.InFront := True;
- Main^.DrawAll;
- Main^.Run;
- Main^.Done;
- TextMode(3);
- end.
-