source: cprs/branches/tmg-cprs/m_files/TMGOOT2.m@ 1742

Last change on this file since 1742 was 796, checked in by Kevin Toppenberg, 14 years ago

Initial upload

File size: 1.9 KB
RevLine 
[796]1TMGOOT2 ;TMG/kst/OO Test code ;03/25/06
2 ;;1.0;TMG-LIB;**1**;04/25/04
3
4 ;"Kevin Toppenberg MD
5 ;"GNU General Public License (GPL) applies
6
7 ;------------------------------------------
8 ;Main function below
9 ;------------------------------------------
10
11MyFunct
12
13 do VCUSAV2^TMGTERM
14
15 new tScreen ;"will store type def & all instances of object type
16 new pScrn ;"will store 1 instance of object (actually inside object type def [tScreen])
17 set pScrn=$$new^TMGOOL("tScreen","TMGWSCR")
18 new tWindow,pWinMain,pWin1,pWin2
19 set pWinMain=$$new^TMGOOL("tWindow","TMGWIN01")
20 do proc^TMGOOL(pWinMain,"SET TLHW",0,0,IOSL,IOM)
21 do setProp^TMGOOL(pScrn,"WINDOW",pWinMain)
22
23 ;"goto X2
24 ;"========== Start of custom windows etc. ===========
25 set pWin1=$$new^TMGOOL("tWindow","TMGWIN01")
26 do proc^TMGOOL(pWin1,"SET TLHW",12,5,10,30)
27 do setProp^TMGOOL(pWin1,"TITLE","Main Window")
28 do setProp^TMGOOL(pWin1,"PARENT",pWinMain)
29
30 new tButton,pButton1
31 set pButton1=$$new^TMGOOL("tButton","TMGWBT01")
32 do proc^TMGOOL(pButton1,"SET TLHW",5,5,3,8)
33 do setProp^TMGOOL(pButton1,"TITLE","Button")
34 do setProp^TMGOOL(pButton1,"PARENT",pWin1) ;"<-- now parent paint will effect painting of this
35
36 set pWin2=$$new^TMGOOL("tWindow","TMGWIN01")
37 do proc^TMGOOL(pWin2,"SET TLHW",8,10,18,60)
38 do setProp^TMGOOL(pWin2,"TITLE","Another Window")
39 do setProp^TMGOOL(pWin2,"PARENT",pWinMain)
40
41 new tScrlBox,pSB
42 set pSB=$$new^TMGOOL("tScrlBox","TMGWSBX1")
43 do proc^TMGOOL(pSB,"SET TLHW",2,2,10,20)
44 do setProp^TMGOOL(pSB,"PARENT",pWin2)
45 do setProp^TMGOOL(pSB,"SIZABLE",1)
46
47X2
48RUN do proc^TMGOOL(pScrn,"RUN")
49
50 ;" goto X3
51 do delete^TMGOOL(pWinMain)
52 do delete^TMGOOL(pScrn)
53
54X3
55
56 do VCULOAD2^TMGTERM
57 write "That all folks!",!
58
59 quit
Note: See TracBrowser for help on using the repository browser.