home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
windows
/
kpwdemo.zip
/
GRAPHICS.SRC
< prev
next >
Wrap
Text File
|
1990-06-28
|
3KB
|
95 lines
:h1 is window (,1.285,1.125,85,25,'Graphics in KnowledgePro',[popup,thickFrame,titleBar,showChildren,siblings]).
:font is create_font (?bigFont).
:font2 is create_font (?smallFont).
use_font (?font).
text ('
KnowledgePro makes it easy to display images and define hyper-regions.').
button ('Return to the demo',return,35,21).
use_font (system_font).
if ?version is 3
then bitmapFile is 'spaceman.bmp'
else bitmapFile is 'spaceman.bm4'.
:h2 is window (,45,5,35,15,ICONS,[childwindow,thickFrame,visible,titlebar],?h1 ).
:h3 is window (,4,5,35,15,BITMAPS,[childwindow,thickFrame,titleBar,visible],?h1).
:image is load_bitmap (?bitmapFile).
bitmap (?image,1,1).
:b1 is button ('See Code',code,23,2).
set_display_window (?h2).
text ('
#x15Point and click
#x18 to select an
#x25icon.').
if ?version is 3
then :i1 is load_icon ('kpwin.ico') and
icon (?i1,8,10)
else :i1 is [].
:i2 is load_icon (exclamation_icon).
:i3 is load_icon (hand_icon) .
:i4 is load_icon (question_icon).
:i5 is load_icon (asterisk_icon).
:iconList is [?i1,?i2,?i3,?i4,?i5].
:nameList is [KnowledgePro,Exclamation,Stop,Question,Information].
icon (?i2,3,2).
icon (?i3,11,5).
icon (?i4,19,8).
icon (?i5,27,11).
hyper_region (KnowledgePro,8,10,7,3).
hyper_region (Exclamation,3,2,7,3).
hyper_region (Stop,11,5,7,3).
hyper_region (Question,19,8,7,3).
hyper_region (Information,27,11,7,3).
button ('Continue',continue,18,18,).
show_window (?h1).
topic code.
use_font (?font2).
set_display_window (?h2).
hide_window (?b1).
window (,1,1,50,50,,[child,showchildren,siblings,visible],?h3).
text ('
window (,6,5,35,15,BITMAPS,
[popupWindow,thickFrame,
titleBar,visible]).
image is load_bitmap (''sample.bmp'').
bitmap (?image,1,1).
button (''See Code'',code,23,2).
Image captured using ImagePrep by
Computer Presentations Inc.').
button (Continue,done,12,11.5).
use_font (system_font).
topic done.
close_window ().
show_window (?b1).
end.
end.
topic mark (item).
window (,1,1,50,50,,[child,showChildren,visible],?h2).
text ('
Each icon is overlaid with a
hyper-region. Here is the icon
which you selected.').
handle is element ( ?iconList, where (?nameList,?item) ).
icon (?handle,15,7).
button (Continue,done,13,11).
topic done.
close_window ().
end.
end.
topic return.
delete_font ([?font,?font2]).
delete_bitmap (?image).
delete_icon ([ ?i1,?i2,?i3,?i4,?i5]).
close_window (?h1).
continue ().
end.