home *** CD-ROM | disk | FTP | other *** search
- Path: familynews.cycor.ca!usenet
- From: gcaine@cycor.ca (gcaine)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Boopsi
- Date: 29 Feb 1996 22:54:13 GMT
- Organization: Cycor Communications Inc., Coast to Coast Internet Services
- Message-ID: <3425.6632T1029T1644@cycor.ca>
- NNTP-Posting-Host: skt-as014.cycor.ca
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- What's the trick to getting a frame around boopsi gadgets?
-
- I tried the example in the RKM libraries book, and the string gadget
- has no border. I then tried a frbuttonclass gadget, with text. I passed
- it the DrawInfo with the GA_DrawInfo tag, and I get the text, but that's
- all.
-
- Here's a test program to show what I mean.
-
- ----------------------------------Cut---------------------------------
-
- #include <exec/types.h>
- #include <utility/tagitem.h>
- #include <intuition/intuition.h>
- #include <intuition/gadgetclass.h>
-
- #include <proto/exec.h>
- #include <proto/intuition.h>
-
- struct Window *w;
- struct IntuiMessage *msg;
- struct Gadget *testGad;
-
-
-
- #define TESTGAD_ID 1L
- #define MINWINDOWWIDTH 80
- #define MINWINDOWHEIGHT 70
-
- void main(void)
- {
- BOOL done = FALSE;
- struct DrawInfo *drawInfo = NULL;
- struct Screen *pubScn = NULL;
-
-
- if (IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 37L))
- {
- if (pubScn = LockPubScreen(NULL))
- {
- if (drawInfo = GetScreenDrawInfo(pubScn))
- {
-
- if (w = OpenWindowTags(NULL,
- WA_Flags, WFLG_DEPTHGADGET | WFLG_DRAGBAR |
- WFLG_CLOSEGADGET | WFLG_SIZEGADGET,
- WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_GADGETUP,
- WA_MinWidth, MINWINDOWWIDTH,
- WA_MinHeight, MINWINDOWHEIGHT,
- TAG_END))
- {
- if (testGad = (struct Gadget *)NewObject(NULL,
- "frbuttonclass",
- GA_ID, TESTGAD_ID,
- GA_Top, (w->BorderTop) + 10L,
- GA_Left, (w->BorderLeft) + 5L,
- GA_Width, 25,
- GA_Height, 12,
- GA_DrawInfo, drawInfo,
- GA_Text, (ULONG)"Test",
- TAG_END))
-
- {
-
- AddGList(w, testGad, -1, -1, NULL);
- RefreshGList(testGad, w, NULL, -1);
-
- while (done == FALSE)
- {
- WaitPort((struct MsgPort *)w->UserPort);
- while (msg = (struct IntuiMessage *)
- GetMsg((struct MsgPort *)w->UserPort))
- {
- if (msg->Class == IDCMP_CLOSEWINDOW)
- done = TRUE;
- ReplyMsg((struct Message *)msg);
- }
- }
- RemoveGList(w, testGad, -1);
- DisposeObject(testGad);
- }
- CloseWindow(w);
- }
- FreeScreenDrawInfo(pubScn, drawInfo);
- drawInfo = NULL;
- }
-
- UnlockPubScreen(NULL, pubScn);
- pubScn = NULL;
- }
- CloseLibrary((struct Library *)IntuitionBase);
- }
- }
- --------------------------------End Cut-------------------------------
-
- I've just started playing with boopsi now, but I could use some help.
-
- Does anyone know where I can get some more documentation, or tutorials?
-
- Gary Caine Member: Team AMIGA
-
-