LOGO-L> MSWLogo windows 
Author Message
 LOGO-L> MSWLogo windows

;Hello Every Body
;Here is a trial to use windows functions of MSWLogo. To be honest
;I am not so comfortable with it. As you can see the core of this demo
;could be run without windows;with only 3 procedures totalling less than
;25 % of the code size. Does it worth?.
;Best Regards
;Mhelhefny
;-------------------------------------------------
TO COL :N
OP ITEM :N [[255 255 0][255 0 0][0 255 0][0 0 255]
            [255 155 0][50 255 120][130 0 130]
            [30 200 200][255 0 255][200 200 100]
            [120 20 120][200 100 50]]
END

to draw
cs ht pd
poly_star 50*scrollbarget "size scrollbarget "depth scrollbarget "sides
pu sety -100 rt 90 label se "THE "POLY_STAR
end

to fil
setfc col :lev pu rt 45 fd :size*.66 pd fill pu bk :size*.66 lt 45 pd
end

to go
windowcreate "main "panel [poly_star] 0 0 100 130[setup]
end

to poly_star :size :lev :sides
if :lev =0 [stop]
repeat :sides [setpc col repcount fd :size/ 4
poly_star :size/3 :lev-1 :sides fd :size/ 2 rt 360/:sides]
fil
end

to scale1
staticupdate "text1 (se "depth scrollbarget "depth)
draw
end

to scale2
staticupdate "text2 (se "size scrollbarget "size)
draw
end

to scale3
staticupdate "text3 (se "sides scrollbarget "sides)
draw
end

to setup
buttoncreate "panel "stop [Exit] 30 100 40 15 [windowdelete "panel]
staticcreate "panel "text1 [depth] 15 10 70 10
scrollbarcreate "panel "depth 15 20 70 10 [scale1]
staticcreate "panel "text2 [size] 20 40 60 10
scrollbarcreate "panel "size 15 50 70 10 [scale2]
staticcreate "panel "text3 [sides] 20 70 60 10
scrollbarcreate "panel "sides 15 80 70 10 [scale3]
scrollbarset "depth 2 4 3
scrollbarset "size 1 5 3
scrollbarset "sides 4 7 5
end
;-------------------------------------------------
---------------------------------------------------------------





Tue, 09 May 2000 03:00:00 GMT  
 LOGO-L> MSWLogo windows

75% for a user interface, that's cheap, it's usually 95%
and that's why it's important to learn it.

Most new code today is user interface, the next most is
error checking.

The functionality of the internet has existed for 20 years.
What made it so popular recently?

A GUI (an html Browser), was it worth it?

Was it worth putting a GUI front end on UCBLogo called
MSWLogo? MSWLogo's GUI is about 2/3's of the code and it
is fairly high level C++ objects from a 3rd party library.

To answer your question, yes, the world seems to think it's
worth it. Besides it's fun.

Version 6.2 of MSWLogo (not released yet) will allow you to
place the controls in the graphics window which will simplify
things a little.

Quote:

> ;Hello Every Body
> ;Here is a trial to use windows functions of MSWLogo. To be honest
> ;I am not so comfortable with it. As you can see the core of this demo
> ;could be run without windows;with only 3 procedures totalling less than
> ;25 % of the code size. Does it worth?.
> ;Best Regards
> ;Mhelhefny
> ;-------------------------------------------------
> TO COL :N
> OP ITEM :N [[255 255 0][255 0 0][0 255 0][0 0 255]
>             [255 155 0][50 255 120][130 0 130]
>             [30 200 200][255 0 255][200 200 100]
>             [120 20 120][200 100 50]]
> END

> to draw
> cs ht pd
> poly_star 50*scrollbarget "size scrollbarget "depth scrollbarget "sides
> pu sety -100 rt 90 label se "THE "POLY_STAR
> end

> to fil
> setfc col :lev pu rt 45 fd :size*.66 pd fill pu bk :size*.66 lt 45 pd
> end

> to go
> windowcreate "main "panel [poly_star] 0 0 100 130[setup]
> end

> to poly_star :size :lev :sides
> if :lev =0 [stop]
> repeat :sides [setpc col repcount fd :size/ 4
> poly_star :size/3 :lev-1 :sides fd :size/ 2 rt 360/:sides]
> fil
> end

> to scale1
> staticupdate "text1 (se "depth scrollbarget "depth)
> draw
> end

> to scale2
> staticupdate "text2 (se "size scrollbarget "size)
> draw
> end

> to scale3
> staticupdate "text3 (se "sides scrollbarget "sides)
> draw
> end

> to setup
> buttoncreate "panel "stop [Exit] 30 100 40 15 [windowdelete "panel]
> staticcreate "panel "text1 [depth] 15 10 70 10
> scrollbarcreate "panel "depth 15 20 70 10 [scale1]
> staticcreate "panel "text2 [size] 20 40 60 10
> scrollbarcreate "panel "size 15 50 70 10 [scale2]
> staticcreate "panel "text3 [sides] 20 70 60 10
> scrollbarcreate "panel "sides 15 80 70 10 [scale3]
> scrollbarset "depth 2 4 3
> scrollbarset "size 1 5 3
> scrollbarset "sides 4 7 5
> end
> ;-------------------------------------------------
> ---------------------------------------------------------------




--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Tue, 09 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. LOGO-L> windows functions in MSWLogo

2. LOGO-L> MSWLogo Commander Window

3. LOGO-L> PC-LOGO syntax in MSWLogo

4. LOGO-L> Re: MSWLogo

5. LOGO-L> MSWlogo for D. Barnett

6. LOGO-L> Web page + MSWLogo GUI Builder

7. LOGO-L> Bola magica (MSWLogo)

8. LOGO-L> oscillatory table with mswlogo bits

9. LOGO-L> Re: MSWlogo

10. LOGO-L> MSWLogo 6.2 is available

11. LOGO-L> Searching for MSWLogo (Spanish Version)

12. Odp: LOGO-L> MSWLogo 6.2 is available

 

 
Powered by phpBB® Forum Software