amiga-news ENGLISH VERSION
.
Links| Forum| Kommentare| News melden
.
Chat| Umfragen| Newsticker| Archiv
.

amiga-news.de Forum > Programmierung > Window mit Scrollern, wie? [ - Suche - Neue Beiträge - Registrieren - Login - ]

-1- [ - Beitrag schreiben - ]

08.12.2005, 12:32 Uhr

Micha1701
Posts: 938
Nutzer
Hallo zusammen!

Ich bräuchte ein Fenster mit horizontalen und vertikalen Scrollern. Am liebsten im Fensterrahmen. Bisher konnte ich aber nur herausfinden, daß die BOOPSI Scroller auch in Fensterrahmen stehen können.

Nur wie bekomm ich die da rein? Konnte bisher nichts finden...

--
:boing: Micha :boing:

Look at my HPs:
http://www.Silicon-Wizards.com

http://www.RealmsofPower.de.vu

[ - Antworten - Zitieren - Direktlink - ]

08.12.2005, 13:15 Uhr

thomas
Posts: 7718
Nutzer
code:
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <intuition/gadgetclass.h>
#include <intuition/imageclass.h>


#define GID_RARROW 911
#define GID_LARROW 912
#define GID_UARROW 913
#define GID_DARROW 914
#define GID_XPROP  915
#define GID_YPROP  916


int main (int argc,char *argv[])

{
struct RDArgs *rdargs;
static struct {
	char *pubscreen;
	} args = {0};
struct Screen *scr;
struct Window *win;
struct MsgPort *port;
struct IntuiMessage *mess;
BOOL cont;
long barh;
long w,h;
long sizew,sizeh;
struct DrawInfo *drawinfo;
struct Image *sizeimage,*rarrowimage,*larrowimage,*darrowimage,*uarrowimage;
struct Gadget *gad,*xprop,*yprop,*rarrowbutton,*larrowbutton,*darrowbutton,*uarrowbu tton;

if (rdargs = ReadArgs ("PUBSCREEN/K",(APTR)&args,NULL))
	{
	if (scr = LockPubScreen (args.pubscreen))
		{
		drawinfo = GetScreenDrawInfo (scr);

		sizeimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,SIZEIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (sizeimage)
			{
			GetAttr (IA_Width,sizeimage,&sizew);
			GetAttr (IA_Height,sizeimage,&sizeh);
			DisposeObject (sizeimage);
			}
		else
			{
			sizew = 18;
			sizeh = 10;
			}

		darrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,DOWNIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (darrowimage)
			{
			GetAttr (IA_Width,darrowimage,&w);
			GetAttr (IA_Height,darrowimage,&h);
			}
		darrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_ID,GID_DARROW,
			GA_RelRight,-w+1,
			GA_RelBottom,-sizeh-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_Immediate,TRUE,
			GA_RelVerify,TRUE,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_RightBorder,TRUE,
			GA_Image,darrowimage,
			TAG_END);

		uarrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,UPIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (uarrowimage)
			{
			GetAttr (IA_Width,uarrowimage,&w);
			GetAttr (IA_Height,uarrowimage,&h);
			}
		uarrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_Previous,darrowbutton,
			GA_ID,GID_UARROW,
			GA_RelRight,-w+1,
			GA_RelBottom,-sizeh-h-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_Immediate,TRUE,
			GA_RelVerify,TRUE,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_RightBorder,TRUE,
			GA_Image,uarrowimage,
			TAG_END);

		barh = scr->WBorTop+scr->RastPort.TxHeight+2;

		yprop = NewObject (NULL,PROPGCLASS,
			GA_Previous,uarrowbutton,
			GA_ID,GID_YPROP,
			GA_RelRight,-sizew+4,
			GA_Top,barh,
			GA_Width,sizew-6,
			GA_RelHeight,-sizeh-h-h-barh-1,
			GA_Immediate,TRUE,
			GA_RelVerify,TRUE,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_RightBorder,TRUE,
			PGA_Freedom,FREEVERT,
			PGA_Borderless,TRUE,
			PGA_NewLook,TRUE,
			PGA_Total,100,
			PGA_Visible,20,
			TAG_END);

		rarrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,RIGHTIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (rarrowimage)
			{
			GetAttr (IA_Width,rarrowimage,&w);
			GetAttr (IA_Height,rarrowimage,&h);
			}
		rarrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_Previous,yprop,
			GA_ID,GID_RARROW,
			GA_RelRight,-sizew-w+1,
			GA_RelBottom,-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_Immediate,TRUE,
			GA_RelVerify,TRUE,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_BottomBorder,TRUE,
			GA_Image,rarrowimage,
			TAG_END);

		larrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,LEFTIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (larrowimage)
			{
			GetAttr (IA_Width,larrowimage,&w);
			GetAttr (IA_Height,larrowimage,&h);
			}
		larrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_Previous,rarrowbutton,
			GA_ID,GID_LARROW,
			GA_RelRight,-sizew-w-w+1,
			GA_RelBottom,-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_Immediate,TRUE,
			GA_RelVerify,TRUE,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_BottomBorder,TRUE,
			GA_Image,larrowimage,
			TAG_END);

		xprop = NewObject (NULL,PROPGCLASS,
			GA_Previous,larrowbutton,
			GA_ID,GID_XPROP,
			GA_Left,scr->WBorLeft,
			GA_RelBottom,-sizeh+3,
			GA_RelWidth,-sizew-w-w-scr->WBorLeft-1,
			GA_Height,sizeh-4,
			GA_Immediate,TRUE,
			GA_RelVerify,TRUE,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_BottomBorder,TRUE,
			PGA_Freedom,FREEHORIZ,
			PGA_Borderless,TRUE,
			PGA_NewLook,TRUE,
			PGA_Total,100,
			PGA_Visible,20,
			TAG_END);

		w = scr->Width >> 1;
		h = scr->Height >> 1;

		if (win = OpenWindowTags (NULL,
				WA_CustomScreen,scr,
				WA_Title,"Scroll",
				WA_Width,w,WA_Height,h,
				WA_Left,(scr->Width - w) >> 1,
				WA_Top,(scr->Height - h) >> 1,
				WA_Flags,WFLG_CLOSEGADGET|WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_SIZEG ADGET|WFLG_GIMMEZEROZERO|WFLG_ACTIVATE,
				WA_IDCMP,IDCMP_CLOSEWINDOW|IDCMP_GADGETDOWN|IDCMP_GADGETUP,
				WA_MinWidth,120,WA_MinHeight,90,
				WA_MaxWidth,-1,WA_MaxHeight,-1,
				WA_Gadgets,darrowbutton,
				TAG_END))
			{
			port = win->UserPort;
			cont = TRUE;
			do	{
				WaitPort (port);
				while (mess = (struct IntuiMessage *) GetMsg (port))
					{
					switch (mess->Class)
						{
					case IDCMP_CLOSEWINDOW:
						cont = FALSE;
						break;
					case IDCMP_GADGETDOWN:
						gad = mess->IAddress;
						switch (gad->GadgetID)
							{
						case GID_RARROW:
							Printf ("right arrow pressedn");
							break;
						case GID_LARROW:
							Printf ("left arrow pressedn");
							break;
						case GID_UARROW:
							Printf ("up arrow pressedn");
							break;
						case GID_DARROW:
							Printf ("down arrow pressedn");
							break;
						case GID_XPROP:
							Printf ("horizontal scroller pressedn");
							break;
						case GID_YPROP:
							Printf ("vertical scroller pressedn");
							break;
							}
						break;
					case IDCMP_GADGETUP:
						gad = mess->IAddress;
						switch (gad->GadgetID)
							{
						case GID_RARROW:
							Printf ("right arrow releasedn");
							break;
						case GID_LARROW:
							Printf ("left arrow releasedn");
							break;
						case GID_UARROW:
							Printf ("up arrow releasedn");
							break;
						case GID_DARROW:
							Printf ("down arrow releasedn");
							break;
						case GID_XPROP:
							Printf ("horizontal scroller releasedn");
							break;
						case GID_YPROP:
							Printf ("vertical scroller releasedn");
							break;
							}
						break;
						}
					ReplyMsg ((struct Message *) mess);
					}
				}
			while (cont);

			CloseWindow (win);
			}

		DisposeObject (larrowbutton);
		DisposeObject (larrowimage);
		DisposeObject (rarrowbutton);
		DisposeObject (rarrowimage);
		DisposeObject (xprop);
		DisposeObject (darrowbutton);
		DisposeObject (darrowimage);
		DisposeObject (uarrowbutton);
		DisposeObject (uarrowimage);
		DisposeObject (yprop);

		FreeScreenDrawInfo (scr,drawinfo);
		UnlockPubScreen (NULL,scr);
		}

	FreeArgs (rdargs);
	}

PrintFault (IoErr(),NULL);
return(0);
}


Gruß Thomas

--
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/

[ - Antworten - Zitieren - Direktlink - ]

08.12.2005, 13:35 Uhr

Micha1701
Posts: 938
Nutzer
Super Thomas, Danke!

--
:boing: Micha :boing:

Look at my HPs:
http://www.Silicon-Wizards.com

http://www.RealmsofPower.de.vu

[ - Antworten - Zitieren - Direktlink - ]

09.12.2005, 08:36 Uhr

Micha1701
Posts: 938
Nutzer
@Thomas:

Ich hab mal Dein Beispiel übernommen. Nur wie kann ich denn nun die Werte auslesen, wenn der Scroller bewegt wurde? Und wie kann ich den Scroller im nachhinein verändern?

Wenn ich ModifyProp()/NewModifyProp() benutze passiert nichts.
Mit GetAttr()/SetAttr() hatte ich bisher keinen Erfolg (hab verschiedene Attribute ausprobiert).
Und "((struct PropInfo *)xprop->SpecialInfo)->HorizProp" (o.ä.) gibt mir immer nur "0" aus.


--
:boing: Micha :boing:

Look at my HPs:
http://www.Silicon-Wizards.com

http://www.RealmsofPower.de.vu

[ - Antworten - Zitieren - Direktlink - ]

09.12.2005, 11:24 Uhr

thomas
Posts: 7718
Nutzer
@Micha1701:

Auslesen mit GetAttr(PGA_Top,xprop,&x) und GetAttr(PGA_Top,xprop,&x);
Setzen mit SetGadgetAttrs(xprop,win,NULL,PGA_Top,x,TAG_END) bzw. SetGadgetAttrs(yprop,win,NULL,PGA_Top,y,TAG_END);

Die wichtigen Attribute sind:

PGA_Total = Größe des Bildes
PGA_Visible = Sichtbarer Bereich des Bildes (also Größe des Fensters)
PGA_Top = Aktuelle Position des sichtbaren Bereichs im Bild.

Das Maximum für PGA_Top ist PGA_Total - PGA_Visible.

Gruß Thomas

--
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/

[ - Antworten - Zitieren - Direktlink - ]

09.12.2005, 12:11 Uhr

Micha1701
Posts: 938
Nutzer
@thomas:

Tja, das funktioniert aber nicht immer.

Ich bekomme nur für PGA_Top einen Wert geliefert, nachdem das Fenster geöffnet wurde.

Die anderen Attribute liefern immer "0"...

Habs in Deinem Beispiel ausprobiert und auch in meinem Programm...


--
:boing: Micha :boing:

Look at my HPs:
http://www.Silicon-Wizards.com


http://www.RealmsofPower.de.vu

[ Dieser Beitrag wurde von Micha1701 am 09.12.2005 um 12:16 Uhr editiert. ]

[ - Antworten - Zitieren - Direktlink - ]

09.12.2005, 12:22 Uhr

thomas
Posts: 7718
Nutzer


Visisble und Total mußt du setzen, die kann man nicht auslesen. Und Top auszulesen macht auch nur Sinn, wenn der Benutzer den Scroller bewegen kann, also wenn das Fenster geöffnet ist.

Gruß Thomas



--
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/

[ - Antworten - Zitieren - Direktlink - ]

09.12.2005, 15:32 Uhr

thomas
Posts: 7718
Nutzer

Hier ist ein Beispiel mit Bewegung:

code:
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/graphics.h>
#include <proto/intuition.h>
#include <proto/utility.h>
#include <intuition/gadgetclass.h>
#include <intuition/imageclass.h>
#include <intuition/icclass.h>


#define GID_RARROW 911
#define GID_LARROW 912
#define GID_UARROW 913
#define GID_DARROW 914
#define GID_XPROP  915
#define GID_YPROP  916


void draw_something (struct RastPort *rp,long x,long y,long w,long h)

{
UBYTE c = 0;
long i;

w --;
h --;

for (i = 0; i <= w; i += 5)
	{
	SetAPen (rp,c);
	Move (rp,x+i,y);
	Draw (rp,x+w-i,y+h);
	c ++;
	}

for (i = 0; i <= h; i += 5)
	{
	SetAPen (rp,c);
	Move (rp,x+w,y+i);
	Draw (rp,x,y+h-i);
	c ++;
	}
}


int main (int argc,char *argv[])

{
struct RDArgs *rdargs;
static struct {
	char *pubscreen;
	} args = {0};
struct Screen *scr;
struct Window *win;
struct MsgPort *port;
struct IntuiMessage *mess;
BOOL cont;
long barh;
long w,h;
long sizew,sizeh;
struct DrawInfo *drawinfo;
struct Image *sizeimage,*rarrowimage,*larrowimage,*darrowimage,*uarrowimage;
struct Gadget *xprop,*yprop,*rarrowbutton,*larrowbutton,*darrowbutton,*uarrowbutton; 
struct BitMap *pattern;
long xtotal,ytotal;

if (rdargs = ReadArgs ("PUBSCREEN/K",(APTR)&args,NULL))
	{
	if (scr = LockPubScreen (args.pubscreen))
		{
		xtotal = scr->Width;
		ytotal = scr->Height;

		drawinfo = GetScreenDrawInfo (scr);

		sizeimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,SIZEIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (sizeimage)
			{
			GetAttr (IA_Width,sizeimage,&sizew);
			GetAttr (IA_Height,sizeimage,&sizeh);
			}
		else
			{
			sizew = 18;
			sizeh = 10;
			}

		darrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,DOWNIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (darrowimage)
			{
			GetAttr (IA_Width,darrowimage,&w);
			GetAttr (IA_Height,darrowimage,&h);
			}
		darrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_ID,GID_DARROW,
			GA_RelRight,-w+1,
			GA_RelBottom,-sizeh-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_RightBorder,TRUE,
			GA_Image,darrowimage,
			ICA_TARGET,ICTARGET_IDCMP,
			TAG_END);

		uarrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,UPIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (uarrowimage)
			{
			GetAttr (IA_Width,uarrowimage,&w);
			GetAttr (IA_Height,uarrowimage,&h);
			}
		uarrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_Previous,darrowbutton,
			GA_ID,GID_UARROW,
			GA_RelRight,-w+1,
			GA_RelBottom,-sizeh-h-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_RightBorder,TRUE,
			GA_Image,uarrowimage,
			ICA_TARGET,ICTARGET_IDCMP,
			TAG_END);

		barh = scr->WBorTop+scr->RastPort.TxHeight+2;

		yprop = NewObject (NULL,PROPGCLASS,
			GA_Previous,uarrowbutton,
			GA_ID,GID_YPROP,
			GA_RelRight,-sizew+4,
			GA_Top,barh,
			GA_Width,sizew-6,
			GA_RelHeight,-sizeh-h-h-barh-1,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_RightBorder,TRUE,
			PGA_Freedom,FREEVERT,
			PGA_Borderless,TRUE,
			PGA_NewLook,TRUE,
			PGA_Total,ytotal,
			ICA_TARGET,ICTARGET_IDCMP,
			TAG_END);

		rarrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,RIGHTIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (rarrowimage)
			{
			GetAttr (IA_Width,rarrowimage,&w);
			GetAttr (IA_Height,rarrowimage,&h);
			}
		rarrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_Previous,yprop,
			GA_ID,GID_RARROW,
			GA_RelRight,-sizew-w+1,
			GA_RelBottom,-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_BottomBorder,TRUE,
			GA_Image,rarrowimage,
			ICA_TARGET,ICTARGET_IDCMP,
			TAG_END);

		larrowimage = NewObject (NULL,SYSICLASS,
			SYSIA_Which,LEFTIMAGE,
			SYSIA_Size,SYSISIZE_MEDRES,
			SYSIA_DrawInfo,drawinfo,
			TAG_END);
		if (larrowimage)
			{
			GetAttr (IA_Width,larrowimage,&w);
			GetAttr (IA_Height,larrowimage,&h);
			}
		larrowbutton = NewObject (NULL,BUTTONGCLASS,
			GA_Previous,rarrowbutton,
			GA_ID,GID_LARROW,
			GA_RelRight,-sizew-w-w+1,
			GA_RelBottom,-h+1,
			GA_Width,w,
			GA_Height,h,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_BottomBorder,TRUE,
			GA_Image,larrowimage,
			ICA_TARGET,ICTARGET_IDCMP,
			TAG_END);

		xprop = NewObject (NULL,PROPGCLASS,
			GA_Previous,larrowbutton,
			GA_ID,GID_XPROP,
			GA_Left,scr->WBorLeft,
			GA_RelBottom,-sizeh+3,
			GA_RelWidth,-sizew-w-w-scr->WBorLeft-1,
			GA_Height,sizeh-4,
			GA_DrawInfo,drawinfo,
			GA_GZZGadget,TRUE,
			GA_BottomBorder,TRUE,
			PGA_Freedom,FREEHORIZ,
			PGA_Borderless,TRUE,
			PGA_NewLook,TRUE,
			PGA_Total,xtotal,
			ICA_TARGET,ICTARGET_IDCMP,
			TAG_END);

		w = scr->Width >> 1;
		h = scr->Height >> 1;

		if (pattern = AllocBitMap (xtotal,ytotal,GetBitMapAttr(scr->RastPort.BitMap,BMA_DEPTH),BMF_MINPL ANES|BMF_CLEAR,scr->RastPort.BitMap))
			{
			struct RastPort rp;
			InitRastPort (&rp);
			rp.BitMap = pattern;
			draw_something (&rp,0,0,xtotal,ytotal);
			}

		if (win = OpenWindowTags (NULL,
				WA_CustomScreen,scr,
				WA_Title,"Scroll",
				WA_Width,w,WA_Height,h,
				WA_Left,(scr->Width - w) >> 1,
				WA_Top,(scr->Height - h) >> 1,
				WA_Flags,WFLG_CLOSEGADGET|WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_SIZEG ADGET|WFLG_GIMMEZEROZERO|WFLG_ACTIVATE|WFLG_NOCAREREFRESH,
				WA_IDCMP,IDCMP_CLOSEWINDOW|IDCMP_NEWSIZE|IDCMP_IDCMPUPDATE,
				WA_MinWidth,120,WA_MinHeight,90,
				WA_MaxWidth,-1,WA_MaxHeight,-1,
				WA_Gadgets,darrowbutton,
				TAG_END))
			{
			long x,y;
			long maxx,maxy;
			BOOL new_size = TRUE;

			port = win->UserPort;
			cont = TRUE;
			do	{
				if (new_size)
					{
					SetGadgetAttrs (xprop,win,NULL,PGA_Visible,win->GZZWidth,TAG_END);
					SetGadgetAttrs (yprop,win,NULL,PGA_Visible,win->GZZHeight,TAG_END);
					maxx = xtotal - win->GZZWidth;
					maxy = ytotal - win->GZZHeight;
					GetAttr (PGA_Top,xprop,&x);
					GetAttr (PGA_Top,yprop,&y);
					if (pattern)
						BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
					new_size = FALSE;
					}
				WaitPort (port);
				while (mess = (struct IntuiMessage *) GetMsg (port))
					{
					switch (mess->Class)
						{
					case IDCMP_IDCMPUPDATE:
						switch (GetTagData (GA_ID,0,(struct TagItem *)mess->IAddress))
							{
						case GID_LARROW:
							if (x > 0)
								{
								x -= 10;
								if (x < 0)
									x = 0;
								SetGadgetAttrs (xprop,win,NULL,PGA_Top,x,TAG_END);
								if (pattern)
									BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
								}
							break;
						case GID_RARROW:
							if (x < maxx)
								{
								x += 10;
								if (x > maxx)
									x = maxx;
								SetGadgetAttrs (xprop,win,NULL,PGA_Top,x,TAG_END);
								if (pattern)
									BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
								}
							break;
						case GID_UARROW:
							if (y > 0)
								{
								y -= 10;
								if (y < 0)
									y = 0;
								SetGadgetAttrs (yprop,win,NULL,PGA_Top,y,TAG_END);
								if (pattern)
									BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
								}
							break;
						case GID_DARROW:
							if (y < maxy)
								{
								y += 10;
								if (y > maxy)
									y = maxy;
								SetGadgetAttrs (yprop,win,NULL,PGA_Top,y,TAG_END);
								if (pattern)
									BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
								}
							break;
						case GID_XPROP:
							x = GetTagData (PGA_Top,0,(struct TagItem *)mess->IAddress);
							if (pattern)
								BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
							break;
						case GID_YPROP:
							y = GetTagData (PGA_Top,0,(struct TagItem *)mess->IAddress);
							if (pattern)
								BltBitMapRastPort (pattern,x,y,win->RPort,0,0,win->GZZWidth,win->GZZHeight,0xc0);
							break;
							}
						break;
					case IDCMP_NEWSIZE:
						new_size = TRUE;
						break;
					case IDCMP_CLOSEWINDOW:
						cont = FALSE;
						break;
						}
					ReplyMsg ((struct Message *) mess);
					}
				}
			while (cont);

			CloseWindow (win);
			}

		DisposeObject (larrowbutton);
		DisposeObject (larrowimage);
		DisposeObject (rarrowbutton);
		DisposeObject (rarrowimage);
		DisposeObject (xprop);
		DisposeObject (darrowbutton);
		DisposeObject (darrowimage);
		DisposeObject (uarrowbutton);
		DisposeObject (uarrowimage);
		DisposeObject (yprop);
		DisposeObject (sizeimage);

		if (pattern)
			FreeBitMap (pattern);

		FreeScreenDrawInfo (scr,drawinfo);
		UnlockPubScreen (NULL,scr);
		}

	FreeArgs (rdargs);
	}

PrintFault (IoErr(),NULL);
return(0);
}


Gruß Thomas

--
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/

[ - Antworten - Zitieren - Direktlink - ]


-1- [ - Beitrag schreiben - ]


amiga-news.de Forum > Programmierung > Window mit Scrollern, wie? [ - Suche - Neue Beiträge - Registrieren - Login - ]


.
Impressum | Datenschutzerklärung | Netiquette | Werbung | Kontakt
Copyright © 1998-2024 by amiga-news.de - alle Rechte vorbehalten.
.