commit 51f73b984375554aa2a6fa22ae5469fec985bb1f Author: Carsten Larsen Date: Sun Feb 28 22:17:19 2021 +0100 Initial commit diff --git a/AmigaE.info b/AmigaE.info new file mode 100644 index 0000000..17f2377 Binary files /dev/null and b/AmigaE.info differ diff --git a/AmigaE/ClickTabExample b/AmigaE/ClickTabExample new file mode 100644 index 0000000..d2a8867 Binary files /dev/null and b/AmigaE/ClickTabExample differ diff --git a/AmigaE/ClickTabExample.e b/AmigaE/ClickTabExample.e new file mode 100644 index 0000000..8cc2d86 --- /dev/null +++ b/AmigaE/ClickTabExample.e @@ -0,0 +1,159 @@ +/* ClickTabExample.e - Ported to E by Eric Sauvageau. */ + +OPT PREPROCESS + +MODULE 'tools/constructors', 'tools/boopsi' + +MODULE 'exec/types','exec/memory','dos/dos','dos/dosextens','exec/lists', + 'exec/nodes','intuition','graphics','intuition/intuition', + 'intuition/gadgetclass','intuition/imageclass', + 'intuition/intuitionbase','intuition/classusr', + 'intuition/gadgetclass','intuition/cghooks','intuition/icclass', + 'intuition/classes','intuition/sghooks','graphics/gfxbase', + 'graphics/text','graphics/gfxmacros','utility/tagitem','utility/hooks' + + +MODULE 'clicktab','gadgets/clicktab','window','classes/window','layout', + 'gadgets/layout', 'other/classact_macros' + +DEF listitems:PTR TO mlh + + +CONST ID_CLICKTAB =1 + + +PROC clickTabNodes(list:PTR TO lh, labels:PTR TO LONG) +DEF node=NIL, i=0 + + newlist(list) + + WHILE labels[i] + + IF (node := AllocClickTabNodeA([TNA_TEXT, labels[i], + TNA_NUMBER, i, + TNA_ENABLED, TRUE, + TNA_SPACING, 6, + TAG_DONE])) + + AddTail(list,node) + ENDIF + + INC i + + ENDWHILE +ENDPROC + + +PROC freeClickTabNodes(list:PTR TO lh) +DEF node:PTR TO ln, nextnode:PTR TO ln + + node:= list.head + + WHILE (nextnode = node.succ) + FreeClickTabNode(node) + node := nextnode + ENDWHILE + + END list -> Optional, the E cleanup code would do it for us anyway. +ENDPROC + +PROC main() +DEF win=NIL:PTR TO window, tab_object=NIL:PTR TO object, win_object=NIL:PTR TO object +DEF wait, signal, result, done = FALSE, code, tmpres,tmpres2 +DEF names:PTR TO LONG + + names:=['Tab_1','Tab_2','Tab_3','Tab_4',NIL] + +-> Open the classes + + windowbase := OpenLibrary('window.class',0) + layoutbase := OpenLibrary('gadgets/layout.gadget',0) + clicktabbase := OpenLibrary('gadgets/clicktab.gadget',0) + + IF (windowbase AND layoutbase AND clicktabbase) + clickTabNodes(NEW listitems, names) + + /* Create the window object. */ + win_object := WindowObject, + WA_SCREENTITLE, 'ClassAct Copyright 1995, Phantom Development LLC.', + WA_TITLE, 'ClassAct clicktab.gadget Example', + WA_SIZEGADGET, TRUE, + WA_LEFT, 40, + WA_TOP, 30, + WA_DEPTHGADGET, TRUE, + WA_DRAGBAR, TRUE, + WA_CLOSEGADGET, TRUE, + WA_ACTIVATE, TRUE, + WA_SMARTREFRESH, TRUE, + WINDOW_PARENTGROUP, VLayoutObject, + LAYOUT_SPACEOUTER, TRUE, + LAYOUT_DEFERLAYOUT, TRUE, + LAYOUT_ADDCHILD, tab_object := ClickTabObject, + GA_ID, ID_CLICKTAB, + CLICKTAB_LABELS, listitems, + CLICKTAB_CURRENT, 0, + End, + End, + End + +-> Object creation sucessful? + + IF win_object + +-> Open the window. + + IF (win := CA_OpenWindow(win_object)) + +-> Obtain the window wait signal mask. + + GetAttr( WINDOW_SIGMASK, win_object, {signal}) + +-> Input Event Loop + + WHILE done = FALSE + wait:= Wait(signal OR SIGBREAKF_CTRL_C) + + IF (wait AND SIGBREAKF_CTRL_C) + done := TRUE + ELSE + + WHILE (result := domethod(win_object, [WM_HANDLEINPUT,{code}])) <> WMHI_LASTMSG + tmpres := (result AND WMHI_CLASSMASK) + SELECT tmpres + + CASE WMHI_CLOSEWINDOW + done := TRUE + + CASE WMHI_GADGETUP + tmpres2 := (result AND WMHI_GADGETMASK) + + SELECT tmpres2 + CASE ID_CLICKTAB ; NOP + NOP + ENDSELECT + + ENDSELECT + ENDWHILE + ENDIF + ENDWHILE + ENDIF + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(win_object) + ENDIF + ENDIF + + freeClickTabNodes(listitems) + + /* Close the classes. */ + + IF clicktabbase THEN CloseLibrary(clicktabbase) + IF layoutbase THEN CloseLibrary(layoutbase) + IF windowbase THEN CloseLibrary(windowbase) + +ENDPROC + diff --git a/AmigaE/ClickTabExample.info b/AmigaE/ClickTabExample.info new file mode 100644 index 0000000..8d7d18d Binary files /dev/null and b/AmigaE/ClickTabExample.info differ diff --git a/AmigaE/ConnectExample b/AmigaE/ConnectExample new file mode 100644 index 0000000..cbc33a9 Binary files /dev/null and b/AmigaE/ConnectExample differ diff --git a/AmigaE/ConnectExample.e b/AmigaE/ConnectExample.e new file mode 100644 index 0000000..37a3077 --- /dev/null +++ b/AmigaE/ConnectExample.e @@ -0,0 +1,166 @@ +/* ClassAct Inter-Connection Notification Example + Ported to E by Eric Sauvageau. +*/ + +OPT PREPROCESS + +MODULE 'tools/boopsi' + +MODULE 'exec/nodes','intuition','graphics','intuition/intuition', + 'intuition/gadgetclass','intuition/imageclass', + 'intuition/intuitionbase','intuition/classusr', + 'intuition/gadgetclass','intuition/cghooks','intuition/icclass', + 'intuition/classes' + +MODULE 'libraries/gadtools','intuition/icclass','dos','dos/dos', + 'graphics','intuition','intuition/intuition','utility/tagitem' + + +MODULE 'window','classes/window','layout','gadgets/layout','gadgets/palette', + 'gadgets/button','images/bevel','palette','images/label','label', + 'classes/window','other/classact_macros','button' + + +CONST ID_BUTTON = 1 +CONST ID_FOREGROUND = 2 +CONST ID_BACKGROUND = 3 + + +PROC main() + +DEF window:PTR TO window, + but_object:PTR TO object, + win_object:PTR TO object, + mapfg2button, mapbg2button, + tmpres1,tmpres2 + +DEF wait, signal, result, done=FALSE, code + + + mapfg2button := [PALETTE_COLOR, BUTTON_TEXTPEN, TAG_END] + mapbg2button := [PALETTE_COLOR, BUTTON_BACKGROUNDPEN, TAG_END] + + windowbase := OpenLibrary('window.class',0) + layoutbase := OpenLibrary('gadgets/layout.gadget',0) + buttonbase := OpenLibrary('gadgets/button.gadget',0) + palettebase := OpenLibrary('gadgets/palette.gadget',0) + labelbase := OpenLibrary('images/label.image',0) + + IF (windowbase AND layoutbase AND buttonbase AND palettebase AND labelbase) + +-> Create the window object. + + win_object := WindowObject, + WA_SCREENTITLE, 'ClassAct Copyright 1995, Phantom Development LLC.', + WA_TITLE, 'ClassAct Example', + WA_SIZEGADGET, TRUE, + WA_LEFT, 40, + WA_TOP, 30, + WA_DEPTHGADGET, TRUE, + WA_DRAGBAR, TRUE, + WA_CLOSEGADGET, TRUE, + WA_ACTIVATE, TRUE, + WA_SMARTREFRESH, TRUE, + + WINDOW_PARENTGROUP, VLayoutObject, + LAYOUT_SPACEOUTER, TRUE, + LAYOUT_DEFERLAYOUT, TRUE, + LAYOUT_BEVELSTYLE, GroupFrame, + LAYOUT_LABEL, 'InterConnection', + + StartMember, but_object := ButtonObject, + GA_TEXT, '_Inter-Connection Example', + GA_ID, ID_BUTTON, + EndMember, + CHILD_WEIGHTEDHEIGHT, 0, + + StartMember, HLayoutObject, + LAYOUT_SPACEOUTER, FALSE, + + StartMember, PaletteObject, + GA_ID, ID_FOREGROUND, + PALETTE_NUMCOLORS, 8, + PALETTE_COLOR, 1, + ICA_TARGET, but_object, /* object to connect to */ + ICA_MAP, mapfg2button, /* tag mapping array */ + EndMember, + CHILD_LABEL, LabelObject, LABEL_TEXT, '_ForeGround', LabelEnd, + CHILD_MINWIDTH, 90, + CHILD_MINHEIGHT, 20, + + StartMember, PaletteObject, + GA_ID, ID_BACKGROUND, + PALETTE_NUMCOLORS, 8, + PALETTE_COLOR, 0, + ICA_TARGET, but_object, /* object to connect to */ + ICA_MAP, mapbg2button, /* tag mapping array */ + EndMember, + CHILD_LABEL, LabelObject, LABEL_TEXT, '_BackGround', LabelEnd, + CHILD_MINWIDTH, 90, + CHILD_MINHEIGHT, 20, + EndMember, + EndMember, + EndWindow + +-> Object creation sucessful? + + IF win_object + +-> Open the window. + + IF (window := CA_OpenWindow(win_object)) + +-> Obtain the window wait signal mask. + + GetAttr(WINDOW_SIGMASK, win_object, {signal}) + +-> Input Event Loop + + WHILE (done = FALSE) + wait := Wait(signal OR SIGBREAKF_CTRL_C) + + IF (wait AND SIGBREAKF_CTRL_C) + done := TRUE + + ELSE + + WHILE ((result := CA_HandleInput(win_object,{code})) <> WMHI_LASTMSG) + + tmpres1 := (result AND WMHI_CLASSMASK) + + SELECT tmpres1 + + CASE WMHI_CLOSEWINDOW ; done := TRUE + + CASE WMHI_GADGETUP + tmpres2 := (result AND WMHI_GADGETMASK) + + SELECT tmpres2 + CASE ID_BUTTON ; NOP + ENDSELECT + + ENDSELECT + + ENDWHILE + ENDIF + ENDWHILE + ENDIF + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(win_object ) + ENDIF + ENDIF + +-> Close the classes. + + IF labelbase THEN CloseLibrary(labelbase) + IF palettebase THEN CloseLibrary(palettebase) + IF buttonbase THEN CloseLibrary(buttonbase) + IF layoutbase THEN CloseLibrary(layoutbase) + IF windowbase THEN CloseLibrary(windowbase) + +ENDPROC diff --git a/AmigaE/ConnectExample.info b/AmigaE/ConnectExample.info new file mode 100644 index 0000000..d9908fb Binary files /dev/null and b/AmigaE/ConnectExample.info differ diff --git a/AmigaE/E_Examples.doc b/AmigaE/E_Examples.doc new file mode 100644 index 0000000..3d79209 --- /dev/null +++ b/AmigaE/E_Examples.doc @@ -0,0 +1,25 @@ +Notes for the Amiga E API for ClassAct +-------------------------------------- + + o Remember that in E, an external function name must have the first letter + in uppercase, and the second one in lowercase. For this reason, some + function call have slightly different names than the ones used in + the Autodocs: + + LAYOUT_GetClass() is Layout_GetClass() + CLICKTAB_GetClass() is ClickTab_GetClass() + etc... + + Check the modules when uncertain about the name to use. + + + o Don't forget to put OPT PREPROCESS at the top of your source to be able + to use the macros. + + + +Other/Classact_lib.m +---------------------- +This module holds a few goodies for ClassAct, ported from the linked +library. Note that some functions in it are still untested. + diff --git a/AmigaE/E_Examples.doc.info b/AmigaE/E_Examples.doc.info new file mode 100644 index 0000000..637674f Binary files /dev/null and b/AmigaE/E_Examples.doc.info differ diff --git a/AmigaE/LayoutExample b/AmigaE/LayoutExample new file mode 100644 index 0000000..74218b0 Binary files /dev/null and b/AmigaE/LayoutExample differ diff --git a/AmigaE/LayoutExample.e b/AmigaE/LayoutExample.e new file mode 100644 index 0000000..27d1f33 --- /dev/null +++ b/AmigaE/LayoutExample.e @@ -0,0 +1,531 @@ +/************************************************************************* + * ClassAct Comprehensive Demo Program + * Copyright © 1995 Phantom Development Co. + * + * Translated from C to E by Eric Sauvageau. + */ + + +/* +Supply inithook.m with ClassAct? Or at least its source? Might be added + to classact_lib.m? + +*/ + +OPT PREPROCESS + +MODULE 'tools/constructors' +MODULE 'tools/boopsi','tools/installhook','tools/inithook' + +MODULE 'exec/types','exec/memory','intuition/intuition','exec/ports', + 'intuition/gadgetclass','intuition/icclass','libraries/gadtools', + 'graphics/gfxbase','graphics/text','graphics/gfxmacros', + 'utility/tagitem','workbench/startup','workbench/workbench', + 'intuition','graphics','exec','dos','diskfont','utility','wb','icon', + 'utility/hooks','intuition/classes','intuition/classusr', + 'exec/lists','exec/nodes','dos/rdargs','dos/dos' + + +MODULE 'classes/window','gadgets/listbrowser','listbrowser', + 'other/classact_macros','layout','gadgets/layout','images/bevel', + 'gadgets/chooser','chooser','images/label','label','window', + 'button' + +MODULE 'tools/classact_lib' + +/* a simple button */ +#define Button(a) ButtonObject, GA_TEXT, a, ButtonEnd +#define DButton(a) ButtonObject, GA_TEXT, a, GA_DISABLED, TRUE, ButtonEnd + + +/************************************************************************** + * Some label arrays for the gadgets in this demo. + */ + +DEF objtypes:PTR TO LONG, + objnames:PTR TO LONG + + +/************************************************************************* + * ReadArgs + */ + +#define TEMPLATE 'S=SIMPLEREFRESH/S,NC=NOCAREREFRESH/S,ND=NDEFER/S' + +ENUM A_SIMPLE, A_NOCARE, A_NODEFER + +DEF arguments:PTR TO LONG + + +-> Must use separate vars because for some reason, EC chokes when you try +-> to assign a value to an indexed array in the middle of a list... Will +-> have to notify Wouter about that bugger. +-> We will manualy build the list later. + +ENUM G_OBJTYPE=1, G_OBJLIST, G_TOP, G_UP, G_DOWN, G_BOTTOM, G_SORT, + G_NEW, G_EDIT, G_COPY, G_REMOVE, G_HELP, G_SAVE, G_USE, G_TEST, + G_CANCEL,G_END + +DEF gl[18]: ARRAY OF LONG + +DEF g_objtype, + g_objlist, + g_top, + g_up, + g_down, + g_bottom, + g_sort, + g_new, + g_edit, + g_copy, + g_remove, + g_help, + g_save, + g_use, + g_test, + g_cancel + + +PROC init() + objtypes:=['Exec','Image','Sound','Menu','Icon','Dock','Access',NIL] + objnames:=['ToolManager','ScreenMode','WBPattern',NIL] + + buttonbase :=openClass('gadgets/button.gadget',0) + listbrowserbase :=openClass('gadgets/listbrowser.gadget',0) + chooserbase :=openClass('gadgets/chooser.gadget',0) + windowbase :=openClass('window.class',0) + layoutbase :=openClass('gadgets/layout.gadget',0) + labelbase := openClass('images/label.image',0) + + iconbase := OpenLibrary('icon.library',36) + +ENDPROC + + +/************************************************************************* + * App message hook. + * Workbench App messages can be caught with a callback hook such as this. + * We'll not worry about the app message type in this hook. Objects dropped + * on the window or on the icon (while iconified) will be added to the + * listview. + */ + + +PROC appMsgFunc(hook:PTR TO hook, window:PTR TO object, msg:PTR TO appmessage) +DEF win: PTR TO window, i, arg:PTR TO wbarg, l: PTR TO lh, n:PTR TO ln, + name[256]:STRING + + i := msg.numargs + arg := msg.arglist + l := hook.data + + GetAttr(WINDOW_WINDOW, window, {win} ) + + +-> Detach the list for modifications. + + SetGadgetAttrsA(g_objlist, win, NIL,[LISTBROWSER_LABELS, Not(0), TAG_END]) + + WHILE i + /* Add the name of the icon to the listview. ListBrowser can copy the + * text into an internal buffer and thus let us not worry about the + * pointer validity. + */ + + DEC i + + NameFromLock(arg.lock, name, 256) + AddPart(name,arg.name, 256) + + IF (n := AllocListBrowserNodeA(1, [LBNCA_COPYTEXT, TRUE, LBNCA_TEXT, name, TAG_END])) THEN AddTail(l, n) + + arg++ + + ENDWHILE + +-> Reattach the list + + SetGadgetAttrsA(g_objlist, win, NIL, [LISTBROWSER_LABELS, l, TAG_END]) +ENDPROC + + +/************************************************************************* + * Main Program + */ + +PROC main() HANDLE +DEF objlist=NIL:PTR TO lh, + typelist:PTR TO lh, + args=NIL:PTR TO rdargs, + appport: PTR TO mp, + window=NIL:PTR TO object, + mainlayout:PTR TO window, + apphook:hook, + win:PTR TO window, + wsig, asig,done=FALSE, + sig,result,code, + tmp,tmp2,tmp3, + ids:PTR TO LONG, + dis=FALSE,i, + helptext[40]:STRING + + +-> Init some lists, and open the required gadgets/libraries. + +init() + +ids := [G_TOP, G_UP, G_DOWN, G_BOTTOM, G_EDIT, G_COPY, G_REMOVE, G_END ] + +arguments:=[0,0,0] +IF (args := ReadArgs(TEMPLATE, arguments, NIL))=NIL THEN Raise(20) + + +IF ((iconbase<>NIL) AND (buttonbase<>NIL) AND (listbrowserbase<>NIL) AND (chooserbase<>NIL) AND (windowbase<>NIL) AND (layoutbase<>NIL) AND (labelbase<>NIL)) + + WriteF('\seferred \s refresh \s\n', (IF arguments[A_NODEFER] THEN 'Non-d' ELSE 'D'), (IF arguments[A_SIMPLE] THEN 'Simple' ELSE 'Smart'), (IF arguments[A_NOCARE] THEN '(NoCare)' ELSE '')) + + objlist := browserNodesA(objnames) + typelist := chooserLabelsA(objtypes) + + /* By providing a message port you enable windowclass to handle iconification + * and appwindows. This port can shared by all the windows of your application. + */ + + appport := CreateMsgPort() + + IF (objlist AND typelist AND appport) + inithook(apphook,{appMsgFunc},objlist) + + /* Create a Window object with a Layout. When Window is asked to open itself, + * it will calculate how much space the Layout needs and size itself accordingly. + */ + + + window := WindowObject, + WA_IDCMP, IDCMP_RAWKEY, + WA_TOP, 20, + WA_LEFT, 20, + WA_SIZEGADGET, TRUE, + WA_DEPTHGADGET, TRUE, + WA_DRAGBAR, TRUE, + WA_CLOSEGADGET, TRUE, + WA_ACTIVATE, TRUE, + + /* About window refreshes: + * Because WindowClass and LayoutClass can, when used together, change the + * normal Intuition practise of refreshing gadgets in the input.device context, + * some rules about the refresh system change. + * Deferred refresh works in both smart and simple refresh windows, but + * if nocarerefresh is used, Intuition does not retain the damage regions + * and any window damage will force the whole window to be refreshed. + * This demo allows you to try combinations of refresh types. + * In the normal case you can ignore this and let WindowClass and the user + * decide what kind of refreshes they want. Nocare refresh can be + * combined with smart refresh to provide a fast, but somewhat more memory + * hungry refresh method. Simple refresh can save some memory but it's + * slower. + */ + + WA_SIMPLEREFRESH, arguments[A_SIMPLE], + WA_NOCAREREFRESH, arguments[A_NOCARE], + WA_SMARTREFRESH, Not(arguments[A_SIMPLE]), + + WA_TITLE, 'ClassAct layout.gadget Example (ToolManager preferences mockup)', + WA_SCREENTITLE, 'ClassAct Copyright 1995 Phantom Development LLC.', + + /* Turn on gadget help in the window + */ + + WINDOW_GADGETHELP, TRUE, + + /* Add an iconification gadget. If you have this, you must listen to + * WMHI_ICONIFY. + */ + + WINDOW_ICONIFYGADGET, TRUE, + + /* This message port lets windowclass handle the icon and appwindow. + */ + + WINDOW_APPPORT, appport, + WINDOW_APPWINDOW, TRUE, + WINDOW_APPMSGHOOK, apphook, + + /* The windowclass will automatically free the DiskObject used when + * iconifying the window. If you do not provide a valid DiskObject, + * windowclass will try to use env:sys/def_window.info or the default + * project icon. + */ + + WINDOW_ICON, GetDiskObject( 'LayoutExample' ), + WINDOW_ICONTITLE, 'ClassAct Example', + + /* Below is the layout of the window + */ + + WINDOW_PARENTGROUP, mainlayout := VGroupObject, + LAYOUT_SPACEOUTER, TRUE, + LAYOUT_BEVELSTYLE, BVS_THIN, + + /* this tag instructs layout.gadget to defer GM_LAYOUT and GM_RENDER and ask + * the windowclass to do them. This lessens the load on input.device + */ + + LAYOUT_DEFERLAYOUT, Not(arguments[A_NODEFER]), + + /* A 1-of-n chooser using the labels list we made from the label array earlier + */ + + StartMember, g_objtype := ChooserObject, + CHOOSER_LABELS, typelist, + EndMember, + MemberLabel('_Object Type'), + + /* Objects can be given arbitary weights within groups, and layout.gadget + * will distribute space relative to the total weight of the group. + * Here we set the button column to 0 weight which means minimum space. + * Thus the listview gets all available extra space. + */ + + StartHGroup, BAligned, + + StartMember, g_objlist := ListBrowserObject, + LISTBROWSER_LABELS, objlist, + LISTBROWSER_SHOWSELECTED, TRUE, + EndMember, + + StartVGroup, + StartMember, g_top := DButton('Top'), + StartMember, g_up := DButton('Up'), + StartMember, g_down := DButton('Down'), + StartMember, g_bottom := DButton('Bottom'), + StartMember, g_sort := Button('So_rt'), + EndGroup, + CHILD_WEIGHTEDWIDTH, 0, + + /* One way to keep the buttons constant size is to set the + * group to stay at minimum size with a weight of 0. We could + * also set the weight of each of the buttons to 0. That way + * extra space would be distributed between the buttons + * instead of all below. This looks better. + */ + + CHILD_WEIGHTEDHEIGHT, 0, + EndGroup, + + /* two rows of buttons. EvenSized instructs layout.gadget that it + * should make sure the minimum size of each matches, so that we + * get four neat columns. + * Again the weight is set to 0. When the window is resized, all + * space is given to the listview. + */ + + + StartHGroup, EvenSized, + StartMember, g_new := Button('_New...'), + StartMember, g_edit := DButton('_Edit...'), + StartMember, g_copy := DButton('Co_py'), + StartMember, g_remove := DButton('Remove'), + EndGroup, + CHILD_WEIGHTEDHEIGHT, 0, + + StartHGroup, EvenSized, + StartMember, g_save := Button('_Save'), + StartMember, g_use := Button('_Use'), + StartMember, g_test := Button('_Test'), + StartMember, g_cancel := Button('_Cancel'), + EndGroup, + CHILD_WEIGHTEDHEIGHT, 0, + + + StartMember, g_help := ButtonObject, + GA_READONLY, TRUE, + GA_TEXT, 'Welcome to ClassAct demo!', + EndMember, + CHILD_WEIGHTEDHEIGHT, 0, + + EndGroup, + EndWindow + + IF window + + /* Finish the gadgetarray initialisation. Set gadget IDs and release verify. + * This is one way of avoiding boring repetition in the layout description + * taglist itself. + */ + +-> Let's also generate the array of gadget pointers. We couldn't generate it +-> while we created gadgets because some bug (?) in EC prevents the use of +-> an array in the middle of a list. +-> Fortunately, it's a breeze to do using E lists. + + gl:=[NIL, + g_objtype, + g_objlist, + g_top, + g_up, + g_down, + g_bottom, + g_sort, + g_new, + g_edit, + g_copy, + g_remove, + g_help, + g_save, + g_use, + g_test, + g_cancel, + NIL] + + i:=1 + + REPEAT + SetAttrsA(gl[i], [GA_ID, i, GA_RELVERIFY, TRUE, TAG_END]) + INC i + UNTIL (i = G_END) + + IF (win := CA_OpenWindow(window)) + asig := Shl(1,appport.sigbit) + + /* Now that the window has been opened, we can get the signal mask + * of its user port. If the program supported iconification and didn't + * use a shared IDCMP port between all windows, this signal bit + * would have to be re-queried before each Wait(). + */ + + GetAttr( WINDOW_SIGMASK, window, {wsig} ) + + WHILE (done = FALSE) + sig := Wait(wsig OR asig OR SIGBREAKF_CTRL_C) + + IF (sig AND (wsig OR asig)) + + /* Messages waiting at the window's IDCMP port. Loop at WM_HANDLEINPUT + * until all have been processed. + */ + + WHILE ((result := CA_HandleInput(window,{code})) <> WMHI_LASTMSG) + + /* The return code of this method is two-part. The upper word describes the + * class of the message (gadgetup, menupick, closewindow, iconify, etc), + * and the lower word is a class-defined ID, currently in use in the + * gadgetup and menupick return codes. + * Switch on the class, then on the ID. + */ + + tmp := (result AND WMHI_CLASSMASK) + + SELECT tmp + + CASE WMHI_GADGETUP + /* OK, got a gadgetup from something. Lets find out what the something is. + * The code WORD to which a pointer was passed to WM_HANDLEINPUT has been + * set to the Code value from the IDCMP_GADGETUP, in case we need it. + */ + + tmp2 := (result AND WMHI_GADGETMASK) + SELECT tmp2 + + CASE G_OBJLIST + /* User clicked on the listview + */ + IF (code = Not(0)) THEN dis := TRUE /* no node was selected */ + + i := 0 + REPEAT + SetGadgetAttrsA( gl[ids[i]], win, NIL, [GA_DISABLED, dis, TAG_END]) + RefreshGList( gl[ids[i]], win, NIL, 1 ) + INC i + UNTIL (ids[i] = G_END) + ENDSELECT + + CASE WMHI_GADGETHELP + + /* A gadget help message informs the application about the gadget + * under the mouse pointer. The code WORD is set to the value the + * gadget returned. Result code contains the ID of the gadget, + * or NULL (not in the window) or WMHI_GADGETMASK (not over a gadget). + */ + + tmp3 := (result AND WMHI_GADGETMASK) + SELECT tmp3 + + CASE G_OBJTYPE ; StrCopy(helptext,'Choose object type') + CASE G_OBJLIST ; StrCopy(helptext,'Choose object to modify') + CASE G_TOP ; StrCopy(helptext,'Move object to top') + CASE G_UP ; StrCopy(helptext,'Move object upwards') + CASE G_DOWN ; StrCopy(helptext,'Move object downwards') + CASE G_BOTTOM ; StrCopy(helptext,'Move object to bottom') + CASE G_SORT ; StrCopy(helptext,'Sort object list') + CASE G_NEW ; StrCopy(helptext,'Create new object') + CASE G_EDIT ; StrCopy(helptext,'Edit object') + CASE G_COPY ; StrCopy(helptext,'Make a new copy of object') + CASE G_REMOVE ; StrCopy(helptext,'Delete the object') + CASE G_HELP ; StrCopy(helptext,'Hey there ;)') + CASE G_SAVE ; StrCopy(helptext,'Save settings') + CASE G_USE ; StrCopy(helptext,'Use these settings') + CASE G_TEST ; StrCopy(helptext,'Test these settings') + CASE G_CANCEL ; StrCopy(helptext,'Cancel changes') + DEFAULT ; StrCopy(helptext,'') + ENDSELECT + + IF (SetGadgetAttrsA(gl[G_HELP], win, NIL, [GA_TEXT, helptext, TAG_END] )) THEN RefreshGList(gl[G_HELP], win, NIL, 1) + + CASE WMHI_CLOSEWINDOW + /* The window close gadget was hit. Time to die... + */ + done := TRUE + + CASE WMHI_ICONIFY + /* Window requests that it be iconified. Handle this event as + * soon as possible. The window is not iconified automatically to + * give you a chance to make note that the window pointer will be + * invalid before the window closes. It also allows you to free + * resources only needed when the window is open, if you wish to. + */ + IF (CA_Iconify( window )) THEN win := NIL + + CASE WMHI_UNICONIFY + /* The window should be reopened. If you had free'd something + * on iconify, now is the time to re-allocate it, before calling + * CA_OpenWindow. + */ + win := CA_OpenWindow( window ) + + ENDSELECT + ENDWHILE + + ELSEIF (sig AND SIGBREAKF_CTRL_C) + done := TRUE + ENDIF + + ENDWHILE + + /* Close the window and dispose of all attached gadgets + */ + DisposeObject( window ) + ENDIF + ENDIF + ENDIF + + IF appport THEN DeleteMsgPort(appport) + + /* NIL is valid input for these helper functions, so no need to check. + */ + freeChooserLabels( typelist ) + freeBrowserNodes( objlist ) + + FreeArgs(args) +ENDIF + +EXCEPT DO + + IF buttonbase THEN CloseLibrary(buttonbase) + IF listbrowserbase THEN CloseLibrary(listbrowserbase) + IF chooserbase THEN CloseLibrary(chooserbase) + IF windowbase THEN CloseLibrary(windowbase) + IF layoutbase THEN CloseLibrary(layoutbase) + IF labelbase THEN CloseLibrary(labelbase) + IF iconbase THEN CloseLibrary(iconbase) +ENDPROC diff --git a/AmigaE/LayoutExample.info b/AmigaE/LayoutExample.info new file mode 100644 index 0000000..7c6c5a7 Binary files /dev/null and b/AmigaE/LayoutExample.info differ diff --git a/AmigaE/PenMapExample b/AmigaE/PenMapExample new file mode 100644 index 0000000..471b08d Binary files /dev/null and b/AmigaE/PenMapExample differ diff --git a/AmigaE/PenMapExample.e b/AmigaE/PenMapExample.e new file mode 100644 index 0000000..ffc917d --- /dev/null +++ b/AmigaE/PenMapExample.e @@ -0,0 +1,1773 @@ +/* Example for ClassAct penmap.image example 40.2 */ +/* Original C example by Phantom Development */ +/* Ported to E by Eric Sauvageau */ + +-> Required modules + +MODULE 'exec/types','intuition/imageclass','intuition', + 'intuition/gadgetclass','intuition/intuition','utility/tagitem' + +MODULE 'penmap','images/penmap','tools/classact_lib' + +DEF penmapbase, + win:PTR TO window, + image_object:PTR TO image + + +PROC main() +DEF msg:PTR TO intuimessage, done=FALSE + +-> Open the window. + + win:=OpenWindowTagList(NIL, + [WA_FLAGS ,(WFLG_DEPTHGADGET OR WFLG_DRAGBAR OR + WFLG_CLOSEGADGET OR WFLG_SIZEGADGET), + WA_IDCMP, (IDCMP_CLOSEWINDOW OR IDCMP_NEWSIZE), + WA_INNERWIDTH, 60, + WA_INNERHEIGHT, 45, + WA_MAXWIDTH, -1, + WA_MAXHEIGHT, -1, + WA_ACTIVATE, TRUE, + WA_SMARTREFRESH, TRUE, + WA_TITLE, 'ClassAct penmap.image Demo', + TAG_DONE]) + + IF win + +-> Open the penmap.image class. + + IF (penmapbase := openClass('Images/penmap.image',40)) + +-> Alloc a new object. + + image_object := NewObjectA(PenMap_GetClass(), NIL, + [PENMAP_RENDERDATA, {image_data}, + PENMAP_PALETTE, {palette_data}, + PENMAP_SCREEN, win.wscreen, + TAG_DONE]) + + IF image_object + +-> Set its attributes. + + SetAttrsA(image_object, + [IA_WIDTH, (win.width - (win.borderleft + win.borderright + 10)), + IA_HEIGHT, (win.height - (win.bordertop + win.borderbottom + 10)), + TAG_DONE]) + + DrawImageState(win.rport, + image_object, + (win.borderleft + 5), + (win.bordertop + 5), + IDS_NORMAL, NIL) + +-> Handle it. + WHILE done=FALSE + WaitPort(win.userport) + WHILE (msg := GetMsg(win.userport)) + + IF (msg.class = IDCMP_CLOSEWINDOW) + done := TRUE + + ELSEIF (msg.class = IDCMP_NEWSIZE) + SetAttrsA(image_object, + [IA_WIDTH, (win.width - (win.borderleft + win.borderright + 10)), + IA_HEIGHT, (win.height - (win.bordertop + win.borderbottom + 10)), + TAG_DONE]) + + SetAPen(win.rport,0) + + RectFill(win.rport, + win.borderleft, + win.bordertop, + (win.borderleft + win.width - (win.borderright + win.borderleft + 1)), + (win.bordertop + win.height - (win.bordertop + win.borderbottom + 1))) + + DrawImageState(win.rport, + image_object, + (win.borderleft + 5), + (win.bordertop + 5), + IDS_NORMAL, + NIL) + ENDIF + ReplyMsg(msg) + ENDWHILE + ENDWHILE + ENDIF + ENDIF + ENDIF + +-> Cleanup. + + IF image_object THEN DisposeObject(image_object) + IF win THEN CloseWindow(win) + IF penmapbase THEN CloseLibrary(penmapbase) +ENDPROC + + +palette_data: +LONG 8, + $99999999, $99999999, $99999999, + $00000000, $00000000, $00000000, + $FFFFFFFF, $FFFFFFFF, $FFFFFFFF, + $33333333, $66666666, $AAAAAAAA, + $77777777, $77777777, $88888888, + $AAAAAAAA, $AAAAAAAA, $AAAAAAAA, + $AAAAAAAA, $88888888, $77777777, + $EEEEEEEE, $99999999, $77777777 + + +image_data: +CHAR 0,112, 0,118 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$02 + CHAR $05,$05,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$02,$03 + CHAR $03,$03,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$02,$03,$03 + CHAR $03,$03,$03,$03,$01,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$02,$07,$03,$03 + CHAR $03,$03,$03,$03,$03,$01,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$02,$07,$07,$07,$07 + CHAR $01,$00,$04,$03,$01,$00,$01,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$02,$07,$07,$07,$07,$02 + CHAR $05,$01,$00,$04,$01,$01,$03,$01 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$02,$07,$07,$07,$07,$02,$02 + CHAR $02,$05,$01,$00,$03,$03,$03,$03 + CHAR $01,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $02,$07,$07,$07,$07,$02,$02,$02 + CHAR $02,$02,$05,$01,$00,$03,$03,$03 + CHAR $03,$01,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$02 + CHAR $07,$07,$07,$07,$02,$02,$02,$04 + CHAR $02,$02,$02,$05,$01,$00,$03,$03 + CHAR $03,$03,$01,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$02,$07 + CHAR $07,$07,$07,$02,$02,$02,$04,$02 + CHAR $02,$02,$02,$02,$05,$01,$03,$03 + CHAR $03,$03,$03,$01,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$02,$07,$07 + CHAR $07,$07,$02,$02,$02,$04,$02,$02 + CHAR $02,$05,$02,$02,$02,$05,$01,$00 + CHAR $03,$03,$03,$03,$01,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$02,$07,$07,$07 + CHAR $07,$02,$02,$02,$04,$02,$02,$02 + CHAR $05,$02,$02,$02,$02,$02,$05,$01 + CHAR $00,$03,$03,$03,$03,$01,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$02,$07,$07,$07,$07 + CHAR $02,$02,$02,$04,$02,$02,$02,$05 + CHAR $02,$02,$02,$04,$02,$02,$02,$05 + CHAR $01,$00,$03,$03,$03,$03,$01,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$02,$07,$07,$07,$07,$02 + CHAR $02,$02,$04,$02,$02,$02,$05,$02 + CHAR $02,$02,$04,$02,$02,$02,$02,$02 + CHAR $05,$01,$00,$03,$03,$03,$03,$01 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$02,$07,$07,$07,$07,$02,$02 + CHAR $02,$04,$02,$02,$02,$05,$02,$02 + CHAR $02,$04,$02,$02,$02,$05,$02,$02 + CHAR $02,$05,$01,$00,$03,$03,$03,$03 + CHAR $01,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $02,$07,$07,$07,$07,$02,$02,$02 + CHAR $04,$02,$02,$02,$05,$02,$02,$02 + CHAR $04,$02,$02,$02,$05,$02,$02,$02 + CHAR $02,$02,$05,$01,$00,$03,$03,$03 + CHAR $03,$01,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$02 + CHAR $07,$07,$07,$07,$02,$02,$02,$04 + CHAR $02,$02,$02,$05,$02,$02,$02,$04 + CHAR $02,$02,$02,$05,$02,$02,$02,$04 + CHAR $02,$02,$05,$01,$05,$03,$03,$03 + CHAR $03,$03,$01,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$02,$07 + CHAR $07,$07,$07,$02,$02,$02,$04,$02 + CHAR $02,$02,$05,$02,$02,$02,$04,$02 + CHAR $02,$02,$05,$02,$02,$02,$04,$02 + CHAR $02,$02,$01,$05,$03,$03,$03,$03 + CHAR $03,$03,$03,$01,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$02,$07,$07 + CHAR $07,$07,$02,$02,$02,$04,$02,$02 + CHAR $02,$05,$02,$02,$02,$04,$02,$02 + CHAR $02,$05,$02,$02,$02,$04,$02,$02 + CHAR $02,$01,$05,$03,$03,$03,$03,$03 + CHAR $03,$03,$03,$03,$01,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$02,$07,$07,$07 + CHAR $07,$02,$02,$02,$04,$02,$02,$02 + CHAR $05,$02,$02,$02,$04,$02,$02,$02 + CHAR $05,$02,$02,$02,$04,$02,$02,$02 + CHAR $01,$05,$03,$03,$03,$03,$03,$03 + CHAR $03,$03,$03,$03,$03,$01,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$02,$03,$07,$07,$07 + CHAR $02,$02,$02,$04,$02,$02,$02,$05 + CHAR $02,$02,$02,$04,$02,$02,$02,$05 + CHAR $02,$02,$02,$04,$02,$02,$02,$01 + CHAR $05,$03,$03,$03,$03,$03,$03,$03 + CHAR $03,$03,$03,$03,$03,$03,$01,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$02,$02,$03,$01,$07,$02 + CHAR $02,$02,$04,$02,$02,$02,$05,$02 + CHAR $02,$02,$04,$02,$02,$02,$05,$02 + CHAR $02,$02,$04,$02,$02,$02,$01,$05 + CHAR $03,$03,$03,$03,$03,$03,$03,$03 + CHAR $03,$03,$03,$03,$03,$03,$03,$01 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$03,$03,$03,$03,$01,$02 + CHAR $02,$02,$02,$02,$02,$05,$02,$02 + CHAR $02,$04,$02,$02,$02,$05,$02,$02 + CHAR $02,$04,$02,$02,$02,$01,$05,$03 + CHAR $03,$03,$03,$03,$03,$04,$04,$03 + CHAR $00,$03,$03,$03,$03,$03,$03,$03 + CHAR $01,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$03,$03,$03,$03,$03,$01 + CHAR $02,$02,$02,$02,$05,$02,$02,$02 + CHAR $04,$02,$02,$02,$05,$02,$02,$02 + CHAR $04,$02,$02,$02,$01,$05,$03,$03 + CHAR $03,$03,$03,$03,$04,$03,$03,$03 + CHAR $03,$00,$03,$03,$03,$03,$03,$03 + CHAR $01,$01,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$02,$03,$03,$03,$03,$03 + CHAR $01,$02,$02,$02,$02,$02,$02,$04 + CHAR $02,$02,$02,$05,$02,$02,$02,$04 + CHAR $02,$02,$02,$01,$05,$03,$03,$03 + CHAR $01,$01,$01,$01,$03,$03,$03,$03 + CHAR $03,$03,$00,$03,$03,$03,$03,$03 + CHAR $01,$01,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$02,$03,$03,$03,$03 + CHAR $03,$01,$02,$02,$02,$02,$04,$02 + CHAR $02,$02,$05,$02,$02,$02,$04,$02 + CHAR $02,$02,$01,$05,$03,$03,$03,$01 + CHAR $02,$02,$05,$05,$01,$01,$03,$03 + CHAR $03,$03,$03,$00,$03,$03,$03,$03 + CHAR $01,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$02,$03,$03,$03 + CHAR $03,$03,$01,$02,$02,$02,$02,$02 + CHAR $02,$05,$02,$02,$02,$04,$02,$02 + CHAR $02,$01,$05,$03,$03,$03,$01,$02 + CHAR $02,$02,$02,$02,$05,$05,$01,$03 + CHAR $03,$03,$03,$03,$04,$04,$01,$01 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$02,$03,$03 + CHAR $03,$03,$03,$01,$02,$02,$02,$02 + CHAR $05,$02,$02,$02,$04,$02,$02,$02 + CHAR $01,$05,$03,$03,$03,$01,$02,$02 + CHAR $05,$00,$05,$05,$05,$05,$05,$01 + CHAR $03,$03,$03,$03,$03,$04,$01,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$02,$03 + CHAR $03,$03,$03,$03,$01,$02,$02,$02 + CHAR $02,$02,$02,$04,$02,$02,$02,$01 + CHAR $05,$03,$03,$03,$01,$02,$02,$05 + CHAR $05,$00,$00,$00,$00,$02,$02,$05 + CHAR $01,$03,$03,$03,$01,$01,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$02 + CHAR $03,$03,$03,$03,$03,$01,$02,$02 + CHAR $02,$02,$04,$02,$02,$02,$01,$05 + CHAR $03,$03,$03,$01,$02,$02,$05,$05 + CHAR $05,$05,$05,$00,$04,$00,$02,$02 + CHAR $05,$01,$03,$03,$01,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $02,$03,$03,$03,$03,$03,$01,$02 + CHAR $02,$02,$02,$02,$02,$01,$05,$03 + CHAR $03,$03,$01,$02,$02,$05,$05,$05 + CHAR $05,$05,$05,$00,$04,$04,$00,$02 + CHAR $05,$05,$01,$01,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$02,$03,$03,$03,$03,$03,$01 + CHAR $02,$02,$02,$02,$01,$05,$03,$03 + CHAR $03,$01,$02,$02,$05,$05,$05,$05 + CHAR $05,$05,$05,$00,$04,$04,$04,$04 + CHAR $05,$05,$01,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$02,$03,$03,$03,$03,$03 + CHAR $01,$02,$02,$01,$05,$03,$03,$03 + CHAR $01,$02,$02,$05,$04,$04,$01,$02 + CHAR $05,$05,$05,$05,$04,$04,$04,$04 + CHAR $00,$01,$03,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$02,$03,$03,$03,$03 + CHAR $03,$01,$01,$05,$03,$03,$03,$01 + CHAR $02,$02,$05,$05,$04,$01,$03,$03 + CHAR $02,$05,$05,$05,$05,$04,$04,$04 + CHAR $01,$03,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$02,$03,$03,$03 + CHAR $03,$03,$04,$03,$03,$03,$03,$04 + CHAR $02,$02,$05,$05,$05,$01,$03,$03 + CHAR $03,$02,$05,$05,$00,$00,$00,$01 + CHAR $03,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$02,$03,$03 + CHAR $03,$03,$03,$03,$03,$03,$03,$01 + CHAR $02,$02,$05,$05,$05,$05,$01,$03 + CHAR $03,$03,$02,$05,$00,$00,$01,$03 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$02,$03 + CHAR $03,$03,$03,$03,$03,$03,$03,$03 + CHAR $01,$02,$02,$02,$05,$05,$05,$01 + CHAR $03,$03,$02,$05,$00,$01,$03,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$02 + CHAR $03,$03,$03,$03,$03,$03,$03,$03 + CHAR $03,$01,$02,$02,$05,$05,$05,$05 + CHAR $01,$03,$05,$05,$01,$03,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $02,$03,$03,$03,$03,$03,$03,$03 + CHAR $03,$03,$01,$02,$02,$02,$05,$05 + CHAR $00,$00,$00,$01,$03,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$02,$03,$03,$03,$03,$03,$03 + CHAR $03,$03,$03,$01,$02,$02,$05,$05 + CHAR $00,$00,$01,$03,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$02,$03,$03,$03,$03,$03 + CHAR $03,$03,$03,$03,$01,$02,$04,$04 + CHAR $00,$01,$03,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$02,$03,$03,$03,$03 + CHAR $03,$03,$03,$03,$03,$01,$04,$04 + CHAR $01,$03,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$02,$03,$03,$03 + CHAR $03,$03,$03,$03,$03,$03,$01,$01 + CHAR $03,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$05,$05,$05 + CHAR $05,$05,$03,$03,$05,$05,$05,$05 + CHAR $05,$05,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$05,$05,$05,$05 + CHAR $05,$05,$05,$05,$05,$07,$07,$07 + CHAR $07,$05,$05,$05,$05,$07,$07,$07 + CHAR $07,$05,$04,$04,$04,$04,$04,$04 + CHAR $04,$04,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$05,$05,$05 + CHAR $05,$05,$05,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$05,$07,$07,$07 + CHAR $07,$07,$05,$05,$07,$07,$07,$07 + CHAR $07,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$04,$04,$04,$04,$04 + CHAR $04,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$05,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$07,$07,$07 + CHAR $07,$07,$07,$07,$07,$07,$07,$07 + CHAR $07,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$05,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$07,$07,$07 + CHAR $07,$07,$07,$07,$07,$07,$07,$07 + CHAR $07,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$07,$07,$07 + CHAR $07,$07,$02,$02,$07,$07,$07,$07 + CHAR $07,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$05,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$07,$07,$07 + CHAR $07,$02,$02,$03,$02,$07,$07,$07 + CHAR $07,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$04 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$02,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $02,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$02,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $02,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$02,$02,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $02,$02,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$02,$02,$02 + CHAR $02,$02,$02,$03,$02,$02,$02,$02 + CHAR $02,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$02,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $02,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$04,$04 + CHAR $01,$01,$01,$01,$01,$02,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $02,$01,$01,$01,$01,$01,$04,$04 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$02,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $02,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$02,$02 + CHAR $02,$02,$02,$03,$02,$02,$02,$02 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$02,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$02 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$01,$02 + CHAR $02,$02,$02,$03,$02,$02,$02,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$01,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$02 + CHAR $02,$02,$02,$05,$02,$02,$02,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $02,$02,$02,$05,$02,$02,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$05,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $02,$02,$02,$03,$02,$02,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$04 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $02,$02,$02,$05,$02,$02,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $01,$02,$02,$05,$02,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$01,$01,$01,$01,$01 + CHAR $01,$02,$02,$05,$02,$01,$01,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$01,$01,$01,$01,$01 + CHAR $01,$02,$02,$03,$02,$01,$01,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$01 + CHAR $01,$01,$02,$05,$01,$01,$01,$01 + CHAR $01,$01,$04,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$01 + CHAR $01,$01,$02,$05,$01,$01,$01,$01 + CHAR $01,$01,$04,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$02,$05,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$02,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$01,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$05,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$01 + CHAR $01,$01,$01,$04,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$04,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$04,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$05,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $01,$01,$01,$01,$04,$01,$04,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$04,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$04,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$05,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$05,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$01,$01,$01,$04,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$04 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$04,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$05,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $04,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$05,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$04 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$05,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$04 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$05,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$04,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$05 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$04,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$05 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$04,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $05,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$05,$05,$05,$02,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$05,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$02,$04,$04,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$04,$02,$02,$02,$02,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$02 + CHAR $02,$02,$02,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$04,$04,$02,$02,$02,$02 + CHAR $02,$02,$01,$01,$01,$01,$01,$01 + CHAR $01,$04,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$05,$05,$01,$01,$01 + CHAR $01,$01,$01,$01,$02,$02,$02,$02 + CHAR $02,$02,$04,$04,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$04,$04,$04,$04,$04 + CHAR $02,$02,$02,$02,$01,$01,$01,$01 + CHAR $01,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$01,$01,$01 + CHAR $01,$01,$02,$02,$02,$02,$04,$04 + CHAR $04,$04,$04,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$04 + CHAR $04,$04,$02,$02,$02,$02,$04,$04 + CHAR $04,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$05,$05,$05,$05 + CHAR $02,$02,$02,$02,$04,$04,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$04,$04,$04,$04,$02,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $05,$04,$04,$04,$04,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$04,$04,$04,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$05 + CHAR $04,$04,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$04,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$04,$04,$04,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $01,$01,$01,$01,$01,$01,$01,$01 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$05,$04,$04 + CHAR $04,$04,$04,$04,$04,$04,$04,$04 + CHAR $04,$04,$04,$04,$04,$04,$04,$04 + CHAR $04,$04,$04,$04,$04,$04,$04,$04 + CHAR $04,$04,$04,$04,$04,$04,$04,$04 + CHAR $04,$04,$04,$04,$04,$04,$04,$04 + CHAR $04,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 + CHAR $00,$00,$00,$00,$00,$00,$00,$00 diff --git a/AmigaE/PenMapExample.info b/AmigaE/PenMapExample.info new file mode 100644 index 0000000..77b08ac Binary files /dev/null and b/AmigaE/PenMapExample.info differ diff --git a/ClassActDemo.doc b/ClassActDemo.doc new file mode 100644 index 0000000..d4343f0 --- /dev/null +++ b/ClassActDemo.doc @@ -0,0 +1,261 @@ + ClassAct 2.0 Demo + ----------------- + ------- + --- + +ClassAct is a set of over 30 BOOPSI classes co-authored by Christopher +Aldi, Timothy Aston, Osma Ahvenlampi, and Petter Nilsen. Its now being +published by Finale Development, Inc. + +ClassAct provides object-oriented building blocks for your application in +the form of Intuition BOOPSI classes available as either shared run-time or +link-time libraries. As they are standard classes, they may be used with +any application environment supporting BOOPSI. ClassAct is a complete GUI +system in its own right, supporting everything from simple buttons to an +advanced list management class, and includes a complete window GUI layout +system classes that lets you create font-sensitive and resizable interfaces +quickly and easily, including any preferenced window backfill pattern +loadable via the system DataTypes. + +Programs that use ClassAct can be made freely distributable, shareware, +commercial, etc. and there is NO FEE for users. When you purchase +ClassAct, users of your software get to use all the preferences functions +of our system. ClassAct a powerful and time-saving choice for software +developers, and an affordable and convenient one as well. + +Since ClassAct classes are BOOPSI, they automatically support all kinds of +great features such as window relatively (resizability), 3.x help, +notification, and interconnections with other BOOPSI classes (which do not +necessarily have to be ClassAct classes). ClassAct classes are "standard" +AmigaOS BOOPSI class libraries, much like the colorwheel and gradient +sliders that come with release 3.x of the Amiga's operating system. +ClassAct classes are built for speed, power, efficiency and stability. + +ClassAct is compatible with 2.04 (V37) thru 3.1 (V40) releases of the Amiga +operating system and take advantage of performance increases available in +release 3.x (V39+). ClassAct has been tested with ECS, AGA, CyberGraphics, +Retina, Picasso II and EGS Spectrum. + +ClassAct is an expanding project, providing you with the graphical user +interface tools you need to write your application. ClassAct is currently +over 30 different classes, and the list is growing all the time! + +Installation: +------------- + +You must first run the Install_Classes Installer script to install the +ClassAct classes and prefs tool on your Amiga. You will not be able to run +any of the examples without the classes installed. If you already have +some ClassAct classes on your system, the Installer will only copy NEWER +versions. Note that the Installer does not copy the examples or demo +documentation. You may run the demos right out of the extracted archive +one installing the classes. Class updates dated newer than this demo +archive may, or may not be available for FTP from ftp.warped.com or +ftp.finale-dev.com user support sites. + +Support Classes: +---------------- + + * ARexx class + - Powerful ARexx class which can be used to create and manage + arexxports. Supports many arexx abilities such as stems, etc. + + * Window class + - creates intuition window objects. Windows maybe opened, closed + or iconified at will. Many window attributes may be set while + the window is open. Automatically handles keyboard control, + task defered display rendering, and many other issues to + simplify IDCMP processing and programming overhead. Preference + user backfill hooks are also supported. + +Gadget Classes: +--------------- + * Button gadget class + - powerful button class with many of options including built-in + arrow glyphs, tab-cycle support, custom images and more. + + * CheckBox gadget class + - for checkbox gadgets, very much like GadTools CHECKBOX_KIND. + + * Chooser gadget class + - for pop-up and drop-down menus simular in purpose to CycleGadgets. + + * Clicktab gadget class + - for file folder like click tab pages + + * Fuel Gauge gadget class + - for progress indication, several features including optional + tick marks, and orientation settings. + + * GetFile gadget class + - Allows the user the option of typing in a file name or popping up a + file requester to choose a file. + + * GetFont gadget class + - Lets the user pop up a font requester to choose a font. + + * GetScreenMode gadget class + - Lets the user pop up a screen mode requester to choose a screen mode. + + * Integer gadget class + - an integer gadget with optional arrows. + + * ListBrowser gadget class + - a listview supporting multiple columns, images, multi-select, etc. + + * Layout gadget class - + - for laying out gadgets and images in a font-sensitive and resizable + hierarchical group fashion. + + * Page gadget class - + - may be used in conjuntion with clicktab or other classes + to provided paged gui displays. + + * RadioButton gadget class + - for radio button gadgets, like GadTools MX_KIND. + + * Scroller gadget class + - a proportional scrollbar with arrows, and slider mode. + + * SpeedBar gadget class + - for button tool bars (horizontal or vertical orientations) with + optional window title bar help messages. + + * String gadget class + - a simple string gadget with bevel frame. + + +Image Classes: +-------------- + * Bevel image class + - for drawing bevel grouping boxes + - supports all kinds of standard bevels, including titled grouping. + bevels, drop-box bevels, optional inner fill color and text, etc. + + * Bitmap image class + - A contributed class, by Yvon Rozijn (Author of A-Web Amiga WWW + Browser) + - easily create images for Bitmap structures. + - loads images seamlessly through datatypes.library. + - resultant bitmap image can be embedded within a GUI Layout, Button, + Speedbar, etc. + + * Draw List image class + - for designing custom colorized and scaled vector/areafill images. + + * Glyph image class + - for standard scalable system images + - includes many images: arrows, get file, get font, etc. + + * Label image class + - makes multi-line labels mixing text, colors, images, styles, etc. + + * Penmap image class + - for pen-remapped images. + + +Future classes in development include requester class, balance groups, +virtual groups, application class, external tracker, printer class, +and more! + +Should You Use ClassAct?: +------------------------- +Have you written or are you currently in the process of developing Amiga +applications? If so, the answer is a very definite YES, you should be +using ClassAct. + +The graphic user interfaces of many Amiga applications fit atleast one or +more of the following descriptions: + + - Non-existant (i.e. command line only) + - Not font sensitive + - Not Locale sensitive + - Slow + - Memory Intensive + - Unattractive + - Lacking in intuitiveness and originality + - Non-standard + - Poor or limited keyboard control + +The reasons for this are simple. Many of the existing systems for creating +a GUI are either limited in features, slow, hard to use, and/or violate +system standards. ClassAct makes every attempt to combine compability, +flexiblity, usablility and some originality while following Amiga style +guide. + +This is why you should use ClassAct. The Amiga is a graphic system and +applications should have a attractive and responsive graphic user +interface. The ClassAct toolkit allows you to easily create an attractive +GUI that doesn't suffer from the deficiencies listed above. + +If you want your application to be easy to use, fast and professional +looking then you should consider ClassAct. + + +Purchasing ClassAct: +-------------------- + +ClassAct is availble NOW only from for just $39.95 USD for public domain +and sharware authors, and $69.95 USD for commercial developers. It can be +ordered directly from Finale Development, Inc: + + + Finale Development, Inc. + P.O. Box 6905 + West Palm Beach, FL. 33405 + USA + + Phone: 1 (203) 235-7518 + Fax: 1 (203) 237-8459 + + E-Mail: caldi@ct1.nai.net + E-Mail: caldi@finale-dev.com + +If you are an author of an exising application using a competitive GUI +product such as MUI, BGUI, StormWizard, GadLayout, GTLayout, Triton, +GadOutline, or GUIEnv, you may take an advantage of a $10 USD discount +off the purchase price. + + +The ClassAct web site url is: + + WWW: http://www.warped.com/~timmer/classact/ + + +Here is some of what is included with ClassAct: + + - The complete set of ClassAct BOOPSI classes. + + - Documentation how to use each class in C= AutoDoc format. + + - Examples programs in C and AmigaE for using each of the classes. + + - C, AmigaE, Cyclone Module II, includes that you will need for writing + programs that use ClassAct. Assember support available, ask for details. + We offer FREE copies of ClassAct to anyone who wishes to create the + support modules and includes for other compilers. Please email us for + more details. + + - classact.lib which includes SAS/C or DICE auto-open support for + ClassAct classes easing use. Source included. + + - SBGen which allows you to quickly generate SpeedBar gadget source + code and image data from a collection of 100+ pre-designed images. + + - Free bug fixes via ftp/email. + + - Free minor updates via ftp/email. + + - Technical support directly from the ClassAct Development Team + and via the ClassAct Mailing list. (See our FAQ for more info). + +We hope you enjoy the ClassAct demo. Be sure you experiment with the +included preferences program to configure various GUI styles. If you +have any questions or comments, suggestions or problems, please do not +hesitate to contact us. + +We want your comments and suggestions so we can improve ClassAct. If you +should find a bug, or shortcoming in the system, we encorage you to contact +us immediatly with as much related information as possible - an unreported +bug may never get fixed if it is not discovered and reported. + diff --git a/ClassActDemo.doc.info b/ClassActDemo.doc.info new file mode 100644 index 0000000..547154b Binary files /dev/null and b/ClassActDemo.doc.info differ diff --git a/ClassActFAQ.doc b/ClassActFAQ.doc new file mode 100644 index 0000000..6556e78 --- /dev/null +++ b/ClassActFAQ.doc @@ -0,0 +1,444 @@ + CLASSACT FAQ + + +THIS DOCUMENT + + This document was written to answer to frequently asked questions + about the ClassAct GUI toolkit. It addresses both user and developer + questions. Sorry, some information is not quite up-to-date for + ClassAct 2.0 yet. + + +MAINTAINER + + This FAQ is maintained by Osma Ahvenlampi + + +CONTENTS + + 1.1 What is ClassAct? + 1.2 What's the availability? + 1.3 Why is it better than the other GUI toolkits? + 1.4 Where can I get ClassAct? + 1.5 Is there a mailing list? + 1.6 What uses ClassAct? + + 2.1 What is in ClassAct? + 2.2 How about the developer support stuff? + 2.3 How does writing ClassAct applications differ from GadTools? + 2.4 From other toolkits? + + 3.1 Can I change the way ClassAct looks? + 3.2 Is there a preferences editor? + 3.3 Can ClassAct use background patterns? + + 4.1 What is this deferred refresh thing? + 4.2 How does it work? + 4.3 How do the gadgets interconnect? + 4.4 How does ClassAct support keyboard control? + +THE FAQ + + 1.1 What is ClassAct? + + ClassAct is a GUI toolkit for the Amiga, implemented as a set of + easy to use shared BOOPSI class libraries. + + ClassAct provides object-oriented building blocks for your + application in the form of Intuition BOOPSI classes available as + either shared run-time libraries. As they are standard classes, + they may be used with any application environment supporting + BOOPSI. However, ClassAct is a complete GUI system in its own right, + supporting everything from simple buttons to an advanced listview + class supporting multi-select, images, multi-column and more. + In addition, a complete GUI fast window and layout system class that + lets you create font-sensitive and resizable interfaces quickly + and easily. + + 1.2 What's the availability? + + Programs that use ClassAct can be made freely distributable, + shareware, commercial, etc. as there is no fee for users! When you + purchase ClassAct, users of your software get to use all the + functions/preferences of our classes. This not only makes ClassAct + a powerful and time-saving choice for software developers, but an + affordable and convenient one as well. + + ClassAct is a commercial toolkit with a developer kit available for + $69.95. This kit contains the latest ClassAct libraries, the C + headers, and the programmer documentation, plus many example programs + with source. The kit also includes a distribution license for the + class libraries, which means that they can be distributed free of + charge with the applications using them. For inclusion with software + to be bundled and/or distributed with the AmigaOS, a special license + is available. + + For freeware and shareware developers there is a special deal of the + toolkit for only $39.95. The package is exactly the same and entitles + the buyer to the same support, but the distribution license restricts + the use of the toolkit to non-commercial programs. That means public + domain, freeware, shareware and similar applications. + + 1.3 Why is it better than other GUI toolkits? + + Since ClassAct all classes are BOOPSI, they automatically support all + sorts of great features, such as window relativity (resizability), + 3.x gadgethelp, notification, and interconnections with other BOOPSI + classes (which do not necessarily have to be ClassAct classes). + ClassAct classes are totally standard BOOPSI objects, just like the + colorwheel and gradient sliders that come with release 3.x of the + Amiga's operating system. ClassAct classes are built for speed, + power and efficiency. Many systems are cumbersome or limited in + ability, and user preference, often the result of trying to build + on top of the limited GadTools system. Many people think BOOPSI and + get scared off, this is only because until now, there have not been + many BOOPSI objects to work with. Making a BOOPSI interface often + requiers writing your own gadget classes since AmigaOS does not + provide anything beyond the basic button, string and scroller. + + ClassAct provides all of the ground work, over 25 font adaptive + feature rich classes, letting you concentrate on your application, + and its GUI, not how to implement it or work around short comings + of lesser systems. + + All ClassAct classes are compatible with 2.04 (V37) thru 3.1 (V40) + releases of the Amiga operating system and take advantage of + performance increases available in release 3.x. + + 1.4 Where can I get ClassAct? + + ClassAct is availble NOW only from for just $39.95 USD for public + domain and sharware authors, and $69.95 USD for commercial + developers. It can be ordered directly from Finale Development, Inc: + + Finale Development, Inc. + P.O. Box 6905 + West Palm Beach, FL. 33405 + USA + + Phone: 1 203 235 7518 + Fax: 1 203 237 8459 + + E-Mail: caldi@ct1.nai.net + + Demos and maintenance updates are available via FTP from: + + FTP: ftp.warped.com + /pub/amiga/classact/ClassActDemo.lha + /pub/amiga/classact/Classes-##-XXX-##.lha + + Where ##-XXX-## prepresents the date of the update release, + for example: Classes-8-May-97.lha + + The ClassAct web site is at: + WWW: http://www.warped.com/~timmer/classact/ + + 1.5 Is there a mailing list? + + Yes. To subscribe, send a message to; + + majordomo@warped.com + + with the line, + + subscribe classact + + in the BODY of the message. For example, + + subscribe classact joe@bob.com + + This mailing list is the primary form of support for the toolkit. + All of the developers read it and answer questions. + + 1.6 What uses ClassAct? + + Several ClassAct applications are being developed. A few + have already been, or are very near release; + + Excelsior BBS - The lastest version of E! BBS now usess ClassAct. + + SysInspector - System Inspector, simular in purpose to Xoper + with a very attractive ClassAct GUI. + + EnPrint - Epson Stylus printer driver/control software + Available from Endicor Technologies. + + IW225 Pro - IW225 Professional TCP/IP Stack is now using + ClassAct for point & click GUI QuickPrefs + configuration as well as bundled with the + new DaFTP. Available from InterWorks. + + NewYork - An NNTP News Reader, styled after Voodoo. In + beta stages of development, and like Voodoo, + this is being written by one one of the ClassAct + co-authors. Email caldi@ct1.nai.net for more info. + + NewIcons 3.0 - Recently release version of NewIcons, uses + ClassAct for NI3 prefs. + + AmiFTP - AmiFTP, another popular GUI FTP client has been + re-implemented with ClassAct. More info at: + + http://www.lysator.liu.se/~lilja/AmiFTP.html + + DaFTP'96 - The popular DaFTP has been re-implemented + using ClassAct. + + Voodoo - A multithreaded mail reader with MIME support, + Rexx interface for OS 3.x, and included + in the Amiga Technologies Surfer bundle. + + http://www.niksula.cs.hut.fi/~oahvenla/voodoo/ + + Thor 2.5 - The popular THOR news/email offline/tcp reader + is being ported to ClassAct. Available Soon! + + Note, V2.5 beta/preview is available now for + registered users. + + Grapevine2 - A greatly enhanced version of the original GUI IRC + client is in the hands of a small group of + testers now - and a year later now, it still is. + + CompactPlayer - A SCSI-2 audio CD player implemented as an early + demo of using ClassAct is available with source + from: + + Aminet: /disk/cdrom/CompactPlayer.lha + + Asokoban3 - Amiga version xsokoban, a very impressive game. + + AmiLights - A puzzel game, playable on the Workbench screen, + from Doug Dyer - author of the popular AmiCheck. + + A list with links to respective software is also on the ClassAct + web page. And there is much more to come! + + + 2.1 What is in ClassAct? + + ClassAct is an expanding project. Currently over 30 different classes, + and the number is expanding all the time. ClassAct also has some tools + to aid in building user interfaces. And here is a list of classes; + + Gadget Classes: + * Button gadget class + - powerful button class with many of options including built-in + arrow glyphs, tab-cycle support, custom images and more. + + * CheckBox gadget class + - for checkbox gadgets, very much like GadTools CHECKBOX_KIND. + + * Chooser gadget class + - for pop-up and drop-down menus similar in purpose to GadTools + CYCLE_KIND. + + * Clicktab gadget class + - for file-folder tabs gadgets. May used in conjunction with + the Page gadget to "flip" the virtual pages. + + * Fuel Gauge gadget class + - for progress indication, several features including optional + tick marks, and orientation settings. + + * Integer gadget class + - an integer gadget with optional arrows. + + * Layout gadget class + - for laying out gadgets and images in a font-sensitive and + resizable hierarchical group fashion. + + * ListBrowser gadget class + - a listview supporting multiple columns, images, multi-select, + hierarchical lists, etc. + + * Page gadget class + - a virtual page class for hiding groups of gadgets from view. + + * Palette gadget class + - for color selection, like GadTools PALETTE_KIND. + + * RadioButton gadget class + - for radio button gadgets, like GadTools MX_KIND. + + * Scroller gadget class + - a proportional scrollbar with arrows, and slider mode. + + * SpeedBar gadget class + - for button tool bars (horizontal or vertical orientations) with + optional window title bar help messages. + + * String gadget class + - a simple string gadget with bevel frame, compatible with + strgclass. + + Image Classes: + * Bevel image class + - for drawing bevel grouping boxes + - supports all kinds of standard bevels, including titled grouping. + bevels, drop-box bevels, optional inner fill color and text, etc. + + * Draw List image class + - for designing custom colorized and scaled vector/areafill images. + + * Glyph image class + - for standard scalable system images + - includes many images: arrows, get file, get font, etc. + + * Label image class + - makes multi-line labels mixing text, colors, images, styles, etc. + + * Penmap image class + - for pen-remapped images. + + Other Support Classes: + * Window class + - deferred layout & gadget refresh support. + - automatic gadget keyboard control support with visual feedback. + - iconification. + - greatly simplified IDCMP processing. + + * ARexx class + - simplifies creation and handling of ARexx ports. + + + 2.2 How about the developer support stuff? + + Here is some of what is included with ClassAct: + + - The complete set of ClassAct BOOPSI classes. + - Autodocs in text and AmigaGuide format telling you how to use each + class. + - classact.lib (with source) which includes SAS/C and DICE autoopen + support for ClassAct classes, plus useful support routines. + - SBGen which allows you to quickly generate SpeedBar gadget source + code and image data. + - PMGen for creating penmap.image source data from pictures. + - Examples programs in C for using each of the classes. + - C includes that you will need for writing programs that use ClassAct. + - Technical support from Phantom Development. + + 2.3 How does writing ClassAct applications differ from GadTools? + + The first and foremost difference is that designing a GUI is much + easier. Even with GUI builders such as GadToolsBox, making a GadTools + GUI includes a lot of pixel-level tweaking to make it look right + for font sensitivity, notably with various locales, and prop fonts. + + With ClassAct the GUI is described as a layout hierarchy, and the + layout engine will take care of sizing and positioning gadgets. The + developer need not, and should not, try to place objects in absolute + positions. Resizability needs no extra work, because layout.gadget + will scale the hierarchy to fit any size. + + Second, of course, is that the GadTools counterparts of ClassAct + gadgets are much more restricted, if they in fact even exist at all. + + GadTools may be harder to use because many operations require that + the gadgets be destroyed and recreated in some instances, eg resize, + changing fonts/screens, etc. With ClassAct they don't even have to be + detached from the window before modifying - they are BOOPSI objects. + + 2.4 From other toolkits? + + Many available GUI toolkits are based on GadTools. While they make + creating a GUI easier, they can not fix some deficiencies of + GadTools. Because ClassAct is BOOPSI, these deficiencies often do + not exist. In addition, ClassAct provides many gadgets and abilities + absent from some other packages. + + In some ways, ClassAct resembles MUI. However, there are many big + differences. ClassAct can be used at many levels. The simplest + applications might only need a single gadget, such as the fuelgauge + progress indicator. ClassAct allows putting single gadgets such as + this into existing GadTools interfaces, because the gadgets are + as useful independantly as they are when part of the whole. The + gadgets send normal IDCMP messages back to the application, and do + not require special front end event handlers. Exec and Intuition + functions are enough to deal with ClassAct. On the other hand, the + whole GUI can be quickly created using ClassAct gadgets, the + ClassAct Window Class can even provide completely transparent + keyboard shortcuts with no additional effort by the programmer. + This is the prefered and recommended usage. + + + 3.1 Can I change the way ClassAct looks? + + ClassAct has a number of system-wide default settings. While we + accept that some GUI features have to be user configurable, the + common methods of providing this configurability have until now been + sub-optimal. We are working on giving application-level + configurability to ClassAct with a method that differs from the + usual approaches to the problem. Suggestions welcome! + + 3.2 Is there a preferences editor? + + Yes. An editor for setting global GUI preferences for things such as + bevel styles, default window backfill patterns, fallback font label + pen settings and built-in gadget imagery and so on is constantly + being worked on. The current version is available in the demo and + update archives and is provided free to all ClassAct users. + + 3.3 Can ClassAct use background patterns? + + The layout system accepts both a simple RectFill pattern and a + backfill hook for more complicated patterns (such as a background + picture). It is very simple to use a generic backfill hook with + ClassAct. Examples are provided on how to override the default hook. + + + 4.1 What is this deferred refresh thing? + + Normally, when a window requires refreshing, Intuition will + automatically refresh the "damaged" regions in the window's borders + and gadgets. However, with complex gadgets, this can take time, and + that time is taken by input.device. Unfortunately input.device is + responsible for other things too, such as moving the mouse pointer. + A refresh of a window filled with complex BOOPSI gadgets can make the + mouse pointer "freeze" for a second. Not only that, but since + input.device runs at a high priority, the whole machine appears to + stop for a fraction of a second while the refresh is taking place. + + This is even worse when the window is resized. Not only do the + gadgets have to be redrawn, but also their size has to be + recalculated. Resizing a window can stop input.device for even a + couple of seconds at worst. + + ClassAct's window and layout classes work together to eliminate this + problem. When using the deferred refresh feature of these classes, + input.device can continue while the relayout and refresh are done by + the application task. + + 4.2 How does it work? + + The concept is quite simple. When a layout gadget receives a command + to refresh itself and notices that it was dispatched by input.device, + it will check whether it had been instructed to defer refreshes. If + that is the case, it will, instead of refreshing itself, notify the + window class that it should restart the refresh in the application + context. Windowclass will then decide on the exact method of refresh + based on the refresh type (smart or simple, possibly nocare) and send + another refresh command to the layout gadget. Meanwhile, input.device + can do something else. + + 4.3 How do the gadgets interconnect? + + You can use the normal BOOPSI ICA_MAP and ICA_TARGET tags and the + ic and model classes built in the OS. All of the ClassAct classes + provide state information through the OM_NOTIFY method. In addition, + the layout.gadget automatically connects objects to their labels, + groups to each other, etc. + + 4.4 How does ClassAct support keyboard control? + + The ClassAct window class, together with the layout class, will make + keyboard control completely transparent to applications. As long as + the gadget label contains a shortcut character (normally the + character after a '_' character), the gadget will have a keyboard + shortcut. Gadgets provide visual feedback through two custom gadget + methods (documented in case you want to make your own custom gadget), + ie. a button will "depress" when you press the shortcut key, and + release when you release the key. The message you get afterwards is + identical to a normal mouse button triggered gadget event. Window + class can deal with several keys pressed down and other such special + case events. diff --git a/ClassActFAQ.doc.info b/ClassActFAQ.doc.info new file mode 100644 index 0000000..2599332 Binary files /dev/null and b/ClassActFAQ.doc.info differ diff --git a/Classes.info b/Classes.info new file mode 100644 index 0000000..162e997 Binary files /dev/null and b/Classes.info differ diff --git a/Classes/arexx.class b/Classes/arexx.class new file mode 100644 index 0000000..822eb60 Binary files /dev/null and b/Classes/arexx.class differ diff --git a/Classes/gadgets/button.gadget b/Classes/gadgets/button.gadget new file mode 100644 index 0000000..5072fc7 Binary files /dev/null and b/Classes/gadgets/button.gadget differ diff --git a/Classes/gadgets/checkbox.gadget b/Classes/gadgets/checkbox.gadget new file mode 100644 index 0000000..0579dec Binary files /dev/null and b/Classes/gadgets/checkbox.gadget differ diff --git a/Classes/gadgets/chooser.gadget b/Classes/gadgets/chooser.gadget new file mode 100644 index 0000000..b0cb168 Binary files /dev/null and b/Classes/gadgets/chooser.gadget differ diff --git a/Classes/gadgets/clicktab.gadget b/Classes/gadgets/clicktab.gadget new file mode 100644 index 0000000..4bac561 Binary files /dev/null and b/Classes/gadgets/clicktab.gadget differ diff --git a/Classes/gadgets/fuelgauge.gadget b/Classes/gadgets/fuelgauge.gadget new file mode 100644 index 0000000..77372ea Binary files /dev/null and b/Classes/gadgets/fuelgauge.gadget differ diff --git a/Classes/gadgets/getfile.gadget b/Classes/gadgets/getfile.gadget new file mode 100644 index 0000000..d8de6ba Binary files /dev/null and b/Classes/gadgets/getfile.gadget differ diff --git a/Classes/gadgets/getfont.gadget b/Classes/gadgets/getfont.gadget new file mode 100644 index 0000000..2176eb7 Binary files /dev/null and b/Classes/gadgets/getfont.gadget differ diff --git a/Classes/gadgets/getscreenmode.gadget b/Classes/gadgets/getscreenmode.gadget new file mode 100644 index 0000000..70f58ab Binary files /dev/null and b/Classes/gadgets/getscreenmode.gadget differ diff --git a/Classes/gadgets/integer.gadget b/Classes/gadgets/integer.gadget new file mode 100644 index 0000000..4886f96 Binary files /dev/null and b/Classes/gadgets/integer.gadget differ diff --git a/Classes/gadgets/layout.gadget b/Classes/gadgets/layout.gadget new file mode 100644 index 0000000..95c12b5 Binary files /dev/null and b/Classes/gadgets/layout.gadget differ diff --git a/Classes/gadgets/layout.gadget.020 b/Classes/gadgets/layout.gadget.020 new file mode 100644 index 0000000..2327e54 Binary files /dev/null and b/Classes/gadgets/layout.gadget.020 differ diff --git a/Classes/gadgets/listbrowser.gadget b/Classes/gadgets/listbrowser.gadget new file mode 100644 index 0000000..f0126d2 Binary files /dev/null and b/Classes/gadgets/listbrowser.gadget differ diff --git a/Classes/gadgets/palette.gadget b/Classes/gadgets/palette.gadget new file mode 100644 index 0000000..be8a300 Binary files /dev/null and b/Classes/gadgets/palette.gadget differ diff --git a/Classes/gadgets/radiobutton.gadget b/Classes/gadgets/radiobutton.gadget new file mode 100644 index 0000000..203fac2 Binary files /dev/null and b/Classes/gadgets/radiobutton.gadget differ diff --git a/Classes/gadgets/scroller.gadget b/Classes/gadgets/scroller.gadget new file mode 100644 index 0000000..6dd9cb1 Binary files /dev/null and b/Classes/gadgets/scroller.gadget differ diff --git a/Classes/gadgets/slider.gadget b/Classes/gadgets/slider.gadget new file mode 100644 index 0000000..2ce7382 Binary files /dev/null and b/Classes/gadgets/slider.gadget differ diff --git a/Classes/gadgets/space.gadget b/Classes/gadgets/space.gadget new file mode 100644 index 0000000..b314880 Binary files /dev/null and b/Classes/gadgets/space.gadget differ diff --git a/Classes/gadgets/speedbar.gadget b/Classes/gadgets/speedbar.gadget new file mode 100644 index 0000000..0514f61 Binary files /dev/null and b/Classes/gadgets/speedbar.gadget differ diff --git a/Classes/gadgets/string.gadget b/Classes/gadgets/string.gadget new file mode 100644 index 0000000..ad93200 Binary files /dev/null and b/Classes/gadgets/string.gadget differ diff --git a/Classes/gadgets/textfield.gadget b/Classes/gadgets/textfield.gadget new file mode 100644 index 0000000..894402d Binary files /dev/null and b/Classes/gadgets/textfield.gadget differ diff --git a/Classes/images/bevel.image b/Classes/images/bevel.image new file mode 100644 index 0000000..64b3870 Binary files /dev/null and b/Classes/images/bevel.image differ diff --git a/Classes/images/bitmap.image b/Classes/images/bitmap.image new file mode 100644 index 0000000..9881960 Binary files /dev/null and b/Classes/images/bitmap.image differ diff --git a/Classes/images/drawlist.image b/Classes/images/drawlist.image new file mode 100644 index 0000000..49c8caf Binary files /dev/null and b/Classes/images/drawlist.image differ diff --git a/Classes/images/glyph.image b/Classes/images/glyph.image new file mode 100644 index 0000000..f979d4d Binary files /dev/null and b/Classes/images/glyph.image differ diff --git a/Classes/images/label.image b/Classes/images/label.image new file mode 100644 index 0000000..b803a31 Binary files /dev/null and b/Classes/images/label.image differ diff --git a/Classes/images/penmap.image b/Classes/images/penmap.image new file mode 100644 index 0000000..305f0c2 Binary files /dev/null and b/Classes/images/penmap.image differ diff --git a/Classes/window.class b/Classes/window.class new file mode 100644 index 0000000..db8057f Binary files /dev/null and b/Classes/window.class differ diff --git a/Demo.info b/Demo.info new file mode 100644 index 0000000..165e3b1 Binary files /dev/null and b/Demo.info differ diff --git a/Demo/ClassActDemo b/Demo/ClassActDemo new file mode 100644 index 0000000..4f758f3 Binary files /dev/null and b/Demo/ClassActDemo differ diff --git a/Demo/ClassActDemo.c b/Demo/ClassActDemo.c new file mode 100644 index 0000000..136fc09 --- /dev/null +++ b/Demo/ClassActDemo.c @@ -0,0 +1,1447 @@ + +/** + ** ClassAct Demonstration. + ** + ** Copyright © 1995-1997 by Timothy Aston and Christopher Aldi + ** All rights reserved. + ** + ** This is a fairly comprehensive demo intended to show-off ClassAct's + ** capability, and also demonstrate to you, the programmer, how to use + ** ClassAct. + ** + ** The demo takes place completely in a single window, made up of several + ** pages. The entire GUI layout is done completely in a single Layout + ** class gadget, that is made up of layout groups containing images and + ** gadgets and other layout groups. We create this layout first, then we + ** create a window object and attach the layout to that. + ** + ** A good idea would be to go through each of the gadgets created in this + ** programme, load up its autodoc, and see how we've used the various + ** features here in this demo. Then feel free to change some things + ** around and see what else you can do with ClassAct, because this demo by + ** no means shows off all that ClassAct can do. + ** + **/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "stdio.h" +#include "strings.h" + + +/* Some useful #defines. + */ +#define D(x) +#define MAX(a, b) ((a > b) ? a : b) +#define MIN(a, b) ((a > b) ? b : a) +#define RED(x) ((x >> 8) & 0xf) +#define BLUE(x) ((x >> 4) & 0xf) +#define GREEN(x) (x & 0xf) + +/* Gadget IDs + */ +#define GAD_BACK 1 +#define GAD_FORWARD 2 +#define GAD_QUIT 3 +#define GAD_GETFILE 4 +#define GAD_GETFONT 5 +#define GAD_GETSCREEN 6 + +#define NUM_PAGES 7 + + +extern struct GfxBase *GfxBase; + +/* External variables, from Images.c + */ +extern struct Image picture_image, classact_image; +extern struct Image sb_images[]; +extern struct Image hide_image, show_image, leaf_image; + +/* Global variables. + */ +struct Screen *screen = NULL; +struct Gadget *layout, *layout1, *page, *layout2; +struct Gadget *fuelgauge_gad, *scroller_gad, *palette_gad, *lb_gad; +struct Gadget *getfile_gad, *getfont_gad, *getscreen_gad, *fontpreview_gad; +struct Gadget *back_gad, *forward_gad; +struct Image *limage; +struct List *radio_list, *chooser_list1, *chooser_list2, *chooser_list3, *tab_list; +struct List speedbar_list, lb_list1, lb_list2; + + +/* Some static string data used to initialize some gadgets. + */ + +/* Integer to FuelGauge mapping. + */ +struct TagItem integer_map[] = +{ + { INTEGER_Number, FUELGAUGE_Level }, + { TAG_END, NULL } +}; + +/* GetFont to Button mapping. + */ +struct TagItem getfont_map[] = +{ + { GETFONT_TextAttr, GA_TextAttr }, + { GETFONT_FrontPen, BUTTON_TextPen }, + { GETFONT_BackPen, BUTTON_BackgroundPen }, + { GETFONT_SoftStyle, BUTTON_SoftStyle }, + { TAG_DONE, TAG_DONE } +}; + +/* SpeedBar help strings. Also used in a ListBrowser. + */ +UBYTE *sbhelp_strs[] = +{ + "Erase block and copy it to the clipboard", + "Copy block to the clipboard", + "Paste from clipboard to your project", + "Erase block", + "Mail someone", + "Insert current time", + "Insert current date", + "Disk", + "Spray Paint", + "Print project", + NULL +}; + +/* ListBrowser column info. + */ +struct ColumnInfo ci1[] = +{ + { 20, NULL, 0 }, + { 80, NULL, 0 }, + { -1, (STRPTR)~0, -1 } +}; + +struct ColumnInfo ci2[] = +{ + { 100, "Column Header", 0 }, + { -1, (STRPTR)~0, -1 } +}; + +/* Some fonts that we'll be using. + */ +struct TextAttr helvetica15bu = { (STRPTR)"helvetica.font", 15, FSF_UNDERLINED | FSF_BOLD, FPF_DISKFONT }; +struct TextAttr garnet16 = { (STRPTR)"garnet.font", 16, 0, FPF_DISKFONT }; + + +/* Function prototypes. + */ +VOID set_mapping(struct Screen *, struct DrawInfo *, UWORD []); +LONG easy_req(struct Window *, char *, char *, char *, ...); +BOOL make_lb_list(struct List *, struct Image *, UBYTE **); +VOID make_fancy_list(struct Gadget *); +ULONG __asm __saveds lb_hook(register __a0 struct Hook *hook, register __a2 struct Node *node, + register __a1 struct LBDrawMsg *msg); +BOOL make_speedbar_list(struct List *, struct Image *, UBYTE **); +VOID free_speedbar_list(struct List *); + + +/* This is the start of our program. + */ +main() +{ + if (!ButtonBase) return(20); + + /* We'll just open up on the default public screen, so we need to get + * a lock on it. + */ + if (screen = LockPubScreen(NULL)) + { + struct DrawInfo *drinfo = GetScreenDrawInfo(screen); + struct Image *l; + UWORD mapping[8]; + + /* Setup the pen mappings to use for our images. + */ + set_mapping(screen, drinfo, mapping); + + /* Create a bunch of label lists that our various gadgets will + * use. + */ + make_speedbar_list(&speedbar_list, sb_images, sbhelp_strs); + make_lb_list(&lb_list1, sb_images, sbhelp_strs); + NewList(&lb_list2); + + if (layout = LayoutObject, + GA_DrawInfo, drinfo, + LAYOUT_DeferLayout, TRUE, /* Layout refreshes done on + * task's context (by the + * window class) */ + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BottomSpacing, 4, + LAYOUT_HorizAlignment, LALIGN_RIGHT, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_BevelStyle, BVS_BUTTON, + LAYOUT_BevelState, IDS_SELECTED, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + LAYOUT_SpaceOuter, TRUE, + CLASSACT_BackFill, LAYERS_BACKFILL, + + /* "ClassAct Man", always visible. This is a + * simple Label class image with a mapping. + */ + LAYOUT_AddImage, l = LabelObject, + LABEL_Justification, LABEL_CENTRE, + LABEL_Mapping, mapping, + LABEL_Image, &picture_image, + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LayoutEnd, + CHILD_WeightedWidth, 0, + + LAYOUT_AddChild, layout1 = LayoutObject, + LAYOUT_LeftSpacing, 4, + LAYOUT_RightSpacing, 4, + LAYOUT_TopSpacing, 2, + LAYOUT_BottomSpacing, 2, + LAYOUT_BevelStyle, BVS_GROUP, + + /* All the cool stuff in this demo appears + * on different pages that we can flip + * through via some buttons at the bottom + * of the window. + */ + LAYOUT_AddChild, page = PageObject, + /* The first page, showing our nifty + * logo. This is a single label image, + * notice how you can seemlessly mix + * text and images, and also do pen + * re-mapping. + */ + PAGE_Add, LayoutObject, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + LAYOUT_VertAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "Welcome to the ClassAct Demo\n", + LABEL_Mapping, mapping, + LABEL_Image, &classact_image, + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LayoutEnd, + + /* A credits page, made up of a single + * label image. + */ + PAGE_Add, LayoutObject, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "Welcome to the ClassAct Demo\n", + IA_Font, screen->Font, + LABEL_Text, "\nPeople responsible for ClassAct:\n", + LABEL_Text, "Christopher Aldi\n", + LABEL_Text, "Timothy Aston\n", + LABEL_Text, "Osma Ahvenlampi\n\n", + LABEL_Text, "This demo written by Timothy Aston", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LayoutEnd, + + /* The Button gadget class is so + * versatile, might as well dedicate + * an entire page to it. + */ + PAGE_Add, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "ClassAct has buttons!", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_AddChild, ButtonObject, + GA_Text, "_Simple", + GA_RelVerify, TRUE, + ButtonEnd, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "Push Button", + GA_RelVerify, TRUE, + BUTTON_PushButton, TRUE, + ButtonEnd, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "Colour", + GA_RelVerify, TRUE, + BUTTON_BackgroundPen, 7, + BUTTON_TextPen, 2, + ButtonEnd, + + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_AddChild, ButtonObject, + GA_Text, "B_old", + GA_RelVerify, TRUE, + BUTTON_SoftStyle, FSF_BOLD, + ButtonEnd, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "Read-Only", + GA_RelVerify, TRUE, + GA_ReadOnly, TRUE, + ButtonEnd, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "_Right aligned", + GA_RelVerify, TRUE, + BUTTON_Justification, BCJ_RIGHT, + ButtonEnd, + + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_AddChild, ButtonObject, + GA_TextAttr, &garnet16, + GA_Text, "B_ig Button, different font", + GA_RelVerify, TRUE, + ButtonEnd, + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_VertAlignment, LALIGN_CENTRE, + + LAYOUT_AddChild, ButtonObject, + BUTTON_AutoButton, BAG_POPFILE, + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "Get Fi_le", + LabelEnd, + + LAYOUT_AddChild, ButtonObject, + BUTTON_AutoButton, BAG_POPDRAWER, + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "Get _Drawer", + LabelEnd, + + LAYOUT_AddChild, ButtonObject, + BUTTON_AutoButton, BAG_POPFONT, + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "Fo_nt", + LabelEnd, + + LAYOUT_AddChild, ButtonObject, + BUTTON_AutoButton, BAG_POPTIME, + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "_Time", + LabelEnd, + + LayoutEnd, + LayoutEnd, + + /* Our next page shows some gadgets + * that are basically just direct + * replacements for GadTools gadget + * kinds. Don't be fooled though, even + * though they may look similar, we've + * made several useful enhancements. + */ + PAGE_Add, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "GadTools Replacements", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, PaletteObject, + GA_RelVerify, TRUE, + PALETTE_NumColours, 1 << screen->RastPort.BitMap->Depth, + PaletteEnd, + CHILD_MinWidth, 40, + CHILD_MinHeight, 20, + CHILD_Label, LabelObject, + LABEL_Text, "_Palette", + LabelEnd, + + LAYOUT_AddChild, scroller_gad = ScrollerObject, + GA_RelVerify, TRUE, + SCROLLER_Top, 0, + SCROLLER_Total, 90, + SCROLLER_Visible, 10, + SCROLLER_Orientation, FREEHORIZ, + ScrollerEnd, + CHILD_MinHeight, 14, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "_Scroller", + LabelEnd, + + LAYOUT_AddChild, StringObject, + GA_RelVerify, TRUE, + STRINGA_MaxChars, 40, + STRINGA_TextVal, "ClassAct is just soooooo cool", + StringEnd, + CHILD_Label, LabelObject, + LABEL_Text, "S_tring", + LabelEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_AddChild, RadioButtonObject, + GA_RelVerify, TRUE, + GA_DrawInfo, drinfo, + RADIOBUTTON_Labels, radio_list = RadioButtons("ClassAct radio buttons", + "support strumming.", + "Click & Drag over buttons!", + NULL), + RADIOBUTTON_Spacing, 2, + RadioButtonEnd, + + LAYOUT_AddChild, CheckBoxObject, + GA_RelVerify, TRUE, + GA_Text, "_Click the label", + CHECKBOX_TextPlace, PLACETEXT_RIGHT, + CheckBoxEnd, + LayoutEnd, + CHILD_WeightedHeight, 0, + + LayoutEnd, + + /* This page is a little more + * interesting, it contains some of the + * cooler classes like the fuelgauge, + * chooser and speedbar. We also have + * an Integer class gadget, showing off + * our innovative arrow buttons. This + * gadget is connected to the fuelgauge + * via a simple mapping. + */ + PAGE_Add, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "New and Improved!\n", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_SpaceOuter, FALSE, + + LAYOUT_AddChild, fuelgauge_gad = FuelGaugeObject, + FUELGAUGE_Orientation, FGORIENT_HORIZ, + FUELGAUGE_Percent, TRUE, + FUELGAUGE_Min, 0, + FUELGAUGE_Max, 100, + FUELGAUGE_Level, 20, + FUELGAUGE_Ticks, 10, + FUELGAUGE_TickSize, 4, + FUELGAUGE_ShortTicks, TRUE, + FuelGaugeEnd, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_DrawInfo, drinfo, + LABEL_Text, "Interconnected:", + LabelEnd, + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_SpaceOuter, FALSE, + + LAYOUT_AddChild, IntegerObject, + GA_RelVerify, TRUE, + INTEGER_MaxChars, 3, + INTEGER_Minimum, 0, + INTEGER_Maximum, 100, + INTEGER_Number, 20, + INTEGER_MinVisible, 5, + ICA_TARGET, fuelgauge_gad, + ICA_MAP, integer_map, + IntegerEnd, + CHILD_WeightedHeight, 0, + CHILD_WeightedWidth, 0, + CHILD_Label, LabelObject, + LABEL_DrawInfo, drinfo, + LABEL_Text, "_Look, arrows! (Range: 0...100):", + LabelEnd, + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_AddChild, ChooserObject, + GA_RelVerify, TRUE, + CHOOSER_Labels, chooser_list1 = ChooserLabels( "A PopUp gadget", + "from the Chooser", + "gadget class.", + "Good for allowing", + "the user to", + "select a state", + "or mode.", + NULL), + CHOOSER_PopUp, TRUE, + CHOOSER_AutoFit, TRUE, + ChooserEnd, + + LAYOUT_AddChild, ChooserObject, + GA_RelVerify, TRUE, + CHOOSER_Labels, chooser_list2 = ChooserLabels("A DropDown", + "gadget from", + "the Chooser", + "gadget class.", + "Good for", + "allowing the", + "user to", + "select actions", + NULL), + CHOOSER_DropDown, TRUE, + CHOOSER_Title, "Drop-Down", + CHOOSER_AutoFit, FALSE, + ChooserEnd, + + LAYOUT_AddChild, ChooserObject, + GA_RelVerify, TRUE, + CHOOSER_Labels, chooser_list3 = ChooserLabels("A thin Chooser.", + "Use this in", + "conjunction with", + "a string gadget.", + NULL), + CHOOSER_DropDown, TRUE, + CHOOSER_AutoFit, TRUE, + ChooserEnd, + CHILD_MinWidth, 20, + CHILD_WeightedWidth, 0, + LayoutEnd, + CHILD_WeightedWidth, 0, + + LAYOUT_AddChild, SpeedBarObject, + GA_RelVerify, TRUE, + SPEEDBAR_Orientation, SBORIENT_HORIZ, + SPEEDBAR_Buttons, &speedbar_list, + SPEEDBAR_Background, mapping[4], + SPEEDBAR_StrumBar, FALSE, + SpeedBarEnd, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, ClickTabObject, + GA_RelVerify, TRUE, + CLICKTAB_Labels, tab_list = ClickTabs("Tabs", "For", + "Pages", "Etc.", NULL), + CLICKTAB_Current, 0L, + ClickTabEnd, + CHILD_WeightedHeight, 0, + + LayoutEnd, + CHILD_WeightedWidth, 0, + + /* One of the most powerful classes + * we've done is the ListBrowser. The + * first object is a simple multi- + * column list showing images and text, + * as well as editable nodes. The 2nd + * object is intended to demonstrate + * some of the numerous node attributes. + */ + PAGE_Add, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "Look what ListBrowser can do!\n", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_AddChild, ListBrowserObject, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, (ULONG)&lb_list1, + LISTBROWSER_ColumnInfo, &ci1, + LISTBROWSER_AutoFit, TRUE, + LISTBROWSER_MultiSelect, TRUE, + LISTBROWSER_ShowSelected, TRUE, + LISTBROWSER_Separators, TRUE, + LISTBROWSER_Editable, TRUE, + LISTBROWSER_Spacing, 1, + ListBrowserEnd, + + LAYOUT_AddChild, lb_gad = ListBrowserObject, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, &lb_list2, + LISTBROWSER_ColumnInfo, &ci2, + LISTBROWSER_ColumnTitles, TRUE, + LISTBROWSER_Separators, TRUE, + LISTBROWSER_Hierarchical, TRUE, + LISTBROWSER_Editable, TRUE, + LISTBROWSER_MultiSelect, TRUE, + LISTBROWSER_ShowSelected, TRUE, + ListBrowserEnd, + LayoutEnd, + LayoutEnd, + + /* Our second ListBrowser page shows + * the powerful hierarchical mode of + * ListBrowser. The two gadgets + * contain identical lists, but the + * left-hand gadget shows the default + * hide/show images while the right- + * hand ones shows some custom images. + */ + PAGE_Add, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "Get File/Font/Screen Mode\n", + IA_Font, screen->Font, + LABEL_Text, "ASL has never been this easy", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, getfile_gad = GetFileObject, + GA_ID, GAD_GETFILE, + GA_RelVerify, TRUE, + GETFILE_TitleText, "Select a File", + GETFILE_ReadOnly, FALSE, + End, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "File:", + LabelEnd, + + LAYOUT_AddChild, getfont_gad = GetFontObject, + GA_ID, GAD_GETFONT, + GA_RelVerify, TRUE, + GETFONT_TitleText, "Select a Font", + GETFONT_DoStyle, TRUE, + GETFONT_DoFrontPen, TRUE, + GETFONT_DoBackPen, TRUE, + ICA_MAP, getfont_map, + End, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "Font:", + LabelEnd, + + LAYOUT_AddChild, fontpreview_gad = ButtonObject, + GA_ReadOnly, TRUE, + GA_Text, "123 AcBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz!@#$%^&*()", + BUTTON_DomainString, "Text", + ButtonEnd, + CHILD_Label, LabelObject, + LABEL_Text, "Preview:", + LabelEnd, + + LAYOUT_AddChild, getscreen_gad = GetScreenModeObject, + GA_ID, GAD_GETSCREEN, + GA_RelVerify, TRUE, + GETSCREENMODE_TitleText, "Select a Screen Mode", + GETSCREENMODE_DoWidth, TRUE, + GETSCREENMODE_DoHeight, TRUE, + GETSCREENMODE_DoDepth, TRUE, + GETSCREENMODE_MinWidth, 500, + GETSCREENMODE_MinHeight, 180, + End, + CHILD_WeightedHeight, 0, + CHILD_Label, LabelObject, + LABEL_Text, "Screen Mode:", + LabelEnd, + + LayoutEnd, + + /* This is the last page, just the + * credits, again as a single label + * gadget. + */ + PAGE_Add, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_VertAlignment, LALIGN_CENTRE, + LAYOUT_HorizAlignment, LALIGN_CENTRE, + + LAYOUT_AddImage, l = LabelObject, + LABEL_DrawInfo, drinfo, + IA_Font, &helvetica15bu, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "Order ClassAct Now!\n", + IA_Font, screen->Font, + LABEL_Text, "\nFinale Development, Inc.\n", + LABEL_Text, "P.O. Box 6905, ", + LABEL_Text, "West Palm Beach, FL 33405", + LABEL_Text, "U.S.A.\n", + LABEL_Text, "Tel: 1 (203) 235-7518\n", + LABEL_Text, "Fax: 1 (203) 237-8459\n", + LABEL_Text, "E-Mail: ClassAct@finale-dev.com\n", + LABEL_Text, "WWW: http://www.warped.com/~timmer/classact/\n", + LABEL_Text, "FTP: ftp.warped.com /pub/amiga/classact/\n", + LabelEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LayoutEnd, + LayoutEnd, + + PageEnd, + + LayoutEnd, + + /* These are the gadgets that appear at the + * bottom of the window for changing pages. + */ + LAYOUT_AddChild, layout2 = LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_EvenSize, TRUE, + LAYOUT_HorizAlignment, LALIGN_RIGHT, + LAYOUT_SpaceInner, FALSE, + + LAYOUT_AddChild, SpaceObject, + SpaceEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, SpaceObject, + SpaceEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, back_gad = ButtonObject, + GA_ID, GAD_BACK, + GA_Text, "< _Back", + GA_RelVerify, TRUE, + GA_Disabled, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, forward_gad = ButtonObject, + GA_ID, GAD_FORWARD, + GA_Text, "_Forward >", + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, SpaceObject, + SpaceEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GAD_QUIT, + GA_Text, "Quit", + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LayoutEnd, + + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LayoutEnd) + { + struct MsgPort *app_port; + Object *window_obj; + + /* Connect the GetFont gadget to the font preview button. + */ + SetAttrs(getfont_gad, + ICA_TARGET, fontpreview_gad, + TAG_DONE); + + /* Make the fancy ListBrowserList. + */ + make_fancy_list(lb_gad); + + /* Create a message port for App* messages. This is needed for + * iconification. We're being a touch naughty by not checking + * the return code, but that just means that iconification won't + * work, nothing really bad will happen. + */ + app_port = CreateMsgPort(); + + /* Create the window object. + */ + if (window_obj = WindowObject, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_CustomScreen, screen, + WA_IDCMP, IDCMP_CLOSEWINDOW, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "ClassAct Demonstration", + WINDOW_ParentGroup, layout, + WINDOW_IconifyGadget, TRUE, + WINDOW_Icon, GetDiskObject("PROGDIR:ClassActDemo"), + WINDOW_IconTitle, "ClassAct Demo", + WINDOW_AppPort, app_port, + EndWindow) + { + struct Window *win; + + /* Open the window. + */ + if (win = (struct Window *)CA_OpenWindow(window_obj)) + { + ULONG signal; + BOOL ok = TRUE; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, window_obj, &signal); + + /* Input Event Loop + */ + while (ok) + { + ULONG result; + + Wait(signal | (1L << app_port->mp_SigBit)); + + /* CA_HandleInput() returns the gadget ID of a clicked + * gadget, or one of several pre-defined values. For + * this demo, we're only actually interested in a + * close window and a couple of gadget clicks. + */ + while ((result = CA_HandleInput(window_obj, NULL)) != WMHI_LASTMSG) + { + ULONG current_page; + + switch(result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + ok = FALSE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GAD_FORWARD: + GetAttr(PAGE_Current, page, ¤t_page); + if (current_page < NUM_PAGES) + { + if (current_page == 0) + if (SetGadgetAttrs(back_gad, win, NULL, + GA_Disabled, FALSE, + TAG_DONE)) + RefreshGList(layout2, win, NULL, 1); + + current_page++; + + if (current_page == NUM_PAGES) + if (SetGadgetAttrs(forward_gad, win, NULL, + GA_Disabled, TRUE, + TAG_DONE)) + RefreshGList(layout2, win, NULL, 1); + + SetGadgetAttrs(page, win, NULL, + PAGE_Current, current_page, + TAG_DONE); + RethinkLayout(layout1, win, NULL, TRUE); + } + break; + + case GAD_GETFILE: + RequestFile((Object *)getfile_gad, win); + break; + + case GAD_GETFONT: + RequestFont((Object *)getfont_gad, win); + break; + + case GAD_GETSCREEN: + RequestScreenMode((Object *)getscreen_gad, win); + break; + + case GAD_BACK: + GetAttr(PAGE_Current, page, ¤t_page); + if (current_page > 0) + { + if (current_page == NUM_PAGES) + if (SetGadgetAttrs(forward_gad, win, NULL, + GA_Disabled, FALSE, + TAG_DONE)) + RefreshGList(layout2, win, NULL, 1); + + current_page--; + + if (current_page == 0) + if (SetGadgetAttrs(back_gad, win, NULL, + GA_Disabled, TRUE, + TAG_DONE)) + RefreshGList(layout2, win, NULL, 1); + + SetGadgetAttrs(page, win, NULL, + PAGE_Current, current_page, + TAG_DONE); + RethinkLayout(layout1, win, NULL, TRUE); + } + break; + + case GAD_QUIT: + ok = FALSE; + break; + + default: + break; + } + break; + + case WMHI_ICONIFY: + if (CA_Iconify(window_obj)) + win = NULL; + break; + + case WMHI_UNICONIFY: + win = CA_OpenWindow(window_obj); + break; + + default: + break; + } + } + } + + /* Disposing of the window object will also close the + * window if it is already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(window_obj); + } + else + easy_req(NULL, "Demo failed to start\nCouldn't open window", "Quit", ""); + + /* Lose the App* message port. + */ + if (app_port) + DeleteMsgPort(app_port); + } + else + { + easy_req(NULL, "Demo failed to start\nCouldn't create window object", "Quit", ""); + DisposeObject(layout); + } + } + else + easy_req(NULL, "Demo failed to start\nCouldn't create layout", "Quit", ""); + + /* Free the lists. + */ + if (radio_list) + FreeRadioButtons(radio_list); + if (chooser_list1) + FreeChooserLabels(chooser_list1); + if (chooser_list2) + FreeChooserLabels(chooser_list2); + if (chooser_list3) + FreeChooserLabels(chooser_list3); + if (tab_list) + FreeClickTabs(tab_list); + + free_speedbar_list(&speedbar_list); + + FreeListBrowserList(&lb_list1); + FreeListBrowserList(&lb_list2); + DisposeObject(limage); + + if (screen->RastPort.BitMap->Depth > 2 && GfxBase->LibNode.lib_Version >= 39) + { + ReleasePen(screen->ViewPort.ColorMap, mapping[4]); + ReleasePen(screen->ViewPort.ColorMap, mapping[5]); + ReleasePen(screen->ViewPort.ColorMap, mapping[7]); + } + + UnlockPubScreen(0, screen); + } + else + easy_req(NULL, "Demo failed to start\nCouldn't lock destination screen", "Quit", ""); +} + + +/* Set the mapping array for a screen. This creates an 8 colour mapping + * that should closely match the style of 8-colour palette that has become + * more or less conventional: + * pen 0 - medium grayish tone + * pen 1 - black + * pen 2 - white + * pen 3 - an arbitrary colour + * pen 4 - darker tone of pen 0 + * pen 5 - lighter tone of pen 0 + * pen 6,7 - some nice colours. + * You can be reasonably sure that this routine will setup a mapping that + * will make images designed for this style of palette look OK. + * + * This should probably lock the pen it eventually chooses, and maybe try to + * allocate a pen if it can't find anything close enough. + */ +VOID set_mapping(struct Screen *screen, struct DrawInfo *drinfo, UWORD image_mapping[]) +{ + /* Setup the image remapping. + */ + image_mapping[0] = drinfo->dri_Pens[BACKGROUNDPEN]; + image_mapping[1] = drinfo->dri_Pens[SHADOWPEN]; + image_mapping[2] = drinfo->dri_Pens[SHINEPEN]; + image_mapping[3] = drinfo->dri_Pens[FILLPEN]; + + if (screen->RastPort.BitMap->Depth > 2) + { + if (GfxBase->LibNode.lib_Version >= 39) + { + struct ColorMap *colourmap = screen->ViewPort.ColorMap; + ULONG bg[3]; + + GetRGB32(colourmap, drinfo->dri_Pens[BACKGROUNDPEN], 1, bg); + image_mapping[4] = ObtainBestPen(colourmap, bg[0] - 0x22222222, bg[1] - 0x22222222, bg[2] - 0x22222222, + OBP_Precision, PRECISION_GUI); + image_mapping[5] = ObtainBestPen(colourmap, bg[0] + 0x22222222, bg[1] + 0x22222222, bg[2] + 0x22222222, + OBP_Precision, PRECISION_GUI); + image_mapping[7] = ObtainBestPen(colourmap, 0xeeeeeeee, 0x22222222, 0x22222222, + OBP_Precision, PRECISION_GUI); + } + else + { + UWORD bg; + WORD lightgray, darkgray; + WORD rdiff1 = 3, gdiff1 = 3, bdiff1 = 3; + WORD rdiff2 = 3, gdiff2 = 3, bdiff2 = 3; + WORD i; + + /* Set the defaults. + */ + lightgray = darkgray = drinfo->dri_Pens[BACKGROUNDPEN]; + + /* Find out what the background colour is. + */ + bg = GetRGB4(screen->ViewPort.ColorMap, 0); + + /* Search for the light and dark grays. + */ + for (i = 1; i < 1 << screen->RastPort.BitMap->Depth; i++) + { + UWORD colour; + + /* Get the colour. + */ + colour = GetRGB4(screen->ViewPort.ColorMap, i); + + /* Compare it to the background colour, see if its darker and + * close enough to that colour. + */ + if ((RED(bg) >= RED(colour) && RED(bg) - RED(colour) <= rdiff1) && + (GREEN(bg) >= GREEN(colour) && GREEN(bg) - GREEN(colour) <= gdiff1) && + (BLUE(bg) >= BLUE(colour) && BLUE(bg) - BLUE(colour) <= bdiff1)) + { + darkgray = i; + rdiff1 = RED(bg) - RED(colour); + gdiff1 = GREEN(bg) - GREEN(colour); + bdiff1 = BLUE(bg) - BLUE(colour); + } + /* Compare it to the background colour, see if its lighter and + * close enough to that colour. + */ + if ((RED(colour) >= RED(bg) && RED(colour) - RED(bg) <= rdiff2) && + (GREEN(colour) >= GREEN(bg) && GREEN(colour) - GREEN(bg) <= gdiff2) && + (BLUE(colour) >= BLUE(bg) && BLUE(colour) - BLUE(bg) <= bdiff2)) + { + lightgray = i; + rdiff2 = RED(colour) - RED(bg); + gdiff2 = GREEN(colour) - GREEN(bg); + bdiff2 = BLUE(colour) - BLUE(bg); + } + } + + image_mapping[4] = darkgray; + image_mapping[5] = lightgray; + image_mapping[6] = (1 << screen->RastPort.BitMap->Depth) - 2; + image_mapping[7] = (1 << screen->RastPort.BitMap->Depth) - 1; + } + } + else + { + image_mapping[4] = image_mapping[5] = drinfo->dri_Pens[BACKGROUNDPEN]; + image_mapping[6] = image_mapping[7] = drinfo->dri_Pens[FILLPEN]; + } +} + + +/* Do an easy requester. + */ +LONG easy_req(struct Window *win, char *reqtext, char *reqgads, char *reqargs, ...) +{ + struct EasyStruct general_es = + { + sizeof(struct EasyStruct), + 0, + "Demo", + NULL, + NULL + }; + + general_es.es_TextFormat = reqtext; + general_es.es_GadgetFormat = reqgads; + + return(EasyRequestArgs(win, &general_es, NULL, &reqargs)); +} + + +/* Function to make an Exec List of ListBrowserNodes from an array of images + * and an array of strings. + */ +BOOL make_lb_list(struct List *list, struct Image *images, UBYTE **strs) +{ + struct Node *node; + WORD i = 0; + + NewList(list); + + while (i < 10) + { + if (node = AllocListBrowserNode(2, + LBNA_Column, 0, + LBNCA_Image, images, + LBNCA_Justification, LCJ_CENTRE, + LBNA_Column, 1, + LBNCA_CopyText, TRUE, + LBNCA_Text, *strs, + LBNCA_Editable, TRUE, + LBNCA_MaxChars, 60, + TAG_DONE)) + { + AddTail(list, node); + } + else + break; + + images++; + strs++; + i++; + } + return(TRUE); +} + + +/* Make a fairly fancy list. We've taken a different approach here, this + * time using ListBrowser methods to create the list items AFTER the object + * has been created. + */ +VOID make_fancy_list(struct Gadget *lb_gad) +{ + struct Image *gimage; + static struct Hook lbhook; + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Demo of ListBrowserNode features", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Editable node", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Click twice to edit", + LBNCA_Editable, TRUE, + LBNCA_MaxChars, 60, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Change colours", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Flags, LBFLG_CUSTOMPENS, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Colourful!", + LBNCA_FGPen, 19, + LBNCA_BGPen, 18, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Checkbox item", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_CheckBox, TRUE, + LBNA_Checked, TRUE, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Checked by default", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_CheckBox, TRUE, + LBNA_Checked, FALSE, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Unchecked by default", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Justifications", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Left", + LBNCA_Justification, LCJ_LEFT, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Centre", + LBNCA_Justification, LCJ_CENTRE, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Right", + LBNCA_Justification, LCJ_RIGHT, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Read-Only node", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Flags, LBFLG_READONLY, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Can't select me!", + TAG_DONE); + + gimage = GlyphObject, + IA_Width, 20, + IA_Height, 20, + GLYPH_Glyph, GLYPH_POPTIME, + GlyphEnd; + limage = LabelObject, + IA_Font, &garnet16, + LABEL_Text, "Created using\n_label.image\n", + IA_Font, screen->Font, + LABEL_SoftStyle, FSF_BOLD | FSF_ITALIC, + LABEL_DisposeImage, TRUE, + LABEL_Image, gimage, + IA_FGPen, 35, + LABEL_Text, " Cool eh?", + LabelEnd; + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Some images", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_Image, limage, + TAG_DONE); + + lbhook.h_Entry = (ULONG (*)())lb_hook; + lbhook.h_SubEntry = NULL; + lbhook.h_Data = NULL; + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Rendering hook", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_RenderHook, &lbhook, + LBNCA_HookHeight, 20, + TAG_DONE); +} + +/* Hook for our fancy list. This just renders an ellipse. + */ +ULONG __asm __saveds lb_hook(register __a0 struct Hook *hook, register __a2 struct Node *node, + register __a1 struct LBDrawMsg *msg) +{ + WORD width = msg->lbdm_Bounds.MaxX - msg->lbdm_Bounds.MinX; + WORD height = msg->lbdm_Bounds.MaxY - msg->lbdm_Bounds.MinY; + + if(msg->lbdm_MethodID != LV_DRAW) + return(LBCB_UNKNOWN); + + SetAPen(msg->lbdm_RastPort, 69); + DrawEllipse(msg->lbdm_RastPort, + msg->lbdm_Bounds.MinX + (width / 2), msg->lbdm_Bounds.MinY + (height / 2), + width / 2, height / 2); + + return(LVCB_OK); +} + +/* Create the SpeedBar list from an array of images, creating help texts + * for each button from a string array. + */ +BOOL make_speedbar_list(struct List *list, struct Image *images, UBYTE **help) +{ + struct Node *node; + WORD i = 0; + + NewList(list); + + while (i < 10) + { + if (node = AllocSpeedButtonNode(i, + SBNA_Image, images, + SBNA_Top, 2, + SBNA_Left, 0, + SBNA_Help, *help, + SBNA_Enabled, TRUE, + SBNA_Spacing, 2, + SBNA_Highlight, SBH_RECESS, + TAG_DONE)) + { + AddTail(list, node); + } + else + PutStr("Allocation failed\n"); + + images++; + help++; + i++; + } + return(TRUE); +} + + +/* Function to free a SpeedBar Exec List. + */ +VOID free_speedbar_list(struct List *list) +{ + struct Node *node, *nextnode; + + node = list->lh_Head; + while (nextnode = node->ln_Succ) + { + FreeSpeedButtonNode(node); + node = nextnode; + } + NewList(list); +} diff --git a/Demo/ClassActDemo.c.info b/Demo/ClassActDemo.c.info new file mode 100644 index 0000000..ad6e7fd Binary files /dev/null and b/Demo/ClassActDemo.c.info differ diff --git a/Demo/ClassActDemo.info b/Demo/ClassActDemo.info new file mode 100644 index 0000000..7794fc9 Binary files /dev/null and b/Demo/ClassActDemo.info differ diff --git a/Demo/ClassActDemo.lnk b/Demo/ClassActDemo.lnk new file mode 100644 index 0000000..56265d7 --- /dev/null +++ b/Demo/ClassActDemo.lnk @@ -0,0 +1,6 @@ +FROM LIB:c.o "ClassActDemo.o"+"Images.o" +TO "ClassActDemo" +LIB lib:classact.lib lib:debug.lib LIB:sc.lib LIB:amiga.lib +SMALLCODE +SMALLDATA + diff --git a/Demo/ClassActDemo.o b/Demo/ClassActDemo.o new file mode 100644 index 0000000..233c01d Binary files /dev/null and b/Demo/ClassActDemo.o differ diff --git a/Demo/Images.c b/Demo/Images.c new file mode 100644 index 0000000..8850c7e --- /dev/null +++ b/Demo/Images.c @@ -0,0 +1,949 @@ +#include +#include + +__chip UWORD picture_data[2205] = +{ + /* Plane 0 */ + 0x0000, 0x0000, 0x0001, 0x8000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0003, 0x8000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0007, 0xF000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xF800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0x3400, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x003D, 0x9E00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0078, 0xDF00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x00F0, 0x6F80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x01E0, 0x37C0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x03C0, 0x1FE0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0780, 0x8DF0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0F01, 0x06F8, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1E02, 0x037C, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3C04, 0x01BE, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x7808, 0x08DF, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xF010, 0x106F, 0x8000, 0x0000, 0x0000, + 0x0000, 0x0001, 0xE020, 0x207F, 0xC000, 0x0000, 0x0000, + 0x0000, 0x0003, 0xC040, 0x407F, 0xE000, 0x0000, 0x0000, + 0x0000, 0x0007, 0x8080, 0x80FF, 0xF000, 0x0000, 0x0000, + 0x0000, 0x000F, 0x0101, 0x01FF, 0xF800, 0x0000, 0x0000, + 0x0000, 0x001E, 0x0202, 0x03FF, 0xFC00, 0x0000, 0x0000, + 0x0000, 0x001C, 0x0404, 0x07FF, 0xFE00, 0x0000, 0x0000, + 0x0000, 0x007C, 0x0808, 0x0FF2, 0xFF00, 0x0000, 0x0000, + 0x0000, 0x007E, 0x1010, 0x1FEF, 0x7F80, 0x0000, 0x0000, + 0x0000, 0x003F, 0x0020, 0x3FFF, 0xBF80, 0x0000, 0x0000, + 0x0000, 0x001F, 0x8040, 0x7E7F, 0xDF00, 0x0000, 0x0000, + 0x0000, 0x000F, 0xC080, 0xFC1F, 0xE600, 0x0000, 0x0000, + 0x0000, 0x0007, 0xE101, 0xF97F, 0xF400, 0x0000, 0x0000, + 0x0000, 0x0003, 0xF003, 0xF303, 0xF800, 0x0000, 0x0000, + 0x0000, 0x0001, 0xF807, 0xE7C1, 0xF000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xFC0F, 0xCFC1, 0xE000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x7E1F, 0x9FC1, 0xC000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3F3F, 0x25E0, 0xC000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1FFE, 0x6EF1, 0x8000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0FBC, 0x7F63, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x07FE, 0x7FA6, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x03FF, 0x1FAC, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x01FF, 0x9FF8, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x00FF, 0xC630, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x007F, 0xE660, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x003F, 0xF0C0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xF980, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xFF00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xFF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3FFF, 0xFF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x001F, 0xFFFF, 0xFFFF, 0x8000, 0x0000, 0x0000, + 0x0000, 0x007F, 0xFFEF, 0xFF7F, 0xFF00, 0x0000, 0x0000, + 0x0000, 0x01FF, 0xFFEF, 0xFF7F, 0xFFC0, 0x0000, 0x0000, + 0x0000, 0x03FF, 0xFFEF, 0x9F7F, 0xFFF0, 0x0000, 0x0000, + 0x0000, 0x07FF, 0xEFEF, 0x2F7F, 0x7FF8, 0x0000, 0x0000, + 0x0000, 0x07FF, 0xEFE0, 0x207F, 0x7FFC, 0x0000, 0x0000, + 0x0000, 0x0FFF, 0xEFE0, 0x207F, 0x7FFC, 0x0000, 0x0000, + 0x0000, 0x0FFF, 0xF7E0, 0x207E, 0xFFFE, 0x0000, 0x0000, + 0x0000, 0x1FFF, 0xF7F0, 0x20FE, 0xFFFE, 0x0000, 0x0000, + 0x0000, 0x1FFF, 0xF7F0, 0x20FE, 0xFFFF, 0x0000, 0x0000, + 0x0000, 0x3FFF, 0xF1F0, 0x20F8, 0xFFFF, 0x0000, 0x0000, + 0x0000, 0x3FFF, 0xFEF0, 0x20F7, 0xFFFF, 0x8000, 0x0000, + 0x0000, 0x7FFF, 0xFDF8, 0x21FB, 0xFFFF, 0x8000, 0x0000, + 0x0000, 0x7FFF, 0xFBF8, 0x21FD, 0xFFFF, 0xC000, 0x0000, + 0x0000, 0xFFFF, 0xFBF8, 0x21FD, 0xFFFF, 0xC000, 0x0000, + 0x0000, 0xFFFF, 0xFDF8, 0x21FB, 0xFFFF, 0xE000, 0x0000, + 0x0001, 0xFFFF, 0xFDFC, 0x23FB, 0xFFFF, 0xE000, 0x0000, + 0x0001, 0xFFFF, 0xFDFC, 0x23FB, 0xFFFF, 0xF000, 0x0000, + 0x0003, 0xFFFF, 0xFEFC, 0x23F7, 0xFFFF, 0xF000, 0x0000, + 0x0003, 0xFFFF, 0xFEFE, 0x27F7, 0xFFFF, 0xF800, 0x0000, + 0x0007, 0xFFFF, 0xFEFE, 0x27F7, 0xFFFF, 0xF800, 0x0000, + 0x0007, 0xFFFF, 0xFF7E, 0x27EF, 0xFFFF, 0xFC00, 0x0000, + 0x000F, 0xFFFF, 0xFF7F, 0x2FEF, 0xFFFF, 0xFC00, 0x0000, + 0x000F, 0xFFFF, 0xFFBF, 0x2FDF, 0xFFFF, 0xFE00, 0x0000, + 0x001F, 0xFFFF, 0xFFBF, 0x2FDF, 0xFFFF, 0xFE00, 0x0000, + 0x001F, 0xFFFF, 0xFFDF, 0xBFBF, 0xFFFF, 0xFF00, 0x0000, + 0x003F, 0xFFFF, 0xFFDF, 0xBFBF, 0xFFFF, 0xFF00, 0x0000, + 0x003F, 0xFFFF, 0xFFEF, 0xBF7F, 0xFEFF, 0xFF80, 0x0000, + 0x007F, 0xFFFF, 0xFFEF, 0xBF7F, 0xFEFF, 0xFF80, 0x0000, + 0x007F, 0xFFEF, 0xFFF7, 0xDEFF, 0xFEFF, 0xFFC0, 0x0000, + 0x00FF, 0xFFEF, 0xFFF7, 0xDEFF, 0xFEFF, 0xFFC0, 0x0000, + 0x00FF, 0xFFCF, 0xFFFB, 0xDDFF, 0xFEFF, 0xFFE0, 0x0000, + 0x01FF, 0xFFCF, 0xFFFB, 0xDDFF, 0xFE7F, 0xFFE0, 0x0000, + 0x01FF, 0xFF8F, 0xFFFD, 0xEBFF, 0xFE7F, 0xFFF0, 0x0000, + 0x03FF, 0xFF8F, 0xFFFD, 0xEBFF, 0xFE3F, 0xFFF0, 0x0000, + 0x03FF, 0xFF0F, 0xFFFE, 0xE7FF, 0xFE3F, 0xFFF8, 0x0000, + 0x07FF, 0xFF0F, 0xFFFE, 0xE7FF, 0xFE1F, 0xFFF8, 0x0000, + 0x07FF, 0xFE0F, 0xFFFF, 0x6FFF, 0xFE1F, 0xFFFC, 0x0000, + 0x0FFF, 0xFE0F, 0xFFFF, 0x6FFF, 0xFE0F, 0xFFFC, 0x0000, + 0x0FFF, 0xFC0F, 0xFFFF, 0xAFFF, 0xFE0F, 0xFFFE, 0x0000, + 0x1FFF, 0xFC0F, 0xFFFF, 0xAFFF, 0xFE07, 0xFFFE, 0x0000, + 0x1FFF, 0xF80F, 0xFFFF, 0xCFFF, 0xFE07, 0xFFFF, 0x0000, + 0x3FFF, 0xF80F, 0xFFFF, 0xCFFF, 0xFE03, 0xFFFF, 0x0000, + 0x3FFF, 0xF00F, 0xFFFF, 0xEFFF, 0xFE03, 0xFFFF, 0x8000, + 0x7FFF, 0xF00F, 0xFFFF, 0xEFFF, 0xFE01, 0xFFFF, 0x8000, + 0xFFFF, 0xE00F, 0xFFFF, 0xC7FF, 0xFE01, 0xFFFF, 0xC000, + 0xFFFF, 0xE00F, 0xFFFF, 0xEFFF, 0xFE00, 0xFFFF, 0xE000, + 0xFFFF, 0xC00F, 0xFFFF, 0xEFFF, 0xFE00, 0xFFFF, 0xE000, + 0xFFFF, 0xC00F, 0xFFFF, 0xEFFF, 0xFE00, 0x7FFF, 0xE000, + 0xEFFF, 0x800F, 0xFFFF, 0xEFFF, 0xFE00, 0x7FFF, 0x0000, + 0x03FF, 0x800F, 0xFFFF, 0xEFFF, 0xFE00, 0x3FFC, 0x0000, + 0x007F, 0x000F, 0xFFFF, 0xC7FF, 0xFE00, 0x3FE0, 0x0000, + 0x001F, 0x000F, 0xFFFF, 0xEFFF, 0xFE00, 0x1F80, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xEFFF, 0xFE00, 0x1E00, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xEFFF, 0xFE00, 0x0300, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xEFFF, 0xFE00, 0x0200, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xEFFF, 0xFE00, 0x0000, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xEFFF, 0xFE00, 0x0000, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xC7FF, 0xFE00, 0x0000, 0x0000, + 0x0000, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0002, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0007, 0x8000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xE000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xF000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x003E, 0x2000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x007E, 0x0400, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x00FF, 0x1E00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x01FF, 0x8F00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x03FD, 0xC780, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x07FB, 0xE7C0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0FF7, 0x71E0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1FEE, 0xF8F0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3FDD, 0xDC78, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x7FBB, 0xBE3C, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xFF77, 0x771E, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0001, 0xFEEE, 0xEF8F, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0003, 0xFDDD, 0xDD8F, 0x8000, 0x0000, 0x0000, + 0x0000, 0x0007, 0xFBBB, 0xBB9F, 0xC000, 0x0000, 0x0000, + 0x0000, 0x000F, 0xF777, 0x773F, 0xE000, 0x0000, 0x0000, + 0x0000, 0x001F, 0xEEEE, 0xEE7F, 0xF000, 0x0000, 0x0000, + 0x0000, 0x003F, 0xDDDD, 0xDCFF, 0xF800, 0x0000, 0x0000, + 0x0000, 0x0077, 0xBBBB, 0xB9FF, 0xFC00, 0x0000, 0x0000, + 0x0000, 0x007B, 0xF777, 0x73F2, 0xFE00, 0x0000, 0x0000, + 0x0000, 0x007D, 0xEEEE, 0xE7EF, 0x7E00, 0x0000, 0x0000, + 0x0000, 0x007E, 0xFDDD, 0xCE1F, 0xBE00, 0x0000, 0x0000, + 0x0000, 0x003F, 0x7BBB, 0x9D87, 0xDE00, 0x0000, 0x0000, + 0x0000, 0x001F, 0xBF77, 0x3BE3, 0xE000, 0x0000, 0x0000, + 0x0000, 0x000F, 0xDEEE, 0x7601, 0xF000, 0x0000, 0x0000, + 0x0000, 0x0007, 0xEFDC, 0xEC0C, 0xE000, 0x0000, 0x0000, + 0x0000, 0x0003, 0xF7B9, 0xD806, 0x6000, 0x0000, 0x0000, + 0x0000, 0x0001, 0xFBF3, 0xB002, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xFDE7, 0x6000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x7ECE, 0xC200, 0x4000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3F1D, 0x8700, 0x8000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1FBD, 0x8781, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0FFD, 0x83C2, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x07FE, 0xE1C4, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x03FF, 0x6088, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x01FF, 0xB810, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x00FF, 0xD820, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x007F, 0xE840, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x003F, 0xF080, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xF900, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x6000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0x0F00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0x9F00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xFF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xFF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xFF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xFF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xDF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xDF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0xDF80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xFF00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xDF00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xDF00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x000F, 0xDF00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0007, 0xFE00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0007, 0xDE00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0007, 0xDE00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0007, 0xDE00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0003, 0xFC00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0003, 0xDC00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0003, 0xDC00, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0001, 0xD800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0001, 0xF800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0001, 0xD800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xD000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xD000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xF000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x4000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x4000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x4000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x4000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, + 0x3C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0003, 0xC000, + 0x1F80, 0x0000, 0x0000, 0x0000, 0x0000, 0x001F, 0x8000, + 0x01E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0078, 0x0000, + 0x0078, 0x0000, 0x0000, 0x0000, 0x0000, 0x01E0, 0x0000, + 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 2 */ + 0x0000, 0x0000, 0x0001, 0xC000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x6000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001E, 0x4000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x003D, 0x2000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0078, 0x8000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x00F0, 0x4000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x01E2, 0x2000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x03C4, 0x1000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0788, 0x8800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0F11, 0x0400, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1E22, 0x2200, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3C44, 0x4100, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x7888, 0x8880, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xF111, 0x1040, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0001, 0xE222, 0x2250, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0003, 0xC444, 0x4420, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0007, 0x8888, 0x8840, 0x0000, 0x0000, 0x0000, + 0x0000, 0x000F, 0x1111, 0x1080, 0x0000, 0x0000, 0x0000, + 0x0000, 0x000E, 0x2222, 0x2100, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0004, 0x4444, 0x4200, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0888, 0x840C, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1111, 0x0810, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0222, 0x1000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0444, 0x2060, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0088, 0x4018, 0x1800, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0110, 0x817C, 0x0800, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0021, 0x0302, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0042, 0x07D1, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0004, 0x0FD9, 0x8000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0008, 0x1FDF, 0x8000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0010, 0x39FE, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0020, 0x70FE, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0042, 0x7060, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x7820, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x1C20, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x1E60, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0600, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0600, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0600, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0600, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x001F, 0x9F80, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3FFF, 0xFFFF, 0xC000, 0x0000, 0x0000, + 0x0000, 0x001F, 0xE01F, 0xFF80, 0x7F80, 0x0000, 0x0000, + 0x0000, 0x0070, 0x000F, 0xFF00, 0x00E0, 0x0000, 0x0000, + 0x0000, 0x01C0, 0x000F, 0xFF00, 0x0038, 0x0000, 0x0000, + 0x0000, 0x0300, 0x000F, 0x9F00, 0x000C, 0x0000, 0x0000, + 0x0000, 0x0600, 0x100F, 0x0F00, 0x8006, 0x0000, 0x0000, + 0x0000, 0x0400, 0x1000, 0x2000, 0x8002, 0x0000, 0x0000, + 0x0000, 0x0C00, 0x1000, 0x2000, 0x8003, 0x0000, 0x0000, + 0x0000, 0x0800, 0x0800, 0x2001, 0x0001, 0x0000, 0x0000, + 0x0000, 0x1800, 0x0800, 0x0001, 0x0001, 0x8000, 0x0000, + 0x0000, 0x1000, 0x0800, 0x2001, 0x0000, 0x8000, 0x0000, + 0x0000, 0x3000, 0x0E00, 0x2007, 0x0000, 0xC000, 0x0000, + 0x0000, 0x2000, 0x0100, 0x2008, 0x0000, 0x4000, 0x0000, + 0x0000, 0x6000, 0x0200, 0x0004, 0x0000, 0x6000, 0x0000, + 0x0000, 0x4000, 0x0400, 0x2002, 0x0000, 0x2000, 0x0000, + 0x0000, 0xC000, 0x0400, 0x2002, 0x0000, 0x3000, 0x0000, + 0x0000, 0x8000, 0x0200, 0x2004, 0x0000, 0x1000, 0x0000, + 0x0001, 0x8000, 0x0200, 0x0004, 0x0000, 0x1800, 0x0000, + 0x0001, 0x0000, 0x0200, 0x2004, 0x0000, 0x0800, 0x0000, + 0x0003, 0x0000, 0x0100, 0x2008, 0x0000, 0x0C00, 0x0000, + 0x0002, 0x0000, 0x0100, 0x2008, 0x0000, 0x0400, 0x0000, + 0x0006, 0x0000, 0x0100, 0x0008, 0x0000, 0x0600, 0x0000, + 0x0004, 0x0000, 0x0080, 0x2010, 0x0000, 0x0200, 0x0000, + 0x000C, 0x0000, 0x0080, 0x2010, 0x0000, 0x0300, 0x0000, + 0x0008, 0x0000, 0x0040, 0x2020, 0x0000, 0x0100, 0x0000, + 0x0018, 0x0000, 0x0040, 0x0020, 0x0000, 0x0180, 0x0000, + 0x0010, 0x0000, 0x0020, 0x2040, 0x0000, 0x0080, 0x0000, + 0x0030, 0x0000, 0x0020, 0x2040, 0x0000, 0x00C0, 0x0000, + 0x0020, 0x0008, 0x0010, 0x2080, 0x0100, 0x0040, 0x0000, + 0x0060, 0x0008, 0x0010, 0x0080, 0x0100, 0x0060, 0x0000, + 0x0040, 0x0018, 0x0008, 0x2100, 0x0180, 0x0020, 0x0000, + 0x00C0, 0x0018, 0x0008, 0x2100, 0x0180, 0x0030, 0x0000, + 0x0080, 0x0038, 0x0004, 0x2200, 0x01C0, 0x0010, 0x0000, + 0x0180, 0x0028, 0x0004, 0x2200, 0x0140, 0x0018, 0x0000, + 0x0100, 0x0068, 0x0002, 0x1400, 0x0160, 0x0008, 0x0000, + 0x0300, 0x0048, 0x0002, 0x1400, 0x0120, 0x000C, 0x0000, + 0x0200, 0x00C8, 0x0001, 0x1800, 0x0130, 0x0004, 0x0000, + 0x0600, 0x0088, 0x0001, 0x1800, 0x0110, 0x0006, 0x0000, + 0x0400, 0x0188, 0x0000, 0x9000, 0x0118, 0x0002, 0x0000, + 0x0C00, 0x0108, 0x0000, 0x9000, 0x0108, 0x0003, 0x0000, + 0x0800, 0x0308, 0x0000, 0x5000, 0x010C, 0x0001, 0x0000, + 0x1800, 0x0208, 0x0000, 0x5000, 0x0104, 0x0001, 0x8000, + 0x1000, 0x0608, 0x0000, 0x3000, 0x0106, 0x0000, 0x8000, + 0x3000, 0x0408, 0x0000, 0x3000, 0x0102, 0x0000, 0xC000, + 0x2000, 0x0C08, 0x0000, 0x1000, 0x0103, 0x0000, 0x4000, + 0x6000, 0x0808, 0x0000, 0x1000, 0x0101, 0x0000, 0x6000, + 0xC000, 0x1808, 0x0000, 0x3800, 0x0101, 0x8000, 0x3000, + 0x8000, 0x1008, 0x0000, 0x1000, 0x0100, 0x8000, 0x1000, + 0x8000, 0x3008, 0x0000, 0x1000, 0x0100, 0xC000, 0x1000, + 0x8000, 0x2008, 0x0000, 0x1000, 0x0100, 0x4000, 0x1000, + 0xE000, 0x6008, 0x0000, 0x1000, 0x0100, 0x6000, 0x7000, + 0x4000, 0x4008, 0x0000, 0x1000, 0x0100, 0x2000, 0x2000, + 0x6000, 0xC008, 0x0000, 0x3800, 0x0100, 0x3000, 0x6000, + 0x3E00, 0x8008, 0x0000, 0x1000, 0x0100, 0x1007, 0xC000, + 0x0387, 0x8008, 0x0000, 0x1000, 0x0100, 0x1E1C, 0x0000, + 0x00F4, 0x0008, 0x0000, 0x1000, 0x0100, 0x03F0, 0x0000, + 0x001C, 0x0008, 0x0000, 0x1000, 0x0100, 0x0380, 0x0000, + 0x0000, 0x0008, 0x0000, 0x1000, 0x0100, 0x0000, 0x0000, + 0x0000, 0x0008, 0x0000, 0x1000, 0x0100, 0x0000, 0x0000, + 0x0000, 0x0008, 0x0000, 0x3800, 0x0100, 0x0000, 0x0000, + 0x0000, 0x000F, 0xFFFF, 0xFFFF, 0xFF00, 0x0000, 0x0000 +}; + +struct Image picture_image = +{ + 0, 0, 100, 105, 3, &picture_data[0], 0x7, 0x0, NULL +}; + + + +__chip UWORD classact_data[5814] = +{ + /* Plane 0 */ + 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF80, + 0xC226, 0x0F04, 0xE2BB, 0xD1A6, 0xE113, 0x0784, 0xE2BB, 0xD1A6, 0xE113, 0x0782, 0x715D, 0xE8D3, 0x7089, 0x83C2, 0x715D, 0xE8D3, 0x7089, 0x83C1, 0x3800, + 0xE092, 0x6ACD, 0x91EB, 0x9993, 0x5049, 0x354D, 0x91EB, 0x9993, 0x5049, 0x3566, 0xC8F5, 0xCCC9, 0xA824, 0x9AA6, 0xC8F5, 0xCCC9, 0xA824, 0x9AB3, 0x6400, + 0xC70B, 0xED09, 0x0AD2, 0x1314, 0x2385, 0xF689, 0x0AD2, 0x1314, 0x2385, 0xF684, 0x8569, 0x098A, 0x11C2, 0xFB44, 0x8569, 0x098A, 0x11C2, 0xFB42, 0x4200, + 0xD667, 0x73C2, 0x4A49, 0x461F, 0xAB33, 0xB9C2, 0x4A49, 0x461F, 0xAB33, 0xB9E1, 0x2524, 0xA30F, 0xD599, 0xDCE1, 0x2524, 0xA30F, 0xD599, 0xDCF0, 0x9200, + 0xC6E8, 0x0A1A, 0x8556, 0x087E, 0x0374, 0x051A, 0x8556, 0x087E, 0x0374, 0x050D, 0x42AB, 0x043F, 0x01BA, 0x028D, 0x42AB, 0x043F, 0x01BA, 0x0286, 0xA100, + 0xD25A, 0x470A, 0xD394, 0xF4C1, 0xC92D, 0x238A, 0xD394, 0xF4C1, 0xC92D, 0x2385, 0x69CA, 0x7A60, 0xE496, 0x91C5, 0x69CA, 0x7A60, 0xE496, 0x91C2, 0xB400, + 0xD2ED, 0xF50B, 0x7F7D, 0x987C, 0xC976, 0xFA8B, 0x7F7D, 0x987C, 0xC976, 0xFA85, 0xBFBE, 0xCC3E, 0x64BB, 0x7D45, 0xBFBE, 0xCC3E, 0x64BB, 0x7D42, 0xDF00, + 0xC864, 0xFB2D, 0x1B42, 0x38FC, 0xC432, 0x7DAD, 0x1B42, 0x38FC, 0xC432, 0x7D96, 0x8DA1, 0x1C7E, 0x6219, 0x3ED6, 0x8DA1, 0x1C7E, 0x6219, 0x3ECB, 0x4600, + 0xF461, 0x7EC8, 0x6714, 0x5B95, 0xDA30, 0xBF48, 0x6714, 0x5B95, 0xDA30, 0xBF64, 0x338A, 0x2DCA, 0xED18, 0x5FA4, 0x338A, 0x2DCA, 0xED18, 0x5FB2, 0x1900, + 0xF4EA, 0x902C, 0x5D80, 0xB355, 0xBA75, 0x4824, 0x5D80, 0xB355, 0xBA75, 0x4816, 0x2EC0, 0x59AA, 0xDD3A, 0xA412, 0x2EC0, 0x59AA, 0xDD3A, 0xA40B, 0x1700, + 0xDCFE, 0x38F0, 0x4F33, 0x765F, 0x8E7F, 0x1C70, 0x4F33, 0x765F, 0x8E7F, 0x1C78, 0x2799, 0xBB2F, 0xC73F, 0x8E38, 0x2799, 0xBB2F, 0xC73F, 0x8E3C, 0x1300, + 0xECB1, 0xE217, 0x3E31, 0x8A02, 0xD658, 0xF117, 0x3E31, 0x8A02, 0xD658, 0xF10B, 0x9F18, 0xC501, 0x6B2C, 0x788B, 0x9F18, 0xC501, 0x6B2C, 0x7885, 0xCF00, + 0xCAD5, 0xFC1D, 0x7981, 0x5A67, 0xA56F, 0xFE1D, 0x7981, 0x5A67, 0xA56A, 0xFE0E, 0xBCC0, 0xAD33, 0xD2B5, 0x7F0E, 0xBCC0, 0xAD33, 0xD2B5, 0x7F07, 0x5E00, + 0xE0C3, 0x5316, 0x3FD1, 0xCF27, 0x30FF, 0xFF96, 0x3FD1, 0xCF27, 0x3061, 0xA98B, 0x1FE8, 0xE793, 0x9830, 0xD4CB, 0x1FE8, 0xE793, 0x9830, 0xD4C5, 0x8F00, + 0xD4C7, 0x2E12, 0x73F3, 0x5E4F, 0x0BFF, 0xFFF2, 0x73F3, 0x5E4F, 0x0A63, 0x9709, 0x39F9, 0xAFF7, 0x8531, 0xCB89, 0x39F9, 0xAF27, 0x8531, 0xCB84, 0x9C00, + 0xC00F, 0xAE24, 0xFD5A, 0xE719, 0xA7FF, 0xFFFC, 0x7D5A, 0xE719, 0xA007, 0xD712, 0x7EAD, 0x7FFC, 0xD003, 0xEB92, 0x3EAD, 0x738C, 0xD003, 0xEB89, 0x3F00, + 0xE8A6, 0xCA11, 0x7221, 0xF161, 0x7FFF, 0xFFFD, 0x7221, 0xF161, 0x7453, 0x6508, 0xB910, 0xFFF8, 0xBA29, 0xB288, 0xB910, 0xF8B0, 0xBA29, 0xB284, 0x5C00, + 0xF86A, 0x1E23, 0x20AA, 0x9900, 0x7FFF, 0xFFFF, 0x20AA, 0x9900, 0x7C35, 0x0F11, 0x9055, 0x4FF8, 0x3E1A, 0x8791, 0x9055, 0x4C80, 0x3E1A, 0x8788, 0xC800, + 0xF141, 0x2C04, 0x37DE, 0x5809, 0x7FFA, 0x8FFF, 0x37DE, 0x5809, 0x78A0, 0x9602, 0x1BEF, 0x3FFC, 0xBC50, 0x4B02, 0x1BEF, 0x2C04, 0xBC50, 0x4B01, 0x0D00, + 0xF9EE, 0xE8CA, 0xAEBE, 0x5A70, 0xFFC0, 0x23FF, 0xAEBE, 0x5A70, 0xBCF7, 0x7465, 0x575F, 0x3FFC, 0x5E7B, 0xBA25, 0x575F, 0x2D38, 0x5E7B, 0xBA32, 0xAB00, + 0xE954, 0xE81C, 0x0E66, 0xDAAC, 0xFF30, 0x777F, 0x8E66, 0xDAAC, 0x94AA, 0x740E, 0x0733, 0x7FFD, 0x4A55, 0x3A0E, 0x0733, 0x6D56, 0x4A55, 0x3A07, 0x0300, + 0xD8A7, 0x8029, 0x074A, 0x8BA6, 0xFE43, 0xC83F, 0xC74A, 0x8BA6, 0x8C53, 0xC014, 0x83A5, 0x7F7E, 0x4629, 0xE414, 0x83A5, 0x45D3, 0x4629, 0xE00A, 0x4100, + 0xDA1F, 0xDFE3, 0x27C4, 0xA98F, 0xFC0F, 0xEFFF, 0xE7C4, 0xA98F, 0x8D0F, 0xEFF1, 0x93E2, 0x7F7E, 0xC687, 0xF7F1, 0x93E2, 0x54C7, 0xC687, 0xF7F8, 0xC900, + 0xE635, 0x34FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x4D35, 0x9D00, + 0xD7F8, 0x64FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x1932, 0xFC00, + 0xC90A, 0xF77F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xBDCF, 0xB200, + 0xC768, 0x777F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x1DCC, 0xE200, + 0xE65D, 0xD77F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x75C0, 0xEF00, + 0xDEC7, 0xE4FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xF93B, 0x3F00, + 0xDDFE, 0x56FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x95BB, 0xB900, + 0xEE61, 0x667F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x5983, 0xFB00, + 0xE667, 0x74FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xDD36, 0x5400, + 0xE06D, 0xF97F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x7E49, 0xFD00, + 0xC11F, 0xA87F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xEA03, 0xFB00, + 0xF7F5, 0x41FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xC89F, 0x3A00, + 0xFD5C, 0x37FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x9001, 0xD400, + 0xCFD8, 0x8B7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x9806, 0x3800, + 0xEF5F, 0x31FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x221A, 0x7400, + 0xE5EC, 0xCBFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8C07, 0xF400, + 0xD71D, 0xF4FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x000E, 0x7600, + 0xFC9E, 0xF97F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x402F, 0xBD00, + 0xFF49, 0xF3FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x000C, 0xE000, + 0xC48E, 0xFBFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0011, 0x5900, + 0xF3F8, 0x7BFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0002, 0x8700, + 0xFBFD, 0xF57F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0082, 0x6E00, + 0xFEB3, 0x277F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0400, 0x7100, + 0xC7C6, 0x5B7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0800, 0x6F00, + 0xD0AB, 0x537F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x080C, 0x3F00, + 0xE29A, 0xE37F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0025, 0x7F00, + 0xDB19, 0x777F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0038, 0x8800, + 0xCF22, 0xF37F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0135, 0xA000, + 0xDA35, 0xF5FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x001C, 0x3B00, + 0xD915, 0xF27F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x007A, 0x7B00, + 0xDEF0, 0xA2FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x5046, 0xBF00, + 0xCDF4, 0x48FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x60D6, 0x0F00, + 0xF772, 0x90FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x40D0, 0x0D00, + 0xC763, 0x307F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x20F9, 0xEB00, + 0xE6CD, 0xD07F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0074, 0xA900, + 0xD699, 0xF2FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x004A, 0x9F00, + 0xE669, 0x2B7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x3022, 0x1200, + 0xCC23, 0x417F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x20BF, 0x4F00, + 0xD11A, 0x1A7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x6072, 0x8B00, + 0xFBAF, 0xF07F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x01BB, 0xEF00, + 0xC2C5, 0x11FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x211A, 0xEE00, + 0xC226, 0x0F7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x6821, 0x3800, + 0xE092, 0x6AFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x4053, 0x6400, + 0xC70B, 0xED7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0082, 0x4200, + 0xD667, 0x73FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0100, 0x9200, + 0xC6E8, 0x0A7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xB146, 0xA100, + 0xD25A, 0x477F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x2202, 0xB400, + 0xD2ED, 0xF57F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0282, 0xDF00, + 0xC864, 0xFB7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x410B, 0x4600, + 0xF461, 0x7EFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8052, 0x1900, + 0xF4EA, 0x907F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x118B, 0x1700, + 0xDCFE, 0x38FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x219C, 0x1300, + 0xECB1, 0xE27F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0505, 0xCF00, + 0xCAD5, 0xFC7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0027, 0x5E00, + 0xE0C3, 0x5316, 0x3820, 0x0080, 0x4202, 0x4060, 0x0020, 0x0080, 0x4202, 0x4070, 0x0010, 0x0040, 0x2101, 0x2030, 0x0010, 0x0040, 0x2101, 0x2025, 0x8F00, + 0xD4C7, 0x2E12, 0x7400, 0x0180, 0x4404, 0x40E4, 0x0400, 0x0180, 0x4404, 0x40F2, 0x0200, 0x00C0, 0x2202, 0x2072, 0x0200, 0x00C0, 0x2202, 0x2074, 0x9C00, + 0xC00F, 0xAE24, 0xF880, 0x0882, 0x0A20, 0x00C0, 0x8080, 0x0882, 0x0A20, 0x00E0, 0x0040, 0x0441, 0x0510, 0x0060, 0x4040, 0x0441, 0x0510, 0x0079, 0x3F00, + 0xE8A6, 0xCA11, 0x7110, 0x0892, 0x0824, 0x82C0, 0x8110, 0x0892, 0x0824, 0x82E0, 0x4088, 0x0449, 0x0412, 0x4160, 0x4088, 0x0449, 0x0412, 0x4164, 0x5C00, + 0xF86A, 0x1E23, 0x2240, 0x20E2, 0x0042, 0x80C0, 0xC240, 0x20E2, 0x0042, 0x80E0, 0x6120, 0x1071, 0x0021, 0x4060, 0x6120, 0x1071, 0x0021, 0x4068, 0xC800, + 0xF141, 0x2C04, 0x3000, 0x21C2, 0x0457, 0x01C3, 0x8000, 0x21C2, 0x0457, 0x01E1, 0xC000, 0x10E1, 0x022B, 0x80E1, 0xC000, 0x10E1, 0x022B, 0x80F1, 0x0D00, + 0xF9EE, 0xE8CA, 0xA900, 0x2182, 0x0000, 0x0385, 0x0100, 0x2182, 0x0000, 0x0382, 0x8080, 0x10C1, 0x0000, 0x01C2, 0x8080, 0x10C1, 0x0000, 0x01D2, 0xAB00, + 0xE954, 0xE81C, 0x0910, 0x2142, 0x0815, 0x0303, 0x0110, 0x2142, 0x0815, 0x0301, 0x8088, 0x10A1, 0x040A, 0x8181, 0x8088, 0x10A1, 0x040A, 0x8187, 0x0300, + 0xD8A7, 0x8029, 0x0424, 0x6040, 0x1028, 0x2606, 0x0824, 0x6040, 0x1028, 0x2603, 0x0412, 0x3020, 0x0814, 0x1303, 0x0412, 0x3020, 0x0814, 0x130A, 0x4100, + 0xDA1F, 0xDFE3, 0x2008, 0x5040, 0x1070, 0x000C, 0x1008, 0x5040, 0x1070, 0x0006, 0x0804, 0x2820, 0x0838, 0x0006, 0x0804, 0x2820, 0x0838, 0x0008, 0xC900, + 0xE635, 0x34D6, 0x7538, 0x4080, 0x0043, 0x190C, 0x7121, 0xA204, 0x0209, 0x0106, 0x0850, 0x1040, 0x0030, 0xC084, 0x1A90, 0x68C1, 0x48A8, 0x8895, 0x9D00, + 0xE635, 0x34AC, 0xED33, 0xA6ED, 0x2635, 0x34AC, 0xED33, 0xA6ED, 0x2635, 0x34D6, 0x7699, 0xD376, 0x931A, 0x9A56, 0x7699, 0xD376, 0x931A, 0x9A6B, 0x3B00, + 0xD7F8, 0x6497, 0xE2E3, 0x6FF7, 0x97F8, 0x6497, 0xE2E3, 0x6FF7, 0x97F8, 0x64CB, 0xF171, 0xB7FB, 0xCBFC, 0x324B, 0xF171, 0xB7FB, 0xCBFC, 0x3265, 0xF800, + 0xC90A, 0xF77D, 0x94FA, 0x057D, 0x090A, 0xF77D, 0x94FA, 0x057D, 0x090A, 0xF73E, 0xCA7D, 0x02BE, 0x8485, 0x7BBE, 0xCA7D, 0x02BE, 0x8485, 0x7B9F, 0x6500, + 0xC768, 0x7767, 0x117E, 0x37DA, 0x8768, 0x7767, 0x117E, 0x37DA, 0x8768, 0x7733, 0x88BF, 0x1BED, 0x43B4, 0x3BB3, 0x88BF, 0x1BED, 0x43B4, 0x3B99, 0xC400, + 0xE65D, 0xD707, 0x79F2, 0x71F6, 0xA65D, 0xD707, 0x79F2, 0x71F6, 0xA65D, 0xD703, 0xBCF9, 0x38FB, 0x532E, 0xEB83, 0xBCF9, 0x38FB, 0x532E, 0xEB81, 0xDE00, + 0xDEC7, 0xE4D9, 0xF965, 0x3BFF, 0x5EC7, 0xE4D9, 0xF965, 0x3BFF, 0x5EC7, 0xE4EC, 0xFCB2, 0x9DFF, 0xAF63, 0xF26C, 0xFCB2, 0x9DFF, 0xAF63, 0xF276, 0x7E00, + 0xDDFE, 0x56DD, 0xCBC2, 0xFD5A, 0xDDFE, 0x56DD, 0xCBC2, 0xFD5A, 0xDDFE, 0x56EE, 0xE5E1, 0x7EAD, 0x6EFF, 0x2B6E, 0xE5E1, 0x7EAD, 0x6EFF, 0x2B77, 0x7200, + 0xEE61, 0x661F, 0xDBEE, 0x9B7E, 0x2E61, 0x661F, 0xDBEE, 0x9B7E, 0x2E61, 0x660F, 0xEDF7, 0x4DBF, 0x1730, 0xB30F, 0xEDF7, 0x4DBF, 0x1730, 0xB307, 0xF600, + 0xE667, 0x74B2, 0xA31D, 0xF96A, 0xA667, 0x74B2, 0xA31D, 0xF96A, 0xA667, 0x74D9, 0x518E, 0xFCB5, 0x5333, 0xBA59, 0x518E, 0xFCB5, 0x5333, 0xBA6C, 0xA800, + 0xE06D, 0xF94F, 0xEBBD, 0xABC0, 0x606D, 0xF94F, 0xEBBD, 0xABC0, 0x606D, 0xF927, 0xF5DE, 0xD5E0, 0x3036, 0xFCA7, 0xF5DE, 0xD5E0, 0x3036, 0xFC93, 0xFA00, + 0xC11F, 0xA81F, 0xD9FB, 0xFB99, 0x811F, 0xA81F, 0xD9FB, 0xFB99, 0x811F, 0xA80F, 0xECFD, 0xFDCC, 0xC08F, 0xD40F, 0xECFD, 0xFDCC, 0xC08F, 0xD407, 0xF600, + 0xF7F5, 0x41F9, 0xD34F, 0x83BD, 0xB7F5, 0x41F9, 0xD34F, 0x83BD, 0xB7F5, 0x41FC, 0xE9A7, 0xC1DE, 0xDBFA, 0xA0FC, 0xE9A7, 0xC1DE, 0xDBFA, 0xA0FE, 0x7400, + 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0040, + 0x2881, 0xA0C3, 0x1100, 0x0611, 0x1440, 0xD043, 0x1100, 0x0611, 0x1440, 0xD061, 0x8880, 0x0308, 0x8A20, 0x6821, 0x8880, 0x0308, 0x8A20, 0x6830, 0xC4C0, + 0x1105, 0x0102, 0x0400, 0x0608, 0x8882, 0x8082, 0x0400, 0x0608, 0x8882, 0x8081, 0x0200, 0x0304, 0x4441, 0x4041, 0x0200, 0x0304, 0x4441, 0x4040, 0x81C0, + 0x2014, 0x0206, 0x3101, 0x0C03, 0x500A, 0x0106, 0x3101, 0x0C03, 0x500A, 0x0103, 0x1880, 0x8601, 0xA805, 0x0083, 0x1880, 0x8601, 0xA805, 0x0081, 0x8CC0, + 0x0010, 0x040C, 0x3082, 0x1800, 0x4008, 0x020C, 0x3082, 0x1800, 0x4008, 0x0206, 0x1841, 0x0C00, 0x2004, 0x0106, 0x1841, 0x0C00, 0x2004, 0x0103, 0x0CC0, + 0x1002, 0xC504, 0x7080, 0x7401, 0xC801, 0x6284, 0x7080, 0x7401, 0xC801, 0x6282, 0x3840, 0x3A00, 0xE400, 0xB142, 0x3840, 0x3A00, 0xE400, 0xB141, 0x1CC0, + 0x0400, 0x8804, 0x2000, 0x080A, 0x0200, 0x4404, 0x2000, 0x080A, 0x0200, 0x4402, 0x1000, 0x0405, 0x0100, 0x2202, 0x1000, 0x0405, 0x0100, 0x2201, 0x08C0, + 0x0C00, 0x0A04, 0x8000, 0x6102, 0x0600, 0x0504, 0x8000, 0x6102, 0x0600, 0x0502, 0x4000, 0x3081, 0x0300, 0x0282, 0x4000, 0x3081, 0x0300, 0x0281, 0x20C0, + 0x1409, 0x0402, 0xA030, 0xC200, 0x0A04, 0x8202, 0xA030, 0xC200, 0x0A04, 0x8201, 0x5018, 0x6100, 0x0502, 0x4101, 0x5018, 0x6100, 0x0502, 0x4100, 0xA8C0, + 0x080A, 0x0107, 0x0061, 0x8040, 0x0405, 0x0087, 0x0061, 0x8040, 0x0405, 0x0083, 0x8030, 0xC020, 0x0202, 0x8043, 0x8030, 0xC020, 0x0202, 0x8041, 0xC0C0, + 0x0804, 0x4603, 0x0061, 0x0080, 0x0402, 0x230B, 0x0061, 0x0080, 0x0402, 0x2301, 0x8030, 0x8040, 0x0201, 0x1185, 0x8030, 0x8040, 0x0201, 0x1180, 0xC0C0, + 0x2000, 0x860F, 0x1040, 0x0180, 0x3000, 0x430F, 0x1040, 0x0180, 0x3000, 0x4307, 0x8820, 0x00C0, 0x1800, 0x2187, 0x8820, 0x00C0, 0x1800, 0x2183, 0xC4C0, + 0x0044, 0x1428, 0x0080, 0x4190, 0x2022, 0x0A28, 0x0080, 0x4190, 0x2022, 0x0A14, 0x0040, 0x20C8, 0x1011, 0x0514, 0x0040, 0x20C8, 0x1011, 0x050A, 0x00C0, + 0x2000, 0x00E2, 0x0430, 0x8190, 0x5000, 0x0062, 0x0430, 0x8190, 0x5000, 0x0071, 0x0218, 0x40C8, 0x2800, 0x0031, 0x0218, 0x40C8, 0x2800, 0x0038, 0x81C0, + 0x0404, 0x80E0, 0x0020, 0x0080, 0x4200, 0x0060, 0x0020, 0x0080, 0x4202, 0x4070, 0x0010, 0x0040, 0x2101, 0x2030, 0x0010, 0x0040, 0x2101, 0x2038, 0x00C0, + 0x0808, 0x81E4, 0x0400, 0x0180, 0x4400, 0x0004, 0x0400, 0x0180, 0x4404, 0x40F2, 0x0200, 0x0000, 0x2202, 0x2072, 0x0200, 0x00C0, 0x2202, 0x2079, 0x01C0, + 0x1440, 0x01C0, 0x0080, 0x0882, 0x0800, 0x0000, 0x8080, 0x0882, 0x0A20, 0x00E0, 0x0040, 0x0001, 0x0510, 0x0060, 0x4040, 0x0441, 0x0510, 0x0070, 0x00C0, + 0x1049, 0x05C0, 0x8110, 0x0892, 0x0000, 0x0000, 0x8110, 0x0892, 0x0824, 0x82E0, 0x4088, 0x0001, 0x0412, 0x4160, 0x4088, 0x0449, 0x0412, 0x4170, 0x20C0, + 0x0085, 0x01C0, 0xC240, 0x20E2, 0x0000, 0x0000, 0xC240, 0x20E2, 0x0042, 0x80E0, 0x6120, 0x1001, 0x0021, 0x4060, 0x6120, 0x1071, 0x0021, 0x4070, 0x30C0, + 0x08AE, 0x03C3, 0x8000, 0x21C2, 0x0000, 0x0000, 0x8000, 0x21C2, 0x0457, 0x01E1, 0xC000, 0x0001, 0x022B, 0x80E1, 0xC000, 0x10E1, 0x022B, 0x80F0, 0xE0C0, + 0x0000, 0x0705, 0x0100, 0x2182, 0x0000, 0x0000, 0x0100, 0x2182, 0x0000, 0x0382, 0x8080, 0x0001, 0x0000, 0x01C2, 0x8080, 0x10C1, 0x0000, 0x01C1, 0x40C0, + 0x102A, 0x0603, 0x0110, 0x2142, 0x0001, 0x0000, 0x0110, 0x2142, 0x0815, 0x0301, 0x8088, 0x0000, 0x040A, 0x8181, 0x8088, 0x10A1, 0x040A, 0x8180, 0xC0C0, + 0x2050, 0x4C06, 0x0824, 0x6040, 0x0008, 0x2600, 0x0824, 0x6040, 0x1028, 0x2603, 0x0412, 0x0000, 0x0814, 0x1303, 0x0412, 0x3020, 0x0814, 0x1301, 0x82C0, + 0x20E0, 0x000C, 0x1008, 0x5040, 0x0030, 0x0000, 0x1008, 0x5040, 0x1070, 0x0006, 0x0804, 0x0000, 0x0838, 0x0006, 0x0804, 0x2820, 0x0838, 0x0003, 0x04C0, + 0x00C2, 0x027F, 0xFFFF, 0xFFFC, 0x02FF, 0xFFF0, 0x2FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xC080, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8082, 0x00C0, + 0x0006, 0x027F, 0xFFFF, 0xFFFC, 0x05FF, 0xFFF0, 0x1FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8140, 0x7FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8085, 0x01C0, + 0x1454, 0x007F, 0xFFFF, 0xFFFC, 0x0BFF, 0xFFF8, 0x0FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8080, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x01C0, + 0x1814, 0x807F, 0xFFFF, 0xFFF8, 0x05FF, 0xFFF8, 0x17FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8140, 0x7FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x2003, 0x05C0, + 0x1020, 0x207F, 0xFFFF, 0xFFF8, 0x0BFF, 0xFFFE, 0xAFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x02E0, 0x3FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0806, 0x00C0, + 0x0028, 0x027F, 0xFFFF, 0xFFF8, 0x17FF, 0xFFFF, 0x57FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0160, 0x7FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0084, 0x80C0, + 0x0001, 0x007F, 0xFFFF, 0xFFF8, 0x0FFF, 0xFFFF, 0xFFFF, 0xE3FF, 0xFFFF, 0xFFFF, 0xFFFF, 0x02E0, 0x3FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x4004, 0x02C0, + 0x0106, 0x107F, 0xFFFF, 0xFFF0, 0x17FF, 0xFFFF, 0xFFFF, 0x03FF, 0xFFFF, 0xFFFF, 0xFFFE, 0x05F0, 0x1FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x840C, 0x04C0, + 0x0100, 0x007F, 0xFFFF, 0xFFF0, 0x2FFF, 0xFFFF, 0xFFF8, 0x02FF, 0xFFFF, 0xFFFF, 0xFFFE, 0x02F0, 0x2FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0008, 0x88C0, + 0x0E82, 0x00FF, 0xFFFF, 0xFFF0, 0x17FF, 0xFFFF, 0xFFFF, 0x05FF, 0xFFFF, 0xFFFF, 0xFFFC, 0x05F0, 0x1FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8030, 0x00C0, + 0x0C80, 0x11FF, 0xFFFF, 0xFFF0, 0x2FFF, 0xFFFF, 0xFFFE, 0x0BFF, 0xFFFF, 0xFFFF, 0xFFFC, 0x0BF8, 0x0FFF, 0xFFFF, 0xFFFE, 0x7FFF, 0xFFFF, 0x0470, 0x00C0, + 0x0802, 0x327F, 0xFFFF, 0xFFF0, 0x1FFF, 0xFFFF, 0xFFFE, 0x05FF, 0xFFFF, 0xFFFF, 0xFFFC, 0x05F8, 0x17FF, 0xFFFF, 0xFFFC, 0x7FFF, 0xFFFF, 0x0400, 0x44C0, + 0x0002, 0x407F, 0xFFFF, 0xFFF0, 0x2FFF, 0xFFFF, 0xFFFC, 0x0BFF, 0xFFFF, 0xFFFF, 0xFFF8, 0x0BF8, 0x0FFF, 0xFFFF, 0xFFF0, 0xBFFF, 0xFFFF, 0x0002, 0x08C0, + 0x3002, 0x607F, 0xFFFF, 0xFFF0, 0x1FFF, 0xFFFF, 0xFFFC, 0x17FF, 0xFFFF, 0xFFFF, 0xFFF8, 0x17FC, 0x07FF, 0xFFFF, 0xFFF0, 0x5FFF, 0xFFFF, 0x0000, 0x44C0, + 0x1080, 0x887F, 0xFFFF, 0xFFF0, 0x2FFF, 0xFFFF, 0xFFF8, 0x2FFF, 0xFFFF, 0xFFFF, 0xFFF8, 0x0BFC, 0x0BFF, 0xFFFF, 0xFFC0, 0xBFFF, 0xFFFF, 0x0000, 0x88C0, + 0x1202, 0x307F, 0xFFFF, 0xFFF0, 0x1FFF, 0xFFFF, 0xFFF8, 0x17FF, 0xFFFF, 0xFFFF, 0xFFF0, 0x17FC, 0x07FF, 0xFFFF, 0xFF81, 0x7FFF, 0xFFFF, 0x0000, 0x00C0, + 0x0000, 0x007F, 0xFFFF, 0xFFF0, 0x2FFF, 0xFFFF, 0xFFF0, 0x2FC0, 0x3FF0, 0x33F8, 0x19F0, 0x2FFE, 0x03FF, 0xFFE0, 0x7E00, 0x3FFF, 0xFFFF, 0x0000, 0x80C0, + 0x0221, 0x00FF, 0xFFFF, 0xFFF0, 0x1FFF, 0xFFFF, 0xFFF0, 0x5F0E, 0x1FE3, 0x83F1, 0xC1F0, 0x0000, 0x05FF, 0xFF8E, 0x1C00, 0x3FFF, 0xFFFF, 0x0000, 0x00C0, + 0x0024, 0x007F, 0xFFFF, 0xFFF0, 0x0FFF, 0xFFF8, 0x1FE0, 0xBC3A, 0x0F8E, 0x86C6, 0x82E0, 0x0000, 0x03FF, 0xFC7A, 0x1F02, 0xAFFF, 0xFFFF, 0x0000, 0x0BC0, + 0x2260, 0x007F, 0xFFFF, 0xFFF8, 0x1FFF, 0xFFF8, 0x1FE0, 0x5816, 0x070D, 0xC585, 0x6160, 0x0000, 0x01FF, 0xF876, 0x0705, 0x5FFF, 0xFFFF, 0x0008, 0x86C0, + 0x0404, 0x007F, 0xFFFF, 0xFFF8, 0x0FFF, 0xFFF0, 0x0FC0, 0xB02C, 0x0E0B, 0x8B0B, 0xC2E0, 0x0000, 0x00FF, 0xF1BC, 0x0E0B, 0xFFFF, 0xFFFF, 0x0001, 0x18C0, + 0x0400, 0x027F, 0xFFFF, 0xFFF8, 0x07FF, 0xFFF0, 0x17C1, 0x705C, 0x1617, 0xC505, 0xE5C0, 0x0000, 0x01FF, 0xE15C, 0x1605, 0xFFFF, 0xFFFF, 0x0001, 0x11C0, + 0x0100, 0x107F, 0xFFFF, 0xFFF8, 0x0FFF, 0xFFF0, 0x2F82, 0xF0B8, 0x2C0F, 0xEA0B, 0xFBC0, 0x0000, 0x00FF, 0xC6FC, 0x2C0B, 0xFFFF, 0xFFFF, 0x0003, 0x0AC0, + 0x3020, 0x207F, 0xFFFF, 0xFFFC, 0x07FF, 0xFFE0, 0x1F81, 0x7D50, 0x1407, 0xF603, 0xFD80, 0x5555, 0x007F, 0x857F, 0x5417, 0xFFFF, 0xFFFF, 0x0007, 0x10C0, + 0x2140, 0x207F, 0xFFFF, 0xFFFC, 0x03FF, 0xFFE0, 0x2F02, 0xFE00, 0x2C03, 0xFE01, 0xFF80, 0xAAAA, 0x80FF, 0x0BFF, 0xB82F, 0xFFFF, 0xFFFF, 0x0003, 0x00C0, + 0x0140, 0x00FF, 0xFFFF, 0xFFFE, 0x01FF, 0xFFC0, 0x5F05, 0xFC00, 0x5E00, 0xFF00, 0x7F81, 0x7FFF, 0x807F, 0x05FF, 0xF817, 0xFFFF, 0xFFFF, 0x001A, 0x00C0, + 0x00C0, 0x00FF, 0xFFFF, 0xFFFE, 0x01FF, 0xFF80, 0xBE0B, 0xE0E0, 0xBE00, 0x7F00, 0x3F00, 0xBFFF, 0xC03E, 0x0BFF, 0xF02F, 0xFFFF, 0xFFFF, 0x0002, 0x10C0, + 0x0088, 0x04FF, 0xFFFF, 0xFFFF, 0x00FF, 0xFF00, 0x5E05, 0xC340, 0x5F80, 0x7FC0, 0x1F01, 0x7FFF, 0xC07E, 0x17FF, 0xF05F, 0xFFFF, 0xFFFF, 0x0002, 0x11C0, + 0x0180, 0x007F, 0xFFFF, 0xFFFF, 0x003F, 0xFC00, 0xBC0B, 0x0280, 0xBF80, 0x3FE0, 0x2F00, 0xFFFF, 0xC03C, 0x0FFC, 0xE0BF, 0xFFFF, 0xFFFF, 0x0002, 0x00C0, + 0x02A0, 0x01FF, 0xFFFF, 0xFFFF, 0x800F, 0xF001, 0x7C16, 0x05C1, 0x67F0, 0x53F0, 0x1E01, 0x7FFF, 0xE01E, 0x17F9, 0xE05F, 0xFFFF, 0xFFFF, 0x0004, 0x00C0, + 0x0105, 0x417F, 0xFFFF, 0xFFFF, 0xC000, 0x0002, 0xF82C, 0x0B82, 0xCFF0, 0xA7F8, 0x2E02, 0xFFFF, 0xE03C, 0x0FF3, 0x80BF, 0xFFFF, 0xFFFF, 0x0008, 0x00C0, + 0x2201, 0x837F, 0xFFFF, 0xFFFF, 0xE000, 0x0005, 0xF814, 0x1781, 0x45F0, 0x41F8, 0x5E01, 0xFFFF, 0xE01C, 0x07E7, 0x417F, 0xFFFF, 0xFFFF, 0x0008, 0x60C0, + 0x0081, 0x037F, 0xFFFF, 0xFFFF, 0xF000, 0x000B, 0xF028, 0x0C00, 0x83E0, 0x83F0, 0xBC02, 0xFFFF, 0xF00C, 0x070E, 0x809F, 0xFFFF, 0xFFFF, 0x0008, 0x40C0, + 0x3080, 0x83FF, 0xFFFF, 0xFFFF, 0xFC00, 0x0017, 0xF058, 0x0000, 0x81E1, 0x41F1, 0x5C05, 0xFFFF, 0xF01E, 0x001D, 0x803F, 0xFFFF, 0xFFFF, 0x0000, 0x00C0, + 0x1100, 0x01FF, 0xFFFF, 0xFFFF, 0xFE00, 0x00AF, 0xC038, 0x0203, 0x038A, 0x80C6, 0xBC03, 0xFFFF, 0xF00E, 0x006B, 0x80EF, 0xFFFF, 0xFFFF, 0x0001, 0x02C0, + 0x2100, 0x017F, 0xFFFF, 0xFFFF, 0xFF50, 0x055F, 0x001C, 0x0505, 0x303D, 0x901D, 0x7805, 0xFFFF, 0xF807, 0x8157, 0xC15F, 0xFFFF, 0xFFFF, 0x0001, 0x00C0, + 0x0100, 0xC0FF, 0xFFFF, 0xFFFF, 0xFFEA, 0xAABF, 0xFABE, 0xAAAA, 0xEAEB, 0xEAFB, 0xFFAB, 0xFFFF, 0xFEAF, 0xAABF, 0xEABF, 0xFFFF, 0xFFFF, 0x0019, 0x08C0, + 0x0248, 0x82FF, 0xFFFF, 0xFFFF, 0xFFFD, 0x55FF, 0xD557, 0x57D5, 0xDD5F, 0xF757, 0xFF57, 0xFFFF, 0xFF57, 0xF57F, 0xF57F, 0xFFFF, 0xFFFF, 0x0000, 0x10C0, + 0x0841, 0x81FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0008, 0x30C0, + 0x0040, 0x06FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x10C0, + 0x2000, 0x847F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x10C0, + 0x2881, 0xA0FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0010, 0xC4C0, + 0x1105, 0x017F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x81C0, + 0x2014, 0x027F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0001, 0x8CC0, + 0x0010, 0x047F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0003, 0x0CC0, + 0x1002, 0xC57F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0001, 0x1CC0, + 0x0400, 0x887F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0001, 0x08C0, + 0x0C00, 0x0A7F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0001, 0x20C0, + 0x1409, 0x047F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xA8C0, + 0x080A, 0x017F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0001, 0xC0C0, + 0x0804, 0x467F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xC0C0, + 0x2000, 0x867F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0003, 0xC4C0, + 0x0044, 0x147F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x000A, 0x00C0, + 0x2000, 0x00FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0018, 0x81C0, + 0x0404, 0x80E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0018, 0x00C0, + 0x0808, 0x81E4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0009, 0x01C0, + 0x1440, 0x01C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00C0, + 0x1049, 0x05C0, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x20C0, + 0x0085, 0x01C0, 0xC000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x30C0, + 0x08AE, 0x03C3, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xE0C0, + 0x0000, 0x0705, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x40C0, + 0x102A, 0x0603, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xC0C0, + 0x2050, 0x4C06, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x82C0, + 0x20E0, 0x000C, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0003, 0x04C0, + 0x00C2, 0x0208, 0x0000, 0x2000, 0x0020, 0x0000, 0x0000, 0x0080, 0x0060, 0x0000, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x0010, 0x0002, 0x00C0, + 0x00C2, 0x0210, 0x0200, 0x4100, 0x00C2, 0x0210, 0x0200, 0x4100, 0x00C2, 0x0208, 0x0100, 0x2080, 0x0061, 0x0108, 0x0100, 0x2080, 0x0061, 0x0104, 0x00C0, + 0x0006, 0x0228, 0x0C08, 0x8008, 0x0006, 0x0228, 0x0C08, 0x8008, 0x0006, 0x0214, 0x0604, 0x4004, 0x0003, 0x0114, 0x0604, 0x4004, 0x0003, 0x010A, 0x03C0, + 0x1454, 0x0000, 0x0801, 0x8800, 0x1454, 0x0000, 0x0801, 0x8800, 0x1454, 0x0000, 0x0400, 0xC400, 0x0A2A, 0x0000, 0x0400, 0xC400, 0x0A2A, 0x0000, 0x02C0, + 0x1814, 0x8018, 0x2881, 0x8820, 0x1814, 0x8018, 0x2881, 0x8820, 0x1814, 0x800C, 0x1440, 0xC410, 0x0C0A, 0x400C, 0x1440, 0xC410, 0x0C0A, 0x4006, 0x0AC0, + 0x1020, 0x2030, 0x0001, 0x0800, 0x1020, 0x2030, 0x0001, 0x0800, 0x1020, 0x2018, 0x0000, 0x8400, 0x0810, 0x1018, 0x0000, 0x8400, 0x0810, 0x100C, 0x00C0, + 0x0028, 0x0224, 0x0082, 0x8000, 0x8028, 0x0224, 0x0082, 0x8000, 0x8028, 0x0212, 0x0041, 0x4000, 0x4014, 0x0112, 0x0041, 0x4000, 0x4014, 0x0109, 0x00C0, + 0x0001, 0x0020, 0x1005, 0x0004, 0x0001, 0x0020, 0x1005, 0x0004, 0x0001, 0x0010, 0x0802, 0x8002, 0x0000, 0x8010, 0x0802, 0x8002, 0x0000, 0x8008, 0x04C0, + 0x0106, 0x1060, 0x2001, 0x2000, 0x8106, 0x1060, 0x2001, 0x2000, 0x8106, 0x1030, 0x1000, 0x9000, 0x4083, 0x0830, 0x1000, 0x9000, 0x4083, 0x0818, 0x08C0, + 0x0100, 0x0044, 0x4042, 0x0004, 0x0100, 0x0044, 0x4042, 0x0004, 0x0100, 0x0022, 0x2021, 0x0002, 0x0080, 0x0022, 0x2021, 0x0002, 0x0080, 0x0011, 0x10C0, + 0x0E82, 0x0080, 0x0002, 0x100C, 0x8E82, 0x0080, 0x0002, 0x100C, 0x8E82, 0x00C0, 0x0001, 0x0806, 0x4741, 0x0040, 0x0001, 0x0806, 0x4741, 0x0060, 0x00C0, + 0x0C80, 0x1180, 0x0004, 0x0004, 0x0C80, 0x1180, 0x0004, 0x0004, 0x0C80, 0x11C0, 0x0002, 0x0002, 0x0640, 0x08C0, 0x0002, 0x0002, 0x0640, 0x08E0, 0x00C0, + 0x0802, 0x3202, 0x2030, 0x3000, 0x0802, 0x3202, 0x2030, 0x3000, 0x0802, 0x3201, 0x1018, 0x1800, 0x0401, 0x1901, 0x1018, 0x1800, 0x0401, 0x1900, 0x88C0, + 0x7FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFC0, + /* Plane 2 */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1226, 0x0F04, 0xE2BB, 0xF1A6, 0xE913, 0x0784, 0xE2BB, 0xF1A6, 0xE913, 0x0782, 0x715D, 0xF8D3, 0x7489, 0x83C2, 0x715D, 0xF8D3, 0x7489, 0x83C1, 0x3800, + 0x2092, 0x6ACD, 0x91EB, 0xB993, 0x5049, 0x354D, 0x91EB, 0xB993, 0x5049, 0x3566, 0xC8F5, 0xDCC9, 0xA824, 0x9AA6, 0xC8F5, 0xDCC9, 0xA824, 0x9AB3, 0x6400, + 0x0F0B, 0xED09, 0x0AD2, 0x1314, 0x2785, 0xF689, 0x0AD2, 0x1314, 0x2785, 0xF684, 0x8569, 0x098A, 0x13C2, 0xFB44, 0x8569, 0x098A, 0x13C2, 0xFB42, 0x4200, + 0x3667, 0x73C2, 0x4A49, 0xC61F, 0xBB33, 0xB9C2, 0x4A49, 0xC61F, 0xBB33, 0xB9E1, 0x2524, 0xE30F, 0xDD99, 0xDCE1, 0x2524, 0xE30F, 0xDD99, 0xDCF0, 0x9200, + 0x26E8, 0x0A1A, 0x8556, 0x097E, 0x1374, 0x051A, 0x8556, 0x097E, 0x1374, 0x050D, 0x42AB, 0x04BF, 0x09BA, 0x028D, 0x42AB, 0x04BF, 0x09BA, 0x0286, 0xA100, + 0x125A, 0x470A, 0xD394, 0xF6C1, 0xC92D, 0x238A, 0xD394, 0xF6C1, 0xC92D, 0x2385, 0x69CA, 0x7B60, 0xE496, 0x91C5, 0x69CA, 0x7B60, 0xE496, 0x91C2, 0xB400, + 0x12ED, 0xF50B, 0x7F7D, 0x987C, 0xC976, 0xFA8B, 0x7F7D, 0x987C, 0xC976, 0xFA85, 0xBFBE, 0xCC3E, 0x64BB, 0x7D45, 0xBFBE, 0xCC3E, 0x64BB, 0x7D42, 0xDF00, + 0x0864, 0xFB2D, 0x1B46, 0x3CFC, 0xC432, 0x7DAD, 0x1B46, 0x3CFC, 0xC432, 0x7D96, 0x8DA3, 0x1E7E, 0x6219, 0x3ED6, 0x8DA3, 0x1E7E, 0x6219, 0x3ECB, 0x4600, + 0x3461, 0x7EC8, 0x671C, 0x5B95, 0xDA30, 0xBF48, 0x671C, 0x5B95, 0xDA30, 0xBF64, 0x338E, 0x2DCA, 0xED18, 0x5FA4, 0x338E, 0x2DCA, 0xED18, 0x5FB2, 0x1900, + 0x35EA, 0x902C, 0x5D84, 0xB355, 0xBAF5, 0x4824, 0x5D84, 0xB355, 0xBAF5, 0x4816, 0x2EC2, 0x59AA, 0xDD7A, 0xA412, 0x2EC2, 0x59AA, 0xDD7A, 0xA40B, 0x1700, + 0x1CFE, 0x38F0, 0x4F33, 0x765F, 0x8E7F, 0x1C70, 0x4F33, 0x765F, 0x8E7F, 0x1C78, 0x2799, 0xBB2F, 0xC73F, 0x8E38, 0x2799, 0xBB2F, 0xC73F, 0x8E3C, 0x1300, + 0x2CB9, 0xE217, 0xBE31, 0x8A02, 0xD65C, 0xF117, 0xBE31, 0x8A02, 0xD65C, 0xF10B, 0xDF18, 0xC501, 0x6B2E, 0x788B, 0xDF18, 0xC501, 0x6B2E, 0x7885, 0xEF00, + 0x0AD5, 0xFC1D, 0x7985, 0x5A67, 0xA560, 0x061D, 0x7985, 0x5A67, 0xA56A, 0xFE0E, 0xBCC2, 0xAD33, 0xD2B5, 0x7F0E, 0xBCC2, 0xAD33, 0xD2B5, 0x7F07, 0x5E00, + 0x22CB, 0x5316, 0x3FD5, 0xCF2F, 0x3100, 0x0016, 0x3FD5, 0xCF2F, 0x3165, 0xA98B, 0x1FEA, 0xE797, 0x98B2, 0xD4CB, 0x1FEA, 0xE797, 0x98B2, 0xD4C5, 0x8F00, + 0x14C7, 0x2E12, 0x73F3, 0x5E4F, 0x0800, 0x0012, 0x73F3, 0x5E4F, 0x0A63, 0x9709, 0x39F9, 0xA807, 0x8531, 0xCB89, 0x39F9, 0xAF27, 0x8531, 0xCB84, 0x9C00, + 0x000F, 0xAE25, 0xFD5A, 0xE719, 0xA000, 0x0005, 0x7D5A, 0xE719, 0xA007, 0xD712, 0xFEAD, 0x7004, 0xD003, 0xEB92, 0xBEAD, 0x738C, 0xD003, 0xEB89, 0x7F00, + 0x28A6, 0xCA11, 0x7221, 0xF161, 0x7000, 0x0001, 0x7221, 0xF161, 0x7453, 0x6508, 0xB910, 0xF004, 0xBA29, 0xB288, 0xB910, 0xF8B0, 0xBA29, 0xB284, 0x5C00, + 0x396A, 0x1E2B, 0x20AA, 0x9900, 0x6000, 0x0001, 0x20AA, 0x9900, 0x7CB5, 0x0F15, 0x9055, 0x4006, 0x3E5A, 0x8795, 0x9055, 0x4C80, 0x3E5A, 0x878A, 0xC800, + 0x3541, 0x2C0C, 0x37DE, 0x5809, 0x4002, 0xA000, 0x37DE, 0x5809, 0x7AA0, 0x9606, 0x1BEF, 0x2002, 0xBD50, 0x4B06, 0x1BEF, 0x2C04, 0xBD50, 0x4B03, 0x0D00, + 0x39EE, 0xE8EA, 0xBEBE, 0x5A70, 0x8014, 0xBA00, 0xBEBE, 0x5A70, 0xBCF7, 0x7475, 0x5F5F, 0x2002, 0x5E7B, 0xBA35, 0x5F5F, 0x2D38, 0x5E7B, 0xBA3A, 0xAF00, + 0x2954, 0xE81C, 0x0E66, 0xDAAC, 0x0032, 0x7700, 0x0E66, 0xDAAC, 0x94AA, 0x740E, 0x0733, 0x6001, 0x4A55, 0x3A0E, 0x0733, 0x6D56, 0x4A55, 0x3A07, 0x0300, + 0x18A7, 0xA029, 0x074A, 0x8BA6, 0x0053, 0xD840, 0x074A, 0x8BA6, 0x8C53, 0xD014, 0x83A5, 0x4080, 0x4629, 0xEC14, 0x83A5, 0x45D3, 0x4629, 0xE80A, 0x4100, + 0x1E1F, 0xDFE3, 0x27C4, 0xA98E, 0x024F, 0xEFE0, 0x27C4, 0xA98F, 0x8F0F, 0xEFF1, 0x93E2, 0x4080, 0xC787, 0xF7F1, 0x93E2, 0x54C7, 0xC787, 0xF7F8, 0xC900, + 0x2635, 0x3480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4D35, 0x9D00, + 0x17F8, 0x6480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1932, 0xFC00, + 0x090A, 0xF700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBDCF, 0xB200, + 0x0768, 0x7700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1DCC, 0xE200, + 0x265D, 0xDF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x77C0, 0xEF00, + 0x1EC7, 0xE480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF93B, 0x3F00, + 0x1DFE, 0x5680, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x95BB, 0xB900, + 0x2E61, 0x6600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5983, 0xFB00, + 0x2667, 0x7480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDD36, 0x5400, + 0x306D, 0xF900, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7E49, 0xFD00, + 0x011F, 0xA800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xEA03, 0xFB00, + 0x37F5, 0xC180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xEB9F, 0x3A00, + 0x3D5C, 0x3780, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF201, 0xD500, + 0x0FD8, 0x8B00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDD36, 0x3800, + 0x2F5F, 0x3180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x339A, 0x7400, + 0x25EC, 0xCB80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xCD07, 0xF400, + 0x171F, 0xF480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x82CE, 0x7600, + 0x3C9E, 0xF900, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41AF, 0xBD00, + 0x3F49, 0xF380, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x830C, 0xE000, + 0x048E, 0xFB80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4111, 0x5900, + 0x33F8, 0x7B80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xE106, 0xA700, + 0x3BFD, 0xF500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x82B2, 0x6E00, + 0x3EB3, 0x2700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3620, 0x7100, + 0x07C6, 0x5B00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6930, 0x6F00, + 0x10AB, 0x5300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2B3C, 0x3F00, + 0x229A, 0xE300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4725, 0x7F00, + 0x3B19, 0x7700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA238, 0x8800, + 0x0F22, 0xF300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4335, 0xA000, + 0x1A35, 0xF580, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x829C, 0x3B00, + 0x1915, 0xF200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x837A, 0x7B00, + 0x1EF2, 0xA280, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xD747, 0xBF00, + 0x0DF4, 0x4C80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xEDD6, 0x0F00, + 0x3772, 0x9080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5BD0, 0x0D00, + 0x0F63, 0x3000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x33F9, 0xEB00, + 0x2ECD, 0xD000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8BF4, 0xA900, + 0x1E99, 0xF680, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x834A, 0x9F00, + 0x2E69, 0x3B00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xB522, 0x1200, + 0x1C23, 0x4100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2FBF, 0x4F00, + 0x311A, 0x1A00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7972, 0x8B00, + 0x3BAF, 0xF000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03FB, 0xEF00, + 0x02C5, 0x1180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xBB9A, 0xEE00, + 0x1226, 0x0F00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7C21, 0x3800, + 0x2092, 0x6A80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6553, 0x6400, + 0x0F0B, 0xED00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x04B2, 0x4200, + 0x3667, 0x7380, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2300, 0x9200, + 0x26E8, 0x0A00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFD76, 0xA100, + 0x125A, 0x4700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6E32, 0xB400, + 0x12ED, 0xF500, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x82B2, 0xDF00, + 0x0864, 0xFB00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xC12B, 0x4600, + 0x3461, 0x7E80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA052, 0x1900, + 0x35EA, 0x9000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5BEB, 0x1700, + 0x1CFE, 0x3880, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x71DC, 0x1300, + 0x2CB9, 0xE200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8765, 0xEF00, + 0x0AD5, 0xFC00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x80E7, 0x5E00, + 0x22CB, 0x5316, 0x382E, 0x30D8, 0xCF9E, 0x5669, 0xC02E, 0x30D8, 0xCF9E, 0x5674, 0xE017, 0x186C, 0x67CF, 0x2B34, 0xE017, 0x186C, 0x67CF, 0x2B25, 0x8F00, + 0x14C7, 0x2E12, 0x740C, 0xA1B0, 0xF59C, 0x68ED, 0x8C0C, 0xA1B0, 0xF59C, 0x68F6, 0xC606, 0x50D8, 0x7ACE, 0x3476, 0xC606, 0x50D8, 0x7ACE, 0x3474, 0x9C00, + 0x000F, 0xAE25, 0xFAA5, 0x18E6, 0x5FF8, 0x28DB, 0x82A5, 0x18E6, 0x5FF8, 0x28ED, 0x8152, 0x8C73, 0x2FFC, 0x146D, 0xC152, 0x8C73, 0x2FFC, 0x1479, 0x7F00, + 0x28A6, 0xCA11, 0x71DE, 0x0E9E, 0x8BAC, 0x9AEE, 0x8DDE, 0x0E9E, 0x8BAC, 0x9AF7, 0x46EF, 0x074F, 0x45D6, 0x4D77, 0x46EF, 0x074F, 0x45D6, 0x4D64, 0x5C00, + 0x396A, 0x1E2B, 0x2355, 0x66FF, 0x83CA, 0xF0DC, 0xDF55, 0x66FF, 0x83CA, 0xF0EE, 0x6FAA, 0xB37F, 0xC1E5, 0x786E, 0x6FAA, 0xB37F, 0xC1E5, 0x786A, 0xC800, + 0x3541, 0x2C0C, 0x3021, 0xA7F6, 0x875F, 0x69FB, 0xC821, 0xA7F6, 0x875F, 0x69FD, 0xE410, 0xD3FB, 0x43AF, 0xB4FD, 0xE410, 0xD3FB, 0x43AF, 0xB4F3, 0x0D00, + 0x39EE, 0xE8EA, 0xB941, 0xA58F, 0x4308, 0x8BB5, 0x5141, 0xA58F, 0x4308, 0x8B9A, 0xA8A0, 0xD2C7, 0xA184, 0x45DA, 0xA8A0, 0xD2C7, 0xA184, 0x45DA, 0xAF00, + 0x2954, 0xE81C, 0x0999, 0x2553, 0x6B55, 0x8BE3, 0xF199, 0x2553, 0x6B55, 0x8BF1, 0xF8CC, 0x92A9, 0xB5AA, 0xC5F1, 0xF8CC, 0x92A9, 0xB5AA, 0xC5F7, 0x0300, + 0x18A7, 0xA029, 0x04B5, 0x7459, 0x73AC, 0x37D6, 0xF8B5, 0x7459, 0x73AC, 0x3FEB, 0x7C5A, 0xBA2C, 0xB9D6, 0x1BEB, 0x7C5A, 0xBA2C, 0xB9D6, 0x1FFA, 0x4100, + 0x1E1F, 0xDFE3, 0x203B, 0x5670, 0x72F0, 0x101C, 0xD83B, 0x5670, 0x72F0, 0x100E, 0x6C1D, 0xAB38, 0x3978, 0x080E, 0x6C1D, 0xAB38, 0x3978, 0x0808, 0xC900, + 0x2635, 0x34D6, 0x753E, 0x4C81, 0x20C7, 0x1DAD, 0x7127, 0xAE05, 0x4E0D, 0x6596, 0xCC73, 0x1444, 0xB670, 0xF2D4, 0xDA93, 0x6EC5, 0x7EE8, 0xBAD5, 0x9D00, + 0x2635, 0x34AC, 0xED33, 0xB6ED, 0x2635, 0x34AC, 0xED33, 0xB6ED, 0x2635, 0x34D6, 0x7699, 0xDB76, 0x931A, 0x9A56, 0x7699, 0xDB76, 0x931A, 0x9A6B, 0x3B00, + 0x17F8, 0x6497, 0xE2E3, 0x6FF7, 0x97F8, 0x6497, 0xE2E3, 0x6FF7, 0x97F8, 0x64CB, 0xF171, 0xB7FB, 0xCBFC, 0x324B, 0xF171, 0xB7FB, 0xCBFC, 0x3265, 0xF800, + 0x090A, 0xF77D, 0x94FA, 0x057D, 0x090A, 0xF77D, 0x94FA, 0x057D, 0x090A, 0xF73E, 0xCA7D, 0x02BE, 0x8485, 0x7BBE, 0xCA7D, 0x02BE, 0x8485, 0x7B9F, 0x6500, + 0x0768, 0x7767, 0x117E, 0x37DA, 0x8768, 0x7767, 0x117E, 0x37DA, 0x8768, 0x7733, 0x88BF, 0x1BED, 0x43B4, 0x3BB3, 0x88BF, 0x1BED, 0x43B4, 0x3B99, 0xC400, + 0x265D, 0xDF07, 0x79F2, 0x71F6, 0xA65D, 0xDF07, 0x79F2, 0x71F6, 0xA65D, 0xDF03, 0xBCF9, 0x38FB, 0x532E, 0xEF83, 0xBCF9, 0x38FB, 0x532E, 0xEF81, 0xDE00, + 0x1EC7, 0xE4D9, 0xF965, 0x3BFF, 0x5EC7, 0xE4D9, 0xF965, 0x3BFF, 0x5EC7, 0xE4EC, 0xFCB2, 0x9DFF, 0xAF63, 0xF26C, 0xFCB2, 0x9DFF, 0xAF63, 0xF276, 0x7E00, + 0x1DFE, 0x56DD, 0xCBC2, 0xFD5A, 0xDDFE, 0x56DD, 0xCBC2, 0xFD5A, 0xDDFE, 0x56EE, 0xE5E1, 0x7EAD, 0x6EFF, 0x2B6E, 0xE5E1, 0x7EAD, 0x6EFF, 0x2B77, 0x7200, + 0x2E61, 0x661F, 0xDBEE, 0x9B7E, 0x2E61, 0x661F, 0xDBEE, 0x9B7E, 0x2E61, 0x660F, 0xEDF7, 0x4DBF, 0x1730, 0xB30F, 0xEDF7, 0x4DBF, 0x1730, 0xB307, 0xF600, + 0x2667, 0x74B2, 0xA31D, 0xF96A, 0xA667, 0x74B2, 0xA31D, 0xF96A, 0xA667, 0x74D9, 0x518E, 0xFCB5, 0x5333, 0xBA59, 0x518E, 0xFCB5, 0x5333, 0xBA6C, 0xA800, + 0x306D, 0xF94F, 0xEBBD, 0xAFC0, 0x706D, 0xF94F, 0xEBBD, 0xAFC0, 0x706D, 0xF927, 0xF5DE, 0xD7E0, 0x3836, 0xFCA7, 0xF5DE, 0xD7E0, 0x3836, 0xFC93, 0xFA00, + 0x011F, 0xA81F, 0xD9FB, 0xFB99, 0x811F, 0xA81F, 0xD9FB, 0xFB99, 0x811F, 0xA80F, 0xECFD, 0xFDCC, 0xC08F, 0xD40F, 0xECFD, 0xFDCC, 0xC08F, 0xD407, 0xF600, + 0x37F5, 0xC1F9, 0xD34F, 0x83BD, 0xB7F5, 0xC1F9, 0xD34F, 0x83BD, 0xB7F5, 0xC1FC, 0xE9A7, 0xC1DE, 0xDBFA, 0xE0FC, 0xE9A7, 0xC1DE, 0xDBFA, 0xE0FE, 0x7400, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + +struct Image classact_image = +{ + 0, 0, 298, 102, 3, &classact_data[0], 0x7, 0x0, NULL +}; + +__chip UWORD sb_data[][64] = +{ + /* Cut + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0e01, 0xc000, 0x1107, 0x8000, + 0x191e, 0x0000, 0x0f78, 0x0000, + 0x01e0, 0x0000, 0x0f78, 0x0000, + 0x191e, 0x0000, 0x1107, 0x8000, + 0x0e01, 0xc000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Copy + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x01fe, 0x0000, 0x0186, 0x0000, + 0x01fe, 0x0000, 0x0630, 0x8000, + 0x1fff, 0xe000, 0x1f87, 0xe000, + 0x1f03, 0xe000, 0x1f03, 0xe000, + 0x1f03, 0xe000, 0x1f87, 0xe000, + 0x1fff, 0xe000, 0x1fff, 0xe000, + 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0078, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0060, 0x0000, 0x0044, 0x0000, + 0x0004, 0x0000, 0x0018, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Paste + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x003f, 0x0000, + 0x0021, 0x0000, 0x007f, 0x8000, + 0x0080, 0x4000, 0x0081, 0xc000, + 0x0780, 0x4000, 0x0861, 0xc000, + 0x0f20, 0x4000, 0x0891, 0xc000, + 0x0950, 0x4000, 0x0251, 0xc000, + 0x05e0, 0x4000, 0x0880, 0xc000, + 0x307f, 0x8000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0006, 0x0000, 0x0000, 0x0000, + 0x0007, 0x0000, 0x0002, 0x0000, + 0x0002, 0x0000, 0x0782, 0x0000, + 0x00c2, 0x0000, 0x0062, 0x0000, + 0x0222, 0x0000, 0x0422, 0x0000, + 0x0802, 0x0000, 0x1002, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Erase + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x002e, 0xb800, + 0x005d, 0x7800, 0x00ba, 0xf800, + 0x01f5, 0xf000, 0x03eb, 0xe000, + 0x05f7, 0xc000, 0x08ff, 0x8000, + 0x107f, 0x0000, 0x103e, 0x0000, + 0x101c, 0x0000, 0x0828, 0x0000, + 0x0450, 0x0000, 0x02a0, 0x0000, + 0x01ff, 0xf800, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x001a, 0xa800, + 0x0035, 0x5000, 0x006a, 0xa000, + 0x0015, 0x4000, 0x000a, 0x8000, + 0x0205, 0x0000, 0x0502, 0x0000, + 0x0a80, 0x0000, 0x0540, 0x0000, + 0x0aa0, 0x0000, 0x0540, 0x0000, + 0x0280, 0x0000, 0x0100, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Mail + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0800, 0xd000, + 0x0094, 0xd000, 0x0000, 0x1000, + 0x0060, 0x1000, 0x0000, 0x1000, + 0x00d0, 0x1000, 0x0000, 0x1000, + 0x1fff, 0xf000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0018, 0x0000, 0x007c, 0x0000, + 0x01ca, 0x0000, 0x0515, 0x0000, + 0x3fff, 0xe000, 0x2bff, 0xe000, + 0x3e97, 0xe000, 0x3fff, 0xe000, + 0x3f6f, 0xe000, 0x3fff, 0xe000, + 0x3fd7, 0xe000, 0x3fff, 0xe000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Time + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0070, 0x0000, + 0x0376, 0x0000, 0x06db, 0x0000, + 0x0505, 0x0000, 0x0262, 0x0000, + 0x0421, 0x0000, 0x0421, 0x0000, + 0x0439, 0x0000, 0x0401, 0x0000, + 0x0401, 0x0000, 0x0202, 0x0000, + 0x0104, 0x0000, 0x01fc, 0x0000, + 0x0306, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0020, 0x0000, + 0x0000, 0x0000, 0x0098, 0x0000, + 0x01dc, 0x0000, 0x01dc, 0x0000, + 0x01c4, 0x0000, 0x01fc, 0x0000, + 0x01fc, 0x0000, 0x00f8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Date + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x037b, 0x0000, + 0x0285, 0x8000, 0x0201, 0x8000, + 0x0201, 0x8000, 0x0299, 0x8000, + 0x02a7, 0x8000, 0x052b, 0x8000, + 0x0535, 0x8000, 0x080d, 0x8000, + 0x1ff5, 0x8000, 0x0205, 0x8000, + 0x0201, 0x8000, 0x03ff, 0x8000, + 0x01ff, 0x8000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x017a, 0x0000, 0x01fe, 0x0000, + 0x01fe, 0x0000, 0x0166, 0x0000, + 0x0158, 0x0000, 0x02d4, 0x0000, + 0x02c8, 0x0000, 0x07f2, 0x0000, + 0x0000, 0x0000, 0x00aa, 0x0000, + 0x0154, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Disk + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0038, 0x0000, + 0x0054, 0x0000, 0x008e, 0x0000, + 0x0107, 0x0000, 0x0207, 0x8000, + 0x040b, 0xc000, 0x0417, 0xe000, + 0x0e29, 0xe000, 0x0750, 0xc000, + 0x03a0, 0x8000, 0x01d9, 0x8000, + 0x00eb, 0x0000, 0x0076, 0x0000, + 0x003c, 0x0000, 0x0010, 0x0000, + /* Plane 1 */ + 0x0020, 0x0000, 0x0070, 0x0000, + 0x00c0, 0x0000, 0x01a4, 0x0000, + 0x0352, 0x0000, 0x06ab, 0x0000, + 0x0d53, 0x8000, 0x12a1, 0xc000, + 0x1d46, 0xc000, 0x0e89, 0x0000, + 0x0710, 0x0000, 0x03ac, 0x8000, + 0x01d1, 0x0000, 0x00e2, 0x0000, + 0x0074, 0x0000, 0x0000, 0x0000 + }, + /* Spray Paint + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0186, 0xc000, + 0x01bf, 0x0000, 0x07ec, 0xc000, + 0x0423, 0x0000, 0x0ff0, 0xc000, + 0x1008, 0x0000, 0x1078, 0x0000, + 0x1078, 0x0000, 0x1078, 0x0000, + 0x1078, 0x0000, 0x1078, 0x0000, + 0x1008, 0x0000, 0x1038, 0x0000, + 0x1008, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0006, 0xc000, + 0x003f, 0x0000, 0x000c, 0xc000, + 0x0243, 0x0000, 0x0000, 0xc000, + 0x02e0, 0x0000, 0x0440, 0x0000, + 0x0470, 0x0000, 0x0440, 0x0000, + 0x0470, 0x0000, 0x0440, 0x0000, + 0x0440, 0x0000, 0x0440, 0x0000, + 0x0440, 0x0000, 0x0000, 0x0000 + }, + /* Print + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x03fe, 0x0000, + 0x0205, 0x0000, 0x02a7, 0x0000, + 0x0201, 0x0000, 0x02d5, 0x0000, + 0x0201, 0x0000, 0x0601, 0x8000, + 0x1fff, 0xe000, 0x2000, 0x1000, + 0x2803, 0xd000, 0x2000, 0x1000, + 0x3fff, 0xf000, 0x1fff, 0xe000, + 0x0fff, 0xc000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x01fa, 0x0000, 0x0118, 0x0000, + 0x01fe, 0x0000, 0x0102, 0x0000, + 0x01fe, 0x0000, 0x01fe, 0x0000, + 0x0000, 0x0000, 0x1555, 0x4000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + } +}; + +/* Image structures for above data. + */ +struct Image sb_images[] = +{ + { 0, 0, 22, 16, 2, sb_data[0], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[1], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[2], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[3], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[4], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[5], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[6], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[7], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[8], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[9], 0x03, 0x00, NULL }, +}; + +/* Custom show/hide images. + */ +__chip UWORD hide_data[28] = +{ + /* Plane 0 */ + 0x0000, 0xC000, 0xC000, 0xC002, + 0xC203, 0xC203, 0xC203, 0xC203, + 0x6203, 0x3203, 0x1A03, 0x0FFF, + 0x0FFF, 0x0600, + /* Plane 1 */ + 0x2000, 0x7000, 0x781C, 0x6CFE, + 0x77F6, 0x7FDE, 0x6F76, 0x77DE, + 0x3F72, 0x1FCE, 0x0FBE, 0x07FE, + 0x0600, 0x0000 +}; + +struct Image hide_image = +{ + 0,0, 16,14, 2, &hide_data[0], 0x3,0x0, NULL +}; + +__chip UWORD show_data[28] = +{ + /* Plane 0 */ + 0x0180, 0x07C0, 0x1FE0, 0x7F70, + 0xFF78, 0xBF7C, 0xDF7E, 0x6C7F, + 0x37FC, 0x1BF1, 0x0DC6, 0x0618, + 0x0260, 0x0180, + /* Plane 1 */ + 0x0000, 0x0180, 0x07C0, 0x1FE0, + 0x7F70, 0x3FF8, 0x5F7C, 0x2EFC, + 0x17F2, 0x0BCE, 0x0538, 0x02E0, + 0x0080, 0x0000 +}; + +struct Image show_image = +{ + 0,0, 16,14, 2, &show_data[0], 0x3,0x0, NULL +}; + +__chip UWORD leaf_data[28] = +{ + /* Plane 0 */ + 0xFF00, 0x8180, 0x8140, 0x8120, + 0x81F0, 0x8030, 0x8030, 0x8030, + 0x8030, 0x8030, 0x8030, 0x8030, + 0xFFF0, 0x7FF0, + /* Plane 1 */ + 0x0000, 0x7E00, 0x7E80, 0x7EC0, + 0x7E00, 0x7FC0, 0x7FC0, 0x7FC0, + 0x7FC0, 0x7FC0, 0x7FC0, 0x7FC0, + 0x0000, 0x0000 +}; + +struct Image leaf_image = +{ + 0,0, 12,14, 2, &leaf_data[0], 0x3,0x0, NULL +}; + diff --git a/Demo/Images.c.info b/Demo/Images.c.info new file mode 100644 index 0000000..2f77346 Binary files /dev/null and b/Demo/Images.c.info differ diff --git a/Demo/Images.o b/Demo/Images.o new file mode 100644 index 0000000..e6ccd1b Binary files /dev/null and b/Demo/Images.o differ diff --git a/Demo/SCOPTIONS b/Demo/SCOPTIONS new file mode 100644 index 0000000..3833cc5 --- /dev/null +++ b/Demo/SCOPTIONS @@ -0,0 +1,11 @@ +NOSTACKCHECK +NOSTACKEXTEND +ERRORREXX +SAVEDS +SMALLCODE +SMALLDATA +NOERRORCONSOLE +MEMORYSIZE=HUGE +OPTIMIZERTIME +LIBRARY=lib:classact.lib +LIBRARY=lib:debug.lib diff --git a/Demo/SMakeFile b/Demo/SMakeFile new file mode 100644 index 0000000..b19362e --- /dev/null +++ b/Demo/SMakeFile @@ -0,0 +1,16 @@ +# +# Makefile automatically generated by MKMK V6.55 +# Sat Aug 19 12:47:39 1995 +# + +OBJS= ClassActDemo.o Images.o + +SBGen: $(OBJS) + sc link to ClassActDemo with << +$(OBJS) +< + +ClassActDemo.o: ClassActDemo.c + +Images.o: Images.c + diff --git a/Demo/SMakeFile.info b/Demo/SMakeFile.info new file mode 100644 index 0000000..af021ab Binary files /dev/null and b/Demo/SMakeFile.info differ diff --git a/Examples.info b/Examples.info new file mode 100644 index 0000000..e7b7793 Binary files /dev/null and b/Examples.info differ diff --git a/Examples/ARexx.info b/Examples/ARexx.info new file mode 100644 index 0000000..54e3b05 Binary files /dev/null and b/Examples/ARexx.info differ diff --git a/Examples/ARexx/ARexxExample b/Examples/ARexx/ARexxExample new file mode 100644 index 0000000..42d3556 Binary files /dev/null and b/Examples/ARexx/ARexxExample differ diff --git a/Examples/ARexx/ARexxExample.c b/Examples/ARexx/ARexxExample.c new file mode 100644 index 0000000..a0db268 --- /dev/null +++ b/Examples/ARexx/ARexxExample.c @@ -0,0 +1,292 @@ +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef _DCC +#define SAVEDS __geta4 +#define ASM +#define REG_A0 __A0 +#define REG_A1 __A1 +#else +#define SAVEDS __saveds +#define ASM __asm +#define REG_A0 register __a0 +#define REG_A1 register __a1 +#endif + +#ifdef _DCC +extern __stkargs ULONG HookEntry(); +#else +extern __stdargs ULONG HookEntry(); +#endif + +/* Gadget IDs. + */ +#define GAD_QUIT 1 + +/* ARexx command IDs. + */ +enum { REXX_NAME, REXX_VERSION, REXX_AUTHOR, REXX_SEND, REXX_DATE }; + + +/* Protos for the reply hook and ARexx command functions. + */ +VOID SAVEDS reply_callback(struct Hook *, Object *, struct RexxMsg *); +VOID ASM rexx_Name(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_Version(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_Author(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_Send(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_Date(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); + +/* Buffer for the system date. + */ +UBYTE systemDate[32]; + +/* Our reply hook function. + */ +struct Hook reply_hook; + +/* The following commands are valid for this demo. + */ +struct ARexxCmd Commands[] = +{ + { "NAME", REXX_NAME, rexx_Name, NULL, NULL, }, + { "VERSION", REXX_VERSION, rexx_Version, NULL, NULL, }, + { "AUTHOR", REXX_AUTHOR, rexx_Author, NULL, NULL, }, + { "SEND", REXX_SEND, rexx_Send, "TEXT/F", NULL, }, + { "DATE", REXX_DATE, rexx_Date, "SYSTEM/S", NULL, }, + { NULL, NULL, NULL, NULL, NULL, } +}; + + +/* Starting point. + */ +int main(int argc, char *argv[]) +{ + Object *arexx_obj; + + if (!ButtonBase) return(20); + + /* Create host object. + */ + if (arexx_obj = ARexxObject, + AREXX_HostName, "AREXXDEMO", + AREXX_Commands, Commands, + AREXX_NoSlot, TRUE, + AREXX_ReplyHook, &reply_hook, + End) + { + Object *win_obj; + + /* Create the window object. + */ + if (win_obj = WindowObject, + WA_Title, "ClassAct arexx.class Demo", + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_DepthGadget, TRUE, + WINDOW_ParentGroup, LayoutObject, + LAYOUT_AddChild, ButtonObject, + GA_Text, "_Quit", + GA_ID, GAD_QUIT, + GA_RelVerify, TRUE, + ButtonEnd, + LayoutEnd, + EndWindow) + { + struct Window *window; + + /* try to open the window. + */ + if (window = (struct Window *)CA_OpenWindow(win_obj)) + { + ULONG wnsig = 0, rxsig = 0, signal, result, Code; + BOOL running = TRUE; + + /* Setup the reply callback hook. + */ + reply_hook.h_Entry = HookEntry; + reply_hook.h_SubEntry = reply_callback; + reply_hook.h_Data = NULL; + + /* Try to start the macro "Demo.rexx". Note that the + * current directory and REXX: will be searched for this + * macro. Our reply hook will get the results of our + * efforts to start this macro. To be totally robust, we + * should have also passed pointers for the various result + * variables. + */ + DoMethod(arexx_obj, AM_EXECUTE, "Demo.rexx", NULL, NULL, NULL, NULL, NULL); + + /* Obtain wait masks. + */ + GetAttr(WINDOW_SigMask, win_obj, &wnsig); + GetAttr(AREXX_SigMask, arexx_obj, &rxsig); + + /* Event loop... + */ + do + { + signal = Wait(wnsig | rxsig | SIGBREAKF_CTRL_C); + + /* ARexx event? + */ + if (signal & rxsig) + CA_HandleRexx(arexx_obj); + + /* Window event? + */ + if (signal & wnsig) + { + while ((result = CA_HandleInput(win_obj, &Code)) != WMHI_LASTMSG) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + running = FALSE; + break; + + case WMHI_GADGETUP: + switch(result & WMHI_GADGETMASK) + { + case GAD_QUIT: + running = FALSE; + break; + } + break; + + default: + break; + } + } + } + + if (signal & SIGBREAKF_CTRL_C) + { + running = FALSE; + } + } + while (running); + } + else + puts ("Could not open the window"); + DisposeObject(win_obj); + } + else + puts("Could not create the window object"); + DisposeObject(arexx_obj); + } + else + puts("Could not create the ARexx host."); + + return(0); +} + +#ifdef _DCC +int wbmain(struct WBStartup *wbs) +{ + return(main(0, NULL)); +} +#endif + + +/* Note the use of SAVEDS, it is required for the callback + * ARexx command functions if access the global data such as + * systemData[] made in the callback. + */ + +/* This function gets called whenever we get an ARexx reply. In this example, + * we will see a reply come back from the REXX server when it has finished + * attempting to start the Demo.rexx macro. + */ +VOID SAVEDS reply_callback(struct Hook *hook, Object *o, struct RexxMsg *rxm) +{ + Printf("Args[0]: %s\nResult1: %ld Result2: %ld\n", + rxm->rm_Args[0], rxm->rm_Result1, rxm->rm_Result2); +} + +/* NAME + */ +VOID SAVEDS ASM rexx_Name(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + /* return the program name. + */ + ac->ac_Result = "ARexxTest"; +} + +/* VERSION + */ +VOID SAVEDS ASM rexx_Version(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + /* return the program version. + */ + ac->ac_Result = "1.0"; +} + +/* AUTHOR + */ +VOID SAVEDS ASM rexx_Author(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + /* return the authors name. + */ + ac->ac_Result = "Phantom Development LLC"; +} + +/* SEND + */ +VOID SAVEDS ASM rexx_Send(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + /* Print some text + */ + if (ac->ac_ArgList[0]) + Printf("%s\n", (STRPTR)ac->ac_ArgList[0]); +} + +/* DATE + */ +VOID SAVEDS ASM rexx_Date(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + struct DateTime dt; + + /* SYSTEM switch specified? + */ + if (!ac->ac_ArgList[0]) + { + /* return the compilation date. + */ + ac->ac_Result = "11-10-95"; + } + else + { + /* compute system date and store in systemDate buffer + */ + DateStamp((struct DateStamp *)&dt); + + dt.dat_Format = FORMAT_USA; + dt.dat_Flags = 0; + dt.dat_StrDay = NULL; + dt.dat_StrDate = systemDate; + dt.dat_StrTime = NULL; + + DateToStr(&dt); + + /* return system date + */ + ac->ac_Result = systemDate; + } +} + diff --git a/Examples/ARexx/ARexxExample.c.info b/Examples/ARexx/ARexxExample.c.info new file mode 100644 index 0000000..693c7e7 Binary files /dev/null and b/Examples/ARexx/ARexxExample.c.info differ diff --git a/Examples/ARexx/ARexxExample.info b/Examples/ARexx/ARexxExample.info new file mode 100644 index 0000000..c9ba801 Binary files /dev/null and b/Examples/ARexx/ARexxExample.info differ diff --git a/Examples/ARexx/rx_me_demo.rexx b/Examples/ARexx/rx_me_demo.rexx new file mode 100644 index 0000000..88025d5 --- /dev/null +++ b/Examples/ARexx/rx_me_demo.rexx @@ -0,0 +1,25 @@ +/* Small script for the small arexxclass demo */ + +options results + +address AREXXDEMO + +NAME + +say 'Program name : ' RESULT + +VERSION + +say 'Program version : ' RESULT + +AUTHOR + +say 'Program author : ' RESULT + +DATE + +say 'Program compilation date: ' RESULT + +'DATE SYSTEM' + +say 'Current system date : ' RESULT diff --git a/Examples/ARexx/rx_me_demo.rexx.info b/Examples/ARexx/rx_me_demo.rexx.info new file mode 100644 index 0000000..96c7c3a Binary files /dev/null and b/Examples/ARexx/rx_me_demo.rexx.info differ diff --git a/Examples/BackFill.info b/Examples/BackFill.info new file mode 100644 index 0000000..b005639 Binary files /dev/null and b/Examples/BackFill.info differ diff --git a/Examples/BackFill/BackFill.Brush b/Examples/BackFill/BackFill.Brush new file mode 100644 index 0000000..959d8ab Binary files /dev/null and b/Examples/BackFill/BackFill.Brush differ diff --git a/Examples/BackFill/BackFill.Brush.info b/Examples/BackFill/BackFill.Brush.info new file mode 100644 index 0000000..02ebcf6 Binary files /dev/null and b/Examples/BackFill/BackFill.Brush.info differ diff --git a/Examples/BackFill/BackFillExample b/Examples/BackFill/BackFillExample new file mode 100644 index 0000000..fc068cc Binary files /dev/null and b/Examples/BackFill/BackFillExample differ diff --git a/Examples/BackFill/BackFillExample.info b/Examples/BackFill/BackFillExample.info new file mode 100644 index 0000000..277d0d0 Binary files /dev/null and b/Examples/BackFill/BackFillExample.info differ diff --git a/Examples/BackFill/BackfillExample.c b/Examples/BackFill/BackfillExample.c new file mode 100644 index 0000000..9c24688 --- /dev/null +++ b/Examples/BackFill/BackfillExample.c @@ -0,0 +1,397 @@ +/************************************************************************* + * ClassAct Comprehensive Demo Program + * Copyright © 1995 Osma Ahvenlampi + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* get LayerHook.lha from Aminet for this */ +#include + +/************************************************************************* + * Backfill options + * We're using the public domain LayerHook here. + */ +struct BackFillOptions Options = +{ + 256,256, + // !!! 0,0, + TRUE,FALSE, + 0,0, + TRUE +}; + +struct BackFillInfo BF1, BF2, *Backfill; + +UBYTE name[256]; + +/************************************************************************* + * Gadget list + * This wouldn't be strictly necessary, but it's an easy way of keeping + * the gadget pointers for when we need to access the gadgets. + */ +typedef enum { G_Backfill = 1, G_Datatype, G_MAX } GadgetIDs; + +struct Gadget *GL[G_MAX+1]; + +/************************************************************************* + * App message hook. + * Workbench App messages can be caught with a callback hook such as this. + * We'll not worry about the app message type in this hook. Objects dropped + * on the window or on the icon (while iconified) will be added to the + * listview. + */ + +void __asm __saveds AppMsgFunc( register __a0 struct Hook *Hook, + register __a2 Object *Window, + register __a1 struct AppMessage *Msg ) +{ + struct Window *Win; + struct WBArg *arg = Msg->am_ArgList; + Object *dt; + + GetAttr( WINDOW_Window, Window, (ULONG *)&Win ); + + NameFromLock( arg->wa_Lock, name, sizeof(name) ); + AddPart( name, arg->wa_Name, sizeof(name) ); + + dt = NewDTObject( name, + DTA_GroupID, GID_PICTURE, + ICA_TARGET, ICTARGET_IDCMP, + TAG_END ); + + if (dt) + { + SetGadgetAttrs( (struct Gadget *)Hook->h_Data, Win, NULL, + LAYOUT_ModifyChild, GL[G_Datatype], + CHILD_ReplaceObject, dt, + TAG_END ); + GL[G_Datatype] = (struct Gadget *)dt; + RethinkLayout( (struct Gadget *)Hook->h_Data, Win, NULL, FALSE ); + } +} + +struct Hook apphook; + +/************************************************************************* + * IDCMP hook + */ + +void __asm __saveds IDCMPFunc( register __a0 struct Hook *Hook, + register __a2 Object *Window, + register __a1 struct IntuiMessage *Msg ) +{ + struct Window *Win; + + GetAttr( WINDOW_Window, Window, (ULONG *)&Win ); + + if (Msg->Class == IDCMP_IDCMPUPDATE) + { + if ( GetTagData( DTA_Sync, FALSE, Msg->IAddress ) ) + { + RefreshGList( (struct Gadget *)Hook->h_Data, Win, NULL, 1 ); + } + } +} + +struct Hook idcmphook; + +/************************************************************************* + * This function creates our gadgets for the window. + */ +Object *CreateLayout(void) +{ + return VGroupObject, Offset(32,32,32,32), + LAYOUT_BevelStyle, BVS_THIN, + + /* this tag instructs layout.gadget to defer GM_LAYOUT and GM_RENDER and ask + * the windowclass to do them. This lessens the load on input.device + */ + LAYOUT_DeferLayout, TRUE, + + /* this gives us a backfill + */ + CLASSACT_BackFill, Backfill, + + /* this dummy object will be replaced with a datatype when we have a picture + */ + StartMember, apphook.h_Data = idcmphook.h_Data = LayoutObject, VCentered, HCentered, + LAYOUT_BevelStyle, BVS_THIN, + LAYOUT_BevelState, IDS_SELECTED, + LAYOUT_SpaceOuter, TRUE, + + /* We need to install this clearing backfill hook because + * most of the datatypes really screw up rendering if the + * background isn't color 0. + */ + LAYOUT_BackFill, LAYERS_BACKFILL, + StartImage, GL[G_Datatype] = LabelObject, + LABEL_Text, "Please drop picture icons on this window", + EndImage, + CHILD_MinHeight, 128, + EndMember, + + StartMember, GL[G_Backfill] = ButtonObject, + GA_Text, "Use as a backfill", + GA_ID, G_Backfill, + GA_RelVerify, TRUE, + EndMember, + CHILD_WeightedHeight, 0, + EndGroup; +} + +/************************************************************************* + * Main Program + */ +int +main(void) +{ + struct MsgPort *appport; + struct Screen *Scr; + + if (!ButtonBase) /* force it open */ + return 30; + + /* By providing a message port you enable windowclass to handle iconification + * and appwindows. This port can shared by all the windows of your application. + */ + appport = CreateMsgPort(); + Scr = LockPubScreen(NULL); + + if (appport && Scr) + { + Object *Window; + + apphook.h_Entry = (ULONG (* )())AppMsgFunc; + apphook.h_SubEntry = NULL; + + idcmphook.h_Entry = (ULONG (* )())IDCMPFunc; + idcmphook.h_SubEntry = NULL; + + /* Create a Window object with a Layout. When Window is asked to open itself, + * it will calculate how much space the Layout needs and size itself accordingly. + */ + + Window = WindowObject, + + /* these tags describe the window + */ + + WA_IDCMP, IDCMP_RAWKEY, + WA_Top, 20, + WA_Left, 20, + WA_SizeGadget, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + + WA_Title, "ClassAct backfill/datatype example", + WA_ScreenTitle, "ClassAct Copyright 1995 Phantom Development LLC.", + + /* Add an iconification gadget. If you have this, you must listen to + * WMHI_ICONIFY. + */ + + WINDOW_IconifyGadget, TRUE, + + /* This message port lets windowclass handle the icon and appwindow. + */ + + WINDOW_AppPort, appport, + WINDOW_AppWindow, TRUE, + WINDOW_AppMsgHook, &apphook, + + /* This sets up windowclass to relay IDCMPUPDATE messages to the + * application's hook. + */ + + WINDOW_IDCMPHook, &idcmphook, + WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE, + + /* The windowclass will automatically free the DiskObject used when + * iconifying the window. If you do not provide a valid DiskObject, + * windowclass will try to use env:sys/def_window.info or the default + * project icon. + */ + + WINDOW_Icon, GetDiskObject( "BackfillExample" ), + WINDOW_IconTitle, "ClassAct Example", + + /* Below is the layout of the window + */ + + WINDOW_Layout, CreateLayout(), + EndWindow; + + if (Window) + { + /* Window pointer cache. + */ + + struct Window *Win; + BOOL changebackfill = FALSE; + + if (Win = CA_OpenWindow( Window )) + { + ULONG wsig, asig = 1L << appport->mp_SigBit; + BOOL done = FALSE; + + /* Now that the window has been opened, we can get the signal mask + * of its user port. If the program supported iconification and didn't + * use a shared IDCMP port between all windows, this signal bit + * would have to be re-queried before each Wait(). + */ + + GetAttr( WINDOW_SigMask, Window, &wsig ); + + while (done == FALSE) + { + ULONG sig = Wait(wsig | asig | SIGBREAKF_CTRL_C); + ULONG result; + UWORD code; + + if (sig & (wsig | asig)) + { + /* Messages waiting at the window's IDCMP port. Loop at WM_HANDLEINPUT + * until all have been processed. + */ + + while ((result = CA_HandleInput(Window,&code)) != WMHI_LASTMSG) + { + /* The return code of this method is two-part. The upper word describes the + * class of the message (gadgetup, menupick, closewindow, iconify, etc), + * and the lower word is a class-defined ID, currently in use in the + * gadgetup and menupick return codes. + * Switch on the class, then on the ID. + */ + + switch(result & WMHI_CLASSMASK) + { + case WMHI_GADGETUP: + + /* OK, got a gadgetup from something. Lets find out what the something is. + * The code WORD to which a pointer was passed to WM_HANDLEINPUT has been + * set to the Code value from the IDCMP_GADGETUP, in case we need it. + */ + + switch(result & WMHI_GADGETMASK) + { + case G_Backfill: + changebackfill = TRUE; + break; + } + break; + + case WMHI_CLOSEWINDOW: + /* The window close gadget was hit. Time to die... + */ + done = TRUE; + break; + + case WMHI_ICONIFY: + /* Window requests that it be iconified. Handle this event as + * soon as possible. The window is not iconified automatically to + * give you a chance to make note that the window pointer will be + * invalid before the window closes. It also allows you to free + * resources only needed when the window is open, if you wish to. + */ + if (CA_Iconify( Window )) + Win = NULL; + break; + + case WMHI_UNICONIFY: + /* The window should be reopened. If you had free'd something + * on iconify, now is the time to re-allocate it, before calling + * CA_OpenWindow. + */ + Win = CA_OpenWindow( Window ); + break; + } + } + } + else if (sig & SIGBREAKF_CTRL_C) + { + done = TRUE; + } + + if (changebackfill) + { + Object *layout; + + /* This is a quick&dirty demo using an unmodified LayerHook (on Aminet). + * This hook can not change its source bitmap on the fly. + * Becaue of this, we have to do a bit of a juggling act to + * replace the current backfill. + */ + if (Backfill == &BF1) + { + Backfill = NULL; + if (LoadBackgroundImage( &BF2, name, Scr, &Options )) + { + Backfill = &BF2; + } + } + else + { + Backfill = NULL; + if (LoadBackgroundImage( &BF1, name, Scr, &Options )) + { + Backfill = &BF1; + } + } + if (layout = CreateLayout()) + { + SetAttrs(Window, WINDOW_Layout, layout, TAG_END); + /* backfill changed, it's not safe to dispose the old + * one. */ + UnloadBackgroundImage((Backfill == &BF1) ? &BF2 : &BF1); + } + else + { + /* layout failed */ + UnloadBackgroundImage(Backfill); + } + changebackfill = FALSE; + } + } + /* Close the window and dispose of all attached gadgets + */ + DisposeObject( Window ); + } + } + } + + if (appport) + DeleteMsgPort(appport); + if (Scr) + UnlockPubScreen(NULL,Scr); +} diff --git a/Examples/BackFill/BackfillExample.c.info b/Examples/BackFill/BackfillExample.c.info new file mode 100644 index 0000000..a956d34 Binary files /dev/null and b/Examples/BackFill/BackfillExample.c.info differ diff --git a/Examples/BitMap.info b/Examples/BitMap.info new file mode 100644 index 0000000..089fd64 Binary files /dev/null and b/Examples/BitMap.info differ diff --git a/Examples/BitMap/BitMapExample b/Examples/BitMap/BitMapExample new file mode 100644 index 0000000..dbab541 Binary files /dev/null and b/Examples/BitMap/BitMapExample differ diff --git a/Examples/BitMap/BitMapExample.c b/Examples/BitMap/BitMapExample.c new file mode 100644 index 0000000..f1a8a1b --- /dev/null +++ b/Examples/BitMap/BitMapExample.c @@ -0,0 +1,171 @@ +/* ClassAct Example + * Copyright 1995 Phantom Development LLC. + * All Rights Reserved. + * + * This Example Shows ClassAct's bitmap.image + */ + +#include + +#include + +#include +#include +#include + +struct ClassLibrary *WindowBase; +struct ClassLibrary *LayoutBase; +struct ClassLibrary *ButtonBase; +struct ClassLibrary *BitMapBase; + +static struct Image *image; +static struct Screen *screen; +static struct Gadget *gadget; + +int main( void ) +{ Object *Win_Object; + Object *But_Object; + struct Window *window; + struct Image *image1=NULL,*image2=NULL,*image3=NULL; + struct BitMap *bitmap; + ULONG result,signal; + BOOL done=FALSE; + + /* Open the classes we will use. Note, classlib.lib SAS/C or DICE autoinit + * can do this for you automatically. + */ + if( (WindowBase = (struct ClassLibrary *)OpenLibrary("window.class",0L) ) + && (LayoutBase = (struct ClassLibrary *)OpenLibrary("gadgets/layout.gadget",0L) ) + && (ButtonBase = (struct ClassLibrary *)OpenLibrary("gadgets/button.gadget",0L) ) + && (BitMapBase = (struct ClassLibrary *)OpenLibrary("images/bitmap.image",0L) ) + ) + { + if(screen=LockPubScreen(NULL)) + { + /* Make an image out of an IFF file. + * The image will be included in the window layout, and is + * used to clip two other images from + */ + image1=BitMapObject, + BITMAP_SourceFile,"PROGDIR:buttons.iff", + BITMAP_OffsetX, 0, + BITMAP_OffsetY, 0, + BITMAP_Width, 577, + BITMAP_Height, 30, + BITMAP_Screen,screen, + EndImage; + + if(image1) + { + /* Get the bitmap of the image + */ + GetAttr(BITMAP_BitMap,image1,(ULONG *)&bitmap); + + Win_Object = WindowObject, + WA_ScreenTitle, "ClassAct Copyright 1995,1996 ClassAct Development Team..", + WA_Title, "BitMap Example", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_InnerWidth,100, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WA_PubScreen,screen, + WINDOW_ParentGroup, VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_HorizAlignment,LALIGN_CENTER, + + StartImage,image1, + CHILD_NoDispose,TRUE, + + /* Add a button with its imagery read from two + * transparent GIF files. BITMAP_Masking,TRUE will + * make the imagery appear transparent. + */ + StartMember, But_Object = ButtonObject, + GA_ReadOnly, TRUE, + GA_Image,image2=BitMapObject, + BITMAP_BitMap,bitmap, + BITMAP_OffsetX,0, + BITMAP_OffsetY,0, + BITMAP_Width,120, + BITMAP_Height,30, + BITMAP_SelectBitMap,bitmap, + BITMAP_SelectOffsetX,30, + BITMAP_SelectOffsetY,0, + BITMAP_SelectWidth,120, + BITMAP_SelectHeight,30, + BITMAP_Masking,TRUE, + EndImage, + EndMember, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + EndMember, + EndWindow; + /* Object creation sucessful? + */ + if( Win_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Win_Object) ) + { + ULONG wait; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Win_Object, &signal ); + /* Input Event Loop + */ + while( !done ) + { + SetAttrs(image2, BITMAP_OffsetX, 32, TAG_END); + + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + while ((result = CA_HandleInput(Win_Object,NULL)) != WMHI_LASTMSG) + { + switch(result) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + } + } + } + } + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject( Win_Object ); + } + + /* Dispose the images ourselves as button.gadget doesn't + * do this for its GA_Image... + */ + if(image2) DisposeObject(image2); + if(image3) DisposeObject(image3); + if(image1) DisposeObject(image1); + + } + + UnlockPubScreen(NULL,screen); + } + } + + /* Close the classes. + */ + if (BitMapBase) CloseLibrary( (struct Library *)BitMapBase ); + if (ButtonBase) CloseLibrary( (struct Library *)ButtonBase ); + if (LayoutBase) CloseLibrary( (struct Library *)LayoutBase ); + if (WindowBase) CloseLibrary( (struct Library *)WindowBase ); + +} + diff --git a/Examples/BitMap/BitMapExample.c.info b/Examples/BitMap/BitMapExample.c.info new file mode 100644 index 0000000..1faae77 Binary files /dev/null and b/Examples/BitMap/BitMapExample.c.info differ diff --git a/Examples/BitMap/BitMapExample.info b/Examples/BitMap/BitMapExample.info new file mode 100644 index 0000000..3be7a27 Binary files /dev/null and b/Examples/BitMap/BitMapExample.info differ diff --git a/Examples/BitMap/buttons.iff b/Examples/BitMap/buttons.iff new file mode 100644 index 0000000..5e5c7c3 Binary files /dev/null and b/Examples/BitMap/buttons.iff differ diff --git a/Examples/CheckBox.info b/Examples/CheckBox.info new file mode 100644 index 0000000..43a043b Binary files /dev/null and b/Examples/CheckBox.info differ diff --git a/Examples/CheckBox/CheckBoxExample.info b/Examples/CheckBox/CheckBoxExample.info new file mode 100644 index 0000000..194680c Binary files /dev/null and b/Examples/CheckBox/CheckBoxExample.info differ diff --git a/Examples/CheckBox/checkboxexample b/Examples/CheckBox/checkboxexample new file mode 100644 index 0000000..44cc92f Binary files /dev/null and b/Examples/CheckBox/checkboxexample differ diff --git a/Examples/CheckBox/checkboxexample.c b/Examples/CheckBox/checkboxexample.c new file mode 100644 index 0000000..e2b1d21 --- /dev/null +++ b/Examples/CheckBox/checkboxexample.c @@ -0,0 +1,233 @@ +;/* CheckBox Example +sc link checkboxexample.c lib lib:classact.lib +quit +*/ + +/** + ** CheckBoxExample.c -- CheckBox class Example. + ** + ** This is a simple example testing some of the capabilities of the + ** CheckBox gadget class. + ** + ** This code opens a window and then creates 2 CheckBox gadgets which + ** are subsequently attached to the window's gadget list. One uses + ** arrows, one does not. Notice that you can tab cycle between them. + **/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + + +enum +{ + GID_MAIN=0, + GID_CHECKBOX1, + GID_CHECKBOX2, + GID_DOWN, + GID_UP, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + /* make sure our classes opened... */ + if (!ButtonBase || !CheckBoxBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct CheckBox Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "CheckBox", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, gadgets[GID_CHECKBOX1] = CheckBoxObject, + GA_ID, GID_CHECKBOX1, + GA_RelVerify, TRUE, + GA_Text, "CheckBox _1", + CHECKBOX_TextPlace, PLACETEXT_RIGHT, + CheckBoxEnd, + CHILD_NominalSize, TRUE, + + LAYOUT_AddChild, gadgets[GID_CHECKBOX2] = CheckBoxObject, + GA_ID, GID_CHECKBOX2, + GA_RelVerify, TRUE, + GA_Text, "CheckBox _2", + CHECKBOX_TextPlace, PLACETEXT_LEFT, + CheckBoxEnd, + + LAYOUT_AddChild, VGroupObject, + CLASSACT_BackFill, NULL, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_VertAlignment, LALIGN_CENTER, + LAYOUT_HorizAlignment, LALIGN_CENTER, + LAYOUT_BevelStyle, BVS_FIELD, + + LAYOUT_AddImage, LabelObject, + LABEL_Text, "The checkbox may have its label placed\n", + LABEL_Text, "either on the left or right side.\n", + LABEL_Text, " \n", + LABEL_Text, "You may click the label text as well\n", + LABEL_Text, "as the check box itself.\n", + LabelEnd, + LayoutEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_CHECKBOX1: + /* code is TRUE or FALSE depending on check state */ + break; + + case GID_CHECKBOX2: + /* code is TRUE or FALSE depending on check state */ + break; + + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/CheckBox/checkboxexample.c.info b/Examples/CheckBox/checkboxexample.c.info new file mode 100644 index 0000000..1350752 Binary files /dev/null and b/Examples/CheckBox/checkboxexample.c.info differ diff --git a/Examples/Chooser.info b/Examples/Chooser.info new file mode 100644 index 0000000..b77c5b9 Binary files /dev/null and b/Examples/Chooser.info differ diff --git a/Examples/Chooser/ChooserExample.info b/Examples/Chooser/ChooserExample.info new file mode 100644 index 0000000..3e5d818 Binary files /dev/null and b/Examples/Chooser/ChooserExample.info differ diff --git a/Examples/Chooser/HiddenChooser.info b/Examples/Chooser/HiddenChooser.info new file mode 100644 index 0000000..0d4fc6a Binary files /dev/null and b/Examples/Chooser/HiddenChooser.info differ diff --git a/Examples/Chooser/chooserexample b/Examples/Chooser/chooserexample new file mode 100644 index 0000000..64c837e Binary files /dev/null and b/Examples/Chooser/chooserexample differ diff --git a/Examples/Chooser/chooserexample.c b/Examples/Chooser/chooserexample.c new file mode 100644 index 0000000..f727fbe --- /dev/null +++ b/Examples/Chooser/chooserexample.c @@ -0,0 +1,228 @@ +;/* Chooser Example +sc link chooserexample.c lib lib:classact.lib +quit +*/ + +/** + ** ChoosserExample.c -- chooser class example. + ** + ** This is a simple example testing some of the capabilities of the + ** chooser gadget class. + ** + ** This opens a window with chooser gadget. We will usse ClassAct.lib's + ** ChooserLables() and FreeChooserLabels() utility functions to create the + ** item labels. + ** + **/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + +/* button option texts + */ +UBYTE *chooser[] = +{ + "1200", + "2400", + "4800", + "9600", + "19200", + "38400", + "57600", + "115200", + "230400", + NULL +}; + +enum +{ + GID_MAIN=0, + GID_CHOOSER1, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + struct List *chooserlist1; + + /* make sure our classes opened... */ + if (!ButtonBase || !ChooserBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + /* Create chooser label list. + */ + chooserlist1 = ChooserLabels( "1200","2400","4800","9600","19200","38400","57600", NULL ); + + if (chooserlist1) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct Chooser Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "Chooser", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, gadgets[GID_CHOOSER1] = ChooserObject, + GA_ID, GID_CHOOSER1, + GA_RelVerify, TRUE, + CHOOSER_Labels, chooserlist1, + CHOOSER_Selected, 0, + ChooserEnd, + CHILD_NominalSize, TRUE, + CHILD_Label, LabelObject, LABEL_Text, "_Baud Rate", LabelEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + /* free the chooser list + */ + FreeChooserLabels(chooserlist1); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/Chooser/chooserexample.c.info b/Examples/Chooser/chooserexample.c.info new file mode 100644 index 0000000..3ba5825 Binary files /dev/null and b/Examples/Chooser/chooserexample.c.info differ diff --git a/Examples/Chooser/hiddenchooser b/Examples/Chooser/hiddenchooser new file mode 100644 index 0000000..45587d7 Binary files /dev/null and b/Examples/Chooser/hiddenchooser differ diff --git a/Examples/Chooser/hiddenchooser.c b/Examples/Chooser/hiddenchooser.c new file mode 100644 index 0000000..f89e30b --- /dev/null +++ b/Examples/Chooser/hiddenchooser.c @@ -0,0 +1,225 @@ +;/* Hidden Chooser Example +sc link hiddenchooser.c lib lib:classact.lib +quit + */ + +/** This example demonstrates the "hidden mode" mode of the chooser gadget. + ** + ** It is a NEW mode added recently to ClassAct release 2.0 - you *must* + ** have atleast V41.101 or later installed. Officially, this is a V42 + ** ClassAct 2.1 feature, but made available now due to developer demand. + ** + ** Hidden choosers currently need to be handled differently than visible + ** gadget objects. Since they are NOT added to the window, or layout group, + ** they do not trigger a GADGETUP. So, you must use an IDCMPUPDATE hook + ** and use the CHOOSER_Active notifications to get the selection. + **/ + +#define USE_BUILTIN_MATH +#define USE_SYSBASE + +#include +#include +#include + +#define INTUI_V36_NAMES_ONLY + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include + +#define ID_BUTTON 1 +#define ID_HIDDEN 2 + +/* Labels for the popup. + */ +UBYTE *chooser_strs[] = +{ + "Save Image", + "Load Image", + "Follow URL", + "Save to HotList", + NULL +}; + +/************************************************************************* + * IDCMP hook + */ + +void __asm __saveds IDCMPFunc( register __a0 struct Hook *Hook, + register __a2 Object *Window, + register __a1 struct IntuiMessage *Msg ) +{ + ULONG active; + + if (Msg->Class == IDCMP_IDCMPUPDATE) + { + /* The notification might include one of the tags we want to look at... + */ + if (GetTagData(GA_ID, 0, Msg->IAddress) == ID_HIDDEN) + { + active = GetTagData(CHOOSER_Active, -1, Msg->IAddress); + printf("active: %ld\n", active); + } + } +} + + +int main( int argc, char *argv[] ) +{ + if (ButtonBase) + { + Object *Chooser_Object_Hidden; + Object *Window_Object; + struct Window *window; + struct List *chooserlist; + struct Hook idcmphook; + + idcmphook.h_Entry = (ULONG (* )())IDCMPFunc; + idcmphook.h_SubEntry = NULL; + + chooserlist = ChooserLabelsA(chooser_strs); + + if (chooserlist) + { + /* Create an instance of the chooser class that will remain hidden. + */ + Chooser_Object_Hidden = ChooserObject, + GA_RelVerify, TRUE, + GA_ID, ID_HIDDEN, + CHOOSER_Labels, chooserlist, + CHOOSER_DropDown, TRUE, + CHOOSER_AutoFit, TRUE, + CHOOSER_Hidden, TRUE, + ICA_TARGET, ICTARGET_IDCMP, + ChooserEnd; + + /* Create the window object. */ + Window_Object = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "Another ClassAct chooser.gadget Example", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WA_SmartRefresh, TRUE, + WA_IDCMP, IDCMP_GADGETUP|IDCMP_GADGETDOWN|IDCMP_IDCMPUPDATE, + WINDOW_IDCMPHook, &idcmphook, /* For BOOPSI notification */ + WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE, + WINDOW_ParentGroup, VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, ButtonObject, + GA_RelVerify, TRUE, + GA_ID, ID_BUTTON, + GA_Text, "Press me to show the hidden chooser!", + ButtonEnd, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, VGroupObject, + CLASSACT_BackFill, NULL, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_VertAlignment, LALIGN_CENTER, + LAYOUT_HorizAlignment, LALIGN_CENTER, + LAYOUT_BevelStyle, BVS_FIELD, + + LAYOUT_AddImage, LabelObject, + LABEL_Text, "Selecting the button above will\n", + LABEL_Text, "reveal the hidden popup chooser!\n\n", + LABEL_Text, "Hidden choosers are useful for\n", + LABEL_Text, "context sensitive quick menus.\n", + LabelEnd, + + LayoutEnd, + LayoutEnd, + WindowEnd; + + /* Object creation sucessful? + */ + if( Window_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Window_Object) ) + { + ULONG wait, signal, result, done = FALSE; + WORD Code; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Window_Object, &signal ); + + /* Input Event Loop + */ + while( !done ) + { + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + + while ((result = CA_HandleInput(Window_Object,&Code)) != WMHI_LASTMSG) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + + case WMHI_GADGETUP: + switch(result & WMHI_GADGETMASK) + { + case ID_BUTTON: + ActivateGadget((struct Gadget *)Chooser_Object_Hidden, window, NULL); + break; + + } + break; + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened and it will dispose of all objects attached to it. + */ + DisposeObject( Window_Object ); + + /* The hidden chooser isn't attached to anything, so we must dispose + * it ourselves... + */ + DisposeObject( Chooser_Object_Hidden ); + } + } + FreeChooserLabels(chooserlist); + } +} diff --git a/Examples/Chooser/hiddenchooser.c.info b/Examples/Chooser/hiddenchooser.c.info new file mode 100644 index 0000000..762fa97 Binary files /dev/null and b/Examples/Chooser/hiddenchooser.c.info differ diff --git a/Examples/ClickTab.info b/Examples/ClickTab.info new file mode 100644 index 0000000..93ec449 Binary files /dev/null and b/Examples/ClickTab.info differ diff --git a/Examples/ClickTab/ClickTabExample b/Examples/ClickTab/ClickTabExample new file mode 100644 index 0000000..15bc3c2 Binary files /dev/null and b/Examples/ClickTab/ClickTabExample differ diff --git a/Examples/ClickTab/ClickTabExample.c b/Examples/ClickTab/ClickTabExample.c new file mode 100644 index 0000000..3a8fa50 --- /dev/null +++ b/Examples/ClickTab/ClickTabExample.c @@ -0,0 +1,207 @@ +#define USE_BUILTIN_MATH +#define USE_SYSBASE + +#include +#include +#include + +#define INTUI_V36_NAMES_ONLY + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +struct ClassLibrary *WindowBase; +struct ClassLibrary *LayoutBase; +struct ClassLibrary *ClickTabBase; + +#define ID_CLICKTAB 1 + +struct List listitems; +UBYTE *names[] = +{ + "Tab_1", + "Tab_2", + "Tab_3", + "Tab_4", + NULL +}; + +BOOL ClickTabNodes(struct List *list, UBYTE **labels) +{ + struct Node *node; + WORD i = 0; + + NewList(list); + + while (*labels) + { + if (node = (struct Node *)AllocClickTabNode( + TNA_Text, *labels, + TNA_Number, i, + TNA_Enabled, TRUE, + TNA_Spacing, 6, + TAG_DONE)) + { + AddTail(list, node); + } + labels++; + i++; + } + return(TRUE); +} + +VOID FreeClickTabNodes(struct List *list) +{ + struct Node *node, *nextnode; + + node = list->lh_Head; + while (nextnode = node->ln_Succ) + { + FreeClickTabNode(node); + node = nextnode; + } + NewList(list); +} + +int main( int argc, char *argv[] ) +{ + struct Window *window; + Object *Tab_Object; + Object *Win_Object; + + /* Open the classes - typically not required to be done manually. + * SAS/C or DICE AutoInit can do this for you if linked with the + * supplied classact.lib + */ + WindowBase = (struct ClassLibrary *)OpenLibrary("window.class",0L); + LayoutBase = (struct ClassLibrary *)OpenLibrary("gadgets/layout.gadget",0L); + ClickTabBase = (struct ClassLibrary *)OpenLibrary("gadgets/clicktab.gadget",0L); + + if(WindowBase && LayoutBase && ClickTabBase) + { + ClickTabNodes(&listitems, names); + + /* Create the window object. + */ + Win_Object = WindowObject, + WA_ScreenTitle, "ClassAct Copyright 1995, Phantom Development LLC.", + WA_Title, "ClassAct clicktab.gadget Example", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WA_SmartRefresh, TRUE, + WINDOW_ParentGroup, VLayoutObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + StartMember, Tab_Object = ClickTabObject, + GA_ID, ID_CLICKTAB, + CLICKTAB_Labels, &listitems, + CLICKTAB_Current, 0L, + EndMember, + EndMember, + EndWindow; + + /* Object creation sucessful? + */ + if( Win_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Win_Object) ) + { + ULONG wait, signal, result, done = FALSE; + WORD Code; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Win_Object, &signal ); + + /* Input Event Loop + */ + while( !done ) + { + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + + while ((result = CA_HandleInput(Win_Object,&Code)) != WMHI_LASTMSG) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + + case WMHI_GADGETUP: + switch(result & WMHI_GADGETMASK) + { + case ID_CLICKTAB: + break; + } + break; + } + } + } + } + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject( Win_Object ); + } + } + + FreeClickTabNodes(&listitems); + + /* Close the classes. + */ + if (ClickTabBase) CloseLibrary( (struct Library *)ClickTabBase ); + if (LayoutBase) CloseLibrary( (struct Library *)LayoutBase ); + if (WindowBase) CloseLibrary( (struct Library *)WindowBase ); +} + +#ifdef _DCC +int wbmain( struct WBStartup *wbs ) +{ + return( main( 0, NULL )); +} +#endif diff --git a/Examples/ClickTab/ClickTabExample.c.info b/Examples/ClickTab/ClickTabExample.c.info new file mode 100644 index 0000000..0d831b6 Binary files /dev/null and b/Examples/ClickTab/ClickTabExample.c.info differ diff --git a/Examples/ClickTab/ClickTabExample.info b/Examples/ClickTab/ClickTabExample.info new file mode 100644 index 0000000..81105b1 Binary files /dev/null and b/Examples/ClickTab/ClickTabExample.info differ diff --git a/Examples/ClickTab/PageExample.c.info b/Examples/ClickTab/PageExample.c.info new file mode 100644 index 0000000..74239e8 Binary files /dev/null and b/Examples/ClickTab/PageExample.c.info differ diff --git a/Examples/ClickTab/PageExample.info b/Examples/ClickTab/PageExample.info new file mode 100644 index 0000000..c654e62 Binary files /dev/null and b/Examples/ClickTab/PageExample.info differ diff --git a/Examples/ClickTab/pageexample b/Examples/ClickTab/pageexample new file mode 100644 index 0000000..32f8f93 Binary files /dev/null and b/Examples/ClickTab/pageexample differ diff --git a/Examples/ClickTab/pageexample.c b/Examples/ClickTab/pageexample.c new file mode 100644 index 0000000..76851da --- /dev/null +++ b/Examples/ClickTab/pageexample.c @@ -0,0 +1,434 @@ +;/* Page Example +sc link pageexample.c lib lib:classact.lib +quit +*/ + +/** + ** PageExample.c -- Layout page gadget class Example. + ** + ** This is a simple example testing some of the NEW capabilities + ** of the clicktab and page layout gadget class. Note, the + ** "embedded" page + ** + ** Best viewed with TabSize = 2, or = 4. + **/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + + +enum +{ + GID_MAIN=0, + GID_CLICKTAB, + GID_PAGE, + + GID_ALIGN1, + GID_ALIGN2, + GID_ALIGN3, + + GID_PAGELAY1, + GID_PAGELAY2, + + GID_COMPANY, + GID_LASTNAME, + GID_FIRSTNAME, + GID_ADD1, + GID_ADD2, + GID_CITY, + GID_STATE, + GID_ZIPCODE, + GID_PHONE, + GID_FAX, + + GID_CUSTOMERS, + GID_ORDERS, + GID_DETAILS, + GID_NEWORD, + GID_EDITORD, + GID_DELORD, + + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + /* special case - reference buttonbase to make sure it autoinit! + */ + if ( !ButtonBase ) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + struct List *tablabels = ClickTabs("_Contacts","_Orders", NULL); + + if (tablabels) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct Page Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "Page", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_DeferLayout, TRUE, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_SpaceInner, TRUE, + + LAYOUT_AddChild, gadgets[GID_CLICKTAB] = ClickTabObject, + GA_ID, GID_CLICKTAB, + GA_RelVerify, TRUE, + CLICKTAB_Labels, tablabels, + + /* Embed the PageObject "inside" the Clicktab + * the clicktab's beveling will surround the page. + */ + CLICKTAB_PageGroup, gadgets[GID_PAGE] = PageObject, + /* We will defer layout/render changing pages! */ + LAYOUT_DeferLayout, TRUE, + + PAGE_Add, gadgets[GID_PAGELAY1] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_SpaceInner, TRUE, + + LAYOUT_AddChild, gadgets[GID_COMPANY] = StringObject, + GA_ID, GID_COMPANY, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"Company", LabelEnd, + CHILD_MinWidth, 200, + + LAYOUT_AddChild, gadgets[GID_ALIGN1] = HGroupObject, + LAYOUT_AddChild, gadgets[GID_LASTNAME] = StringObject, + GA_ID, GID_LASTNAME, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"Last", LabelEnd, + + LAYOUT_AddChild, gadgets[GID_FIRSTNAME] = StringObject, + GA_ID, GID_FIRSTNAME, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"First", LabelEnd, + LayoutEnd, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, gadgets[GID_ADD1] = StringObject, + GA_ID, GID_ADD1, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"Address 1", LabelEnd, + + LAYOUT_AddChild, gadgets[GID_ADD2] = StringObject, + GA_ID, GID_ADD2, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"Address 2", LabelEnd, + + LAYOUT_AddChild, gadgets[GID_ALIGN2] = HGroupObject, + LAYOUT_AddChild, gadgets[GID_CITY] = StringObject, + GA_ID, GID_CITY, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"City", LabelEnd, + CHILD_WeightedWidth, 100, + + LAYOUT_AddChild, gadgets[GID_STATE] = StringObject, + GA_ID, GID_STATE, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"State", LabelEnd, + CHILD_WeightedWidth, 75, + + LAYOUT_AddChild, gadgets[GID_ZIPCODE] = StringObject, + GA_ID, GID_ZIPCODE, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 24, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"ZipCode", LabelEnd, + CHILD_WeightedWidth, 25, + LayoutEnd, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, gadgets[GID_ALIGN3] = HGroupObject, + LAYOUT_BevelStyle, BVS_SBAR_VERT, + LAYOUT_TopSpacing, 2, + + LAYOUT_AddChild, gadgets[GID_PHONE] = StringObject, + GA_ID, GID_PHONE, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"Phone", LabelEnd, + + LAYOUT_AddChild, gadgets[GID_FAX] = StringObject, + GA_ID, GID_FAX, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MaxChars, 48, + STRINGA_TextVal, "", + StringEnd, + CHILD_Label, LabelObject, LABEL_Text,"Fax", LabelEnd, + LayoutEnd, + CHILD_WeightedHeight, 0, + LayoutEnd, + + PAGE_Add, gadgets[GID_PAGELAY2] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_SpaceInner, TRUE, + + LAYOUT_AddChild, HGroupObject, + LAYOUT_SpaceInner, TRUE, + // customer + LAYOUT_AddChild, gadgets[GID_CUSTOMERS] = ListBrowserObject, + GA_ID, GID_CUSTOMERS, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, NULL, + LISTBROWSER_ShowSelected, TRUE, + LISTBROWSER_HorizontalProp, TRUE, + ListBrowserEnd, + CHILD_WeightedWidth, 30, + + LAYOUT_AddChild, VGroupObject, + LAYOUT_SpaceInner, TRUE, + // orders + LAYOUT_AddChild, gadgets[GID_ORDERS] = ListBrowserObject, + GA_ID, GID_ORDERS, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, NULL, + LISTBROWSER_ShowSelected, TRUE, + LISTBROWSER_HorizontalProp, TRUE, + ListBrowserEnd, + // details + LAYOUT_AddChild, gadgets[GID_DETAILS] = ListBrowserObject, + GA_ID, GID_DETAILS, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, NULL, + LISTBROWSER_ShowSelected, TRUE, + LISTBROWSER_HorizontalProp, TRUE, + ListBrowserEnd, + LayoutEnd, + CHILD_WeightedWidth, 70, + LayoutEnd, + + LAYOUT_AddChild, HGroupObject, + LAYOUT_AddChild, gadgets[GID_NEWORD] = ButtonObject, + GA_ID, GID_NEWORD, + GA_RelVerify, TRUE, + GA_Text, "_New Order", + ButtonEnd, + + LAYOUT_AddChild, gadgets[GID_EDITORD] = ButtonObject, + GA_ID, GID_EDITORD, + GA_RelVerify, TRUE, + GA_Text, "_Edit Order", + ButtonEnd, + + LAYOUT_AddChild, gadgets[GID_DELORD] = ButtonObject, + GA_ID, GID_DELORD, + GA_RelVerify, TRUE, + GA_Text, "_Delete Order", + ButtonEnd, + + LayoutEnd, + CHILD_WeightedHeight, 0, + + LayoutEnd, + + PageEnd, + + ClickTabEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Set up inter-group label pagement. + */ + SetAttrs( gadgets[GID_PAGELAY1], LAYOUT_AlignLabels, gadgets[GID_ALIGN1], TAG_DONE); + SetAttrs( gadgets[GID_ALIGN1], LAYOUT_AlignLabels, gadgets[GID_ALIGN2], TAG_DONE); + SetAttrs( gadgets[GID_ALIGN2], LAYOUT_AlignLabels, gadgets[GID_ALIGN3], TAG_DONE); + + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Activate the first string gadget! + */ +// ActivateLayoutGadget( gadgets[GID_MAIN], windows[WID_MAIN], NULL, gadgets[GID_COMPANY] ); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_COMPANY: + // printf( "Company: %s\n", ((struct StringInfo *)(gadgets[GID_COMPANY]->SpecialInfo))->Buffer); + break; + + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + /* Free the click tab label list. + */ + FreeClickTabs(tablabels); + } + + /* close/free the application port. + */ + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/Connect.info b/Examples/Connect.info new file mode 100644 index 0000000..a00b73f Binary files /dev/null and b/Examples/Connect.info differ diff --git a/Examples/Connect/ConnectExample b/Examples/Connect/ConnectExample new file mode 100644 index 0000000..4ef274d Binary files /dev/null and b/Examples/Connect/ConnectExample differ diff --git a/Examples/Connect/ConnectExample.c b/Examples/Connect/ConnectExample.c new file mode 100644 index 0000000..873efca --- /dev/null +++ b/Examples/Connect/ConnectExample.c @@ -0,0 +1,183 @@ +/* ClassAct Inter-Connection Notification Example + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define ID_BUTTON 1 +#define ID_FOREGROUND 2 +#define ID_BACKGROUND 3 + +struct ClassLibrary *WindowBase; +struct ClassLibrary *LayoutBase; +struct ClassLibrary *LabelBase; +struct ClassLibrary *ButtonBase; +struct ClassLibrary *PaletteBase; + +int main( int argc, char *argv[] ) +{ + struct Window *window; + Object *But_Object; + Object *Win_Object; + + /* Palette Color To Button ForeGround mapping. + */ + struct TagItem MapFG2Button[] = + { + PALETTE_Color, BUTTON_TextPen, + TAG_END + }; + + /* Palette Color To Button BackGround mapping. + */ + struct TagItem MapBG2Button[] = + { + PALETTE_Color, BUTTON_BackgroundPen, + TAG_END + }; + + /* Open the classes - typically not required to be done manually. + * SAS/C or DICE AutoInit can do this for you if linked with the + * supplied classact.lib + */ + WindowBase = (struct ClassLibrary *)OpenLibrary("window.class",0L); + LayoutBase = (struct ClassLibrary *)OpenLibrary("gadgets/layout.gadget",0L); + ButtonBase = (struct ClassLibrary *)OpenLibrary("gadgets/button.gadget",0L); + PaletteBase = (struct ClassLibrary *)OpenLibrary("gadgets/palette.gadget",0L); + LabelBase = (struct ClassLibrary *)OpenLibrary("images/label.image",0L); + + if(WindowBase && LayoutBase && ButtonBase && PaletteBase && LabelBase) + { + /* Create the window object. + */ + Win_Object = WindowObject, + WA_ScreenTitle, "ClassAct Copyright 1995, Phantom Development LLC.", + WA_Title, "ClassAct Example", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WA_SmartRefresh, TRUE, + WINDOW_ParentGroup, VLayoutObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + LAYOUT_BevelStyle, GroupFrame, + LAYOUT_Label, "InterConnection", + StartMember, But_Object = ButtonObject, + GA_Text, "_Inter-Connection Example", + GA_ID, ID_BUTTON, + EndMember, + CHILD_WeightedHeight, 0, + + StartMember, HLayoutObject, + LAYOUT_SpaceOuter, FALSE, + StartMember, PaletteObject, + GA_ID, ID_FOREGROUND, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + ICA_TARGET, But_Object, /* object to connect to */ + ICA_MAP, MapFG2Button, /* tag mapping array */ + EndMember, + CHILD_Label, LabelObject, LABEL_Text, "_ForeGround", LabelEnd, + CHILD_MinWidth, 90, + CHILD_MinHeight, 20, + + StartMember, PaletteObject, + GA_ID, ID_BACKGROUND, + PALETTE_NumColors, 8, + PALETTE_Color, 0, + ICA_TARGET, But_Object, /* object to connect to */ + ICA_MAP, MapBG2Button, /* tag mapping array */ + EndMember, + CHILD_Label, LabelObject, LABEL_Text, "_BackGround", LabelEnd, + CHILD_MinWidth, 90, + CHILD_MinHeight, 20, + EndMember, + EndMember, + EndWindow; + + /* Object creation sucessful? + */ + if( Win_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Win_Object) ) + { + ULONG wait, signal, result, done = FALSE; + WORD Code; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Win_Object, &signal ); + + /* Input Event Loop + */ + while( !done ) + { + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + + while ((result = CA_HandleInput(Win_Object,&Code)) != WMHI_LASTMSG) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + + case WMHI_GADGETUP: + switch(result & WMHI_GADGETMASK) + { + case ID_BUTTON: + break; + } + break; + } + } + } + } + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject( Win_Object ); + } + } + + /* Close the classes. + */ + if (LabelBase) CloseLibrary( (struct Library *)LabelBase ); + if (PaletteBase) CloseLibrary( (struct Library *)PaletteBase ); + if (ButtonBase) CloseLibrary( (struct Library *)ButtonBase ); + if (LayoutBase) CloseLibrary( (struct Library *)LayoutBase ); + if (WindowBase) CloseLibrary( (struct Library *)WindowBase ); +} + +#ifdef _DCC +int wbmain( struct WBStartup *wbs ) +{ + return( main( 0, NULL )); +} +#endif diff --git a/Examples/Connect/ConnectExample.c.info b/Examples/Connect/ConnectExample.c.info new file mode 100644 index 0000000..54e899d Binary files /dev/null and b/Examples/Connect/ConnectExample.c.info differ diff --git a/Examples/Connect/ConnectExample.info b/Examples/Connect/ConnectExample.info new file mode 100644 index 0000000..111a793 Binary files /dev/null and b/Examples/Connect/ConnectExample.info differ diff --git a/Examples/EnvEdit.info b/Examples/EnvEdit.info new file mode 100644 index 0000000..4f50977 Binary files /dev/null and b/Examples/EnvEdit.info differ diff --git a/Examples/EnvEdit/EnvEdit b/Examples/EnvEdit/EnvEdit new file mode 100644 index 0000000..10f9959 Binary files /dev/null and b/Examples/EnvEdit/EnvEdit differ diff --git a/Examples/EnvEdit/EnvEdit.c.info b/Examples/EnvEdit/EnvEdit.c.info new file mode 100644 index 0000000..0fdd1ea Binary files /dev/null and b/Examples/EnvEdit/EnvEdit.c.info differ diff --git a/Examples/EnvEdit/EnvEdit.info b/Examples/EnvEdit/EnvEdit.info new file mode 100644 index 0000000..5cd1fb5 Binary files /dev/null and b/Examples/EnvEdit/EnvEdit.info differ diff --git a/Examples/EnvEdit/envedit.c b/Examples/EnvEdit/envedit.c new file mode 100644 index 0000000..d03db33 --- /dev/null +++ b/Examples/EnvEdit/envedit.c @@ -0,0 +1,889 @@ + +/** + ** EnvEdit.c -- Environmental variable editor. + ** + ** This is a cute little tool to edit your environmental variables with a + ** GUI. Seen a dozen of these already have you eh? Well, this one is + ** different. It uses a hierarchical listbrowser, so you can not only + ** see simple environmental variables, but also ones buried deep in + ** directories (we'll call those directories "records", since these are + ** supposed to be variables). Also, we do not have to call an external + ** text editor to edit the value of variables, not are we limited to + ** one-line variables because we use textfield for editing variables. + ** + ** With all that said, there are somethings missing: the ability to delete, + ** rename and create variables. Think of this as an exercise in learning + ** ClassAct, to add these features (and send us the source when you're + ** done :). + ** + **/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* #define D(x) x to compile with debugging output. + */ +#define D(x) + +#ifdef _DCC +#define SAVEDS __geta4 +#define ASM +#define REG_A0 __A0 +#define REG_A1 __A1 +#else +#define SAVEDS __saveds +#define ASM __asm +#define REG_A0 register __a0 +#define REG_A1 register __a1 +#endif + +enum { GAD_LIST, GAD_EDIT, GAD_SAVE, GAD_USE, GAD_CANCEL }; + +/* ARexx command IDs + */ +enum { REXX_NAME, REXX_VERSION, REXX_AUTHOR, REXX_ACTIVATE, REXX_DEACTIVATE, + REXX_QUIT, REXX_WINDOWTOBACK, REXX_WINDOWTOFRONT }; + + + +/* Some additional info we put in listbrowser node userdata field. + */ +struct LBUserData +{ + UBYTE lbud_FileName[255]; + BOOL lbud_Changed; + STRPTR lbud_Buf; + ULONG lbud_BufSize; +}; + + +/* Function prototypes. + */ +VOID load_text(struct Window *); +LONG file_size(char *); +VOID save_changed(struct List *, STRPTR, BOOL); +BOOL read_files(struct List *, STRPTR, WORD); +VOID bstrcpy(STRPTR, BSTR); +VOID free_list(struct List *); +LONG easy_req(struct Window *, char *, char *, char *, ...); +VOID ASM rexx_name(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_version(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_author(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_activate(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_deactivate(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_quit(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_about(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_windowtoback(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); +VOID ASM rexx_windowtofront(REG_A0 struct ARexxCmd *, REG_A1 struct RexxMsg *); + +/* Global variables. + */ +struct List file_list; +struct Gadget *layout, *list_gad, *edit_gad; +struct DrawInfo *drinfo; +Object *window_obj; +struct Window *win; +BOOL ok = TRUE; + +struct ColumnInfo ci[] = +{ + { 75, "Variable", 0 }, + { 25, "Size", 0 }, + { 75, "Date", 0 }, + { 25, "Time", 0 }, + { -1, (STRPTR)~0, -1 } +}; + +/* ARexx command table. These commands may not seem terribly useful at first, + * but these are a basic set of commands that every app should support. + */ +struct ARexxCmd arexx_cmds[] = +{ + { "NAME", REXX_NAME, rexx_name, NULL, NULL, }, + { "VERSION", REXX_VERSION, rexx_version, NULL, NULL, }, + { "AUTHOR", REXX_AUTHOR, rexx_author, NULL, NULL, }, + { "ACTIVATE", REXX_ACTIVATE, rexx_activate, NULL, NULL, }, + { "DEACTIVATE", REXX_DEACTIVATE, rexx_deactivate, NULL, NULL, }, + { "QUIT", REXX_QUIT, rexx_quit, NULL, NULL, }, + { "WINDOWTOBACK", REXX_WINDOWTOBACK, rexx_windowtoback, NULL, NULL, }, + { "WINDOWTOFRONT", REXX_WINDOWTOFRONT, rexx_windowtofront, NULL, NULL, }, + { NULL, NULL, NULL, NULL, NULL, } +}; + + +/* Custom leaf/show/hide images for the hierarchy control. + */ +__chip UWORD leaf_data[27] = +{ + /* Plane 0 */ + 0x0800, 0x1C00, 0x3600, 0x6B00, + 0xD580, 0x6B00, 0x3600, 0x1C00, + 0x0800, + /* Plane 1 */ + 0x0800, 0x1800, 0x3400, 0x6A00, + 0xD500, 0x6A00, 0x3400, 0x1800, + 0x0000, +}; + +struct Image leaf_image = +{ + 0, 0, 9, 9, 2, &leaf_data[0], 0x3, 0x0, NULL +}; + +__chip UWORD show_data[27] = +{ + /* Plane 0 */ + 0x7C00, 0xD600, 0xABC0, 0x8020, + 0xD560, 0xAAA0, 0xD560, 0xAAA0, + 0x7FC0, + /* Plane 1 */ + 0x7C00, 0xD600, 0xABC0, 0x8000, + 0xD540, 0xAA80, 0xD540, 0xAA80, + 0x0000, +}; + +struct Image show_image = +{ + 0, 0, 11, 9, 2, &show_data[0], 0x3, 0x0, NULL +}; + +__chip UWORD hide_data[27] = +{ + /* Plane 0 */ + 0x7C00, 0xD600, 0xABC0, 0xFFF0, + 0xF558, 0xEAA8, 0xD550, 0xFFE0, + 0x7FC0, + /* Plane 1 */ + 0x7C00, 0xD600, 0xABC0, 0xAFF0, + 0xD550, 0xAAA0, 0xD540, 0xFFC0, + 0x0000, +}; + +struct Image hide_image = +{ + 0, 0, 13, 9, 2, &hide_data[0], 0x3, 0x0, NULL +}; + + +/* This is the start of our programme. + */ +#ifdef _DCC +wbmain() { main(); } +#endif + +main() +{ + struct Screen *screen = NULL; + + if (!ButtonBase) return(20); + + /* We'll just open up on the default public screen, and use its screen font. + */ + if (screen = LockPubScreen(NULL)) + { + UWORD mapping[4]; + + drinfo = GetScreenDrawInfo(screen); + + NewList(&file_list); + read_files(&file_list, "ENV:", 1); + + /* Setup a simple mapping. + */ + mapping[0] = drinfo->dri_Pens[BACKGROUNDPEN]; + mapping[1] = drinfo->dri_Pens[SHADOWPEN]; + mapping[2] = drinfo->dri_Pens[SHINEPEN]; + mapping[3] = drinfo->dri_Pens[FILLPEN]; + + /* Do the layout. + */ + if (layout = LayoutObject, + GA_DrawInfo, drinfo, + ICA_TARGET, ICTARGET_IDCMP, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_SpaceOuter, TRUE, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_HorizAlignment, LAYOUT_ALIGN_CENTER, + + LAYOUT_AddChild, list_gad = ListBrowserObject, + GA_ID, GAD_LIST, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, (ULONG)&file_list, + LISTBROWSER_ColumnInfo, (ULONG)&ci, + LISTBROWSER_ColumnTitles, TRUE, + LISTBROWSER_ShowSelected, TRUE, + LISTBROWSER_Separators, FALSE, + LISTBROWSER_Hierarchical, TRUE, + LISTBROWSER_LeafImage, &leaf_image, + LISTBROWSER_ShowImage, &show_image, + LISTBROWSER_HideImage, &hide_image, + LISTBROWSER_AutoFit, TRUE, + ListBrowserEnd, + CHILD_WeightedHeight, 100, + + LAYOUT_AddChild, edit_gad = TextFieldObject, + GA_ID, GAD_EDIT, + GA_RelVerify, TRUE, + TEXTFIELD_Border, TEXTFIELD_BORDER_DOUBLEBEVEL, + TextFieldEnd, + CHILD_MinHeight, screen->Font->ta_YSize + 6, + CHILD_WeightedHeight, 50, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_EvenSize, TRUE, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GAD_SAVE, + GA_Text, "_Save", + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_NominalSize, TRUE, + CHILD_WeightedWidth, 0, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GAD_USE, + GA_Text, "_Use", + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_NominalSize, TRUE, + CHILD_WeightedWidth, 0, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GAD_CANCEL, + GA_Text, " _Cancel ", + GA_RelVerify, TRUE, + ButtonEnd, + CHILD_NominalSize, TRUE, + CHILD_WeightedWidth, 0, + + LayoutEnd, + CHILD_WeightedHeight, 0, + LayoutEnd) + { + struct MsgPort *app_port; + + /* Create a message port for App* messages. This is needed for + * iconification. We're being a touch naughty by not checking + * the return code, but that just means that iconification won't + * work, nothing really bad will happen. + */ + app_port = CreateMsgPort(); + + /* Create the window object. + */ + if (window_obj = WindowObject, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_CustomScreen, screen, + WA_IDCMP, IDCMP_CLOSEWINDOW, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "Environmental Variable Editor", + WA_NewLookMenus, TRUE, + WINDOW_ParentGroup, layout, + WINDOW_IconifyGadget, TRUE, + WINDOW_Icon, GetDiskObject("PROGDIR:EnvEdit"), + WINDOW_IconTitle, "EnvEdit", + WINDOW_AppPort, app_port, + TAG_DONE)) + { + /* Increase the initial hieght. + */ + SetAttrs(window_obj, + WA_InnerHeight, screen->Font->ta_YSize * 16, + TAG_DONE); + + /* Open the window. + */ + if (win = (struct Window *)CA_OpenWindow(window_obj)) + { + Object *arexx_obj; + + /* Create host object. + */ + if (arexx_obj = ARexxObject, + AREXX_HostName, "ENVEDIT", + AREXX_Commands, arexx_cmds, + ARexxEnd) + { + /* Input Event Loop + */ + while (ok) + { + ULONG signal, winsig, rxsig; + ULONG result; + + /* Obtain the window and ARexx wait signal masks. + */ + GetAttr(WINDOW_SigMask, window_obj, &winsig); + GetAttr(AREXX_SigMask, arexx_obj, &rxsig); + + signal = Wait(rxsig | winsig | (1L << app_port->mp_SigBit) | SIGBREAKF_CTRL_C); + + /* ARexx event? + */ + if (signal & rxsig) + CA_HandleRexx(arexx_obj); + + /* Window event? + */ + if (signal & winsig) + { + /* CA_HandleInput() returns the gadget ID of a clicked + * gadget, or one of several pre-defined values. For + * this demo, we're only actually interested in a + * close window and a couple of gadget clicks. + */ + while ((result = CA_HandleInput(window_obj, NULL)) != WMHI_LASTMSG) + { + switch(result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + ok = FALSE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GAD_LIST: + D( PutStr("Load text\n"); ) + load_text(win); + break; + + case GAD_EDIT: + D( PutStr("Text edited\n"); ) + { + struct Node *node; + + GetAttr(LISTBROWSER_SelectedNode, list_gad, (ULONG *)&node); + if (node) + { + struct LBUserData *lbud; + ULONG flags; + + /* Gotta change a flag in + * our special user data + * structure. + */ + GetListBrowserNodeAttrs(node, + LBNA_Flags, &flags, + LBNA_UserData, &lbud, + TAG_DONE); + if (lbud && !(flags & LBFLG_HASCHILDREN)) + lbud->lbud_Changed = TRUE; + } + } + break; + + case GAD_SAVE: + save_changed(&file_list, "ENV:", TRUE); + save_changed(&file_list, "ENVARC:", FALSE); + ok = FALSE; + break; + + case GAD_USE: + save_changed(&file_list, "ENV:", FALSE); + ok = FALSE; + break; + + case GAD_CANCEL: + ok = FALSE; + break; + + default: + break; + } + break; + + case WMHI_ICONIFY: + if (CA_Iconify(window_obj)) + win = NULL; + break; + + case WMHI_UNICONIFY: + win = CA_OpenWindow(window_obj); + break; + + default: + break; + } + } + } + /* CTRL-C should quit. + */ + if (signal & SIGBREAKF_CTRL_C) + { + ok = FALSE; + } + } + /* Free up ARexx. + */ + DisposeObject(arexx_obj); + } + else + easy_req(NULL, "EnvEdit failed to start\nCouldn't create ARexx host", "Quit", ""); + } + else + easy_req(NULL, "EnvEdit failed to start\nCouldn't open window", "Quit", ""); + + /* Disposing of the window object will also close the + * window if it is already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(window_obj); + } + else + easy_req(NULL, "EnvEdit failed to start\nCouldn't create window", "Quit", ""); + + /* Lose the App* message port. + */ + if (app_port) + DeleteMsgPort(app_port); + } + else + easy_req(NULL, "EnvEdit failed to start\nCouldn't create layout", "Quit", ""); + + free_list(&file_list); + + if (drinfo) + FreeScreenDrawInfo(screen, drinfo); + + UnlockPubScreen(0, screen); + } + else + easy_req(NULL, "EnvEdit failed to start\nCouldn't lock destination screen", "Quit", ""); + + exit(0); +} + + +/* Load text for the currently selected item in the variable list into the + * textfield gadget. + */ +VOID load_text(struct Window *win) +{ + struct Node *node; + + SetGadgetAttrs(edit_gad, win, NULL, + TEXTFIELD_Text, "", + TAG_DONE); + + /* Get the selected node. + */ + GetAttr(LISTBROWSER_SelectedNode, list_gad, (ULONG *)&node); + if (node) + { + struct LBUserData *lbud; + ULONG flags; + + /* We stashed some important info in the userdata, so get that. + */ + GetListBrowserNodeAttrs(node, + LBNA_Flags, &flags, + LBNA_UserData, &lbud, + TAG_DONE); + if (lbud && !(flags & LBFLG_HASCHILDREN)) + { + /* Open up the file for read. + */ + if (lbud->lbud_FileName) + { + LONG size; + + /* Found out how big the file is. + */ + if (size = file_size(lbud->lbud_FileName)) + { + BPTR fh; + + /* Open up the file for read. + */ + if (fh = Open(lbud->lbud_FileName, MODE_OLDFILE)) + { + /* Allocate a buffer large enough to load the whole + * file into, if we don't already have one big enough. + */ + if (size > lbud->lbud_BufSize) + { + if (lbud->lbud_Buf) + FreeVec(lbud->lbud_Buf); + lbud->lbud_Buf = (STRPTR)AllocVec(size + 1, MEMF_ANY); + lbud->lbud_BufSize = size + 1; + } + + if (lbud->lbud_Buf) + { + /* Go ahead and load our text in. + */ + lbud->lbud_BufSize = Read(fh, lbud->lbud_Buf, size); + lbud->lbud_Buf[lbud->lbud_BufSize] = '\0'; + + /* Tell the edit gadget to display it. + */ + SetGadgetAttrs(edit_gad, win, NULL, + TEXTFIELD_Text, lbud->lbud_Buf, + TAG_DONE); + } + else + { + D( PutStr("No buffer\n"); ) + lbud->lbud_BufSize = 0; + } + + Close(fh); + } + D( else PutStr("Can't open file\n"); ) + } + D( else PutStr("No file size\n"); ) + } + D( else PutStr("No filename\n"); ) + } + else if (flags & LBFLG_HASCHILDREN) + { + ULONG relevent; + + GetAttr(LISTBROWSER_RelEvent, list_gad, &relevent); + if (relevent != LBRE_SHOWCHILDREN && relevent != LBRE_HIDECHILDREN) + { + SetGadgetAttrs(list_gad, win, NULL, + LISTBROWSER_Labels, ~0, + TAG_DONE); + + if (flags & LBFLG_SHOWCHILDREN) + HideListBrowserNodeChildren(node); + else + ShowListBrowserNodeChildren(node, 1); + + SetGadgetAttrs(list_gad, win, NULL, + LISTBROWSER_Labels, &file_list, + TAG_DONE); + } + } + } + D( else PutStr("No selected node\n"); ) +} + +/* Get the file size (in bytes) of a file. + */ +LONG file_size(char *filename) +{ + BPTR lock; + LONG size = -1; + + if (lock = Lock(filename, ACCESS_READ)) + { + struct FileInfoBlock *fib; + + if (fib = (struct FileInfoBlock *)AllocDosObject(DOS_FIB,TAG_END)) + { + if (Examine(lock, fib)) + size = fib->fib_Size; + FreeDosObject(DOS_FIB, fib); + } + UnLock(lock); + } + return(size); +} + + +/* Save all changed variables to the specified directory. + */ +VOID save_changed(struct List *list, STRPTR dir, BOOL nochange) +{ + struct Node *node; + + /* Peruse all nodes. + */ + for (node = list->lh_Head; node->ln_Succ; node = node->ln_Succ) + { + struct LBUserData *lbud; + ULONG flags; + + /* Get our user data structure. + */ + GetListBrowserNodeAttrs(node, + LBNA_Flags, &flags, + LBNA_UserData, &lbud, + TAG_DONE); + if (lbud && !(flags & LBFLG_HASCHILDREN)) + { + /* See if the node has changed and if we have a filename + * and if we have a buffer. + */ + if (lbud->lbud_Changed && lbud->lbud_FileName) + { + UBYTE open_file[255]; + BPTR fh; + + /* Convert the filename. + */ + sprintf(open_file, "%s%s", dir, lbud->lbud_FileName + 4); + + /* Try and open the file for write. + */ + if (fh = Open(open_file, MODE_NEWFILE)) + { + if (lbud->lbud_BufSize == Write(fh, lbud->lbud_Buf, lbud->lbud_BufSize)) + lbud->lbud_Changed = nochange; + Close(fh); + } + } + } + } +} + + +/* Read files in a directory to a listbrowser list. + */ +BOOL read_files(struct List *list, STRPTR dir, WORD generation) +{ + BPTR lock; + + D( Printf("Read directory: %s\n", dir); ) + + if (lock = Lock(dir, ACCESS_READ)) + { + char *eadata; + + if (eadata = (char *)AllocVec(sizeof(struct ExAllData) * 200, MEMF_CLEAR)) + { + struct ExAllControl *eac; + + if (eac = (struct ExAllControl *)AllocDosObject(DOS_EXALLCONTROL, NULL)) + { + BOOL more; + + eac->eac_LastKey = 0; + do + { + struct ExAllData *ead; + + more = ExAll(lock, eadata, sizeof(struct ExAllData) * 200, ED_DATE, eac); + if (!more && IoErr() != ERROR_NO_MORE_ENTRIES) + return(FALSE); + + if (eac->eac_Entries == 0) + return(FALSE); + + ead = (struct ExAllData *)eadata; + do + { + struct Node *node; + struct DateTime dat; + char temp1[255], temp2[12], temp3[12], temp4[12]; + ULONG flags = LBFLG_CUSTOMPENS; + + if (ead->ed_Type == ST_USERDIR) + { + flags |= LBFLG_HASCHILDREN; + strcpy(temp2, "Record"); + } + else + sprintf(temp2, "%ld", ead->ed_Size); + + if (generation > 1) + flags |= LBFLG_HIDDEN; + + /* Convert the date and time to strings. + */ + dat.dat_Stamp.ds_Days = ead->ed_Days; + dat.dat_Stamp.ds_Minute = ead->ed_Mins; + dat.dat_Stamp.ds_Tick = ead->ed_Ticks; + dat.dat_Flags = 0; + dat.dat_StrDate = temp3; + dat.dat_StrTime = temp4; + dat.dat_StrDay = NULL; + + if (!DateToStr(&dat)) + temp3[0] = temp4[0] = '\0'; + + if (node = AllocListBrowserNode(4, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, ead->ed_Name, + LBNCA_FGPen, drinfo->dri_Pens[TEXTPEN], + LBNA_Column, 1, + LBNCA_CopyText, TRUE, + LBNCA_Text, temp2, + LBNCA_FGPen, (ead->ed_Type == ST_USERDIR? drinfo->dri_Pens[HIGHLIGHTTEXTPEN] : drinfo->dri_Pens[TEXTPEN]), + LBNCA_Justification, LCJ_RIGHT, + LBNA_Column, 2, + LBNCA_CopyText, TRUE, + LBNCA_Text, temp3, + LBNCA_FGPen, drinfo->dri_Pens[TEXTPEN], + LBNA_Column, 3, + LBNCA_CopyText, TRUE, + LBNCA_Text, temp4, + LBNCA_FGPen, drinfo->dri_Pens[TEXTPEN], + LBNA_Generation, generation, + LBNA_Flags, flags, + TAG_DONE)) + { + struct LBUserData *lbud; + + AddTail(list, (struct Node *)node); + + strcpy(temp1, dir); + AddPart(temp1, ead->ed_Name, 255); + + if (lbud = (struct LBUserData *)AllocVec(sizeof(struct LBUserData), MEMF_CLEAR)) + { + strcpy(lbud->lbud_FileName, temp1); + + SetListBrowserNodeAttrs(node, + LBNA_UserData, lbud, + TAG_DONE); + } + + if (ead->ed_Type == ST_USERDIR) + { + read_files(list, temp1, generation + 1); + } + } + + ead = ead->ed_Next; + } while (ead); + } while (more); + + FreeDosObject(DOS_EXALLCONTROL, eac); + } + else + return(FALSE); + FreeVec(eadata); + } + else + return(FALSE); + UnLock(lock); + } + else + return(FALSE); + + return(TRUE); +} + + +/* Copy a B string to a C string. + */ +VOID bstrcpy(STRPTR cstr, BSTR bstr) +{ + strncpy(cstr, (char *)BADDR(bstr) + 1, ((char *)BADDR(bstr))[0]); + cstr[((char *)BADDR(bstr))[0]] = '\0'; +} + + +/* Function to free an Exec List. + */ +VOID free_list(struct List *list) +{ + struct Node *node, *nextnode; + + node = list->lh_Head; + while (nextnode = node->ln_Succ) + { + struct LBUserData *lbud; + + GetListBrowserNodeAttrs(node, + LBNA_UserData, &lbud, + TAG_DONE); + if (lbud) + if (lbud->lbud_Buf); + FreeVec(lbud->lbud_Buf); + + FreeListBrowserNode(node); + node = nextnode; + } + NewList(list); +} + + +/* Do an easy requester. + */ +LONG easy_req(struct Window *win, char *reqtext, char *reqgads, char *reqargs, ...) +{ + struct EasyStruct general_es = + { + sizeof(struct EasyStruct), + 0, + "SBGen", + NULL, + NULL + }; + + general_es.es_TextFormat = reqtext; + general_es.es_GadgetFormat = reqgads; + + return(EasyRequestArgs(win, &general_es, NULL, &reqargs)); +} + +/* NAME + */ +VOID SAVEDS ASM rexx_name(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + ac->ac_Result = "EnvEdit"; +} + +/* VERSION + */ +VOID SAVEDS ASM rexx_version(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + ac->ac_Result = "1.0"; +} + +/* AUTHOR + */ +VOID SAVEDS ASM rexx_author(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + ac->ac_Result = "Timothy Aston"; +} + +/* DEACTIVATE + */ +VOID SAVEDS ASM rexx_deactivate(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + if (CA_Iconify(window_obj)) + win = NULL; +} + +/* ACTIVATE + */ +VOID SAVEDS ASM rexx_activate(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + win = CA_OpenWindow(window_obj); +} + +/* QUIT + */ +VOID SAVEDS ASM rexx_quit(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + ok = FALSE; +} + +/* + */ +VOID SAVEDS ASM rexx_windowtoback(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + WindowToBack(win); +} + +/* WINDOWTOFRONT + */ +VOID SAVEDS ASM rexx_windowtofront(REG_A0 struct ARexxCmd *ac, REG_A1 struct RexxMsg *rxm) +{ + WindowToFront(win); +} diff --git a/Examples/Examples.doc b/Examples/Examples.doc new file mode 100644 index 0000000..7f475a9 --- /dev/null +++ b/Examples/Examples.doc @@ -0,0 +1,3 @@ +This directory contains specific example programs for different features of +the ClassAct toolkit. The source to these programs is included in the +directory. diff --git a/Examples/Examples.doc.info b/Examples/Examples.doc.info new file mode 100644 index 0000000..3157d92 Binary files /dev/null and b/Examples/Examples.doc.info differ diff --git a/Examples/FuelGauge.info b/Examples/FuelGauge.info new file mode 100644 index 0000000..52c38c7 Binary files /dev/null and b/Examples/FuelGauge.info differ diff --git a/Examples/FuelGauge/FuelGaugeExample.info b/Examples/FuelGauge/FuelGaugeExample.info new file mode 100644 index 0000000..d9095df Binary files /dev/null and b/Examples/FuelGauge/FuelGaugeExample.info differ diff --git a/Examples/FuelGauge/fuelgaugeexample b/Examples/FuelGauge/fuelgaugeexample new file mode 100644 index 0000000..cc0d476 Binary files /dev/null and b/Examples/FuelGauge/fuelgaugeexample differ diff --git a/Examples/FuelGauge/fuelgaugeexample.c b/Examples/FuelGauge/fuelgaugeexample.c new file mode 100644 index 0000000..5a65158 --- /dev/null +++ b/Examples/FuelGauge/fuelgaugeexample.c @@ -0,0 +1,269 @@ +;/* FuelGauge Example +sc link fuelgaugeexample.c lib lib:classact.lib +quit +*/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + + +enum +{ + GID_GAUGE=0, + GID_DOWN, + GID_UP, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + +#define FMIN 0 +#define FMAX 100 + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + /* make sure our classes opened... */ + if (!ButtonBase || !FuelGaugeBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct FuelGauge Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "FuelGauge", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, gadgets[GID_GAUGE] = FuelGaugeObject, + GA_ID, GID_GAUGE, + FUELGAUGE_Orientation, FGORIENT_HORIZ, + FUELGAUGE_Min, FMIN, + FUELGAUGE_Max, FMAX, + FUELGAUGE_Level, 0, + FUELGAUGE_Percent, TRUE, + FUELGAUGE_TickSize, 5, + FUELGAUGE_Ticks, 5, + FUELGAUGE_ShortTicks, TRUE, + FuelGaugeEnd, + + LAYOUT_AddChild, VGroupObject, + CLASSACT_BackFill, NULL, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_VertAlignment, LALIGN_CENTER, + LAYOUT_HorizAlignment, LALIGN_CENTER, + LAYOUT_BevelStyle, BVS_FIELD, + + LAYOUT_AddImage, LabelObject, + LABEL_Text, "The fuelgauge supports optional tickmarks as\n", + LABEL_Text, "well as vertical and horizontal orientation.\n", + LABEL_Text, " \n", + LABEL_Text, "You can set the min/max range, as well as\n", + LABEL_Text, "options such as varargs ascii display,\n", + LABEL_Text, "percentage display, and custom pen selection.\n", + LabelEnd, + LayoutEnd, + + + LAYOUT_AddChild, HGroupObject, + LAYOUT_SpaceOuter, FALSE, + LAYOUT_EvenSize, TRUE, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_DOWN, + GA_RelVerify, TRUE, + GA_Text,"_Down", + ButtonEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_UP, + GA_RelVerify, TRUE, + GA_Text,"_Up", + ButtonEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + LayoutEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_DOWN: + { + int i; + + SetAttrs(objects[OID_MAIN], WA_BusyPointer, TRUE); + + for( i = FMAX; i >= FMIN; i -= 5 ) + { + SetGadgetAttrs( + gadgets[GID_GAUGE], + windows[WID_MAIN], NULL, + FUELGAUGE_Level, i, TAG_DONE); + Delay(3); + } + + SetAttrs(objects[OID_MAIN], WA_BusyPointer, FALSE); +; + } + break; + + case GID_UP: + { + int i; + + SetAttrs(objects[OID_MAIN], WA_BusyPointer, TRUE); + + for( i = FMIN; i <= FMAX; i += 5 ) + { + SetGadgetAttrs( + gadgets[GID_GAUGE], + windows[WID_MAIN], NULL, + FUELGAUGE_Level, i, TAG_DONE); + Delay(3); + } + + SetAttrs(objects[OID_MAIN], WA_BusyPointer, FALSE); + } + break; + + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/FuelGauge/fuelgaugeexample.c.info b/Examples/FuelGauge/fuelgaugeexample.c.info new file mode 100644 index 0000000..82667a2 Binary files /dev/null and b/Examples/FuelGauge/fuelgaugeexample.c.info differ diff --git a/Examples/Glyph.info b/Examples/Glyph.info new file mode 100644 index 0000000..6be4290 Binary files /dev/null and b/Examples/Glyph.info differ diff --git a/Examples/Glyph/GlyphExample b/Examples/Glyph/GlyphExample new file mode 100644 index 0000000..a815d01 Binary files /dev/null and b/Examples/Glyph/GlyphExample differ diff --git a/Examples/Glyph/GlyphExample.c b/Examples/Glyph/GlyphExample.c new file mode 100644 index 0000000..e6c9d14 --- /dev/null +++ b/Examples/Glyph/GlyphExample.c @@ -0,0 +1,319 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Here's where it all starts. + */ +main() +{ + struct Screen *screen = NULL; + + if (!ButtonBase) return(20); + + /* We'll just open up on the default public screen, and use its screen font. + */ + if (screen = LockPubScreen(NULL)) + { + struct DrawInfo *drinfo = GetScreenDrawInfo(screen); + Object *layout; + + if (layout = LayoutObject, + GA_DrawInfo, drinfo, + LAYOUT_DeferLayout, TRUE, /* Layout refreshes done on + * task's context (by the + * window class) */ + LAYOUT_SpaceOuter, TRUE, + LAYOUT_AddChild, LayoutObject, + LAYOUT_VertAlignment, LAYOUT_ALIGN_TOP, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_Label, "Available Glyphs", + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_HorizAlignment, LAYOUT_ALIGN_RIGHT, + LAYOUT_SpaceOuter, TRUE, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_DOWNARROW, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Down Arrow:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_UPARROW, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Up Arrow:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_LEFTARROW, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Left Arrow:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_RIGHTARROW, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Right Arrow:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_DROPDOWN, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Drop Down:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_CHECKMARK, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Check Mark:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_RADIOBUTTON, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Radio Button:", + LabelEnd, + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_AddImage, BevelObject, + GA_DrawInfo, drinfo, + BEVEL_Style, BVS_SBAR_HORIZ, + BevelEnd, + LayoutEnd, + CHILD_MinWidth, 4, + CHILD_WeightedWidth, 0, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_VertAlignment, LAYOUT_ALIGN_CENTER, + LAYOUT_SpaceOuter, TRUE, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_POPUP, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Pop Up:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_POPFONT, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Pop Font:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_POPFILE, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Pop File:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_POPDRAWER, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Pop Drawer:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_POPSCREENMODE, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Pop Screen Mode:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_POPTIME, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Pop Time:", + LabelEnd, + + LAYOUT_AddImage, GlyphObject, + GLYPH_Glyph, GLYPH_RETURNARROW, + GlyphEnd, + CHILD_MinWidth, 12, + CHILD_MinHeight, 12, + CHILD_Label, LabelObject, + LABEL_Text, "Return Arrow:", + LabelEnd, + LayoutEnd, + LayoutEnd, + LayoutEnd) + { + struct MsgPort *app_port; + Object *window_obj; + + /* Create a message port for App* messages. This is needed for + * iconification. We're being a touch naughty by not checking + * the return code, but that just means that iconification won't + * work, nothing really bad will happen. + */ + app_port = CreateMsgPort(); + + /* Create the window object. + */ + if (window_obj = WindowObject, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_CustomScreen, screen, + WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "Glyph class example", + WA_NewLookMenus, TRUE, + WINDOW_ParentGroup, layout, + WINDOW_IconifyGadget, TRUE, + WINDOW_Icon, GetDiskObject("PROGDIR:GlyphExample"), + WINDOW_IconTitle, "GlyphExample", + WINDOW_AppPort, app_port, + TAG_DONE)) + { + struct Window *win; + + /* Open the window. + */ + if (win = (struct Window *)CA_OpenWindow(window_obj)) + { + ULONG signal; + BOOL ok = TRUE; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, window_obj, &signal); + + /* Input Event Loop + */ + while (ok) + { + ULONG result; + + Wait(signal | (1L << app_port->mp_SigBit)); + + /* CA_HandleInput() returns the gadget ID of a clicked + * gadget, or one of several pre-defined values. For + * this demo, we're only actually interested in a + * close window and a couple of gadget clicks. + */ + while ((result = CA_HandleInput(window_obj, NULL)) != WMHI_LASTMSG) + { + switch(result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + ok = FALSE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + default: + break; + } + break; + + case WMHI_ICONIFY: + if (CA_Iconify(window_obj)) + win = NULL; + break; + + case WMHI_UNICONIFY: + win = CA_OpenWindow(window_obj); + break; + + default: + break; + } + } + } + } + else + PutStr("ERROR: failed to start. Couldn't open window\n"); + + /* Disposing of the window object will also close the + * window if it is already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(window_obj); + } + else + PutStr("ERROR: failed to start. Couldn't create window\n"); + + /* Lose the App* message port. + */ + if (app_port) + DeleteMsgPort(app_port); + } + else + PutStr("ERROR: failed to start. Couldn't create layout\n"); + + if (drinfo) + FreeScreenDrawInfo(screen, drinfo); + + UnlockPubScreen(0, screen); + } + else + PutStr("ERROR: failed to start. Couldn't lock destination screen\n"); + + exit(0); +} diff --git a/Examples/Glyph/GlyphExample.c.info b/Examples/Glyph/GlyphExample.c.info new file mode 100644 index 0000000..5d5c097 Binary files /dev/null and b/Examples/Glyph/GlyphExample.c.info differ diff --git a/Examples/Glyph/GlyphExample.info b/Examples/Glyph/GlyphExample.info new file mode 100644 index 0000000..95e8972 Binary files /dev/null and b/Examples/Glyph/GlyphExample.info differ diff --git a/Examples/Integer.info b/Examples/Integer.info new file mode 100644 index 0000000..e9eddb2 Binary files /dev/null and b/Examples/Integer.info differ diff --git a/Examples/Integer/IntegerExample b/Examples/Integer/IntegerExample new file mode 100644 index 0000000..afd2c78 Binary files /dev/null and b/Examples/Integer/IntegerExample differ diff --git a/Examples/Integer/IntegerExample.c b/Examples/Integer/IntegerExample.c new file mode 100644 index 0000000..7a66849 --- /dev/null +++ b/Examples/Integer/IntegerExample.c @@ -0,0 +1,222 @@ +;/* Integer Example +sc link integerexample.c lib lib:classact.lib +quit +*/ + +/** + ** IntegerExample.c -- Integer class Example. + ** + ** This is a simple example testing some of the capabilities of the + ** Integer gadget class. + ** + ** This code opens a window and then creates 2 Integer gadgets which + ** are subsequently attached to the window's gadget list. One uses + ** arrows, one does not. Notice that you can tab cycle between them. + **/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + + +enum +{ + GID_MAIN=0, + GID_INTEGER1, + GID_INTEGER2, + GID_DOWN, + GID_UP, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + /* make sure our classes opened... */ + if (!ButtonBase || !IntegerBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct Integer Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "Integer", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, gadgets[GID_INTEGER1] = IntegerObject, + GA_ID, GID_INTEGER1, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + INTEGER_Arrows, TRUE, + INTEGER_MaxChars, 3, + INTEGER_Minimum, -32, + INTEGER_Maximum, 32, + INTEGER_Number, 0, + IntegerEnd, + CHILD_NominalSize, TRUE, + CHILD_Label, LabelObject, LABEL_Text, "Integer _1", LabelEnd, + + LAYOUT_AddChild, gadgets[GID_INTEGER2] = IntegerObject, + GA_ID, GID_INTEGER2, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + INTEGER_Arrows, FALSE, + INTEGER_MaxChars, 6, + INTEGER_Minimum, 0, + INTEGER_Maximum, 100000, + INTEGER_Number, 100, + IntegerEnd, + CHILD_Label, LabelObject, LABEL_Text, "Integer _2", LabelEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Activate the first integer gadget! + */ + ActivateLayoutGadget( gadgets[GID_MAIN], windows[WID_MAIN], NULL, gadgets[GID_INTEGER1] ); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/Integer/IntegerExample.c.info b/Examples/Integer/IntegerExample.c.info new file mode 100644 index 0000000..686c039 Binary files /dev/null and b/Examples/Integer/IntegerExample.c.info differ diff --git a/Examples/Integer/IntegerExample.info b/Examples/Integer/IntegerExample.info new file mode 100644 index 0000000..a77d392 Binary files /dev/null and b/Examples/Integer/IntegerExample.info differ diff --git a/Examples/Label.info b/Examples/Label.info new file mode 100644 index 0000000..7ae9802 Binary files /dev/null and b/Examples/Label.info differ diff --git a/Examples/Label/LabelExample b/Examples/Label/LabelExample new file mode 100644 index 0000000..f3efef5 Binary files /dev/null and b/Examples/Label/LabelExample differ diff --git a/Examples/Label/LabelExample.c b/Examples/Label/LabelExample.c new file mode 100644 index 0000000..caec32a --- /dev/null +++ b/Examples/Label/LabelExample.c @@ -0,0 +1,246 @@ + +/** + ** LabelExample.c -- Label class example. + ** + ** This is a simple example testing some of the capabilities of the + ** Label image class. + ** + ** This code opens a simple window and then creates a Label image, + ** combining text, font changes and images. It then draws the image in + ** both its regular and selected state. + ** + ** Note that we are not using window or layout class here, we are + ** using the gadget in a fairly direct form, but that's perfectly legal. + ** + **/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct ClassLibrary *LabelBase; + +struct ClassLibrary * OpenClass(STRPTR, ULONG); + + +__chip UWORD image_data[] = +{ + /* Plane 0 */ + 0x0000, 0x0000, + 0x7F00, 0x0000, + 0x4180, 0x0000, + 0x4140, 0x0000, + 0x4120, 0x4000, + 0x41F0, 0x6000, + 0x401B, 0xF000, + 0x401B, 0xF800, + 0x401B, 0xF000, + 0x4018, 0x6000, + 0x4018, 0x4000, + 0x4018, 0x0000, + 0x4018, 0x0000, + 0x7FF8, 0x0000, + 0x1FF8, 0x0000, + 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, + 0x0000, 0x0000, + 0x3E00, 0x0000, + 0x3E80, 0x0000, + 0x3EC0, 0x0000, + 0x3E00, 0x0000, + 0x3FE0, 0x0000, + 0x3FE0, 0x0000, + 0x3FE0, 0x0000, + 0x3FE0, 0x0000, + 0x3FE0, 0x0000, + 0x3FE0, 0x0000, + 0x3FE0, 0x0000, + 0x0000, 0x0000, + 0x0000, 0x0000, + 0x0000, 0x0000 +}; + +struct Image image = +{ + 0, 0, 22, 16, 2, image_data, 0x03, 0x00, NULL +}; + +struct TextAttr emerald17 = { (STRPTR)"emerald.font", 18, FS_NORMAL, 0x01 }; + + +/* This is the start of our programme. + */ +main() +{ + struct Screen *screen = NULL; + + /* We'll just open up on the default public screen, and use its screen font. + */ + if (screen = LockPubScreen(NULL)) + { + struct DrawInfo *drinfo = NULL; + + if (drinfo = GetScreenDrawInfo(screen)) + { + /* Open the BOOPSI class library. + */ + PutStr("Opening class\n"); + + if (LabelBase = OpenClass("images/label.image", 0)) + { + struct Image *label_image; + UWORD mapping[4]; + + /* Setup the mapping. This is a pretty standard map for + * a 4 colour image. + */ + mapping[0] = drinfo->dri_Pens[BACKGROUNDPEN]; + mapping[1] = drinfo->dri_Pens[SHADOWPEN]; + mapping[2] = drinfo->dri_Pens[SHINEPEN]; + mapping[3] = drinfo->dri_Pens[FILLPEN]; + + /* Create a label image. Here we make use of underscoring, + * multiple lines, images, different pens, different fonts + * and right justification. + */ + PutStr("Creating object\n"); + if (label_image = (struct Image *)NewObject(LABEL_GetClass(), NULL, + IA_Font, screen->Font, + LABEL_Justification, LABEL_CENTRE, + LABEL_Text, "_Under-scored\nNot under-scored\n", + LABEL_Text, "An image: ", + LABEL_Mapping, mapping, + LABEL_Image, &image, + IA_FGPen, 3, + IA_Font, &emerald17, + LABEL_Text, "\nChange fonts,\n", + IA_FGPen, 2, + IA_Font, screen->Font, + LABEL_Text, "and colours, ", + LABEL_SoftStyle, FSF_BOLD, + LABEL_Text, " and styles", + TAG_END)) + { + struct Window *win = NULL; + + Printf("Image size -- width: %ld height: %ld\n", + (LONG)label_image->Width, (LONG)label_image->Height); + + /* Open a simple window. + */ + if (win = OpenWindowTags(NULL, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_InnerWidth, label_image->Width + INTERWIDTH * 2, + WA_InnerHeight, (label_image->Height + INTERHEIGHT * 2) * 2, + WA_IDCMP, IDCMP_GADGETUP | IDCMP_CLOSEWINDOW | IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "Label Class Demo", + WA_MinWidth, label_image->Width + INTERWIDTH * 2 + 20, + WA_MinHeight, (label_image->Height + INTERHEIGHT * 2) * 2 + screen->Font->ta_YSize + 10, + WA_MaxWidth, -1, + WA_MaxHeight, -1, + TAG_DONE)) + { + struct RastPort *rport = win->RPort; + struct IntuiMessage *imsg; + UWORD top = win->BorderTop + INTERHEIGHT; + UWORD left = win->BorderLeft + INTERWIDTH; + BOOL ok = TRUE; + + PutStr("Drawing image\n"); + + DrawImageState(rport, label_image, left, top, + IDS_NORMAL, drinfo); + DrawImageState(rport, label_image, left, top + label_image->Height + INTERHEIGHT, + IDS_SELECTED, drinfo); + + /* Just wait around until the close gadget is pressed. + */ + while (ok) + { + WaitPort(win->UserPort); + while (imsg = (struct IntuiMessage *)GetMsg(win->UserPort)) + { + switch(imsg->Class) + { + case IDCMP_REFRESHWINDOW: + DrawImageState(rport, label_image, left, top, + IDS_NORMAL, drinfo); + DrawImageState(rport, label_image, left, top + label_image->Height + INTERHEIGHT, + IDS_SELECTED, drinfo); + break; + + case IDCMP_CLOSEWINDOW: + ok = FALSE; + break; + + default: + break; + } + ReplyMsg((struct Message *)imsg); + } + } + /* Done. + */ + CloseWindow(win); + } + else + PutStr("ERROR: Couldn't open window\n"); + + PutStr("Disposing image\n"); + DisposeObject(label_image); + } + else + PutStr("ERROR: Couldn't create image\n"); + + PutStr("Closing class\n"); + CloseLibrary((struct Library *)LabelBase); + } + else + PutStr("ERROR: Couldn't open class\n"); + + FreeScreenDrawInfo(screen, drinfo); + } + else + PutStr("ERROR: Couldn't get DrawInfo\n"); + + UnlockPubScreen(0, screen); + } + else + PutStr("ERROR: Couldn't lock public screen\n"); +} + + +/* Function to open a BOOPSI class library. + */ +struct ClassLibrary * OpenClass(STRPTR name, ULONG version) +{ + struct Library *retval; + UBYTE buffer[256]; + + if ((retval = OpenLibrary(name, version)) == NULL) + { + sprintf (buffer, ":classes/%s", name); + if ((retval = OpenLibrary(buffer, version)) == NULL) + { + sprintf(buffer, "classes/%s", name); + retval = OpenLibrary(buffer, version); + } + } + return((struct ClassLibrary *)retval); +} diff --git a/Examples/Label/LabelExample.c.info b/Examples/Label/LabelExample.c.info new file mode 100644 index 0000000..0216d94 Binary files /dev/null and b/Examples/Label/LabelExample.c.info differ diff --git a/Examples/Label/LabelExample.info b/Examples/Label/LabelExample.info new file mode 100644 index 0000000..2879a15 Binary files /dev/null and b/Examples/Label/LabelExample.info differ diff --git a/Examples/Layout.info b/Examples/Layout.info new file mode 100644 index 0000000..12c6b07 Binary files /dev/null and b/Examples/Layout.info differ diff --git a/Examples/Layout/DynamicExample.c.info b/Examples/Layout/DynamicExample.c.info new file mode 100644 index 0000000..53d1ad5 Binary files /dev/null and b/Examples/Layout/DynamicExample.c.info differ diff --git a/Examples/Layout/DynamicExample.info b/Examples/Layout/DynamicExample.info new file mode 100644 index 0000000..e9bdf3b Binary files /dev/null and b/Examples/Layout/DynamicExample.info differ diff --git a/Examples/Layout/LayoutExample b/Examples/Layout/LayoutExample new file mode 100644 index 0000000..be76912 Binary files /dev/null and b/Examples/Layout/LayoutExample differ diff --git a/Examples/Layout/LayoutExample.c b/Examples/Layout/LayoutExample.c new file mode 100644 index 0000000..59ea3e8 --- /dev/null +++ b/Examples/Layout/LayoutExample.c @@ -0,0 +1,514 @@ +/************************************************************************* + * ClassAct Comprehensive Demo Program + * Copyright © 1995 Osma Ahvenlampi + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +void __stdargs kprintf(const char *, ...); + +/* a simple button */ +#define Button(a) ButtonObject, GA_Text, a, ButtonEnd +#define DButton(a) ButtonObject, GA_Text, a, GA_Disabled, TRUE, ButtonEnd + +/************************************************************************** + * Some label arrays for the gadgets in this demo. + */ + +static STRPTR objtypes[] = +{ + "Exec", + "Image", + "Sound", + "Menu", + "Icon", + "Dock", + "Access", + NULL +}; + +static STRPTR objnames[] = +{ + "ToolManager", + "ScreenMode", + "WBPattern", + NULL +}; + +/************************************************************************* + * Gadget list + * This wouldn't be strictly necessary, but it's an easy way of keeping + * the gadget pointers for when we need to access the gadgets. + */ +typedef enum { G_ObjType = 1, G_ObjList, G_Top, G_Up, G_Down, G_Bottom, + G_Sort, G_New, G_Edit, G_Copy, G_Remove, G_Help, G_Save, G_Use, + G_Test, G_Cancel, G_MAX } GadgetIDs; + +struct Gadget *GL[G_MAX+1]; + +/************************************************************************* + * ReadArgs + */ + +#define TEMPLATE "S=SIMPLEREFRESH/S,NC=NOCAREREFRESH/S,ND=NDEFER/S" +LONG ARG[3]; +typedef enum { A_Simple, A_NoCare, A_NoDefer } Args; + +/************************************************************************* + * App message hook. + * Workbench App messages can be caught with a callback hook such as this. + * We'll not worry about the app message type in this hook. Objects dropped + * on the window or on the icon (while iconified) will be added to the + * listview. + */ + +void __asm __saveds AppMsgFunc( register __a0 struct Hook *Hook, + register __a2 Object *Window, + register __a1 struct AppMessage *Msg ) +{ + struct Window *Win; + struct WBArg *arg = Msg->am_ArgList; + LONG i = Msg->am_NumArgs; + struct List *l = Hook->h_Data; + struct Node *n; + UBYTE name[256]; + + GetAttr( WINDOW_Window, Window, (ULONG *)&Win ); + + /* Detach the list for modifications. + */ + SetGadgetAttrs( GL[G_ObjList], Win, NULL, LISTBROWSER_Labels, ~0, TAG_END ); + + while (i--) + { + /* Add the name of the icon to the listview. ListBrowser can copy the + * text into an internal buffer and thus let us not worry about the + * pointer validity. + */ + + NameFromLock( arg->wa_Lock, name, sizeof(name) ); + AddPart( name, arg->wa_Name, sizeof(name) ); + + if (n = AllocListBrowserNode( 1, LBNCA_CopyText, TRUE, LBNCA_Text, name, TAG_END )) + AddTail( l, n ); + + arg++; + } + + /* Reattach the list */ + SetGadgetAttrs( GL[G_ObjList], Win, NULL, LISTBROWSER_Labels, l, TAG_END ); +} + +/************************************************************************* + * Main Program + */ +int +main(void) +{ + struct List *objlist; + struct List *typelist; + struct RDArgs *args; + struct MsgPort *appport; + + if (!ButtonBase) /* force it open */ + return 30; + + if (!(args = ReadArgs(TEMPLATE, ARG, NULL))) + return 20; + + Printf("%seferred %s refresh %s\n", ARG[A_NoDefer] ? "Non-d" : "D", ARG[A_Simple] ? "Simple" : "Smart", ARG[A_NoCare] ? "(NoCare)" : ""); + + objlist = BrowserNodesA( objnames ); + typelist = ChooserLabelsA( objtypes ); + + /* By providing a message port you enable windowclass to handle iconification + * and appwindows. This port can shared by all the windows of your application. + */ + appport = CreateMsgPort(); + + if (objlist && typelist && appport) + { + struct Gadget *MainLayout; + Object *Window; + + struct Hook apphook; + apphook.h_Entry = (ULONG (* )())AppMsgFunc; + apphook.h_SubEntry = NULL; + apphook.h_Data = objlist; + + /* Create a Window object with a Layout. When Window is asked to open itself, + * it will calculate how much space the Layout needs and size itself accordingly. + */ + + Window = WindowObject, + + /* these tags describe the window + */ + + WA_IDCMP, IDCMP_RAWKEY, + WA_Top, 20, + WA_Left, 20, + WA_SizeGadget, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + + /* About window refreshes: + * Because WindowClass and LayoutClass can, when used together, change the + * normal Intuition practise of refreshing gadgets in the input.device context, + * some rules about the refresh system change. + * Deferred refresh works in both smart and simple refresh windows, but + * if nocarerefresh is used, Intuition does not retain the damage regions + * and any window damage will force the whole window to be refreshed. + * This demo allows you to try combinations of refresh types. + * In the normal case you can ignore this and let WindowClass and the user + * decide what kind of refreshes they want. Nocare refresh can be + * combined with smart refresh to provide a fast, but somewhat more memory + * hungry refresh method. Simple refresh can save some memory but it's + * slower. + */ + + WA_SimpleRefresh, ARG[A_Simple], + WA_NoCareRefresh, ARG[A_NoCare], + WA_SmartRefresh, !ARG[A_Simple], + + WA_Title, "ClassAct layout.gadget Example (ToolManager preferences mockup)", + WA_ScreenTitle, "ClassAct Copyright 1995 Phantom Development LLC.", + + /* Turn on gadget help in the window + */ + + WINDOW_GadgetHelp, TRUE, + + /* Add an iconification gadget. If you have this, you must listen to + * WMHI_ICONIFY. + */ + + WINDOW_IconifyGadget, TRUE, + + /* This message port lets windowclass handle the icon and appwindow. + */ + + WINDOW_AppPort, appport, + WINDOW_AppWindow, TRUE, + WINDOW_AppMsgHook, &apphook, + + /* The windowclass will automatically free the DiskObject used when + * iconifying the window. If you do not provide a valid DiskObject, + * windowclass will try to use env:sys/def_window.info or the default + * project icon. + */ + + WINDOW_Icon, GetDiskObject( "LayoutExample" ), + WINDOW_IconTitle, "ClassAct Example", + + /* Below is the layout of the window + */ + + WINDOW_ParentGroup, MainLayout = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, BVS_THIN, + + /* this tag instructs layout.gadget to defer GM_LAYOUT and GM_RENDER and ask + * the windowclass to do them. This lessens the load on input.device + */ + LAYOUT_DeferLayout, !ARG[A_NoDefer], + + /* A 1-of-n chooser using the labels list we made from the label array earlier + */ + + StartMember, GL[G_ObjType] = ChooserObject, + CHOOSER_Labels, typelist, + EndMember, + MemberLabel("_Object Type"), + + /* Objects can be given arbitary weights within groups, and layout.gadget + * will distribute space relative to the total weight of the group. + * Here we set the button column to 0 weight which means minimum space. + * Thus the listview gets all available extra space. + */ + + StartHGroup, BAligned, + StartMember, GL[G_ObjList] = ListBrowserObject, + LISTBROWSER_Labels, objlist, + LISTBROWSER_ShowSelected, TRUE, + EndMember, + + StartVGroup, + StartMember, GL[G_Top] = DButton("Top"), + StartMember, GL[G_Up] = DButton("Up"), + StartMember, GL[G_Down] = DButton("Down"), + StartMember, GL[G_Bottom] = DButton("Bottom"), + StartMember, GL[G_Sort] = Button("So_rt"), + EndGroup, + CHILD_WeightedWidth, 0, + + /* One way to keep the buttons constant size is to set the + * group to stay at minimum size with a weight of 0. We could + * also set the weight of each of the buttons to 0. That way + * extra space would be distributed between the buttons + * instead of all below. This looks better. + */ + + CHILD_WeightedHeight, 0, + EndGroup, + + /* two rows of buttons. EvenSized instructs layout.gadget that it + * should make sure the minimum size of each matches, so that we + * get four neat columns. + * Again the weight is set to 0. When the window is resized, all + * space is given to the listview. + */ + + StartHGroup, EvenSized, + StartMember, GL[G_New] = Button("_New..."), + StartMember, GL[G_Edit] = DButton("_Edit..."), + StartMember, GL[G_Copy] = DButton("Co_py"), + StartMember, GL[G_Remove] = DButton("Remove"), + EndGroup, + CHILD_WeightedHeight, 0, + + StartHGroup, EvenSized, + StartMember, GL[G_Save] = Button("_Save"), + StartMember, GL[G_Use] = Button("_Use"), + StartMember, GL[G_Test] = Button("_Test"), + StartMember, GL[G_Cancel] = Button("_Cancel"), + EndGroup, + CHILD_WeightedHeight, 0, + + StartMember, GL[G_Help] = ButtonObject, + GA_ReadOnly, TRUE, + GA_Text, "Welcome to ClassAct demo!", + EndMember, + CHILD_WeightedHeight, 0, + EndGroup, + EndWindow; + + if (Window) + { + /* Window pointer cache. + */ + + struct Window *Win; + + /* Finish the gadgetarray initialisation. Set gadget IDs and release verify. + * This is one way of avoiding boring repetition in the layout description + * taglist itself. + */ + + { + LONG i = 1; + do SetAttrs(GL[i], GA_ID, i, GA_RelVerify, TRUE, TAG_END); + while (GL[++i]); + } + + if (Win = CA_OpenWindow( Window )) + { + ULONG wsig, asig = 1L << appport->mp_SigBit; + BOOL done = FALSE; + + /* Now that the window has been opened, we can get the signal mask + * of its user port. If the program supported iconification and didn't + * use a shared IDCMP port between all windows, this signal bit + * would have to be re-queried before each Wait(). + */ + + GetAttr( WINDOW_SigMask, Window, &wsig ); + + while (done == FALSE) + { + ULONG sig = Wait(wsig | asig | SIGBREAKF_CTRL_C); + ULONG result; + UWORD code; + + if (sig & (wsig | asig)) + { + /* Messages waiting at the window's IDCMP port. Loop at WM_HANDLEINPUT + * until all have been processed. + */ + + while ((result = CA_HandleInput(Window,&code)) != WMHI_LASTMSG) + { + /* The return code of this method is two-part. The upper word describes the + * class of the message (gadgetup, menupick, closewindow, iconify, etc), + * and the lower word is a class-defined ID, currently in use in the + * gadgetup and menupick return codes. + * Switch on the class, then on the ID. + */ + + switch(result & WMHI_CLASSMASK) + { + case WMHI_GADGETUP: + + /* OK, got a gadgetup from something. Lets find out what the something is. + * The code WORD to which a pointer was passed to WM_HANDLEINPUT has been + * set to the Code value from the IDCMP_GADGETUP, in case we need it. + */ + + switch(result & WMHI_GADGETMASK) + { + case G_ObjList: + /* User clicked on the listview + */ + { + static ULONG ids[] = { G_Top, G_Up, G_Down, G_Bottom, G_Edit, G_Copy, G_Remove, 0 }; + ULONG i, dis = FALSE; + + if (code == ~0) /* no node was selected */ + dis = TRUE; + + for ( i = 0 ; ids[i] ; i++ ) + { + SetGadgetAttrs( GL[ids[i]], Win, NULL, GA_Disabled, dis, TAG_END ); + RefreshGList( GL[ids[i]], Win, NULL, 1 ); + } + + break; + } + } + break; + + case WMHI_GADGETHELP: + { + STRPTR helptext; + + /* A gadget help message informs the application about the gadget + * under the mouse pointer. The code WORD is set to the value the + * gadget returned. Result code contains the ID of the gadget, + * or NULL (not in the window) or WMHI_GADGETMASK (not over a gadget). + */ + + switch(result & WMHI_GADGETMASK) + { + case G_ObjType: + helptext = "Choose object type"; + break; + case G_ObjList: + helptext = "Choose object to modify"; + break; + case G_Top: + helptext = "Move object to top"; + break; + case G_Up: + helptext = "Move object upwards"; + break; + case G_Down: + helptext = "Move object downwards"; + break; + case G_Bottom: + helptext = "Move object to bottom"; + break; + case G_Sort: + helptext = "Sort object list"; + break; + case G_New: + helptext = "Create new object"; + break; + case G_Edit: + helptext = "Edit object"; + break; + case G_Copy: + helptext = "Make a new copy of object"; + break; + case G_Remove: + helptext = "Delete the object"; + break; + case G_Help: + helptext = "Hey there ;)"; + break; + case G_Save: + helptext = "Save settings"; + break; + case G_Use: + helptext = "Use these settings"; + break; + case G_Test: + helptext = "Test these settings"; + break; + case G_Cancel: + helptext = "Cancel changes"; + break; + default: + helptext = ""; + break; + } + if (SetGadgetAttrs( GL[G_Help], Win, NULL, GA_Text, helptext, TAG_END )) + RefreshGList(GL[G_Help], Win, NULL, 1); + } + break; + + case WMHI_CLOSEWINDOW: + /* The window close gadget was hit. Time to die... + */ + done = TRUE; + break; + + case WMHI_ICONIFY: + /* Window requests that it be iconified. Handle this event as + * soon as possible. The window is not iconified automatically to + * give you a chance to make note that the window pointer will be + * invalid before the window closes. It also allows you to free + * resources only needed when the window is open, if you wish to. + */ + if (CA_Iconify( Window )) + Win = NULL; + break; + + case WMHI_UNICONIFY: + /* The window should be reopened. If you had free'd something + * on iconify, now is the time to re-allocate it, before calling + * CA_OpenWindow. + */ + Win = CA_OpenWindow( Window ); + break; + } + } + } + else if (sig & SIGBREAKF_CTRL_C) + { + done = TRUE; + } + } + /* Close the window and dispose of all attached gadgets + */ + DisposeObject( Window ); + } + } + } + + if (appport) + DeleteMsgPort(appport); + + /* NULL is valid input for these helper functions, so no need to check. + */ + FreeChooserLabels( typelist ); + FreeBrowserNodes( objlist ); + + FreeArgs(args); +} diff --git a/Examples/Layout/LayoutExample.c.info b/Examples/Layout/LayoutExample.c.info new file mode 100644 index 0000000..344094c Binary files /dev/null and b/Examples/Layout/LayoutExample.c.info differ diff --git a/Examples/Layout/LayoutExample.info b/Examples/Layout/LayoutExample.info new file mode 100644 index 0000000..b1f4db5 Binary files /dev/null and b/Examples/Layout/LayoutExample.info differ diff --git a/Examples/Layout/WeightedDemo b/Examples/Layout/WeightedDemo new file mode 100644 index 0000000..e0d1811 Binary files /dev/null and b/Examples/Layout/WeightedDemo differ diff --git a/Examples/Layout/WeightedDemo.c b/Examples/Layout/WeightedDemo.c new file mode 100644 index 0000000..b029305 --- /dev/null +++ b/Examples/Layout/WeightedDemo.c @@ -0,0 +1,305 @@ +;/* +sc link weighteddemo.c lib lib:classact.lib +quit +*/ + +/* Layout Gadget Example. + * In this example we will NOT use window.class - just to show it is possible. + * Note, we do *NOT* recommend this. Window.class offers automatic prefs refresh, + * and support for window backfills, iconification and keyboard control! + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +/************************************************************************* + * Main Program + */ +int main(argc,argv) + int argc; + char *argv[]; +{ + struct Screen *Scr = NULL; + struct Window *Win = NULL; + struct Gadget *gParent = NULL; + + if (!ButtonBase) + return(20); + + if(argc > 1) + Scr = LockPubScreen(argv[1]); + else + Scr = LockPubScreen("Workbench"); + + if (Scr == NULL) + { + /* Shut down, no screen lock + */ + Printf("Failed locking public screen.\n"); + return(5); + } + + /* In this example we will create the layout group before opening + * the window, and size the window to the minimum layout size + * returned by the LayoutLimits() function, then SetGadgetAttr() + * will be used to cause the GREL layout group to resize with the window. + */ + + gParent = VGroupObject, + ICA_TARGET, ICTARGET_IDCMP, + + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_DeferLayout, TRUE, /* this tag instructs layout.gadget to + * defer GM_LAYOUT and GM_RENDER and ask + * the application to do them. This + * lessens the load on input.device + */ + LAYOUT_AddChild, HGroupObject, + LAYOUT_SpaceOuter, FALSE, + LAYOUT_AddChild, HGroupObject, + LAYOUT_SpaceOuter, TRUE, + /* the first group is three label-less buttons + * side by side + */ + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_Label, "Horizontal", + LAYOUT_AddChild, ButtonObject, + End, + LAYOUT_AddChild, ButtonObject, + End, + LAYOUT_AddChild, ButtonObject, + End, + End, + + LAYOUT_AddChild, VGroupObject, + LAYOUT_SpaceOuter, TRUE, + /* the second group is three label-less buttons + * in a vertical group + */ + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_Label, "Vertical", + LAYOUT_AddChild, ButtonObject, + End, + LAYOUT_AddChild, ButtonObject, + End, + LAYOUT_AddChild, ButtonObject, + End, + End, + End, + + LAYOUT_AddChild, HGroupObject, + /* four buttons of varying widths */ + LAYOUT_BevelStyle, BVS_SBAR_VERT, + LAYOUT_Label, "Free, Fixed and Weighted sizes.", + LAYOUT_AddChild, ButtonObject, + GA_Text, "25Kg", + End, + CHILD_WeightedWidth, 25, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "50Kg", + End, + CHILD_WeightedWidth, 50, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "75Kg", + End, + CHILD_WeightedWidth, 75, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "100Kg", + End, + CHILD_WeightedWidth, 100, + End, + CHILD_WeightedHeight,0, + + LAYOUT_AddChild, HGroupObject, + /* four buttons sized in another way */ + LAYOUT_AddChild, ButtonObject, + GA_Text, "Free", + End, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "Fixed", + End, + CHILD_WeightedWidth, 0, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "Free", + End, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "Fixed", + End, + CHILD_WeightedWidth, 0, + End, + CHILD_WeightedHeight,0, + CHILD_MinWidth, 300, + + End; + + if (gParent) + { + struct LayoutLimits Limits; + struct TextFont *font = OpenFont( Scr->Font ); + + /* Query parent layout group for min/max layout limits. */ + LayoutLimits( gParent, &Limits, font, Scr ); + + CloseFont( font ); + + if (Win = OpenWindowTags(NULL, + WA_Flags, WFLG_DEPTHGADGET | WFLG_DRAGBAR | + WFLG_CLOSEGADGET | WFLG_ACTIVATE | WFLG_SIZEGADGET, + WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_IDCMPUPDATE, + WA_Top, 20, + WA_Left, 20, + WA_InnerWidth, Limits.MinWidth, /* open the window at the minimum */ + WA_InnerHeight, Limits.MinHeight, /* size in which the layout fits */ + WA_NoCareRefresh, TRUE, /* only BOOPSI here, no need for separate refreshing */ + WA_PubScreen, Scr, + WA_Title, "ClassAct layout.gadget Example", + WA_ScreenTitle, "ClassAct Copyright 1995 Phantom Development LLC.", + TAG_END)) + { + ULONG wsig = 1L << Win->UserPort->mp_SigBit; + struct IntuiMessage *msg; + BOOL done = FALSE; + + WORD BorderWidth = Win->BorderLeft + Win->BorderRight; + WORD BorderHeight = Win->BorderTop + Win->BorderBottom; + + /* set the window minimum and maximum size to the limits of the layout */ + WindowLimits(Win, + Limits.MinWidth + BorderWidth, + Limits.MinHeight + BorderHeight, + Limits.MaxWidth + BorderWidth, + Limits.MaxHeight + BorderHeight); + + /* make the layout group resize itself relative to window size */ + SetGadgetAttrs( gParent, NULL, NULL, + GA_Top, Win->BorderTop, + GA_Left, Win->BorderLeft, + GA_RelWidth, -BorderWidth, + GA_RelHeight, -BorderHeight, + TAG_END); + + /* make the layout visible */ + AddGadget(Win, gParent, -1); + RefreshGList(gParent, Win, NULL, 1); + + while (done == FALSE) + { + ULONG sig = Wait(wsig | SIGBREAKF_CTRL_C); + + if (sig & wsig) + { + while (msg = (struct IntuiMessage *) GetMsg(Win->UserPort)) + { + /* If you chooser to reply to the message before processing + * it, remember that for IDCMP_IDCMPUPDATE the IAddress + * field points to a tag list that will get free'd on reply. + * + * Before replying, check if the message is IDCMPUPDATE + * and CloneTagItems(msg->IAddress). Don't forget to + * FreeTagItems() your cloned list after you have + * processed it. + */ + + switch (msg->Class) + { + case IDCMP_CLOSEWINDOW: + done = TRUE; + break; + + case IDCMP_IDCMPUPDATE: + { + /* These are the deferred layout specific event + * handlers. This is not as sophisticated as + * window.class's internal logic, but it will suffice. + */ + if (FindTagItem(LAYOUT_RequestRefresh,msg->IAddress)) + { + /* Intuition attempted to refresh the window, + * layout.gadget sent this message to the application. + * We now do the refresh. This is done here because + * refreshing a very complex layout could take some + * time, and doing it in input.device context makes + * the pointer jumpy. + * RefreshWindowFrame() will refresh not only the + * window border but also all gadgets. + * RefreshGList(gParent, Win, NULL, 1); + */ + RefreshWindowFrame( Win ); + break; + } + else if (FindTagItem(LAYOUT_RequestLayout,msg->IAddress)) + { + /* GM_LAYOUT can be a slow operation, so we don't + * want it to be done my input.device... + */ + RethinkLayout(gParent, Win, NULL, FALSE ); + break; + } + else if (FindTagItem(LAYOUT_RelVerify,msg->IAddress)) + { + /* LAYOUT_RelVerify matches an IDCMP_GADGETUP, + * which is somewhat restricted because of + * Intuition limitations.... + */ + + switch ( GetTagData(GA_ID,0,msg->IAddress) ) + { + default: + done = TRUE; + break; + } + break; + } + } + break; + + default: + break; + } + + ReplyMsg((struct Message *) msg); + } + } + else if (sig & SIGBREAKF_CTRL_C) + { + done = TRUE; + } + } + + RemoveGadget(Win, gParent); + CloseWindow(Win); + } + + /* Disposing a layout instance will automatically dispose + * all the child objects. + */ + DisposeObject(gParent); + } + + UnlockPubScreen(0, Scr); + exit(0); +} diff --git a/Examples/Layout/WeightedDemo.c.info b/Examples/Layout/WeightedDemo.c.info new file mode 100644 index 0000000..b7884f7 Binary files /dev/null and b/Examples/Layout/WeightedDemo.c.info differ diff --git a/Examples/Layout/WeightedDemo.info b/Examples/Layout/WeightedDemo.info new file mode 100644 index 0000000..cfcfc4f Binary files /dev/null and b/Examples/Layout/WeightedDemo.info differ diff --git a/Examples/Layout/dynamicexample b/Examples/Layout/dynamicexample new file mode 100644 index 0000000..bc37f99 Binary files /dev/null and b/Examples/Layout/dynamicexample differ diff --git a/Examples/Layout/dynamicexample.c b/Examples/Layout/dynamicexample.c new file mode 100644 index 0000000..299a538 --- /dev/null +++ b/Examples/Layout/dynamicexample.c @@ -0,0 +1,294 @@ +;/* Dynamic Example +sc link dynamicexample.c lib lib:classact.lib +quit +*/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + +enum +{ + GID_MAIN=0, + GID_ADDBUTTON, + GID_REMBUTTON, + GID_REPLACE, + GID_ADDED, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + /* we must initialize this pointer! */ + gadgets[GID_ADDED] = NULL; + + /* make sure our classes opened... */ + if (!ButtonBase || !CheckBoxBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct Dynamic Layout Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "Dynamic Iconified", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_DeferLayout, TRUE, + LAYOUT_SpaceOuter, TRUE, + + LAYOUT_AddChild, HGroupObject, + LAYOUT_EvenSize, TRUE, + LAYOUT_AddChild, gadgets[GID_ADDBUTTON] = ButtonObject, + GA_ID, GID_ADDBUTTON, + GA_RelVerify, TRUE, + GA_Text, "_AddChild", + ButtonEnd, + + LAYOUT_AddChild, gadgets[GID_REMBUTTON] = ButtonObject, + GA_ID, GID_REMBUTTON, + GA_RelVerify, TRUE, + GA_Text, "_RemoveChild", + GA_Disabled, TRUE, + ButtonEnd, + + LAYOUT_AddChild, gadgets[GID_REPLACE] = ButtonObject, + GA_ID, GID_REPLACE, + GA_RelVerify, TRUE, + GA_Text, "Replace", + GA_Disabled, TRUE, + ButtonEnd, + + LAYOUT_AddChild, gadgets[GID_QUIT] = ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + LayoutEnd, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_ADDBUTTON: + if (gadgets[GID_ADDED] == NULL) + { + SetGadgetAttrs(gadgets[GID_ADDBUTTON], windows[WID_MAIN], NULL, + GA_Disabled, TRUE, + TAG_DONE); + SetGadgetAttrs(gadgets[GID_REMBUTTON], windows[WID_MAIN], NULL, + GA_Disabled, FALSE, + TAG_DONE); + SetGadgetAttrs(gadgets[GID_REPLACE], windows[WID_MAIN], NULL, + GA_Disabled, FALSE, + TAG_DONE); + + /* add a new child! */ + SetGadgetAttrs(gadgets[GID_MAIN], windows[WID_MAIN], NULL, + LAYOUT_Inverted, TRUE, // Causes AddHead vs. AddTail! + LAYOUT_AddChild, gadgets[GID_ADDED] = ButtonObject, + GA_ID, GID_ADDED, + GA_RelVerify, TRUE, + GA_Text, "Peekaboo!", + ButtonEnd, + TAG_DONE); + + /* rethink the window layout */ + if (DoMethod(objects[OID_MAIN], WM_RETHINK) == 0) + DoMethod(objects[OID_MAIN], WM_NEWPREFS); + } + break; + + case GID_REMBUTTON: + if (gadgets[GID_ADDED] != NULL) + { + SetGadgetAttrs(gadgets[GID_ADDBUTTON], windows[WID_MAIN], NULL, + GA_Disabled, FALSE, + TAG_DONE); + SetGadgetAttrs(gadgets[GID_REMBUTTON], windows[WID_MAIN], NULL, + GA_Disabled, TRUE, + TAG_DONE); + SetGadgetAttrs(gadgets[GID_REPLACE], windows[WID_MAIN], NULL, + GA_Disabled, TRUE, + TAG_DONE); + + /* remove the child! */ + SetGadgetAttrs(gadgets[GID_MAIN], windows[WID_MAIN], NULL, + LAYOUT_RemoveChild, gadgets[GID_ADDED], + TAG_DONE); + + /* clear the pointer */ + gadgets[GID_ADDED] = NULL; + + /* rethink the window layout */ + if (DoMethod(objects[OID_MAIN], WM_RETHINK) == 0) + DoMethod(objects[OID_MAIN], WM_NEWPREFS); + } + break; + + case GID_REPLACE: + if (gadgets[GID_ADDED] != NULL) + { + struct Gadget *temp = NULL; + + SetGadgetAttrs(gadgets[GID_REPLACE], windows[WID_MAIN], NULL, + GA_Disabled, TRUE, + TAG_DONE); + + /* replace the child! */ + SetGadgetAttrs(gadgets[GID_MAIN], windows[WID_MAIN], NULL, + LAYOUT_ModifyChild, gadgets[GID_ADDED], + CHILD_ReplaceObject, temp = CheckBoxObject, + GA_ID, GID_ADDED, + GA_RelVerify, TRUE, + GA_Text, "Peekaboo!", + CHECKBOX_TextPlace, PLACETEXT_RIGHT, + CheckBoxEnd, + TAG_DONE); + + gadgets[GID_ADDED] = temp; + + /* rethink the window layout */ + if (DoMethod(objects[OID_MAIN], WM_RETHINK) == 0) + DoMethod(objects[OID_MAIN], WM_NEWPREFS); + } + break; + + case GID_ADDED: + break; + + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/ListBrowser.info b/Examples/ListBrowser.info new file mode 100644 index 0000000..de212e4 Binary files /dev/null and b/Examples/ListBrowser.info differ diff --git a/Examples/ListBrowser/LB_Example b/Examples/ListBrowser/LB_Example new file mode 100644 index 0000000..fc180af Binary files /dev/null and b/Examples/ListBrowser/LB_Example differ diff --git a/Examples/ListBrowser/LB_Example.c b/Examples/ListBrowser/LB_Example.c new file mode 100644 index 0000000..5e700d3 --- /dev/null +++ b/Examples/ListBrowser/LB_Example.c @@ -0,0 +1,382 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +ULONG __asm __saveds lb_hook(register __a0 struct Hook *hook, register + __a2 struct Node *node, register __a1 struct LBDrawMsg *msg); + +struct ColumnInfo ci[] = +{ + { 100, "Column Header", 0 }, + { -1, (STRPTR)~0, -1 } +}; + +struct TextAttr emerald17 = { (STRPTR)"emerald.font", 18, FS_NORMAL, 0x01 }; + + +/* Here's where it all starts. + */ +main() +{ + struct Screen *screen = NULL; + + if (!ButtonBase) return(20); + + /* We'll just open up on the default public screen, and use its screen font. + */ + if (screen = LockPubScreen(NULL)) + { + struct TextAttr emerald17 = { (STRPTR)"emerald.font", 18, FS_NORMAL, 0x01 }; + struct DrawInfo *drinfo = GetScreenDrawInfo(screen); + Object *layout; + struct Gadget *lb_gad; + struct List list; + struct Image *limage, *gimage; + struct Hook lbhook; + + NewList(&list); + + if (layout = LayoutObject, + GA_DrawInfo, drinfo, + LAYOUT_DeferLayout, TRUE, /* Layout refreshes done on + * task's context (by the + * window class) */ + LAYOUT_SpaceOuter, TRUE, + LAYOUT_AddChild, lb_gad = ListBrowserObject, + GA_ID, 1, + GA_RelVerify, TRUE, + LISTBROWSER_Labels, &list, + LISTBROWSER_ColumnInfo, &ci, + LISTBROWSER_ColumnTitles, TRUE, + LISTBROWSER_Separators, TRUE, + LISTBROWSER_Hierarchical, TRUE, + LISTBROWSER_Editable, TRUE, + LISTBROWSER_MultiSelect, TRUE, + LISTBROWSER_ShowSelected, TRUE, + ListBrowserEnd, + + LayoutEnd) + { + struct MsgPort *app_port; + Object *window_obj; + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Demo of ListBrowserNode features", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Editable node", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Click twice to edit", + LBNCA_Editable, TRUE, + LBNCA_MaxChars, 60, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Change colours", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Flags, LBFLG_CUSTOMPENS, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Colourful!", + LBNCA_FGPen, 19, + LBNCA_BGPen, 18, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Checkbox item", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_CheckBox, TRUE, + LBNA_Checked, TRUE, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Checked by default", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_CheckBox, TRUE, + LBNA_Checked, FALSE, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Unchecked by default", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Justifications", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Left", + LBNCA_Justification, LCJ_LEFT, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Centre", + LBNCA_Justification, LCJ_CENTRE, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Right", + LBNCA_Justification, LCJ_RIGHT, + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Read-Only node", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Flags, LBFLG_READONLY, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Can't select me!", + TAG_DONE); + + gimage = GlyphObject, + IA_Width, 20, + IA_Height, 20, + GLYPH_Glyph, GLYPH_POPTIME, + GlyphEnd; + limage = LabelObject, + IA_Font, &emerald17, + LABEL_Text, "Created using _label.image\n", + IA_Font, screen->Font, + LABEL_SoftStyle, FSF_BOLD | FSF_ITALIC, + LABEL_Image, gimage, + IA_FGPen, 35, + LABEL_Text, " Cool eh?", + LabelEnd; + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Some images", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_Image, limage, + TAG_DONE); + + lbhook.h_Entry = (ULONG (*)())lb_hook; + lbhook.h_SubEntry = NULL; + lbhook.h_Data = NULL; + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 1, + LBNA_Flags, LBFLG_HASCHILDREN | LBFLG_SHOWCHILDREN, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, "Rendering hook", + TAG_DONE); + + LBAddNode(lb_gad, NULL, NULL, (struct Node *)~0, + LBNA_Generation, 2, + LBNA_Column, 0, + LBNCA_RenderHook, &lbhook, + LBNCA_HookHeight, 20, + TAG_DONE); + + /* Create a message port for App* messages. This is needed for + * iconification. We're being a touch naughty by not checking + * the return code, but that just means that iconification won't + * work, nothing really bad will happen. + */ + app_port = CreateMsgPort(); + + /* Create the window object. + */ + if (window_obj = WindowObject, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_CustomScreen, screen, + WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "ListBrowser class example", + WA_InnerWidth, 300, + WA_InnerHeight, 200, + WA_NewLookMenus, TRUE, + WINDOW_ParentGroup, layout, + WINDOW_IconifyGadget, TRUE, + WINDOW_Icon, GetDiskObject("PROGDIR:LB_Example"), + WINDOW_IconTitle, "LB_Example", + WINDOW_AppPort, app_port, + TAG_DONE)) + { + struct Window *win; + + /* Open the window. + */ + if (win = (struct Window *)CA_OpenWindow(window_obj)) + { + ULONG signal; + BOOL ok = TRUE; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, window_obj, &signal); + + /* Input Event Loop + */ + while (ok) + { + ULONG result; + + Wait(signal | (1L << app_port->mp_SigBit)); + + /* CA_HandleInput() returns the gadget ID of a clicked + * gadget, or one of several pre-defined values. For + * this demo, we're only actually interested in a + * close window and a couple of gadget clicks. + */ + while ((result = CA_HandleInput(window_obj, NULL)) != WMHI_LASTMSG) + { + switch(result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + ok = FALSE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + default: + break; + } + break; + + case WMHI_ICONIFY: + if (CA_Iconify(window_obj)) + win = NULL; + break; + + case WMHI_UNICONIFY: + win = CA_OpenWindow(window_obj); + break; + + default: + break; + } + } + } + } + else + PutStr("ERROR: failed to start. Couldn't open window\n"); + + /* Disposing of the window object will also close the + * window if it is already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(window_obj); + } + else + PutStr("ERROR: failed to start. Couldn't create window\n"); + + /* Lose the App* message port. + */ + if (app_port) + DeleteMsgPort(app_port); + } + else + PutStr("ERROR: failed to start. Couldn't create layout\n"); + + if (drinfo) + FreeScreenDrawInfo(screen, drinfo); + + UnlockPubScreen(0, screen); + } + else + PutStr("ERROR: failed to start. Couldn't lock destination screen\n"); + + exit(0); +} + +ULONG __asm __saveds lb_hook(register __a0 struct Hook *hook, register + __a2 struct Node *node, register __a1 struct LBDrawMsg *msg) +{ + UWORD patterndata[2] = { 0x2222, 0x8888 }; + WORD width = msg->lbdm_Bounds.MaxX - msg->lbdm_Bounds.MinX; + WORD height = msg->lbdm_Bounds.MaxY - msg->lbdm_Bounds.MinY; + + if(msg->lbdm_MethodID != LV_DRAW) + return(LBCB_UNKNOWN); + + SetAPen(msg->lbdm_RastPort, 69); + DrawEllipse(msg->lbdm_RastPort, + msg->lbdm_Bounds.MinX + (width / 2), msg->lbdm_Bounds.MinY + (height / 2), + width / 2, height / 2); + + return(LVCB_OK); +} diff --git a/Examples/ListBrowser/LB_Example.c.info b/Examples/ListBrowser/LB_Example.c.info new file mode 100644 index 0000000..026bc9e Binary files /dev/null and b/Examples/ListBrowser/LB_Example.c.info differ diff --git a/Examples/ListBrowser/LB_Example.info b/Examples/ListBrowser/LB_Example.info new file mode 100644 index 0000000..4113c37 Binary files /dev/null and b/Examples/ListBrowser/LB_Example.info differ diff --git a/Examples/ListBrowser/ListBrowserExample b/Examples/ListBrowser/ListBrowserExample new file mode 100644 index 0000000..211b061 Binary files /dev/null and b/Examples/ListBrowser/ListBrowserExample differ diff --git a/Examples/ListBrowser/ListBrowserExample.c b/Examples/ListBrowser/ListBrowserExample.c new file mode 100644 index 0000000..20ddb35 --- /dev/null +++ b/Examples/ListBrowser/ListBrowserExample.c @@ -0,0 +1,540 @@ + +/** + ** ListBrowserTest.c -- List Browser class test. + ** + ** This is a simple example testing some of the capabilities of the + ** ListBrowser gadget class. + ** + ** This code opens a simple window and then a ListBrowser gadget which is + ** subsequently attached to the window's gadget list. Everytime the user + ** clicks on the close gadget, this code changes some of the attributes + ** of the ListBrowser gadget to demonstrate different ways it can be used, + ** including one demonstration which creates two images using the Label + ** class and shows them in the ListBrowser. + ** + **/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Soon to be moved to gadgets/listbrowser.h + */ +#define LBNCA_Editable (LBNA_Dummy+13) +#define LBNCA_MaxChars (LBNA_Dummy+14) +#define LBNCA_CopyText (LBNA_Dummy+15) +#define LISTBROWSER_Editable (LISTBROWSER_Dummy+33) +#define LISTBROWSER_Position (LISTBROWSER_Dummy+34) +#define LISTBROWSER_EditNode (LISTBROWSER_Dummy+35) +#define LISTBROWSER_EditColumn (LISTBROWSER_Dummy+36) +#define LBP_LINEUP 1 +#define LBP_LINEDOWN 2 +#define LBP_PAGEUP 3 +#define LBP_PAGEDOWN 4 +#define LBP_TOP 5 +#define LBP_BOTTOM 6 + +#define RAWKEY_CURSORUP 76 +#define RAWKEY_CURSORDOWN 77 +#define QUALIFIER_SHIFT 0x03 +#define QUALIFIER_ALT 0x30 +#define QUALIFIER_CTRL 0x08 + + +/* Function prototypes. + */ +BOOL make_list(struct List *, UBYTE **, LONG *); +VOID free_list(struct List *); +VOID wait_for_close(struct Window *, struct Gadget *); +struct ClassLibrary * OpenClass(STRPTR, ULONG); + +/* Global variables. + */ +struct ClassLibrary *ListBrowserBase; +struct ClassLibrary *LabelBase; + + +UBYTE *col1[] = +{ + "This is a", "test of the", "ListBrowser", "gadget class.", + "This is like", "a souped-up", "listview", "gadget. It", "has many", + "cool new", "features", "though like", "multiple", "columns,", + "horizontal", "scrolling,", "images in", "nodes,", "columns titles", + "and much much", "more!", + "This is a", "test of the", "ListBrowser", "gadget class.", + "This is like", "a souped-up", "listview", "gadget. It", "has many", + "cool new", "features", "though like", "multiple", "columns,", + "horizontal", "scrolling,", "images in", "nodes,", "columns titles", + "and much much", "more!", + "This is a", "test of the", "ListBrowser", "gadget class.", + "This is like", "a souped-up", "listview", "gadget. It", "has many", + "cool new", "features", "though like", "multiple", "columns,", + "horizontal", "scrolling,", "images in", "nodes,", "columns titles", + "and much much", "more!", NULL +}; + +LONG col2[] = +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63 +}; + +struct ColumnInfo ci[] = +{ + { 80, "Col 1", 0 }, + { 60, "Col 2", 0 }, + { 60, "Col 3", 0 }, + { -1, (STRPTR)~0, -1 } +}; + +struct ColumnInfo fancy_ci[] = +{ + { 100, NULL, 0 }, + { -1, (STRPTR)~0, -1 } +}; + +/* Some fonts for our fancy list. + */ +struct TextAttr helvetica24b = { (STRPTR)"helvetica.font", 24, FSF_BOLD, FPF_DISKFONT }; +struct TextAttr times18i = { (STRPTR)"times.font", 18, FSF_ITALIC, FPF_DISKFONT }; +struct TextAttr times18 = { (STRPTR)"times.font", 18, 0, FPF_DISKFONT }; + + +/* This is the start of our programme. + */ +main() +{ + struct Screen *screen = NULL; + + /* We'll just open up on the default public screen, and use its screen font. + */ + if (screen = LockPubScreen(NULL)) + { + struct Window *win = NULL; + + /* Open the window, note how we size the window to perfectly fit + * all the gadgets. + */ + if (win = OpenWindowTags(NULL, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_Width, 300, + WA_Height, 160, + WA_CustomScreen, screen, + WA_IDCMP, IDCMP_GADGETUP | IDCMP_MOUSEMOVE | IDCMP_RAWKEY | + IDCMP_CLOSEWINDOW | IDCMP_GADGETDOWN, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "ListBrowser Class Demo", + WA_MinWidth, 50, + WA_MinHeight, 50, + WA_MaxWidth, -1, + WA_MaxHeight, -1, + TAG_DONE)) + { + /* Create the private BOOPSI image class. + */ + PutStr("Creating ListBrowser class\n"); + if (ListBrowserBase = OpenClass("gadgets/listbrowser.gadget", 0)) + { + struct Gadget *listbrowser_gad; + struct List label_list; + + make_list(&label_list, col1, col2); + + /* Create a listbrowser gadget. + */ + PutStr("Creating ListBrowser object\n"); + if (listbrowser_gad = (struct Gadget *)NewObject(LISTBROWSER_GetClass(), NULL, + GA_ID, 1, + GA_Top, win->BorderTop + 5, + GA_Left, 10, + GA_RelWidth, -34, + GA_RelHeight, -(win->BorderTop + win->BorderBottom + 10), + GA_RelVerify, TRUE, + LISTBROWSER_Labels, (ULONG)&label_list, + LISTBROWSER_ColumnInfo, (ULONG)&ci, + LISTBROWSER_ColumnTitles, TRUE, + LISTBROWSER_MultiSelect, FALSE, + LISTBROWSER_Separators, TRUE, + LISTBROWSER_ShowSelected, FALSE, + LISTBROWSER_Editable, TRUE, + TAG_END)) + { + /* Adding gadgets. + */ + PutStr("Adding gadget\n"); + AddGList(win, listbrowser_gad, -1, -1, NULL); + PutStr("Refreshing gadget\n"); + RefreshGList(listbrowser_gad, win, NULL, -1); + + /* Wait for close gadget click to continue. + */ + SetWindowTitles(win, "<- Click here to continue", (UBYTE *)~0); + wait_for_close(win, listbrowser_gad); + + /* Make Visible + */ + SetWindowTitles(win, "Make Visible 10", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_MakeVisible, 10, + LISTBROWSER_EditNode, 8, + LISTBROWSER_EditColumn, 1, + TAG_DONE); + ActivateGadget(listbrowser_gad, win, NULL); + wait_for_close(win, listbrowser_gad); + + /* Show selected + */ + SetWindowTitles(win, "Show selected, Auto-Fit", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_ShowSelected, TRUE, + LISTBROWSER_AutoFit, TRUE, + LISTBROWSER_HorizontalProp, TRUE, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + /* Multi-select + */ + SetWindowTitles(win, "Multi-select, Virtual Width of 500", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_MultiSelect, TRUE, + LISTBROWSER_VirtualWidth, 500, + LISTBROWSER_AutoFit, FALSE, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + /* Detach the list. + */ + SetWindowTitles(win, "Detached list", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_MultiSelect, FALSE, + LISTBROWSER_Labels, ~0, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + /* No separators, no title, 1 column. + */ + SetWindowTitles(win, "No separators, no title, 1 column.", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Labels, (ULONG)&label_list, + LISTBROWSER_ColumnInfo, (ULONG)&fancy_ci, + LISTBROWSER_Separators, FALSE, + LISTBROWSER_ColumnTitles, FALSE, + LISTBROWSER_AutoFit, TRUE, + LISTBROWSER_VirtualWidth, 0, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + /* Fancy list. + */ + PutStr("Creating Label class\n"); + if (LabelBase = OpenClass("images/label.image", 0)) + { + struct List fancy_list; + struct Image *image1, *image2; + struct Node *node1, *node2; + + NewList(&fancy_list); + + PutStr("Creating Label object\n"); + if (image1 = (struct Image *)NewObject(LABEL_GetClass(), NULL, + IA_FGPen, 1, + IA_BGPen, 2, + IA_Font, (ULONG)&helvetica24b, + LABEL_Text, (ULONG)"C", + IA_Font, (ULONG)×18i, + LABEL_Text, (ULONG)"lass ", + IA_Font, (ULONG)&helvetica24b, + LABEL_Text, (ULONG)"A", + IA_Font, (ULONG)×18i, + LABEL_Text, (ULONG)"ct", + TAG_END)) + { + PutStr("Creating Label object\n"); + if (image2 = (struct Image *)NewObject(LABEL_GetClass(), NULL, + IA_FGPen, 2, + IA_BGPen, 0, + IA_Font, (ULONG)×18, + LABEL_Text, (ULONG)"By Phantom Development", + TAG_END)) + { + if (node1 = AllocListBrowserNode(1, + LBNA_Column, 0, + LBNCA_Image, (ULONG)image1, + LBNCA_Justification, LCJ_CENTRE, + TAG_DONE)) + { + AddTail(&fancy_list, node1); + + if (node2 = AllocListBrowserNode(1, + LBNA_Column, 0, + LBNCA_Image, (ULONG)image2, + LBNCA_Justification, LCJ_CENTRE, + TAG_DONE)) + { + AddTail(&fancy_list, node2); + + /* Set listbrowser. + */ + SetWindowTitles(win, "Fancy", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_ColumnInfo, &fancy_ci, + LISTBROWSER_Labels, (ULONG)&fancy_list, + LISTBROWSER_AutoFit, TRUE, + TAG_DONE); + + wait_for_close(win, listbrowser_gad); + + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Labels, ~0, + TAG_DONE); + + FreeListBrowserNode(node2); + } + FreeListBrowserNode(node1); + } + DisposeObject(image2); + } + DisposeObject(image1); + } + + PutStr("Closing Label class\n"); + CloseLibrary((struct Library *)LabelBase); + } + else + PutStr("ERROR: Couldn't create Label class\n"); + + /* Read-only + */ + SetWindowTitles(win, "Read-only", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_ColumnInfo, (ULONG)&ci, + LISTBROWSER_Labels, (ULONG)&label_list, + LISTBROWSER_AutoFit, TRUE, + LISTBROWSER_Selected, -1, + GA_ReadOnly, TRUE, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + /* Disabled. + */ + SetWindowTitles(win, "Disabled", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + GA_Disabled, TRUE, + GA_ReadOnly, FALSE, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + /* No scrollbars, borderless. + */ + SetWindowTitles(win, "No scrollbars, borderless", (UBYTE *)~0); + SetGadgetAttrs(listbrowser_gad, win, NULL, + GA_Disabled, FALSE, + GA_Top, win->BorderTop, + GA_Left, 2, + GA_RelWidth, -18, + GA_RelHeight, -(win->BorderTop + win->BorderBottom), + LISTBROWSER_Borderless, TRUE, + LISTBROWSER_HorizontalProp, FALSE, + LISTBROWSER_VerticalProp, FALSE, + TAG_DONE); + wait_for_close(win, listbrowser_gad); + + RemoveGList(win, listbrowser_gad, -1); + DisposeObject(listbrowser_gad); + } + else + PutStr("ERROR: Couldn't create ListBrowser gadgetn"); + + free_list(&label_list); + + PutStr("Freeing ListBrowser class\n"); + CloseLibrary((struct Library *)ListBrowserBase); + } + else + PutStr("ERROR: Couldn't create ListBrowser class\n"); + + CloseWindow(win); + } + else + PutStr("ERROR: Couldn't open window\n"); + + UnlockPubScreen(0, screen); + } + else + PutStr("ERROR: Couldn't lock public screen\n"); +} + + +/* Function to make a List of ListBrowserNodes from a couple of arrays. + * Just to demonstrate things, we make make three columns, 2 with text + * (the same text) and the third with numbers. + */ +BOOL make_list(struct List *list, UBYTE **labels1, LONG *labels2) +{ + struct Node *node; + WORD i = 0; + + NewList(list); + + while (*labels1) + { + if (node = AllocListBrowserNode(3, + LBNA_Column, 0, + LBNCA_CopyText, TRUE, + LBNCA_Text, *labels1, + LBNCA_MaxChars, 40, + LBNCA_Editable, TRUE, + LBNA_Column, 1, + LBNCA_CopyText, TRUE, + LBNCA_Text, *labels1, + LBNCA_MaxChars, 40, + LBNCA_Editable, TRUE, + LBNA_Column, 2, + LBNCA_Integer, &labels2[i], + LBNCA_Justification, LCJ_RIGHT, + TAG_DONE)) + { + AddTail(list, node); + } + else + break; + + labels1++; + i++; + } + return(TRUE); +} + + +/* Function to free an Exec List of ListBrowser nodes. + */ +VOID free_list(struct List *list) +{ + struct Node *node, *nextnode; + + node = list->lh_Head; + while (nextnode = node->ln_Succ) + { + FreeListBrowserNode(node); + node = nextnode; + } + NewList(list); +} + + +/* Function to open a BOOPSI class library. + */ +struct ClassLibrary * OpenClass(STRPTR name, ULONG version) +{ + struct Library *retval; + UBYTE buffer[256]; + + if ((retval = OpenLibrary(name, version)) == NULL) + { + sprintf (buffer, ":classes/%s", name); + if ((retval = OpenLibrary(buffer, version)) == NULL) + { + sprintf(buffer, "classes/%s", name); + retval = OpenLibrary(buffer, version); + } + } + return((struct ClassLibrary *)retval); +} + +/* Wait for the window close gadget to be pressed. + */ +VOID wait_for_close(struct Window *win, struct Gadget *listbrowser_gad) +{ + BOOL ok = TRUE; + + /* Just wait around until the close gadget is pressed. + */ + while (ok) + { + struct Gadget *gadget; + struct IntuiMessage *imsg; + + WaitPort(win->UserPort); + while (imsg = (struct IntuiMessage *)GetMsg(win->UserPort)) + { + switch (imsg->Class) + { + case IDCMP_CLOSEWINDOW: + ok = FALSE; + break; + + case IDCMP_RAWKEY: + if (!(imsg->Code & IECODE_UP_PREFIX)) + { + switch (imsg->Code) + { + case RAWKEY_CURSORUP: + if (imsg->Qualifier & QUALIFIER_CTRL) + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Position, LBP_TOP, + TAG_DONE); + if (imsg->Qualifier & QUALIFIER_SHIFT) + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Position, LBP_PAGEUP, + TAG_DONE); + else + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Position, LBP_LINEUP, + TAG_DONE); + break; + + case RAWKEY_CURSORDOWN: + if (imsg->Qualifier & QUALIFIER_CTRL) + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Position, LBP_BOTTOM, + TAG_DONE); + if (imsg->Qualifier & QUALIFIER_SHIFT) + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Position, LBP_PAGEDOWN, + TAG_DONE); + else + SetGadgetAttrs(listbrowser_gad, win, NULL, + LISTBROWSER_Position, LBP_LINEDOWN, + TAG_DONE); + break; + + default: + break; + } + } + break; + + case IDCMP_GADGETUP: + gadget = (struct Gadget *)imsg->IAddress; + Printf("Gadget: %ld Code: %ld\n", + (LONG)gadget->GadgetID, (LONG)imsg->Code); + + break; + + default: + break; + } + ReplyMsg((struct Message *)imsg); + } + } +} diff --git a/Examples/ListBrowser/ListBrowserExample.c.info b/Examples/ListBrowser/ListBrowserExample.c.info new file mode 100644 index 0000000..6a16c2a Binary files /dev/null and b/Examples/ListBrowser/ListBrowserExample.c.info differ diff --git a/Examples/ListBrowser/ListBrowserExample.info b/Examples/ListBrowser/ListBrowserExample.info new file mode 100644 index 0000000..221cb3a Binary files /dev/null and b/Examples/ListBrowser/ListBrowserExample.info differ diff --git a/Examples/Palette.info b/Examples/Palette.info new file mode 100644 index 0000000..8214eb5 Binary files /dev/null and b/Examples/Palette.info differ diff --git a/Examples/Palette/PaletteExample b/Examples/Palette/PaletteExample new file mode 100644 index 0000000..4b99b04 Binary files /dev/null and b/Examples/Palette/PaletteExample differ diff --git a/Examples/Palette/PaletteExample.c b/Examples/Palette/PaletteExample.c new file mode 100644 index 0000000..4869195 --- /dev/null +++ b/Examples/Palette/PaletteExample.c @@ -0,0 +1,162 @@ + +/** + ** PaletteExample.c -- Palette class example. + ** + ** This is a simple example testing some of the capabilities of the + ** Palette gadget class. + ** + ** This code opens a simple window and then creates a Palette gadget. + ** + ** Note that we are not using window or layout class here, we are + ** using the gadget in a fairly direct form, but that's perfectly legal. + ** + **/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Function prototypes. + */ +struct ClassLibrary * OpenClass(STRPTR, ULONG); + +/* Global variables. + */ +struct ClassLibrary *PaletteBase; +struct Gadget *palette_gad; + + +/* This is the start of our programme. + */ +main() +{ + struct Screen *screen = NULL; + + /* We'll just open up on the Workbench screen, and use its screen font. + */ + if (screen = LockPubScreen("Workbench")) + { + struct Window *win = NULL; + + /* Open the window, note how we size the window to perfectly fit + * all the gadgets. + */ + if (win = OpenWindowTags(NULL, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_Width, 200, + WA_Height, (screen->WBorTop) + 5 + screen->Font->ta_YSize + 100, + WA_IDCMP, IDCMP_GADGETUP | IDCMP_REFRESHWINDOW | + IDCMP_CLOSEWINDOW | IDCMP_GADGETDOWN, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "Palette Demo", + WA_MinWidth, 60, + WA_MinHeight, (screen->WBorTop) + 5 + screen->Font->ta_YSize + 60, + WA_MaxWidth, -1, + WA_MaxHeight, -1, + TAG_DONE)) + { + PutStr("Creating Palette class\n"); + if (PaletteBase = OpenClass("gadgets/palette.gadget", 0)) + { + PutStr("Creating Palette gadget 1\n"); + if (palette_gad = (struct Gadget *)NewObject(PALETTE_GetClass(), NULL, + GA_ID, 2, + GA_Top, (win->BorderTop) + 5, + GA_Left, 10, + GA_RelWidth, -36, + GA_RelHeight, -(win->BorderTop + win->BorderBottom + 10), + GA_RelVerify, TRUE, + PALETTE_NumColours, 1 << screen->RastPort.BitMap->Depth, + TAG_END)) + { + struct IntuiMessage *imsg; + BOOL ok = TRUE; + + AddGList(win, palette_gad, -1, -1, NULL); + RefreshGList(palette_gad, win, NULL, -1); + + /* Just wait around until the close gadget is pressed. + */ + while (ok) + { + struct Gadget *gadget; + + WaitPort(win->UserPort); + while (imsg = (struct IntuiMessage *)GetMsg(win->UserPort)) + { + switch(imsg->Class) + { + case IDCMP_CLOSEWINDOW: + ok = FALSE; + break; + + case IDCMP_GADGETUP: + gadget = (struct Gadget *)imsg->IAddress; + Printf("Gadget: %ld Code: %ld\n", + (LONG)gadget->GadgetID, (LONG)imsg->Code ); + + break; + + default: + break; + } + ReplyMsg((struct Message *)imsg); + } + } + RemoveGList(win, palette_gad, -1); + DisposeObject(palette_gad); + } + else + PutStr("ERROR: Couldn't create Palette gadget\n"); + + /* Free the class. + */ + PutStr("Freeing Palette class\n"); + CloseLibrary((struct Library *)PaletteBase); + } + else + PutStr("ERROR: Couldn't create Palette class\n"); + + CloseWindow(win); + } + else + PutStr("ERROR: Couldn't open window\n"); + + UnlockPubScreen(0, screen); + } + else + PutStr("ERROR: Couldn't lock public screen\n"); +} + + +/* Open a class library. + */ +struct ClassLibrary * OpenClass(STRPTR name, ULONG version) +{ + struct Library *retval; + UBYTE buffer[256]; + + if ((retval = OpenLibrary(name, version)) == NULL) + { + sprintf (buffer, ":classes/%s", name); + if ((retval = OpenLibrary(buffer, version)) == NULL) + { + sprintf(buffer, "classes/%s", name); + retval = OpenLibrary(buffer, version); + } + } + return((struct ClassLibrary *)retval); +} diff --git a/Examples/Palette/PaletteExample.c.info b/Examples/Palette/PaletteExample.c.info new file mode 100644 index 0000000..b76ff45 Binary files /dev/null and b/Examples/Palette/PaletteExample.c.info differ diff --git a/Examples/Palette/PaletteExample.info b/Examples/Palette/PaletteExample.info new file mode 100644 index 0000000..4cb386f Binary files /dev/null and b/Examples/Palette/PaletteExample.info differ diff --git a/Examples/PenMap.info b/Examples/PenMap.info new file mode 100644 index 0000000..b40155e Binary files /dev/null and b/Examples/PenMap.info differ diff --git a/Examples/PenMap/PenMapExample b/Examples/PenMap/PenMapExample new file mode 100644 index 0000000..e628c9c Binary files /dev/null and b/Examples/PenMap/PenMapExample differ diff --git a/Examples/PenMap/PenMapExample.c b/Examples/PenMap/PenMapExample.c new file mode 100644 index 0000000..fce220a --- /dev/null +++ b/Examples/PenMap/PenMapExample.c @@ -0,0 +1,168 @@ +/* + * Example for ClassAct penmap.image + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +struct ClassLibrary *PenMapBase; + +struct Window *win; +struct Image *image_object; + +ULONG image_object_palette[] = +{ + 2, + 0x00000000, 0x00000000, 0x00000000, + 0xEEEEEEEE, 0xDDDDDDDD, 0x00000000 +}; + +UBYTE happy_data[] = +{ + 0,16, 0,14, + 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,1,1,2,2,2,2,2,2,1,1,0,0,0, + 0,0,1,2,2,2,2,2,2,2,2,2,2,1,0,0, + 0,1,2,2,2,2,2,2,2,2,2,2,2,2,1,0, + 0,1,2,2,2,1,1,2,2,1,1,2,2,2,1,0, + 1,2,2,2,2,1,1,2,2,1,1,2,2,2,2,1, + 1,2,2,2,2,1,1,2,2,1,1,2,2,2,2,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 0,1,2,2,2,1,2,2,2,2,1,2,2,2,1,0, + 0,1,2,2,2,2,1,1,1,1,2,2,2,2,1,0, + 0,0,1,2,2,2,2,2,2,2,2,2,2,1,0,0, + 0,0,0,1,1,2,2,2,2,2,2,1,1,0,0,0, + 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0 +}; + +UBYTE scared_data[] = +{ + 0,16, 0,14, + 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0, + 0,0,0,1,1,2,2,2,2,2,2,1,1,0,0,0, + 0,0,1,2,2,2,2,2,2,2,2,2,2,1,0,0, + 0,1,2,2,2,1,1,2,2,1,1,2,2,2,1,0, + 0,1,2,2,1,2,2,2,2,2,2,1,2,2,1,0, + 1,2,2,2,2,1,1,2,2,1,1,2,2,2,2,1, + 1,2,2,2,2,1,1,2,2,1,1,2,2,2,2,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 0,1,2,2,2,2,1,1,1,1,2,2,2,2,1,0, + 0,1,2,2,2,1,1,1,1,1,1,2,2,2,1,0, + 0,0,1,2,2,2,2,2,2,2,2,2,2,1,0,0, + 0,0,0,1,1,2,2,2,2,2,2,1,1,0,0,0, + 0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0 +}; + + +/* Try opening the class library from a number of common places + */ +struct ClassLibrary *OpenClass (STRPTR name, ULONG version) +{ + struct ExecBase *SysBase = (*((struct ExecBase **) 4)); + struct Library *retval; + UBYTE buffer[256]; + + if ((retval = OpenLibrary (name, version)) == NULL) + { + sprintf (buffer, "SYS:Classes/%s", name); + if ((retval = OpenLibrary (buffer, version)) == NULL) + { + sprintf (buffer, "Classes/%s", name); + retval = OpenLibrary (buffer, version); + } + } + return (struct ClassLibrary *) retval; +} + +void main (void) +{ + struct IntuiMessage *msg; + BOOL done = FALSE; + + win = OpenWindowTags (NULL, + WA_Flags, WFLG_DEPTHGADGET | WFLG_DRAGBAR | + WFLG_CLOSEGADGET | WFLG_SIZEGADGET, + WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_NEWSIZE, + WA_InnerWidth, 40, + WA_InnerHeight, 30, + WA_MaxWidth,-1, + WA_MaxHeight,-1, + WA_Activate, TRUE, + WA_SmartRefresh, TRUE, + WA_Title, "ClassAct penmap.image Demo", + TAG_DONE); + + if (win) + { + if (PenMapBase = OpenClass("images/penmap.image", 40L)) + { + image_object = (struct Image *)NewObject (NULL, "penmap.image", + PENMAP_RenderData, happy_data, + PENMAP_SelectData, scared_data, + PENMAP_Palette, image_object_palette, + PENMAP_Screen, win->WScreen, + TAG_DONE); + if (image_object) + { + SetAttrs(image_object, + IA_Width, win->Width - (win->BorderLeft + win->BorderRight + 10L), + IA_Height, win->Height - (win->BorderTop + win->BorderBottom + 10L), + TAG_DONE); + DrawImageState (win->RPort, + image_object, + win->BorderLeft + 5L, + win->BorderTop + 5L, + IDS_SELECTED, NULL); + + while (!done) + { + WaitPort (win->UserPort); + while (msg = (struct IntuiMessage *)GetMsg (win->UserPort)) + { + if (msg->Class == IDCMP_CLOSEWINDOW) + done = TRUE; + else if (msg->Class == IDCMP_NEWSIZE) + { + SetAttrs(image_object, + IA_Width, win->Width - (win->BorderLeft + win->BorderRight + 10L), + IA_Height, win->Height - (win->BorderTop + win->BorderBottom + 10L), + TAG_DONE); + SetAPen(win->RPort,0); + RectFill(win->RPort, + win->BorderLeft, + win->BorderTop, + win->BorderLeft + win->Width - (win->BorderRight + win->BorderLeft + 1), + win->BorderTop + win->Height - (win->BorderTop + win->BorderBottom + 1)); + DrawImageState(win->RPort, + image_object, + win->BorderLeft + 5L, + win->BorderTop + 5L, + IDS_SELECTED, + NULL); + } + ReplyMsg ((struct Message *)msg); + } + } + } + } + } + if (image_object) + DisposeObject (image_object); + if (win) + CloseWindow (win); + if (PenMapBase) + CloseLibrary ((struct Library *)PenMapBase); +} diff --git a/Examples/PenMap/PenMapExample.c.info b/Examples/PenMap/PenMapExample.c.info new file mode 100644 index 0000000..979c5f4 Binary files /dev/null and b/Examples/PenMap/PenMapExample.c.info differ diff --git a/Examples/PenMap/PenMapExample.info b/Examples/PenMap/PenMapExample.info new file mode 100644 index 0000000..d73fd13 Binary files /dev/null and b/Examples/PenMap/PenMapExample.info differ diff --git a/Examples/PrintReq.info b/Examples/PrintReq.info new file mode 100644 index 0000000..1412a74 Binary files /dev/null and b/Examples/PrintReq.info differ diff --git a/Examples/PrintReq/PrintReqExample b/Examples/PrintReq/PrintReqExample new file mode 100644 index 0000000..7577912 Binary files /dev/null and b/Examples/PrintReq/PrintReqExample differ diff --git a/Examples/PrintReq/PrintReqExample.c b/Examples/PrintReq/PrintReqExample.c new file mode 100644 index 0000000..d4b66e3 --- /dev/null +++ b/Examples/PrintReq/PrintReqExample.c @@ -0,0 +1,519 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { GAD_FROM, GAD_TO, GAD_COPIES, GAD_COLLATE }; + +LONG easy_req(struct Window *, char *, char *, char *, ...); +VOID draw_collate(struct Window *, BOOL); + +/* Image for the no-collate image. + */ +__chip UWORD nocollate_data[450] = +{ + /* Plane 0 */ + 0x0003, 0xFFFF, 0xC000, 0x07FF, 0xFF80, + 0x0002, 0x0000, 0x4000, 0x0400, 0x0080, + 0x0002, 0x0002, 0x6000, 0x0400, 0x04C0, + 0x0002, 0x5806, 0x6000, 0x04B0, 0x0CC0, + 0x01FF, 0xFFE2, 0x6003, 0xFFFF, 0xC4C0, + 0x0100, 0x0027, 0x6002, 0x0000, 0x4EC0, + 0x0100, 0x0330, 0x6002, 0x0006, 0x60C0, + 0x012E, 0x00B4, 0x6002, 0x5C01, 0x68C0, + 0xFFFF, 0xF130, 0x61FF, 0xFFE2, 0x60C0, + 0x8000, 0x13B0, 0x6100, 0x0027, 0x60C0, + 0x8001, 0x9830, 0x6100, 0x0330, 0x60C0, + 0x9700, 0x5E30, 0x612E, 0x00BC, 0x60C0, + 0x8000, 0x9830, 0x6100, 0x0130, 0x60C0, + 0x9400, 0x5834, 0x6128, 0x00B0, 0x68C0, + 0x8001, 0x9830, 0x6100, 0x0330, 0x60C0, + 0x8B5F, 0x1830, 0x6116, 0xBE30, 0x60C0, + 0x8000, 0x1830, 0x6100, 0x0030, 0x60C0, + 0x97B6, 0x1E30, 0x612F, 0x6C3C, 0x60C0, + 0x8000, 0x1830, 0x6100, 0x0030, 0x60C0, + 0x8BA8, 0x1830, 0x6117, 0x5030, 0x60C0, + 0x8000, 0x183F, 0xE100, 0x0030, 0x7FC0, + 0x9BF7, 0x183F, 0xE137, 0xEE30, 0x7FC0, + 0x8000, 0x1830, 0x0100, 0x0030, 0x6000, + 0x9400, 0x1830, 0x0128, 0x0030, 0x6000, + 0x8000, 0x1FF0, 0x0100, 0x003F, 0xE000, + 0x9B00, 0x1FF0, 0x0136, 0x003F, 0xE000, + 0x8000, 0x1800, 0x0100, 0x0030, 0x0000, + 0x8000, 0x1800, 0x0100, 0x0030, 0x0000, + 0xFFFF, 0xF800, 0x01FF, 0xFFF0, 0x0000, + 0x3FFF, 0xF800, 0x007F, 0xFFF0, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0001, 0xFFFF, 0x8000, 0x03FF, 0xFF00, + 0x0001, 0xFFFD, 0x8000, 0x03FF, 0xFB00, + 0x0001, 0xDBF9, 0x8000, 0x03B7, 0xF300, + 0x0000, 0x001D, 0x8000, 0x0000, 0x3B00, + 0x00FF, 0xFFD8, 0x8001, 0xFFFF, 0xB100, + 0x00FF, 0xFCCF, 0x8001, 0xFFF9, 0x9F00, + 0x00ED, 0xFF47, 0x8001, 0xDBFE, 0x8F00, + 0x0000, 0x0ECF, 0x8000, 0x001D, 0x9F00, + 0x7FFF, 0xEC47, 0x80FF, 0xFFD8, 0x8F00, + 0x7FFE, 0x67CF, 0x80FF, 0xFCCF, 0x9F00, + 0x76FF, 0xA7CF, 0x80ED, 0xFF4F, 0x9F00, + 0x7FFF, 0x67CF, 0x80FF, 0xFECF, 0x9F00, + 0x77FF, 0xA3C7, 0x80EF, 0xFF47, 0x8F00, + 0x7FFE, 0x67CF, 0x80FF, 0xFCCF, 0x9F00, + 0x6BDF, 0xE7CF, 0x80D7, 0xBFCF, 0x9F00, + 0x7FFF, 0xE7CF, 0x80FF, 0xFFCF, 0x9F00, + 0x76F5, 0xE7CF, 0x80ED, 0xEBCF, 0x9F00, + 0x7FFF, 0xE7CF, 0x80FF, 0xFFCF, 0x9F00, + 0x6BEF, 0xE7CF, 0x80D7, 0xDFCF, 0x9F00, + 0x7FFF, 0xE7C0, 0x00FF, 0xFFCF, 0x8000, + 0x7AF7, 0xE7C0, 0x00F5, 0xEFCF, 0x8000, + 0x7FFF, 0xE7C0, 0x00FF, 0xFFCF, 0x8000, + 0x77FF, 0xE7C0, 0x00EF, 0xFFCF, 0x8000, + 0x7FFF, 0xE000, 0x00FF, 0xFFC0, 0x0000, + 0x7BFF, 0xE000, 0x00F7, 0xFFC0, 0x0000, + 0x7FFF, 0xE000, 0x00FF, 0xFFC0, 0x0000, + 0x7FFF, 0xE000, 0x00FF, 0xFFC0, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +}; + +struct Image nocollate_image = +{ + 0, 0, 74, 30, 2, &nocollate_data[0], 0x3, 0x0, NULL +}; + +/* Image for the no-collate image. + */ +__chip UWORD collate_data[468] = +{ + /* Plane 0 */ + 0x01FF, 0xFFE0, 0x07FF, 0xFF80, 0x1FFF, 0xFE00, + 0x0100, 0x0020, 0x0400, 0x0080, 0x1000, 0x0200, + 0x0100, 0x0130, 0x0400, 0x0CC0, 0x1000, 0x3300, + 0x012C, 0x0330, 0x04B0, 0x02C0, 0x12C0, 0x0B00, + 0xFFFF, 0xF133, 0xFFFF, 0xC4CF, 0xFFFF, 0x1300, + 0x8000, 0x13B2, 0x0000, 0x4EC8, 0x0001, 0x0B00, + 0x8000, 0x9832, 0x0006, 0x60C8, 0x0019, 0xB300, + 0x9701, 0x9A32, 0x5C01, 0x68C9, 0x7005, 0xA300, + 0x8000, 0x9832, 0x0002, 0x60C8, 0x0009, 0x8300, + 0x9401, 0xD832, 0x5007, 0x60C9, 0x4005, 0x8300, + 0x8000, 0x1832, 0x0000, 0x60C8, 0x0019, 0x8300, + 0x8B5F, 0x1832, 0x2D7C, 0x60C8, 0xB5F1, 0x8300, + 0x8000, 0x1832, 0x0000, 0x60C8, 0x0001, 0x8300, + 0x97B4, 0x1A32, 0x5ED0, 0x68C9, 0x7B41, 0xA300, + 0x8000, 0x1832, 0x0000, 0x60C8, 0x0001, 0x8300, + 0x8BA8, 0x1832, 0x2EA0, 0x60C8, 0xBA81, 0x8300, + 0x8000, 0x1832, 0x0000, 0x60C8, 0x0001, 0x8300, + 0x9BF7, 0x1832, 0x6FDC, 0x60C9, 0xBF71, 0x8300, + 0x8000, 0x1832, 0x0000, 0x60C8, 0x0001, 0x8300, + 0x9400, 0x1832, 0x5000, 0x60C9, 0x4001, 0x8300, + 0x8000, 0x1FF2, 0x0000, 0x7FC8, 0x0001, 0xFF00, + 0x9B00, 0x1FF2, 0x6C00, 0x7FC9, 0xB001, 0xFF00, + 0x8000, 0x1802, 0x0000, 0x6008, 0x0001, 0x8000, + 0x8000, 0x1802, 0x0000, 0x6008, 0x0001, 0x8000, + 0xFFFF, 0xF803, 0xFFFF, 0xE00F, 0xFFFF, 0x8000, + 0x3FFF, 0xF800, 0xFFFF, 0xE003, 0xFFFF, 0x8000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x00FF, 0xFFC0, 0x03FF, 0xFF00, 0x0FFF, 0xFC00, + 0x00FF, 0xFEC0, 0x03FF, 0xF300, 0x0FFF, 0xCC00, + 0x00ED, 0xFCC0, 0x03B7, 0xFD00, 0x0EDF, 0xF400, + 0x0000, 0x0EC0, 0x0000, 0x3B00, 0x0000, 0xEC00, + 0x7FFF, 0xEC41, 0xFFFF, 0xB107, 0xFFFE, 0xF400, + 0x7FFF, 0x67C1, 0xFFF9, 0x9F07, 0xFFE6, 0x4C00, + 0x76FE, 0x63C1, 0xDBFE, 0x8F07, 0x6FFA, 0x3C00, + 0x7FFF, 0x67C1, 0xFFFD, 0x9F07, 0xFFF6, 0x7C00, + 0x77FE, 0x23C1, 0xDFF8, 0x8F07, 0x7FFA, 0x3C00, + 0x7FFF, 0xE7C1, 0xFFFF, 0x9F07, 0xFFE6, 0x7C00, + 0x6BDF, 0xE7C1, 0xAF7F, 0x9F06, 0xBDFE, 0x7C00, + 0x7FFF, 0xE7C1, 0xFFFF, 0x9F07, 0xFFFE, 0x7C00, + 0x76F5, 0xE3C1, 0xDBD7, 0x8F07, 0x6F5E, 0x3C00, + 0x7FFF, 0xE7C1, 0xFFFF, 0x9F07, 0xFFFE, 0x7C00, + 0x6BEF, 0xE7C1, 0xAFBF, 0x9F06, 0xBEFE, 0x7C00, + 0x7FFF, 0xE7C1, 0xFFFF, 0x9F07, 0xFFFE, 0x7C00, + 0x7AF7, 0xE7C1, 0xEBDF, 0x9F07, 0xAF7E, 0x7C00, + 0x7FFF, 0xE7C1, 0xFFFF, 0x9F07, 0xFFFE, 0x7C00, + 0x77FF, 0xE7C1, 0xDFFF, 0x9F07, 0x7FFE, 0x7C00, + 0x7FFF, 0xE001, 0xFFFF, 0x8007, 0xFFFE, 0x0000, + 0x7BFF, 0xE001, 0xEFFF, 0x8007, 0xBFFE, 0x0000, + 0x7FFF, 0xE001, 0xFFFF, 0x8007, 0xFFFE, 0x0000, + 0x7FFF, 0xE001, 0xFFFF, 0x8007, 0xFFFE, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +}; + +struct Image collate_image = +{ + 0, 0, 88, 26, 2, &collate_data[0], 0x3, 0x0, NULL +}; + +/* Here's where it all starts. + */ +main() +{ + struct Screen *screen = NULL; + + if (!ButtonBase) return(20); + + /* We'll just open up on the default public screen, and use its screen font. + */ + if (screen = LockPubScreen(NULL)) + { + struct DrawInfo *drinfo = GetScreenDrawInfo(screen); + struct List *radio_list; + struct Image *l, *collate_limage, *nocollate_limage; + struct Gadget *collate_gad, *nocollate_gad; + Object *layout, *collate_layout; + UWORD mapping[4]; + + /* Setup a simple mapping. + */ + mapping[0] = drinfo->dri_Pens[BACKGROUNDPEN]; + mapping[1] = drinfo->dri_Pens[SHADOWPEN]; + mapping[2] = drinfo->dri_Pens[SHINEPEN]; + mapping[3] = drinfo->dri_Pens[FILLPEN]; + + /* Create radio buttons. + */ + radio_list = RadioButtons( "All Pages", + "Odd Pages", + "Even Pages", + "Current Page", + "Range of Pages:", + NULL); + + nocollate_limage = LabelObject, + /* LABEL_Mapping, mapping, */ + LABEL_Image, &nocollate_image, + LabelEnd; + collate_limage = LabelObject, + /* LABEL_Mapping, mapping, */ + LABEL_Image, &collate_image, + LabelEnd; + + if (layout = LayoutObject, + GA_DrawInfo, drinfo, + LAYOUT_DeferLayout, TRUE, /* Layout refreshes done on + * task's context (by the + * window class) */ + LAYOUT_SpaceOuter, TRUE, + LAYOUT_ShrinkWrap, TRUE, + LAYOUT_VertAlignment, LAYOUT_ALIGN_TOP, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_VertAlignment, LAYOUT_ALIGN_CENTER, + LAYOUT_SpaceOuter, TRUE, + + LAYOUT_AddImage, l = LabelObject, + IA_Font, screen->Font, + LABEL_Text, "Driver:", + LabelEnd, + CHILD_MinWidth, l->Width, + CHILD_MinHeight, l->Height, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, ButtonObject, + GA_Text, "EpsonX", + GA_ReadOnly, TRUE, + ButtonEnd, + LayoutEnd, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_Label, "Page Range", + + LAYOUT_AddChild, RadioButtonObject, + GA_DrawInfo, drinfo, + RADIOBUTTON_Labels, radio_list, + RADIOBUTTON_Spacing, 3, + RadioButtonEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_VertAlignment, LAYOUT_ALIGN_CENTER, + + LAYOUT_AddImage, l = LabelObject, + IA_Font, screen->Font, + LABEL_Text, "from:", + LabelEnd, + CHILD_MinWidth, l->Width, + CHILD_MinHeight, l->Height, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, IntegerObject, + INTEGER_Number, 1, + INTEGER_Minimum, 0, + IntegerEnd, + + LAYOUT_AddImage, l = LabelObject, + IA_Font, screen->Font, + LABEL_Text, " to:", + LabelEnd, + CHILD_MinWidth, l->Width, + CHILD_MinHeight, l->Height, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, IntegerObject, + INTEGER_Number, 1, + INTEGER_Minimum, 0, + IntegerEnd, + + LayoutEnd, + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_VERT, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_Label, "Copies", + LAYOUT_VertAlignment, LAYOUT_ALIGN_TOP, + LAYOUT_ShrinkWrap, TRUE, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_VertAlignment, LAYOUT_ALIGN_CENTER, + + LAYOUT_AddImage, l = LabelObject, + IA_Font, screen->Font, + LABEL_Text, "Number of Copies:", + LabelEnd, + CHILD_MinWidth, l->Width, + CHILD_MinHeight, l->Height, + CHILD_WeightedWidth, 0, + CHILD_WeightedHeight, 0, + + LAYOUT_AddChild, IntegerObject, + INTEGER_Number, 1, + INTEGER_Minimum, 0, + IntegerEnd, + + LayoutEnd, + + LAYOUT_AddChild, LayoutObject, + LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ, + LAYOUT_VertAlignment, LAYOUT_ALIGN_CENTER, + + LAYOUT_AddChild, CheckBoxObject, + GA_ID, GAD_COLLATE, + GA_Text, "Collate Pages?", + GA_RelVerify, TRUE, + CheckBoxEnd, + CHILD_MinHeight, screen->Font->ta_YSize + 6, + + LayoutEnd, + + LAYOUT_AddChild, collate_layout = LayoutObject, + LAYOUT_HorizAlignment, LAYOUT_ALIGN_CENTER, + LAYOUT_AddChild, collate_gad = ButtonObject, + GA_Image, nocollate_limage, + GA_ReadOnly, TRUE, + ButtonEnd, + CHILD_MinWidth, 100, + CHILD_MinHeight, 40, + CHILD_WeightedWidth, 0, + LayoutEnd, + + LayoutEnd, + LayoutEnd, + CHILD_WeightedHeight, 0, + + LayoutEnd) + { + struct MsgPort *app_port; + Object *window_obj; + + /* Create a message port for App* messages. This is needed for + * iconification. We're being a touch naughty by not checking + * the return code, but that just means that iconification won't + * work, nothing really bad will happen. + */ + app_port = CreateMsgPort(); + + /* Create the window object. + */ + if (window_obj = WindowObject, + WA_Left, 0, + WA_Top, screen->Font->ta_YSize + 3, + WA_CustomScreen, screen, + WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR | WFLG_DEPTHGADGET | WFLG_CLOSEGADGET | + WFLG_SIZEGADGET | WFLG_ACTIVATE | WFLG_SMART_REFRESH, + WA_Title, "Print Requester example", + WA_NewLookMenus, TRUE, + WINDOW_ParentGroup, layout, + WINDOW_IconifyGadget, TRUE, + WINDOW_Icon, GetDiskObject("PROGDIR:PrintReq"), + WINDOW_IconTitle, "PrintReq", + WINDOW_AppPort, app_port, + WINDOW_LockHeight, TRUE, + TAG_DONE)) + { + struct Window *win; + + /* Open the window. + */ + if (win = (struct Window *)CA_OpenWindow(window_obj)) + { + ULONG signal; + BOOL ok = TRUE, collate = FALSE; + + /* Draw the collate image. + */ + /* draw_collate(win, collate); */ + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, window_obj, &signal); + + /* Input Event Loop + */ + while (ok) + { + ULONG result; + + Wait(signal | (1L << app_port->mp_SigBit)); + + /* CA_HandleInput() returns the gadget ID of a clicked + * gadget, or one of several pre-defined values. For + * this demo, we're only actually interested in a + * close window and a couple of gadget clicks. + */ + while ((result = CA_HandleInput(window_obj, NULL)) != WMHI_LASTMSG) + { + switch(result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + ok = FALSE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GAD_COLLATE: + collate = !collate; + if (collate) + { + SetGadgetAttrs(collate_gad, win, NULL, + GA_Image, collate_limage, + TAG_DONE); + } + else + { + SetGadgetAttrs(collate_gad, win, NULL, + GA_Image, nocollate_limage, + TAG_DONE); + } + RethinkLayout(collate_layout, win, NULL, TRUE); + break; + + default: + break; + } + break; + + case WMHI_ICONIFY: + if (CA_Iconify(window_obj)) + win = NULL; + break; + + case WMHI_UNICONIFY: + win = CA_OpenWindow(window_obj); + break; + + default: + break; + } + } + } + } + else + easy_req(NULL, "PrintReq failed to start\nCouldn't open window", "Quit", ""); + + /* Disposing of the window object will also close the + * window if it is already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(window_obj); + } + else + easy_req(NULL, "PrintReq failed to start\nCouldn't create window", "Quit", ""); + + /* Lose the App* message port. + */ + if (app_port) + DeleteMsgPort(app_port); + } + else + easy_req(NULL, "PrintReq failed to start\nCouldn't create layout", "Quit", ""); + + /* Get rid of our images. + */ + if (collate_limage) + DisposeObject(collate_limage); + if (nocollate_limage) + DisposeObject(nocollate_limage); + + if (radio_list) + FreeRadioButtons(radio_list); + + if (drinfo) + FreeScreenDrawInfo(screen, drinfo); + + UnlockPubScreen(0, screen); + } + else + easy_req(NULL, "PrintReq failed to start\nCouldn't lock destination screen", "Quit", ""); + + exit(0); +} + +/* Do an easy requester. + */ +LONG easy_req(struct Window *win, char *reqtext, char *reqgads, char *reqargs, +...) +{ + struct EasyStruct general_es = + { + sizeof(struct EasyStruct), + 0, + "SBGen", + NULL, + NULL + }; + + general_es.es_TextFormat = reqtext; + general_es.es_GadgetFormat = reqgads; + + return(EasyRequestArgs(win, &general_es, NULL, &reqargs)); +} diff --git a/Examples/PrintReq/PrintReqExample.c.info b/Examples/PrintReq/PrintReqExample.c.info new file mode 100644 index 0000000..9f0c308 Binary files /dev/null and b/Examples/PrintReq/PrintReqExample.c.info differ diff --git a/Examples/PrintReq/PrintReqExample.info b/Examples/PrintReq/PrintReqExample.info new file mode 100644 index 0000000..6c04aab Binary files /dev/null and b/Examples/PrintReq/PrintReqExample.info differ diff --git a/Examples/RadioButton.info b/Examples/RadioButton.info new file mode 100644 index 0000000..7145b3a Binary files /dev/null and b/Examples/RadioButton.info differ diff --git a/Examples/RadioButton/RadioExample.info b/Examples/RadioButton/RadioExample.info new file mode 100644 index 0000000..bb47eab Binary files /dev/null and b/Examples/RadioButton/RadioExample.info differ diff --git a/Examples/RadioButton/radioexample b/Examples/RadioButton/radioexample new file mode 100644 index 0000000..f77f284 Binary files /dev/null and b/Examples/RadioButton/radioexample differ diff --git a/Examples/RadioButton/radioexample.c b/Examples/RadioButton/radioexample.c new file mode 100644 index 0000000..5d24104 --- /dev/null +++ b/Examples/RadioButton/radioexample.c @@ -0,0 +1,231 @@ +;/* RadioButton Example +sc link radioexample.c lib lib:classact.lib +quit +*/ + +/** + ** RadioExample.c -- radiobutton class example. + ** + ** This is a simple example testing some of the capabilities of the + ** radiobutton gadget class. + ** + ** This opens a window with radio button gadget. We will usse ClassAct.lib's + ** RadioButtons() and FreeRadioButtons() utility functions to create the + ** item labels. + ** + **/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + +/* button option texts + */ +UBYTE *radio[] = +{ + "2400", + "9600", + "19200", + "38400", + NULL +}; + +enum +{ + GID_MAIN=0, + GID_RADIOBUTTON, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + +#define FMIN 0 +#define FMAX 100 + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + struct List *radiolist; + + /* make sure our classes opened... */ + if (!ButtonBase || !RadioButtonBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + /* Create radiobutton label list. + */ + radiolist = RadioButtons( "1200","2400","4800","9600","19200","38400","57600", NULL ); + + if (radiolist) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct RadioButton Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "RadioButton", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, BVS_GROUP, + LAYOUT_Label, "Baud Rate", + + LAYOUT_AddChild, gadgets[GID_RADIOBUTTON] = RadioButtonObject, + GA_ID, GID_RADIOBUTTON, + GA_RelVerify, TRUE, + RADIOBUTTON_Labels, radiolist, + RADIOBUTTON_Selected, 0, + RadioButtonEnd, + // CHILD_WeightedHeight, 0, + LayoutEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + /* free the radiobutton list + */ + FreeRadioButtons(radiolist); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} diff --git a/Examples/RadioButton/radioexample.c.info b/Examples/RadioButton/radioexample.c.info new file mode 100644 index 0000000..9f08eb3 Binary files /dev/null and b/Examples/RadioButton/radioexample.c.info differ diff --git a/Examples/ReqTools.info b/Examples/ReqTools.info new file mode 100644 index 0000000..fd84784 Binary files /dev/null and b/Examples/ReqTools.info differ diff --git a/Examples/ReqTools/ReqTools b/Examples/ReqTools/ReqTools new file mode 100644 index 0000000..da509f2 Binary files /dev/null and b/Examples/ReqTools/ReqTools differ diff --git a/Examples/ReqTools/ReqTools.c b/Examples/ReqTools/ReqTools.c new file mode 100644 index 0000000..30858df --- /dev/null +++ b/Examples/ReqTools/ReqTools.c @@ -0,0 +1,326 @@ +;/* +sc link reqtools.c lib lib:classact.lib +quit +*/ + +/* ClassAct Example, "reqtools" prefs skeleton. + */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +//#include +//#include + +struct Screen *Scr = NULL; +struct DrawInfo *Dri; +BOOL done = FALSE; + +/************************************************************************** + * Chooser label arrays + */ +static STRPTR chooserlabels1[] = +{ + "File Requester", + "Font Requester", + "Palette Requester", + "Screen Mode Requester", + "Volume Requester", + "Other Requesters", + NULL +}; + +static STRPTR chooserlabels2[] = +{ + "Mouse Pointer", + "Center in Window", + "Center on Screen", + "Top Left of Window", + "Top Left of Screen", + NULL +}; + +/************************************************************************* + * Gadget list + */ +typedef enum { G_PopScreen = 1, G_UseSysFont, G_ImmSort, G_DrawerFirst, + G_MixFiles, G_DiskLed, G_DefPage, G_Visible, G_VisMin, G_VisMax, + G_Pos, G_PosX, G_PosY, G_Save, G_Use, G_Cancel, G_MAX } GadgetIDs; + +struct Gadget *GList[G_MAX+1]; + +/************************************************************************* + * Main Program + */ +int main(argc,argv) +int argc; +char *argv[]; +{ + struct Window *Win; + + Scr = LockPubScreen(NULL); + + if (!ButtonBase) /* force it open */ + return (30); + + if (Scr == NULL) + { + /* Shut down, no screen lock + */ + Printf("Failed locking public screen.\n"); + return(30); + } + + Dri = GetScreenDrawInfo(Scr); + if (Dri) + { + struct List *chooser1 = ChooserLabelsA( chooserlabels1 ); + struct List *chooser2 = ChooserLabelsA( chooserlabels2 ); + + if (chooser1 && chooser2) + { + struct Gadget *MainLayout, *l1, *l2; + Object *Window; + + Window = WindowObject, + WA_SizeGadget, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WA_PubScreen, Scr, + WA_Title, "ClassAct layout.gadget Example (ReqTools preferences mockup)", + WA_ScreenTitle, "ClassAct Release 2.0", + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, MainLayout = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, /* this tag instructs layout.gadget to + * defer GM_LAYOUT and GM_RENDER and ask + * the application to do them. This + * lessens the load on input.device */ + StartHGroup, + StartVGroup, + + /* This is a basic vertical centered layout group with three gadgets */ + StartVGroup, VCentered, LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, GroupFrame, + LAYOUT_Label, "General", + + /* SetGadgetCommKeys will set the gadget IDs automatically */ + StartMember, GList[G_PopScreen] = CheckBoxObject, + GA_Text, "_Pop screen to front", + End, + + StartMember, GList[G_UseSysFont] = CheckBoxObject, + GA_Text, "Us_e system default font", + End, + End, + CHILD_WeightMinimum, TRUE, /* by setting WeightMinimum you instruct + * layout.gadget to weight the object according + * to its minimum size. This retains group + * aspects at all sizes. */ + + StartVGroup, VCentered, LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, GroupFrame, + LAYOUT_Label, "File Requester", + + StartMember, GList[G_ImmSort] = CheckBoxObject, + GA_Text, "_Immediate sort", + End, + + StartMember, GList[G_DrawerFirst] = CheckBoxObject, + GA_Text, "_Display drawers first", + End, + + StartMember, GList[G_MixFiles] = CheckBoxObject, + GA_Text, "Mi_x files and drawers", + End, + + StartMember, GList[G_DiskLed] = CheckBoxObject, + GA_Text, "Dis_k activity LED", + End, + End, + CHILD_WeightMinimum, TRUE, + End, + CHILD_WeightMinimum, TRUE, + + StartVGroup, TOffset(INTERSPACING), + StartMember, GList[G_DefPage] = ChooserObject, + CHOOSER_Labels, chooser1, + End, + CHILD_Label, LabelObject, LABEL_Text, "De_faults for", End, + CHILD_WeightedHeight, 0, + + StartMember, l1 = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_BevelStyle, StandardFrame, + LAYOUT_BevelState, IDS_SELECTED, + + StartHGroup, TOffset(INTERSPACING), + LAYOUT_Label, "Size (% of visible height):", + + StartMember, GList[G_Visible] = ScrollerObject, + SCROLLER_Total, 100, + SCROLLER_Arrows, FALSE, + SCROLLER_Orientation, SORIENT_HORIZ, + End, + CHILD_MinHeight, Scr->Font->ta_YSize + 6, + + End, + CHILD_WeightedHeight, 0, + + StartMember, l2 = HGroupObject, TOffset(INTERSPACING), + LAYOUT_Label, "Number of visible entries:", + + StartMember, GList[G_VisMin] = IntegerObject, + GA_TabCycle, TRUE, + End, + CHILD_Label, LabelObject, LABEL_Text, "_Minimum", End, + + StartMember, GList[G_VisMax] = IntegerObject, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + End, + CHILD_Label, LabelObject, LABEL_Text, "Ma_ximum", End, + + End, + CHILD_WeightedHeight, 0, + + StartMember, GList[G_Pos] = ChooserObject, + GA_TabCycle, TRUE, + CHOOSER_Labels, chooser2, + End, + CHILD_Label, LabelObject, LABEL_Text, "P_osition", End, + CHILD_WeightedHeight, 0, + + StartHGroup, + + StartMember, GList[G_PosX] = IntegerObject, + GA_TabCycle, TRUE, + End, + + StartMember, GList[G_PosY] = IntegerObject, + GA_TabCycle, TRUE, + End, + + End, + CHILD_Label, LabelObject, LABEL_Text, "Offse_t", End, + CHILD_WeightedHeight, 0, + End, + End, + CHILD_WeightMinimum, TRUE, + End, + + StartHGroup, + LAYOUT_EvenSize, TRUE, + + StartMember, GList[G_Save] = ButtonObject, + GA_Text, "_Save", + End, + CHILD_NominalSize, TRUE, /* make it a bit larger than necessary */ + CHILD_WeightedWidth, 0, + + StartMember, GList[G_Use] = ButtonObject, + GA_Text, "_Use", + End, + CHILD_NominalSize, TRUE, + CHILD_WeightedWidth, 0, + + StartMember, GList[G_Cancel] = ButtonObject, + GA_Text, "_Cancel", + End, + CHILD_NominalSize, TRUE, + CHILD_WeightedWidth, 0, + End, + CHILD_WeightedHeight, 0, + End, + EndWindow; + + if (Window) + { + /* set up automatic label justification */ + SetAttrs( l1, LAYOUT_AlignLabels, l2, TAG_END ); + SetAttrs( l2, LAYOUT_AlignLabels, l1, TAG_END ); + + /* Finish the gadgetarray initialisation. Set gadget IDs and release verify */ + + { + LONG i = 1; + do SetAttrs(GList[i], GA_ID, i, GA_RelVerify, TRUE, TAG_END); + while (GList[++i]); + } + + if (Win = CA_OpenWindow( Window )) + { + ULONG wsig; + + GetAttr( WINDOW_SigMask, Window, &wsig ); + + while (done == FALSE) + { + ULONG sig = Wait(wsig | SIGBREAKF_CTRL_C); + ULONG result; + WORD code; + + if (sig & wsig) + { + while ((result = CA_HandleInput(Window,&code)) != WMHI_LASTMSG) + { + switch(result & WMHI_CLASSMASK) + { + case WMHI_GADGETUP: + switch(result & WMHI_GADGETMASK) + { + case G_Save: + case G_Use: + case G_Cancel: + done = TRUE; + /*FALLTHROUGH*/ + + /* Gadgets here */ + default: + Printf("Gadget ID %ld hit (code %ld)\n", result & WMHI_GADGETMASK, code); + break; + } + break; + + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + } + } + } + else if (sig & SIGBREAKF_CTRL_C) + { + done = TRUE; + } + } + /* Close the window and dispose of all attached gadgets */ + DisposeObject( Window ); + } + } + } + + FreeChooserLabels( chooser1 ); + FreeChooserLabels( chooser2 ); + + FreeScreenDrawInfo(Win->WScreen, Dri); + } + UnlockPubScreen(0, Scr); +} diff --git a/Examples/ReqTools/ReqTools.c.info b/Examples/ReqTools/ReqTools.c.info new file mode 100644 index 0000000..d1fe147 Binary files /dev/null and b/Examples/ReqTools/ReqTools.c.info differ diff --git a/Examples/ReqTools/ReqTools.info b/Examples/ReqTools/ReqTools.info new file mode 100644 index 0000000..9eb6d6c Binary files /dev/null and b/Examples/ReqTools/ReqTools.info differ diff --git a/Examples/Speed.info b/Examples/Speed.info new file mode 100644 index 0000000..8694481 Binary files /dev/null and b/Examples/Speed.info differ diff --git a/Examples/Speed/SpeedExample1 b/Examples/Speed/SpeedExample1 new file mode 100644 index 0000000..a52fe95 Binary files /dev/null and b/Examples/Speed/SpeedExample1 differ diff --git a/Examples/Speed/SpeedExample1.c b/Examples/Speed/SpeedExample1.c new file mode 100644 index 0000000..597f553 --- /dev/null +++ b/Examples/Speed/SpeedExample1.c @@ -0,0 +1,454 @@ +/* ClassAct Example + * Copyright © 1995 Christopher Aldi + * All Rights Reserved. + * + * This Example Shows ClassAct's speed laying out & rendering 100 buttons. + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct ClassLibrary *WindowBase; +struct ClassLibrary *LayoutBase; +struct ClassLibrary *ButtonBase; + +LONG ARG[1]; + +int main( void ) +{ + struct Window *window; + Object *Win_Object; + ULONG signal, result; + ULONG done = FALSE; + struct RDArgs *args; + + if (!(args = ReadArgs("ND=NODEFER/S",ARG,NULL))) + return 20; + + /* Open the classes we will use. Note, classlib.lib SAS/C or DICE autoinit + * can do this for you automatically. + */ + if( WindowBase = (struct ClassLibrary *)OpenLibrary("window.class",0L) ) + { + if( LayoutBase = (struct ClassLibrary *)OpenLibrary("gadgets/layout.gadget",0L) ) + { + if( ButtonBase = (struct ClassLibrary *)OpenLibrary("gadgets/button.gadget",0L) ) + { + /* Create the window object. + */ + Win_Object = WindowObject, + WA_ScreenTitle, "ClassAct Copyright 1995, Phantom Development LLC.", + WA_Title, "SpeedTest1 (100 buttons)", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WINDOW_ParentGroup, HGroupObject, + TAligned, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, !ARG[0], + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + StartVGroup, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + StartMember, ButtonObject, + GA_Text, "Button", + EndMember, + End, + + EndMember, + EndWindow; + + /* Object creation sucessful? + */ + if( Win_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Win_Object) ) + { + ULONG wait; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Win_Object, &signal ); + + /* Input Event Loop + */ + while( !done ) + { + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + + while ((result = CA_HandleInput(Win_Object,NULL)) != WMHI_LASTMSG) + { + switch(result) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + } + } + } + } + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject( Win_Object ); + } + } + } + } + + /* Close the classes. + */ + if (LayoutBase) CloseLibrary( (struct Library *)LayoutBase ); + if (ButtonBase) CloseLibrary( (struct Library *)ButtonBase ); + if (WindowBase) CloseLibrary( (struct Library *)WindowBase ); + + FreeArgs(args); +} + +#ifdef _DCC +int wbmain( struct WBStartup *wbs ) +{ + return( main( 0, NULL )); +} +#endif diff --git a/Examples/Speed/SpeedExample1.c.info b/Examples/Speed/SpeedExample1.c.info new file mode 100644 index 0000000..86a5546 Binary files /dev/null and b/Examples/Speed/SpeedExample1.c.info differ diff --git a/Examples/Speed/SpeedExample1.info b/Examples/Speed/SpeedExample1.info new file mode 100644 index 0000000..6bc62f9 Binary files /dev/null and b/Examples/Speed/SpeedExample1.info differ diff --git a/Examples/Speed/SpeedExample2 b/Examples/Speed/SpeedExample2 new file mode 100644 index 0000000..22550a1 Binary files /dev/null and b/Examples/Speed/SpeedExample2 differ diff --git a/Examples/Speed/SpeedExample2.c b/Examples/Speed/SpeedExample2.c new file mode 100644 index 0000000..edad900 --- /dev/null +++ b/Examples/Speed/SpeedExample2.c @@ -0,0 +1,294 @@ +/* ClassAct Example + * Copyright © 1995 Christopher Aldi + * All Rights Reserved. + * + * This Example Shows ClassAct's speed laying out & rendering 50 checkboxs + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct ClassLibrary *WindowBase; +struct ClassLibrary *LayoutBase; +struct ClassLibrary *CheckBoxBase; + +LONG ARG[1]; + +int main( void ) +{ + struct Window *window; + Object *Win_Object; + ULONG signal, result; + ULONG done = FALSE; + struct RDArgs *args; + + if (!(args = ReadArgs("ND=NODEFER/S",ARG,NULL))) + return 20; + + /* Open the classes we will use. Note, classlib.lib SAS/C or DICE autoinit + * can do this for you automatically. + */ + if( WindowBase = (struct ClassLibrary *)OpenLibrary("window.class",0L) ) + { + if( LayoutBase = (struct ClassLibrary *)OpenLibrary("gadgets/layout.gadget",0L) ) + { + if( CheckBoxBase = (struct ClassLibrary *)OpenLibrary("gadgets/checkbox.gadget",0L) ) + { + /* Create the window object. + */ + Win_Object = WindowObject, + WA_ScreenTitle, "ClassAct Copyright 1995, Phantom Development LLC.", + WA_Title, "SpeedTest2 (50 checkboxes)", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WINDOW_ParentGroup, HGroupObject, + TAligned, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, !ARG[0], + StartVGroup, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + End, + StartVGroup, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + End, + StartVGroup, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + End, + StartVGroup, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + End, + StartVGroup, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + StartMember, CheckBoxObject, + GA_Text, "CheckBox", + EndMember, + End, + + EndMember, + EndWindow; + + /* Object creation sucessful? + */ + if( Win_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Win_Object) ) + { + ULONG wait; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Win_Object, &signal ); + + /* Input Event Loop + */ + while( !done ) + { + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + + while ((result = CA_HandleInput(Win_Object,NULL)) != WMHI_LASTMSG) + { + switch(result) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + } + } + } + } + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject( Win_Object ); + } + } + } + } + + /* Close the classes. + */ + if (LayoutBase) CloseLibrary( (struct Library *)LayoutBase ); + if (CheckBoxBase) CloseLibrary( (struct Library *)CheckBoxBase ); + if (WindowBase) CloseLibrary( (struct Library *)WindowBase ); + + FreeArgs(args); +} + +#ifdef _DCC +int wbmain( struct WBStartup *wbs ) +{ + return( main( 0, NULL )); +} +#endif diff --git a/Examples/Speed/SpeedExample2.c.info b/Examples/Speed/SpeedExample2.c.info new file mode 100644 index 0000000..b54a1d8 Binary files /dev/null and b/Examples/Speed/SpeedExample2.c.info differ diff --git a/Examples/Speed/SpeedExample2.info b/Examples/Speed/SpeedExample2.info new file mode 100644 index 0000000..1d74045 Binary files /dev/null and b/Examples/Speed/SpeedExample2.info differ diff --git a/Examples/Speed/SpeedExample3 b/Examples/Speed/SpeedExample3 new file mode 100644 index 0000000..09251b4 Binary files /dev/null and b/Examples/Speed/SpeedExample3 differ diff --git a/Examples/Speed/SpeedExample3.c b/Examples/Speed/SpeedExample3.c new file mode 100644 index 0000000..e78b8e3 --- /dev/null +++ b/Examples/Speed/SpeedExample3.c @@ -0,0 +1,444 @@ +/* ClassAct Example + * Copyright © 1995 Christopher Aldi + * All Rights Reserved. + * + * This Example Shows ClassAct's speed laying out & rendering 50 palettes + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct ClassLibrary *WindowBase; +struct ClassLibrary *LayoutBase; +struct ClassLibrary *PaletteBase; + +LONG ARG[1]; + +int main( void ) +{ + struct Window *window; + Object *Win_Object; + ULONG signal, result; + ULONG done = FALSE; + struct RDArgs *args; + + if (!(args = ReadArgs("ND=NODEFER/S",ARG,NULL))) + return 20; + + /* Open the classes we will use. Note, classlib.lib SAS/C or DICE autoinit + * can do this for you automatically. + */ + if( WindowBase = (struct ClassLibrary *)OpenLibrary("window.class",0L) ) + { + if( LayoutBase = (struct ClassLibrary *)OpenLibrary("gadgets/layout.gadget",0L) ) + { + if( PaletteBase = (struct ClassLibrary *)OpenLibrary("gadgets/palette.gadget",0L) ) + { + /* Create the window object. + */ + Win_Object = WindowObject, + WA_ScreenTitle, "ClassAct Copyright 1995, Phantom Development LLC.", + WA_Title, "SpeedTest2 (50 palettes)", + WA_SizeGadget, TRUE, + WA_Left, 40, + WA_Top, 30, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_Activate, TRUE, + WINDOW_ParentGroup, HGroupObject, + TAligned, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, !ARG[0], + StartVGroup, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + End, + StartVGroup, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + End, + StartVGroup, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + End, + StartVGroup, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + End, + StartVGroup, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + StartMember, PaletteObject, + PALETTE_NumColors, 8, + PALETTE_Color, 1, + EndMember, + CHILD_MinWidth, 50, + CHILD_MinHeight, 15, + End, + + EndMember, + EndWindow; + + /* Object creation sucessful? + */ + if( Win_Object ) + { + /* Open the window. + */ + if( window = (struct Window *) CA_OpenWindow(Win_Object) ) + { + ULONG wait; + + /* Obtain the window wait signal mask. + */ + GetAttr( WINDOW_SigMask, Win_Object, &signal ); + + /* Input Event Loop + */ + while( !done ) + { + wait = Wait(signal|SIGBREAKF_CTRL_C); + + if (wait & SIGBREAKF_CTRL_C) done = TRUE; + else + + while ((result = CA_HandleInput(Win_Object,NULL)) != WMHI_LASTMSG) + { + switch(result) + { + case WMHI_CLOSEWINDOW: + done = TRUE; + break; + } + } + } + } + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject( Win_Object ); + } + } + } + } + + /* Close the classes. + */ + if (LayoutBase) CloseLibrary( (struct Library *)LayoutBase ); + if (PaletteBase) CloseLibrary( (struct Library *)PaletteBase ); + if (WindowBase) CloseLibrary( (struct Library *)WindowBase ); + + FreeArgs(args); +} + +#ifdef _DCC +int wbmain( struct WBStartup *wbs ) +{ + return( main( 0, NULL )); +} +#endif diff --git a/Examples/Speed/SpeedExample3.c.info b/Examples/Speed/SpeedExample3.c.info new file mode 100644 index 0000000..816c0e0 Binary files /dev/null and b/Examples/Speed/SpeedExample3.c.info differ diff --git a/Examples/Speed/SpeedExample3.info b/Examples/Speed/SpeedExample3.info new file mode 100644 index 0000000..2d25219 Binary files /dev/null and b/Examples/Speed/SpeedExample3.info differ diff --git a/Examples/SpeedBar.info b/Examples/SpeedBar.info new file mode 100644 index 0000000..b83ecae Binary files /dev/null and b/Examples/SpeedBar.info differ diff --git a/Examples/SpeedBar/SpeedBarExample.info b/Examples/SpeedBar/SpeedBarExample.info new file mode 100644 index 0000000..f9b4c8c Binary files /dev/null and b/Examples/SpeedBar/SpeedBarExample.info differ diff --git a/Examples/SpeedBar/speedbarexample b/Examples/SpeedBar/speedbarexample new file mode 100644 index 0000000..17d46b2 Binary files /dev/null and b/Examples/SpeedBar/speedbarexample differ diff --git a/Examples/SpeedBar/speedbarexample.c b/Examples/SpeedBar/speedbarexample.c new file mode 100644 index 0000000..0c8e32f --- /dev/null +++ b/Examples/SpeedBar/speedbarexample.c @@ -0,0 +1,573 @@ +;/* SpeedBar Example +sc link speedbarexample.c lib lib:classact.lib +quit +*/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + +/* Local function prototypes. + */ +BOOL make_speedbar_list(struct List *, struct Image *, UBYTE **); +VOID free_speedbar_list(struct List *); + + +/* Image data definitions. + */ +__chip UWORD sb_data[][64] = +{ + /* Cut + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0e01, 0xc000, 0x1107, 0x8000, + 0x191e, 0x0000, 0x0f78, 0x0000, + 0x01e0, 0x0000, 0x0f78, 0x0000, + 0x191e, 0x0000, 0x1107, 0x8000, + 0x0e01, 0xc000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Copy + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x01fe, 0x0000, 0x0186, 0x0000, + 0x01fe, 0x0000, 0x0630, 0x8000, + 0x1fff, 0xe000, 0x1f87, 0xe000, + 0x1f03, 0xe000, 0x1f03, 0xe000, + 0x1f03, 0xe000, 0x1f87, 0xe000, + 0x1fff, 0xe000, 0x1fff, 0xe000, + 0x0000, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0078, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0060, 0x0000, 0x0044, 0x0000, + 0x0004, 0x0000, 0x0018, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Paste + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x003f, 0x0000, + 0x0021, 0x0000, 0x007f, 0x8000, + 0x0080, 0x4000, 0x0081, 0xc000, + 0x0780, 0x4000, 0x0861, 0xc000, + 0x0f20, 0x4000, 0x0891, 0xc000, + 0x0950, 0x4000, 0x0251, 0xc000, + 0x05e0, 0x4000, 0x0880, 0xc000, + 0x307f, 0x8000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0006, 0x0000, 0x0000, 0x0000, + 0x0007, 0x0000, 0x0002, 0x0000, + 0x0002, 0x0000, 0x0782, 0x0000, + 0x00c2, 0x0000, 0x0062, 0x0000, + 0x0222, 0x0000, 0x0422, 0x0000, + 0x0802, 0x0000, 0x1002, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Erase + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x002e, 0xb800, + 0x005d, 0x7800, 0x00ba, 0xf800, + 0x01f5, 0xf000, 0x03eb, 0xe000, + 0x05f7, 0xc000, 0x08ff, 0x8000, + 0x107f, 0x0000, 0x103e, 0x0000, + 0x101c, 0x0000, 0x0828, 0x0000, + 0x0450, 0x0000, 0x02a0, 0x0000, + 0x01ff, 0xf800, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x001a, 0xa800, + 0x0035, 0x5000, 0x006a, 0xa000, + 0x0015, 0x4000, 0x000a, 0x8000, + 0x0205, 0x0000, 0x0502, 0x0000, + 0x0a80, 0x0000, 0x0540, 0x0000, + 0x0aa0, 0x0000, 0x0540, 0x0000, + 0x0280, 0x0000, 0x0100, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Mail + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0800, 0xd000, + 0x0094, 0xd000, 0x0000, 0x1000, + 0x0060, 0x1000, 0x0000, 0x1000, + 0x00d0, 0x1000, 0x0000, 0x1000, + 0x1fff, 0xf000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0018, 0x0000, 0x007c, 0x0000, + 0x01ca, 0x0000, 0x0515, 0x0000, + 0x3fff, 0xe000, 0x2bff, 0xe000, + 0x3e97, 0xe000, 0x3fff, 0xe000, + 0x3f6f, 0xe000, 0x3fff, 0xe000, + 0x3fd7, 0xe000, 0x3fff, 0xe000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Time + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0070, 0x0000, + 0x0376, 0x0000, 0x06db, 0x0000, + 0x0505, 0x0000, 0x0262, 0x0000, + 0x0421, 0x0000, 0x0421, 0x0000, + 0x0439, 0x0000, 0x0401, 0x0000, + 0x0401, 0x0000, 0x0202, 0x0000, + 0x0104, 0x0000, 0x01fc, 0x0000, + 0x0306, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0020, 0x0000, + 0x0000, 0x0000, 0x0098, 0x0000, + 0x01dc, 0x0000, 0x01dc, 0x0000, + 0x01c4, 0x0000, 0x01fc, 0x0000, + 0x01fc, 0x0000, 0x00f8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Date + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x037b, 0x0000, + 0x0285, 0x8000, 0x0201, 0x8000, + 0x0201, 0x8000, 0x0299, 0x8000, + 0x02a7, 0x8000, 0x052b, 0x8000, + 0x0535, 0x8000, 0x080d, 0x8000, + 0x1ff5, 0x8000, 0x0205, 0x8000, + 0x0201, 0x8000, 0x03ff, 0x8000, + 0x01ff, 0x8000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x017a, 0x0000, 0x01fe, 0x0000, + 0x01fe, 0x0000, 0x0166, 0x0000, + 0x0158, 0x0000, 0x02d4, 0x0000, + 0x02c8, 0x0000, 0x07f2, 0x0000, + 0x0000, 0x0000, 0x00aa, 0x0000, + 0x0154, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + }, + /* Disk + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0038, 0x0000, + 0x0054, 0x0000, 0x008e, 0x0000, + 0x0107, 0x0000, 0x0207, 0x8000, + 0x040b, 0xc000, 0x0417, 0xe000, + 0x0e29, 0xe000, 0x0750, 0xc000, + 0x03a0, 0x8000, 0x01d9, 0x8000, + 0x00eb, 0x0000, 0x0076, 0x0000, + 0x003c, 0x0000, 0x0010, 0x0000, + /* Plane 1 */ + 0x0020, 0x0000, 0x0070, 0x0000, + 0x00c0, 0x0000, 0x01a4, 0x0000, + 0x0352, 0x0000, 0x06ab, 0x0000, + 0x0d53, 0x8000, 0x12a1, 0xc000, + 0x1d46, 0xc000, 0x0e89, 0x0000, + 0x0710, 0x0000, 0x03ac, 0x8000, + 0x01d1, 0x0000, 0x00e2, 0x0000, + 0x0074, 0x0000, 0x0000, 0x0000 + }, + /* Spray Paint + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x0186, 0xc000, + 0x01bf, 0x0000, 0x07ec, 0xc000, + 0x0423, 0x0000, 0x0ff0, 0xc000, + 0x1008, 0x0000, 0x1078, 0x0000, + 0x1078, 0x0000, 0x1078, 0x0000, + 0x1078, 0x0000, 0x1078, 0x0000, + 0x1008, 0x0000, 0x1038, 0x0000, + 0x1008, 0x0000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0006, 0xc000, + 0x003f, 0x0000, 0x000c, 0xc000, + 0x0243, 0x0000, 0x0000, 0xc000, + 0x02e0, 0x0000, 0x0440, 0x0000, + 0x0470, 0x0000, 0x0440, 0x0000, + 0x0470, 0x0000, 0x0440, 0x0000, + 0x0440, 0x0000, 0x0440, 0x0000, + 0x0440, 0x0000, 0x0000, 0x0000 + }, + /* Print + */ + { + /* Plane 0 */ + 0x0000, 0x0000, 0x03fe, 0x0000, + 0x0205, 0x0000, 0x02a7, 0x0000, + 0x0201, 0x0000, 0x02d5, 0x0000, + 0x0201, 0x0000, 0x0601, 0x8000, + 0x1fff, 0xe000, 0x2000, 0x1000, + 0x2803, 0xd000, 0x2000, 0x1000, + 0x3fff, 0xf000, 0x1fff, 0xe000, + 0x0fff, 0xc000, 0x0000, 0x0000, + /* Plane 1 */ + 0x0000, 0x0000, 0x0000, 0x0000, + 0x01fa, 0x0000, 0x0118, 0x0000, + 0x01fe, 0x0000, 0x0102, 0x0000, + 0x01fe, 0x0000, 0x01fe, 0x0000, + 0x0000, 0x0000, 0x1555, 0x4000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000 + } +}; + +/* Image structures for above data. + */ +struct Image sb_images[] = +{ + { 0, 0, 22, 16, 2, sb_data[0], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[1], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[2], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[3], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[4], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[5], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[6], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[7], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[8], 0x03, 0x00, NULL }, + { 0, 0, 22, 16, 2, sb_data[9], 0x03, 0x00, NULL }, +}; + +/* speedbar window-title help strings. + */ +UBYTE *help_strs[] = +{ + "Erase block and copy it to the clipboard", + "Copy block to the clipboard", + "Paste from clipboard to your project", + "Erase block", + "Mail someone", + "Insert current time", + "Insert current date", + "Disk", + "Spray Paint", + "Print project", + NULL +}; + +/* object/gadget/button id's + */ + +enum +{ + SBID_ERASECLIP=0, + SBID_COPYCLIP, + SBID_PASTECLIP, + SBID_DELETE, + SBID_EMAIL, + SBID_INSTIME, + SBID_INSDATE, + SBID_SAVEDISK, + SBID_PAINT, + SBID_PRINT, + SBID_LAST +}; + +enum +{ + GID_SPEEDBAR=0, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + + +/* Create the SpeedBar Exec list. + */ +BOOL make_speedbar_list(struct List *list, struct Image *images, UBYTE **help) +{ + struct Node *node; + WORD i = SBID_ERASECLIP; + + NewList(list); + + while (i < SBID_LAST) + { + if (node = (struct Node *)AllocSpeedButtonNode( + i, /* speed button id! */ + SBNA_Image, images, + SBNA_Help, *help, + SBNA_Enabled, TRUE, + SBNA_Spacing, 2, + SBNA_Highlight, SBH_RECESS, + TAG_DONE)) + { + AddTail(list, node); + } + else + { + PutStr("Allocation failed\n"); + return (FALSE); + } + + images++; + i++; + help++; + } + return(TRUE); +} + + +/* Function to free a SpeedBar Exec List. + */ +VOID free_speedbar_list(struct List *list) +{ + struct Node *node, *nextnode; + + node = list->lh_Head; + while (nextnode = node->ln_Succ) + { + FreeSpeedButtonNode(node); + node = nextnode; + } + NewList(list); +} + + + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + struct List speedbar_list; + + /* make sure our classes opened... */ + if (!ButtonBase || !SpeedBarBase || !WindowBase || !LayoutBase) + return(30); + + if ( make_speedbar_list(&speedbar_list, sb_images, help_strs) ) + { + if ( AppPort = CreateMsgPort() ) + { + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct SpeedBar Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "SpeedBar", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, gadgets[GID_SPEEDBAR] = SpeedBarObject, + GA_ID, GID_SPEEDBAR, + GA_RelVerify, TRUE, + SPEEDBAR_Orientation, SPEEDBAR_HORIZONTAL, + SPEEDBAR_Buttons, &speedbar_list, + SPEEDBAR_Background, 4, + SpeedBarEnd, + CHILD_MinWidth, 160, + + LAYOUT_AddChild, VGroupObject, + CLASSACT_BackFill, NULL, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_VertAlignment, LALIGN_CENTER, + LAYOUT_HorizAlignment, LALIGN_CENTER, + LAYOUT_BevelStyle, BVS_FIELD, + + LAYOUT_AddImage, LabelObject, + LABEL_Text, "The speedbar supports scrolling list of image\n", + LABEL_Text, "buttons. When more buttons are available than\n", + LABEL_Text, "the visible space, you may scroll the list by\n", + LABEL_Text, "pressing the SHIFT key while clicking the LMB and\n", + LABEL_Text, "dragging the mouse. The speedbar also supports\n", + LABEL_Text, "several options such boolean buttons, and MX groups!\n", + LabelEnd, + LayoutEnd, + + + LAYOUT_AddChild, gadgets[GID_QUIT] = ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_SPEEDBAR: + printf("Speed Button Selected: %d\n", (int)code ); + switch ((int)code) + { + case SBID_ERASECLIP: + break; + + case SBID_COPYCLIP: + break; + + case SBID_PASTECLIP: + break; + /* ... */ + } + break; + + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + SetAttrs(gadgets[GID_SPEEDBAR], SPEEDBAR_Window, NULL, TAG_DONE); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + if (gadgets[GID_SPEEDBAR]) + { + SetAttrs(gadgets[GID_SPEEDBAR], SPEEDBAR_Window, windows[WID_MAIN], TAG_DONE); + } + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will + * also close the window if it is + * already opened and it will dispose of + * all objects attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + DeleteMsgPort(AppPort); + } + } + + free_speedbar_list(&speedbar_list); + + return(0); +} diff --git a/Examples/SpeedBar/speedbarexample.c.info b/Examples/SpeedBar/speedbarexample.c.info new file mode 100644 index 0000000..2e49e77 Binary files /dev/null and b/Examples/SpeedBar/speedbarexample.c.info differ diff --git a/Examples/String.info b/Examples/String.info new file mode 100644 index 0000000..8340b8d Binary files /dev/null and b/Examples/String.info differ diff --git a/Examples/String/StringExample.info b/Examples/String/StringExample.info new file mode 100644 index 0000000..2753068 Binary files /dev/null and b/Examples/String/StringExample.info differ diff --git a/Examples/String/stringexample b/Examples/String/stringexample new file mode 100644 index 0000000..9047f5c Binary files /dev/null and b/Examples/String/stringexample differ diff --git a/Examples/String/stringexample.c b/Examples/String/stringexample.c new file mode 100644 index 0000000..1a59a94 --- /dev/null +++ b/Examples/String/stringexample.c @@ -0,0 +1,318 @@ +;/* String Example +sc link stringexample.c lib lib:classact.lib +quit +*/ + +/** + ** StringExample.c -- String class Example. + ** + ** This is a simple example testing some of the capabilities of the + ** String gadget class. + ** + ** This code opens a window and then creates 2 String gadgets which + ** are subsequently attached to the window's gadget list. One uses + ** and edit hook, and the other does not. Notice that you can tab + ** cycle between them. + **/ + +/* system includes + */ +#include +#include +#include + +#include +#include +#include +#include +#include /* required for string hooks */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* ClassAct includes + */ +#include + + +enum +{ + GID_MAIN=0, + GID_STRING1, + GID_STRING2, + GID_DOWN, + GID_UP, + GID_QUIT, + GID_LAST +}; + +enum +{ + WID_MAIN=0, + WID_LAST +}; + +enum +{ + OID_MAIN=0, + OID_LAST +}; + + +/* hook function typedef + */ +typedef ULONG (*HookFunction)(VOID); + +/* hook function prototype + */ +ULONG __saveds __asm PasswordHook( + register __a0 struct Hook *hook, + register __a2 struct SGWork *sgw, + register __a1 ULONG *msg); + +#define SMAX 24 + +#define PASSWORDCHAR '*' + +UBYTE initialstring[] = "Testing"; + +int main(void) +{ + struct MsgPort *AppPort; + + struct Window *windows[WID_LAST]; + + struct Gadget *gadgets[GID_LAST]; + + Object *objects[OID_LAST]; + + /* make sure our classes opened... */ + if (!ButtonBase || !StringBase || !WindowBase || !LayoutBase) + return(30); + else if ( AppPort = CreateMsgPort() ) + { + struct Hook edithook1; + STRPTR hookdata1; + + /* The password edit hook needs special care, we need to look at + * edithook.h_Data to set/get the real password text. Additionally, + * we need to Alloc/Free maxchars bytes for its buffer! + */ + hookdata1 = (STRPTR)AllocVec( (SMAX + 2), MEMF_ANY | MEMF_CLEAR); + + if (hookdata1) + { + CA_SetUpHook(edithook1, PasswordHook, (STRPTR)hookdata1); + + /* copy real string data into the hidden buffer */ + strcpy(hookdata1, (STRPTR)initialstring); + + /* re-initialize real/visible string with password chars */ + memset((void *)initialstring, PASSWORDCHAR, strlen((STRPTR)initialstring)); + + /* Create the window object. + */ + objects[OID_MAIN] = WindowObject, + WA_ScreenTitle, "ClassAct Release 2.0", + WA_Title, "ClassAct String Example", + WA_Activate, TRUE, + WA_DepthGadget, TRUE, + WA_DragBar, TRUE, + WA_CloseGadget, TRUE, + WA_SizeGadget, TRUE, + WINDOW_IconifyGadget, TRUE, + WINDOW_IconTitle, "String", + WINDOW_AppPort, AppPort, + WINDOW_Position, WPOS_CENTERMOUSE, + WINDOW_ParentGroup, gadgets[GID_MAIN] = VGroupObject, + LAYOUT_SpaceOuter, TRUE, + LAYOUT_DeferLayout, TRUE, + + LAYOUT_AddChild, gadgets[GID_STRING1] = StringObject, + GA_ID, GID_STRING1, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MinVisible, 10, + STRINGA_MaxChars, SMAX, + StringEnd, + CHILD_NominalSize, TRUE, + CHILD_Label, LabelObject, LABEL_Text, "String _1", LabelEnd, + + LAYOUT_AddChild, gadgets[GID_STRING2] = StringObject, + GA_ID, GID_STRING2, + GA_RelVerify, TRUE, + GA_TabCycle, TRUE, + STRINGA_MinVisible, 10, + STRINGA_MaxChars, SMAX, + STRINGA_EditHook, &edithook1, + STRINGA_TextVal, initialstring, + StringEnd, + CHILD_Label, LabelObject, LABEL_Text, "String _2", LabelEnd, + + LAYOUT_AddChild, ButtonObject, + GA_ID, GID_QUIT, + GA_RelVerify, TRUE, + GA_Text,"_Quit", + ButtonEnd, + CHILD_WeightedHeight, 0, + + EndGroup, + EndWindow; + + /* Object creation sucessful? + */ + if (objects[OID_MAIN]) + { + /* Open the window. + */ + if (windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN])) + { + ULONG wait, signal, app = (1L << AppPort->mp_SigBit); + ULONG done = FALSE; + ULONG result; + UWORD code; + + /* Obtain the window wait signal mask. + */ + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + + /* Activate the first string gadget! + */ + ActivateLayoutGadget( gadgets[GID_MAIN], windows[WID_MAIN], NULL, gadgets[GID_STRING1] ); + + /* Input Event Loop + */ + while (!done) + { + wait = Wait( signal | SIGBREAKF_CTRL_C | app ); + + if ( wait & SIGBREAKF_CTRL_C ) + { + done = TRUE; + } + else + { + while ( (result = CA_HandleInput(objects[OID_MAIN], &code) ) != WMHI_LASTMSG ) + { + switch (result & WMHI_CLASSMASK) + { + case WMHI_CLOSEWINDOW: + windows[WID_MAIN] = NULL; + done = TRUE; + break; + + case WMHI_GADGETUP: + switch (result & WMHI_GADGETMASK) + { + case GID_STRING1: + printf( "Contents: %s\n", ((struct StringInfo *)(gadgets[GID_STRING1]->SpecialInfo))->Buffer); + + break; + + case GID_STRING2: + printf( "Contents: %s\n", hookdata1 ); + break; + + case GID_QUIT: + done = TRUE; + break; + } + break; + + case WMHI_ICONIFY: + CA_Iconify(objects[OID_MAIN]); + windows[WID_MAIN] = NULL; + break; + + case WMHI_UNICONIFY: + windows[WID_MAIN] = (struct Window *) CA_OpenWindow(objects[OID_MAIN]); + + if (windows[WID_MAIN]) + { + GetAttr(WINDOW_SigMask, objects[OID_MAIN], &signal); + } + else + { + done = TRUE; // error re-opening window! + } + break; + } + } + } + } + } + + /* Disposing of the window object will also close the window if it is + * already opened, and it will dispose of the layout object attached to it. + */ + DisposeObject(objects[OID_MAIN]); + } + + /* free the password hook buffer + */ + FreeVec(hookdata1); + } + + DeleteMsgPort(AppPort); + } + + return(0); +} + + + +/** Password Entry Hook + **/ + +ULONG __saveds __asm PasswordHook(register __a0 struct Hook *hook, register __a2 struct SGWork *sgw, register __a1 ULONG *msg) +{ + STRPTR pass_ptr = (STRPTR)hook->h_Data; + + sgw->BufferPos = sgw->NumChars; + + if(*msg == SGH_KEY) + { + switch (sgw->EditOp) + { + case EO_INSERTCHAR: + if(pass_ptr) + { + pass_ptr[sgw->BufferPos - 1] = sgw->WorkBuffer[sgw->BufferPos - 1]; + pass_ptr[sgw->BufferPos] = '\0'; + } + sgw->WorkBuffer[sgw->BufferPos - 1] = (UBYTE)PASSWORDCHAR; + break; + + case EO_DELBACKWARD: + if(pass_ptr) + { + pass_ptr[sgw->BufferPos] = '\0'; + } + break; + + default: + sgw->Actions &= ~SGA_USE; + break; + } + + sgw->Actions |= SGA_REDISPLAY; + return (~0L); + } + if(*msg == SGH_CLICK) + { + sgw->BufferPos = sgw->NumChars; + return (~0L); + } + return(0L); +} diff --git a/Examples/String/stringexample.c.info b/Examples/String/stringexample.c.info new file mode 100644 index 0000000..7199013 Binary files /dev/null and b/Examples/String/stringexample.c.info differ diff --git a/Install_Classes b/Install_Classes new file mode 100644 index 0000000..bed8e37 --- /dev/null +++ b/Install_Classes @@ -0,0 +1,393 @@ +; --------------------------------------------------------------------------- + +; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES +; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION. +; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU +; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM. + +; $VER: ClassAct_Install 1.16 (9.3.97) by Osma Ahvenlampi + +(set cpu (database "cpu")) +(set cpu020 (and (<> cpu "68000") (<> cpu "68010"))) +(set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39)) + +; percentage of the size of included ClassAct classes versus the whole +; distribution (ie. total "complete" percentage after ClassAct is installed) + +(set classact-complete 90) + +; ClassAct installer scripts + +;*********************************** +;English Strings +;*********************************** +(set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)") +(set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. " + (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.") + (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.") + ) + ) + +) +(set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?") +(set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.") +(set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.") +(set #creating-dir "Creating directory ") +(set #usbackup-prompt "User-Startup will now be backed up.") +(set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old") +(set #adding-1 "Adding ") +(set #adding-2 " to LIBS: assign\n") +(set #adding-help "This is necessary so that the custom classes can be found.") +(set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?") +(set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.") +(set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.") +;(set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n") +(set #caprefs-message "ClassAct has several user-configurable aspects that affect the look of ClassAct interfaces.\n\nThese settings can be changed using the ClassAct preferences tool that will be installed in yout Prefs drawer.\n\nA small tool, CAPrefs, will be added to your user-startup to load the settings on reboot.") +(set #caprefs-startup-1 "Adding the command\n\n") +(set #caprefs-startup-2 "\n\nTo your s:User-Startup.") +(set #decompressing-classact "Compressed ClassAct distribution detected\n\nDecompressing to RAM:") +(set #deleting-cltmp "Deleting temporary files") + +;*********************************** +;Spanish Strings +;*********************************** +(if (= @language "español") +( + (set #classdest-prompt "Por favor, seleccione el directorio donde desea instalar las clases de ClassAct.\n(Vea la ayuda para más detalles)") + (set #classdest-help (cat "ClassAct es un kit de interface gráfica consistente es clases compartidas BOOPSI.\n\nAlgunos programas requieren que algunas o todas de las clases de ClassAct estén instaladas en su sistema. " + + (if v39 (cat "El OS 3.0 tiene un directorio estándar para las clases BOOPSI: el directorio SYS:Classes. Se recomienda que instale ClassAct ahí.") + (cat "El OS 2.0 no tiene un sitio estándar para las clases BOOPSI residentes en disco. En el OS 3.0 esas clases son almacenadas en el directorio SYS:Classes. Se recomienda que cree este directorio e instale ClassAct ahí.\nEste directorio debe ser añadido a la asignación de LIBS:. Esto puede ser hecho colocando el comando\nAssign >NIL: LIBS: SYS:Classes ADD\nal User-Startup. Este instalador lo hará por usted.") + ) + ) + ) + (set #classes-020 "¿Quiere usar la versión optimizada para OS 3.0 y 020 de ClassAct?") + (set #help-020 "Algunas librerías de ClassAct tienen versiones optimizadas para el uso en máquinas con OS 3.0 y 020 o superior. Si su Amiga es una de tales máquinas debería instalar estas. Las versiones 68000/2.0 también funcionarán, pero son ligeramente más lentas") + (set #noclasses-message "El subdirectorio que seleccionó para sus clases ClassAct no forma parte de la asignación de LIBS:.\n\nEs necesario añadir esta asignación para que las clases puedan ser localizadas adecuadamente.") + (set #creating-dir "Creando directorio ") + (set #usbackup-prompt "Ahora se hará una copia de seguridad del User-Startup.") + (set #usbackup-help "Este instalador hará ahora una modificación en el User-Startup. Antes de hacer esto se hará una copia de seguridad del User-Startup en S:User-Startup.old") + (set #adding-1 "Añadiendo ") + (set #adding-2 "a la asignación de LIBS:\n") + (set #adding-help "Esto es necesario para que las clases puedan ser encontradas.") + (set #junod-button "Parece que tiene el último button.gadget de Comodore ('V42') instalado en su sistema.\n\nEl button.gadget de ClassAct es superior a este gadget y le recomendamos que lo remplace. El button.gadget de ClassAct es compatible con el de Commodore. ¿Desea hacer una copia de seguridad del gadget de Commodore y remplazarlo por la versión de ClassAct?") + (set #junod-backed "Se ha hecho una copia de seguridad del button.gadget 'V42' de Commodore con el nombre button.gadget.v42.\n\nEl button.gadget de ClassAct será instalado en su lugar.") + (set #junod-kept "El button.gadget 'V42' de Commodore no fué remplazado con la versión superior de ClassAct.\n\nLos programas que dependan de la disponibilidad de las características de la versión de ClassAct funcionarán mal probablemente") + ;(set #caprefs-message "CAPrefs es una pequeña utilidad que inicializa algunas preferencias del usuario para las aplicaciones ClassAct. Estas incluyen el estilo de resaltado (Fino/GadTools/Xen), relleno de ventanas, y detalles de las etiquetas de grupo.\n\nPor favor, use las preferencias de interface de ClassAct en su cajón de sistema 'Prefs' .\n\n") + (set #caprefs-message "ClasAct tiene varios aspectos configurables por el usuario que afectan a la apariencia de las interfaces ClassAct.\n\nEstos ajustes pueden ser modificados usando la herramienta de preferencias de ClassAct que será instalada en su cajón 'Prefs'.\n\nUna pequeña herramienta, CAPrefs, será añadida a su user-startup para cargar los ajustes al arrancar.") + (set #caprefs-startup-1 "Añadiendo el comando\n\n") + (set #caprefs-startup-2 "\n\nA su s:User-Startup.") + (set #decompressing-classact "Distribución de Classact comprimida detectada\n\nDescomprimiendo a RAM:") + (set #deleteing-cltmp "Borrando ficheros temporales") +) +) + +;*********************************** +; Italian Strings +;*********************************** +(if (= @language "italiano") +( + (set #classdest-prompt "Per favore scegli la directory in cui vuoi installare le classi ClassAct.\n(Vedi Aiuto per i dettagli)") + (set #classdest-help (cat "ClassAct è un toolkit GUI che consiste di classi BOOPSI condivise.\n\nCerti programmi richiedono che alcune o tutte le classi ClassAct siano installate sul tuo sistema. " + (if v39 (cat "Il SO 3.0 ha una directory standard per le classi BOOPSI, la directory SYS:Classes. Si raccomanda d'installare ClassAct proprio lì.") + (cat "Il SO 2.0 non ha un posto standard per le classi BOOPSI residenti su disco. Nell'OS 3.0 queste classi sono immagazzinate nella directory SYS:Classes. Si raccomanda di creare questa directory e d'installarvi ClassAct.\nQuesta directory dev'essere aggiunta nell'assign LIBS:. Ciò può essere fatto mettendo il comando\nAssign >NIL: LIBS: SYS:Classes ADD\nnella User-Startup. Questo script d'installazione lo farà per te.") + ) + ) + ) + (set #classes-020 "Vuoi usare la versione ottimizzata per SO 3.0 e CPU 020 di ClassAct?") + (set #help-020 "Alcune librerie ClassAct hanno versioni ottimizate per l'uso su macchine equipaggiate con una CPU 020 o superiore e il SO 3.0. Se il tuo Amiga é così equipaggiato, dovresti installarle. Le versioni 68000/2.0 funzioneranno comunque, ma sono più lente.") + (set #noclasses-message "La directory che hai scelto per le tue classi ClassAct non é parte dell'assign LIBS:.\n\nE' necessario aggiungere questo assegnamento affinché le classi siano trovate correttamente.") + (set #creating-dir "Creo la directory ") + (set #usbackup-prompt "La User-Startup sarà ora copiata per sicurezza.") + (set #usbackup-help "Questa installazione ora modificherà la User-Startup. Prima di fare ciò, la vecchia User-Startup sarà copiata per sicurezza in S:User-Startup.old") + (set #adding-1 "Aggiungo ") + (set #adding-2 " all'assign LIBS:\n") + (set #adding-help "Questo è necessario per far trovare al sistema le classi custom.") + (set #junod-button "Sembra che hai installato un recente button.gadget 'V42' della Commodore sul tuo sistema.\n\nIl button.gadget di ClassAct é molto più potente di questo gadget, e raccomandiamo di sostituirlo. Il button.gadget di ClassAct é compatibile con il gadget Commodore. Vuoi copiare per sicurezza il gadget Commodore e sostituirlo con la versione ClassAct?") + (set #junod-backed "Il button.gadget della Commodore 'V42' é stato copiato per sicurezza col nome button.gadget.v42.\n\nIl button.gadget di ClassAct sarà installato al suo posto.") + (set #junod-kept "Il button.gadget 'V42' della Commodore non é stato sostituito dalla versione ClassAct più potente.\n\nI programmi che dipendono dalla disponibilità delle caratteristiche di ClassAct probabilmente funzioneranno male.") + ;(set #caprefs-message "CAPrefs è una piccola utility che setta alcune preferenze dell'utente per le applicazioni ClassAct. Tra queste, lo stile dei bevel (Thin/Gadtools/Xen), i backfill delle finestre, ed il dettaglio della group label.\n\nPer favore usa l'editor di preferenze ClassAct GUI per modificare i settaggi standard forniti. ClassAct prefs sarà installato nel cassetto Prefs del tuo sistema.\n\n") + (set #caprefs-message "ClassAct ha diversi aspetti configurabili dall'utente che modificano l'aspetto delle interfacce ClassAct.\n\nQuesti settaggi possono essere cambiati usando il programma di preferenze ClassAct sarà installato nel tuo cassetto Prefs.\n\nUna piccola utility, CAPrefs, sarà aggiunta alla tua user-startup per caricare i settaggi al reboot.") + (set #caprefs-startup-1 "Aggiungo il comando\n\n") + (set #caprefs-startup-2 "\n\nalla tua S:User-Startup.") + (set #decompressing-classact "Trovata una distribuzione ClassAct compressa\n\nLa decomprimo in RAM:") + (set #deleting-cltmp "Cancello i file temporanei") +) +) + +;*********************************** +; Swedish Strings +;*********************************** +(if (= @language "svenska") +( +(set #classdest-prompt "Var god välj den låda där du vill installera ClassAct-klasserna.\n(Se hjälpen för detaljer.)") +(set #classdest-help (cat "ClassAct är en verktygslåda för skapandet av användargränssnitt (GUI), som består av ett antal så kallade delade BOOPSI-klasser.\n\nEn del program kräver att en del, eller alla, ClassAct-klasser är installerade i din Amiga. " + + (if v39 (cat "OS 3.0 har en standardlåda för BOOPSI-klasser, Sys:Classes. Det rekommenderas att du installerar ClassAct där.") + (cat "OS 2.0 har inte någon standardlåda för diskbaserade BOOPSI-klasser. I OS 3.0 lagras sådana klasser i lådan Sys:Classes. Det rekommenderas att du skapar denna låda, och installerar ClassAct där.\nDenna låda måste vara en del av Libs:-tilldelningen. Detta kan göras genom att placera kommandot\nAssign >NIL: Libs: Sys:Classes ADD\ntill filen S:User-Startup. Den här installeraren kommer att göra det åt dig.") + ) + ) + +) + +(set #classes-020 "Vill du använda OS 3.0-versionen av ClassAct, som är optimerad för en 68020?") +(set #help-020 "Några ClassAct-klasser finns i versioner som är optmierade för en 68020 och OS 3.0 eller bättre. Om din Amiga har sådan utrustning (eller bättre), så bör du installera dem. Versionerna för 68000/2.0 fungerar också, men de är något långsammare.") +(set #noclasses-message "Den låda du har valt för ClassAct-klasserna är inte en del av Libs:-tilldelningen.\n\nDet är nödvändigt att lägga till denna tilldelning, så att klasserna kan hittas utan problem.") +(set #creating-dir "Skapar lådan ") +(set #usbackup-prompt "S:User-Startup kommer nu att backas upp.") +(set #usbackup-help "Den här installeraren kommer strax att modifiera filen S:User-Startup. Innan detta görs, kommer den gamla S:User-Startup att backas upp till S:User-Startup.old") +(set #adding-1 "Lägger till ") +(set #adding-2 " till Libs:-tilldelningen\n") +(set #adding-help "Detta måste göras för att klasserna ska kunna hittas.") +(set #junod-button "Det ser ut som om du har Commodores 'V42' button.gadget installed i din Amiga.\n\nClassActs button.gadget kan mycket mer än denna knapp, och vi rekommenderar att du ersätter den. ClassAct-versionen av button.gadget är bakåtkompatibel med Commodore-knappen. Vill du backa upp Commodore-knappen, och ersätta den med ClassAct-versionen?") +(set #junod-backed "Commodores 'V42' button.gadget har backats upp som button.gadget.v42.\n\nClassActs button.gadget kommer att installeras istället.") +(set #junod-kept "Commodores 'V42' button.gadget har inte ersatts av den mer kapabla ClassAct-versionen.\n\nProgram som förlitar sig på tillgängligheten av ClassAct-specifika funktioner kommer troligen inte att fungera som de ska.") + +;(set #caprefs-message "CAPrefs är ett litet program som sätter användarinställningarna för ClassAct-program. Dessa inställningar inkluderar ramstil (smal/gadtools/xen), fönsterbakgrunder samt detaljer rörande gruppetiketter.\n\nVar god använd ClassActs grafiska inställningsredigerare för att ändra de förvalda inställningarna. ClassActs inställningsredigerare kommer att installeras i din Amigas Prefs-låda.\n\n") + +(set #caprefs-message "ClassAct har flera användardefinierbara aspekter som påverkar hur ClassAct-gränssnitt ser ut.\n\nDessa inställningar kan ändras genom att använda ClassActs inställningsredigerare, som kommer att installeras i din Amigas Prefs-låda.\n\nEtt litet program, CAPrefs, kommer att läggas till din S:User-Startup, för att läsa in inställningarna vid systemuppstart.") +(set #caprefs-startup-1 "Lägger till kommandot\n\n") +(set #caprefs-startup-2 "\n\ntill din s:User-Startup.") +(set #decompressing-classact "Komprimerad ClassAct-distribution upptäckt\n\nPackar upp till Ram:") +(set #deleting-cltmp "Raderar temporära filer") +) +) + + +(procedure install-classact ; call this procedure to copy the classes included in the Classes directory +; in your distribution dir. + + (if (exists "ClassAct.lha") ; ClassAct is compressed - need to decompress first + ( ; Distribution includes LHEX + (working (cat #decompressing-classact)) + +; ClassAct.lha contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct" + + (run "lhex -aqfw=ram:ClassAct/ x ClassAct.lha") + (set #classact-source "RAM:ClassAct") + ) + (set #classact-source (pathonly @icon)) + ) + (if (exists "ClassAct.lzx") ; ClassAct is compressed - need to decompress first + ( ; Distribution includes UNLZX + (working (cat #decompressing-classact)) + +; ClassAct.lzx contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct" + + (run "unlzx -amq x ClassAct.lzx ram:ClassAct/") + (set #classact-source "RAM:ClassAct") + ) + (set #classact-source (pathonly @icon)) + ) + + (if (exists (tackon #classact-source "Classes")) ; The archive contains a ClassAct library update. + ( + (set comp-dest (/ (* classact-complete 2) 10)) + (set comp-libs (/ (* classact-complete 3) 10)) + (set comp-dirs (/ (* classact-complete 4) 10)) + (set comp-junod (/ (* classact-complete 5) 10)) + (set comp-020 (/ (* classact-complete 6) 10)) + (set comp-gad (/ (* classact-complete 7) 10)) + (set comp-im (/ (* classact-complete 8) 10)) + (set comp-prefs (/ (* classact-complete 9) 10)) + + ; has the user installed ClassAct in CLASSACT: ? + (set #classact-dest (getassign "CLASSACT" "A")) + (set @default-dest #classact-dest) + (if (= #classact-dest "") (set #classact-dest "SYS:Classes")) + + ; is ClassAct already in SYS:Classes ? + (if (or (not (exists (tackon #classact-dest "Gadgets/layout.gadget") (noreq))) + (= @user-level 2)) + ; no, ask where it should be placed + (set #classact-dest + (askdir + (prompt #classdest-prompt) + (help #classdest-help) + (default #classact-dest) + (newpath) + ) + ) + ) + + (complete comp-dest) + + (if (<> (run (cat "\"" (tackon #classact-source "C/CheckAssign\"") " LIBS: " #classact-dest)) 0) + ( + (message #noclasses-message) + (if (not (exists #classact-dest)) + (makedir #classact-dest (prompt (cat #creating-dir #classact-dest))) + ) + (set #addassign (cat "Assign >NIL: LIBS: " #classact-dest " ADD\n")) + (startup "CLASSACT" + (command #addassign) + (prompt (cat #adding-1 #classact-dest #adding-2)) + (help #adding-help) + ) + (run (#addassign)) + ) + ) + + (complete comp-libs) + + (set #classact-gadgets (tackon #classact-dest "Gadgets")) + (set #classact-images (tackon #classact-dest "Images")) + + (if (not (exists #classact-gadgets (noreq))) + (makedir #classact-images + (prompt (cat #creating-dir #classact-gadgets)) + ) + ) + + (if (not (exists #classact-images (noreq))) + (makedir #classact-images + (prompt (cat #creating-dir #classact-images)) + ) + ) + + (complete comp-dirs) + + (if (exists "SYS:Classes/Gadgets/button.gadget") + (if (and (= 2752514 (getversion "SYS:Classes/Gadgets/button.gadget")) + (= 4868 (getsize "SYS:Classes/Gadgets/button.gadget"))) + (if (askbool (prompt #junod-button) (help @askbool-help) (default 1)) + ( + (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42") + (message #junod-backed) + ) + (message #junod-kept) + ) + ) + ) + + (complete comp-junod) + + (if (and (and cpu020 v39) (exists (tackon #classact-source "Classes/Gadgets/layout.gadget.020"))) + (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default 1))) + (set classes-020 0) + ) + + (complete comp-020) + + (set #source-path (tackon #classact-source "Classes/Gadgets")) + (foreach #source-path "#?.gadget" + ( + (set thislib (tackon #source-path @each-name)) + (if (and classes-020 (exists (cat thislib ".020"))) + (set thislib (cat thislib ".020")) + ) + (copylib (source thislib) + (dest #classact-gadgets) + (newname @each-name) + (prompt (cat #installing @each-name)) + (help #classdest-help) + (optional "force" "askuser") + ) + ) + ) + + (complete comp-gad) + + (set #source-path (tackon #classact-source "Classes/Images")) + (foreach #source-path "#?.image" + ( + (set thislib (tackon #source-path @each-name)) + (if (and classes-020 (exists (cat thislib ".020"))) + (set thislib (cat thislib ".020")) + ) + (copylib (source thislib) + (dest #classact-images) + (newname @each-name) + (prompt (cat #installing @each-name)) + (help #classdest-help) + (optional "force" "askuser") + ) + ) + ) + + (complete comp-im) + + (set #source-path (tackon #classact-source "Classes")) + (foreach #source-path "#?.class" + ( + (set thislib (tackon #source-path @each-name)) + (if (and classes-020 (exists (cat thislib ".020"))) + (set thislib (cat thislib ".020")) + ) + (copylib (source thislib) + (dest #classact-dest) + (newname @each-name) + (prompt (cat #installing @each-name)) + (help #classdest-help) + (optional "force" "askuser") + ) + ) + ) + ) + ) + (if (exists (tackon #classact-source "Prefs/ClassAct")) ; The archive contains ClassAct prefs tools + ( + (message #caprefs-message) + + (copylib (source (tackon #classact-source "Prefs/CAPrefs")) + (dest "C:") + (prompt (cat #installing "CAPrefs")) + ) + (copylib (source (tackon #classact-source "Prefs/ClassAct")) + (dest "SYS:Prefs") + (prompt (cat #installing "ClassAct Prefs")) + (infos) + ) + + (complete comp-prefs) + + (if (not (exists "ENVARC:ClassAct" (noreq))) + ( + (makedir "ENVARC:ClassAct" + (prompt (cat #creating-dir "ENVARC:ClassAct")) + ) + (textfile (dest "ENVARC:ClassAct/ClassAct") + (append "") + ) + ) + ) + (set caprefs-cmd "C:CAPrefs >NIL:\n") + + (startup "CAPREFS" + (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2)) + (help #caprefs-message) + (command caprefs-cmd) + ) + ) + ) + + (if (or (exists "ClassAct.lha") (exists "ClassAct.lzx")) + (run "C:Delete RAM:ClassAct ALL" + +; (delete "RAM:ClassAct" (all) + + (prompt #deleting-cltmp) + ) + ) + + (complete classact-complete) ) + +; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE +; ************** TO YOUR CLASSACT APPLICATION INSTALLER. + +; --------------------------------------------------------------------------- + +(set #welcome "This program will install the ClassAct shared gadget classes on your system.\n") + +(complete 0) + +(if (< (/ (getversion "exec.library" (resident)) 65536) 37) + + (abort "This program requires OS 2.04 or better.") ) + +(welcome #welcome) + +(install-classact) + +(complete 100) + diff --git a/Install_Classes.info b/Install_Classes.info new file mode 100644 index 0000000..b8d4936 Binary files /dev/null and b/Install_Classes.info differ diff --git a/Layout_README.doc b/Layout_README.doc new file mode 100644 index 0000000..8cecc09 --- /dev/null +++ b/Layout_README.doc @@ -0,0 +1,19 @@ +The layout.gadget is a 68000 binary with V37 support code in it. This means +that it will work on any machine with at least OS 2.04 on it. However, +because Intuition V37 does not support some features the layout.gadget uses, +it has to kludge a few things. These kludges are contained within an OS +version check, and are fully OS legal. They will not be used on a V39 +machine. Obviously these checks can slow things down a bit. + +To rectify that, layout.gadget.020 is a 68030 optimised version that +requires V39. It will refuse to work on a V37 machine. However, it WILL +work on a 68020, regardless of being optimised for a 68030. Because it +requires V39, it also uses Exec memory pool functions directly instead +of the linked lib versions. This is another reason why it is faster. + +In short: if you have 68000 or 68010, OR if you have OS 2.04 or 2.1, you +have to use layout.gadget. If you have 68020 or better and OS 3.0 or +later you can, and should, use layout.gadget.020. The V37 version will +work just like the V39 version would, but it is a tad slower. + +You do want all the speed you can get, don't you? :) diff --git a/Layout_README.doc.info b/Layout_README.doc.info new file mode 100644 index 0000000..c75b40d Binary files /dev/null and b/Layout_README.doc.info differ diff --git a/License.doc b/License.doc new file mode 100644 index 0000000..c542624 --- /dev/null +++ b/License.doc @@ -0,0 +1,43 @@ +1. COPYRIGHTS: THIS PRODUCT IS COPYRIGHTED AND OTHERWISE SUBJECT TO +PROPRIETY RIGHTS. + +2. LICENSE: Subject to the terms of this Agreement and the exclusive +rights of the copyright holder as set forth in the Title 17 of the +United States Code, you are hereby granted unrestricted use of this +Product on one computer in your software development environment. + +You may re-distribute this required elements of this Product with +your product with the following exceptions; + +A) Product documentation, otherwise known as "AutoDocs" and, + +B) Compiler "Include files" may NOT be distributed, transmitted + or reverse engineered in any form without prior written approval + from the Christopher Aldi, Timothy Aston, Osma Ahvenlampi and + Petter Nilsen, otherwise known as "ClassAct Development Team". + +C) The ClassAct distribution license is NOT transferable. Class + re-distribution rights are granted to the original purchaser or + company only. If another company manufactures and/or markets your + product then they are subject to a commercial distribution license + for the classes. + +3. DURATION: This Agreement is effective until terminated. If you fail +to comply with any term or condition of this Agreement this License +will terminate. You may also terminate this License at any time. Upon +doing so you will agree to immediatly cease use and re-distribution and +Destroy all copies of this Product. + +4. DISCLAIMER: This software is provided "as is". No representations or +warranties are made with respect to the accuracy, reliability, performance, +currentness, or operation of this software, and all use is at your own risk. +Neither Finale Development, Inc. nor the authors assume any responsibility +or liability what so ever with respect to your use of this software. + +5. ROYALTY: There is no royalty to paid on this product except as noted below; + +A) Product is integrated or bundled with the Amiga Operation System or + compatible. + +B) Product is bundled in software pack that is supplied with an + Amiga Computer or compatible. diff --git a/License.doc.info b/License.doc.info new file mode 100644 index 0000000..5f08611 Binary files /dev/null and b/License.doc.info differ diff --git a/OrderForm.doc b/OrderForm.doc new file mode 100644 index 0000000..1c7beaa --- /dev/null +++ b/OrderForm.doc @@ -0,0 +1,97 @@ + + Finale Development Order Sheet + ------------------------------ + + + Name: ____________________________________________________ + + Address: ____________________________________________________ + + City: ____________________________________________________ + + State/Provine: ____________________________________________________ + +Zip/Postal Code:_____________________________________________________ + + Country: ____________________________________________________ + + Phone: ____________________________________________________ + + E-Mail: ____________________________________________________ + + + +Quantity - ITEM Description - Price Ea - Amount + +________ - ClassAct BOOPSI Object Kit - $29.95 - _________ + w/ NON-Commmercial license + Competitive Upgrade Discount + +________ - ClassAct BOOPSI Object Kit - $39.95 - _________ + w/ NON-Commmercial license + +________ - ClassAct BOOPSI Object Kit - $59.95 - _________ + w/ Commmercial license + Competitive Upgrade Discount + +________ - ClassAct BOOPSI Object Kit - $69.95 - _________ + w/ Commercial license + + Sub Total: _________ + + Florida Residents 6% Sales Tax: _________ + + Shipping & Handling: _________ + + Total: _________ + + Method of Delivery + ------------------ + +________ - Postal mail to postal address above. + + +________ - E-Mail MIME attachment to E-Mail address above. + + + + Competitive Upgrade Discount + ---------------------------- + +GUI toolkit you are upgrading from: + + _______ MUI _______ BGUI _______ Triton + + _______ GadUtil _______ GUIEnv _______ GUIFront + + _______ GadLayout _______ GadOutline _______ GTLayout + + +Program(s) you having written using this GUI toolkit: + + ___________________________________________________________________ + + ___________________________________________________________________ + + Shipping Charges + ---------------- + + USA or Canada: $3 USA +Foreign Shipments: $6 USA + + Ordering Infomation + ------------------- + +Orders must be pre-paid in full, and will be shipped via US Mail or EMail +as noted above. Please allow 5 to 15 business days for postal delivery +and make all checks payable in US Funds to "Finale Development, Inc". + + + Finale Development, Inc + P.O. Box 6905 + West Palm Beach, FL, 33405 + U.S.A. + + Pone: 1 (203) 235-7518 + Fax: 1 (203) 237-8459 + diff --git a/OrderForm.doc.info b/OrderForm.doc.info new file mode 100644 index 0000000..f308c81 Binary files /dev/null and b/OrderForm.doc.info differ diff --git a/PreView!.info b/PreView!.info new file mode 100644 index 0000000..c8062f2 Binary files /dev/null and b/PreView!.info differ diff --git a/PreView!/PreView0.iff b/PreView!/PreView0.iff new file mode 100644 index 0000000..0e15c36 Binary files /dev/null and b/PreView!/PreView0.iff differ diff --git a/PreView!/PreView0.iff.info b/PreView!/PreView0.iff.info new file mode 100644 index 0000000..def080e Binary files /dev/null and b/PreView!/PreView0.iff.info differ diff --git a/PreView!/PreView1.iff b/PreView!/PreView1.iff new file mode 100644 index 0000000..fd1693a Binary files /dev/null and b/PreView!/PreView1.iff differ diff --git a/PreView!/PreView1.iff.info b/PreView!/PreView1.iff.info new file mode 100644 index 0000000..855a64b Binary files /dev/null and b/PreView!/PreView1.iff.info differ diff --git a/PreView!/PreView2.iff b/PreView!/PreView2.iff new file mode 100644 index 0000000..8e38011 Binary files /dev/null and b/PreView!/PreView2.iff differ diff --git a/PreView!/PreView2.iff.info b/PreView!/PreView2.iff.info new file mode 100644 index 0000000..d3afbb3 Binary files /dev/null and b/PreView!/PreView2.iff.info differ diff --git a/PreView!/PreView3.iff b/PreView!/PreView3.iff new file mode 100644 index 0000000..526fed1 Binary files /dev/null and b/PreView!/PreView3.iff differ diff --git a/PreView!/PreView3.iff.info b/PreView!/PreView3.iff.info new file mode 100644 index 0000000..e4ade50 Binary files /dev/null and b/PreView!/PreView3.iff.info differ diff --git a/Prefs.info b/Prefs.info new file mode 100644 index 0000000..7f9169f Binary files /dev/null and b/Prefs.info differ diff --git a/Prefs/CAPrefs.doc b/Prefs/CAPrefs.doc new file mode 100644 index 0000000..7d4e8fe --- /dev/null +++ b/Prefs/CAPrefs.doc @@ -0,0 +1,67 @@ + NAME + + CAPrefs -- ClassAct Preferences Daemon + + SYNOPSIS + + CAPrefs BEVELS/K,SPACE=LAYOUTSPACING/K/N,GADGETS/K, + LABELPLACE/K,LABELPEN/K/N,LABELFONT/K,REFRESH/K, + PATTERN/K,FALLBACKFONT/K + + CAPrefs [BEVELS GT|THIN|XEN] [SPACE n] [GADGETS NORMAL|3D] + [LABELPLACE LEFT|RIGHT|CENTER] [LABELPEN n] + [LABELFONT font/size] [REFRESH SIMPLE|SMART] + [PATTERN image] [FALLBACKFONT font/size] + + FUNCTION + + Set up ClassAct preferences. Run this program before any + applications that utilize ClassAct classes. A good place is + early in the user-startup. A graphic preferences editor will + be provided in the near future. + + ARGUMENTS + + BEVELS + GT - GadTools-like 2:1 aspect bevels. The default. + THIN - 1:1 aspect thin bevels. + + SPACE + Spacing between gadgets. Corresponds to pixels in + THIN bevel mode, scaled to bevel width. Default 4. + + GADGETS + NORMAL - standard V37 window border gadgets. The default. + 3D - with SysIHack 3DLOOK, a 3D iconify gadget. + + LABELPLACE + LEFT - left justified group labels. + RIGHT - right justified group labels. + CENTER - centered group labels. The default. + + LABELPEN + Pen number to use for labels. Default is TEXTPEN. + + LABELFONT + Font name and size to use for group labels. Default + is the screen/window font. + + REFRESH + Window refresh type. Simple refresh windows take less + memory but update slower when uncovered from behind other + windows. Smart refresh is quicker but more memory hungry. + Default is smart. + + PATTERN + On OS 3.0, ClassAct window.class can automatically install + a backfill pattern to windows, using any image understood + by the datatypes. This option is the name of that image. + + FALLBACKFONT + Window fallback font in case the default font is too large + to fit the window on the screen. + + EXAMPLE + + CAPrefs BEVELS=THIN SPACE=3 LABELPEN=2 LABELFONT Times/12 + diff --git a/Prefs/CAPrefs.doc.info b/Prefs/CAPrefs.doc.info new file mode 100644 index 0000000..d403b61 Binary files /dev/null and b/Prefs/CAPrefs.doc.info differ diff --git a/Prefs/ClassAct b/Prefs/ClassAct new file mode 100644 index 0000000..886f188 Binary files /dev/null and b/Prefs/ClassAct differ diff --git a/Prefs/ClassAct.history.info b/Prefs/ClassAct.history.info new file mode 100644 index 0000000..ba15963 Binary files /dev/null and b/Prefs/ClassAct.history.info differ diff --git a/Prefs/ClassAct.info b/Prefs/ClassAct.info new file mode 100644 index 0000000..c6304ec Binary files /dev/null and b/Prefs/ClassAct.info differ diff --git a/Prefs/caprefs b/Prefs/caprefs new file mode 100644 index 0000000..4d4bc56 Binary files /dev/null and b/Prefs/caprefs differ diff --git a/Prefs/classact.history b/Prefs/classact.history new file mode 100644 index 0000000..288e366 --- /dev/null +++ b/Prefs/classact.history @@ -0,0 +1,41 @@ + +All changes by Petter Nilsen: + +- Will check for v41 of bevel.image and window.class before applying the + new preference settings to these classes. +- Removed a double-usage of a RDArgs structure that would cause problems if + a prefs file was present in env:classact. +- Fixed a wrong check on the return code from GetVar that WOULD cause + problems along with the bug above. +- Added LABELSTYLE argument to the config. +- Removed shell argument support, use the old CAPrefs for that. +- Only a single copy of this program can be running at the same time. + +ClassAct 2.72 (11.Mai.96) +- If no prefs was loaded, loading ClassAct and then selecting Cancel + would give enforcer hits. Fixed. + +ClassAct 2.74 (5.Jul.96) +- Group bevel around Save/Use/Test/Cancel changed to a separator bar. +- ClickTab's text is now default black and not white anymore. +- The filename for the window backfill picture is expanded to the full + path and name of the file. +- The ClassAct "man" is moved to the right side of the window, and is now + transparent. +- Cancel will not cause a refresh unless Test or some of the other similar + functions have been used. +- Label pen defaults to the textpen now. +- Test Area removed, the background of the CA "man" will be used. + +ClassAct 2.93 (17.Jul.96) +- Added support for PROPSTYLE. + +CAPrefs deamon: +- Added support for PROPSTYLE ("3D" or "Normal"). + +ClassAct 2.134 ( 4.Nov.96) +- Fixed a double unlocking of window when the window picture couldn't be + loaded which would cause a freeze. +- Uses getfile.gadget and getfont.gadget +- About window will optionally use requester.class, if present + diff --git a/Quill_README.doc b/Quill_README.doc new file mode 100644 index 0000000..a453b0e --- /dev/null +++ b/Quill_README.doc @@ -0,0 +1,55 @@ + + Digital Quill + ------------- + +Quill is a fast, friendly and full-featured text editor, written by +Timothy Aston and published by Phantom Development. Here's a quick +rundown of some of the highlights of its feature list: + + > A full array of conventional text editing features: + · clipboard support + · choice of true or "fake" tabs and configurable tab size + · word wrap + · auto-indent + · bookmarks + · case conversion + · bracket matching, both automatic and on-demand + + > Very fast text scrolling. + + > Quick disk operations. + + > Fast find and replace. + + > Fully configurable button strip, or "SpeedBar". + + > Completely font adaptive and localized user interface. + + > Complies rigidly with Commodore's user interface style guidelines. + + > Requires at least release 2.1 of the Amiga's OS, and takes full + advantage of release 3.x features. + + > Complete context sensitive hypertext online help via AmigaGuide. + + > Extensive ARexx interface. + + > Macros can be recorded, played back or hand-written, and be assigned + to a key combination, a pull-down menu item, or a SpeedBar button. + +Purchasing Quill: +----------------- + +Digital Quill is available at quality Amiga dealers everywhere with a +suggested retail price of $39.95 USD. If there isn't an Amiga dealer in +your area which carries Quill, you may purchase Quill directly from +us using order form included in this archive. Digital Quill is also +available from Wonder Computers and the GammaSoft Dealer NetWork. + + E-Mail: caldi@finale-dev.com + WWW: http://www.finale-dev.com/ + +The offical Quill web site is at: + http://www.warped.com/~timmer/quill + +Distributor and Dealer inquieres welcome. diff --git a/Quill_README.doc.info b/Quill_README.doc.info new file mode 100644 index 0000000..acd7e47 Binary files /dev/null and b/Quill_README.doc.info differ diff --git a/c/CheckAssign b/c/CheckAssign new file mode 100644 index 0000000..5dcd009 Binary files /dev/null and b/c/CheckAssign differ