rrs@neabbs.UUCP (RONALD VAN EIJCK) (11/23/90)
I've got a very nice workbench on my A3000 (1280 * 1024 AutoScroll) with 2 shells in the lower half and workbench stuff in the upperhalf. My only problem is that if Intuition gives me a requester or if I open a tool (prefs etc.) that these open in the top left part of my WB. and since I am usually looking at the lower right part of my screen I don't see this requester or opened tool so I have to use the mouse to scroll my WB to the other position. My question is: Is it possible to open these window's relative to the position of the WB that I am looking at ? If so HOW ?? Thanx, ------------------------------------------------------------------------- | Ronald van Eijck R&R Software rrs@neabbs.uucp | | | | Some day soon I'll find a nice motto | -------------------------------------------------------------------------
forgeas@swinjm.UUCP (Jean-Michel Forgeas) (11/24/90)
In article <487005@neabbs.UUCP>, RONALD VAN EIJCK writes: > My only problem is that if Intuition gives me a requester or if I open > a tool (prefs etc.) that these open in the top left part of my WB. and since > [...] > My question is: Is it possible to open these window's relative to the position > of the WB that I am looking at ? -Do a SetFunction on OpenWindow(), OpenWindowTag(), ... -Test if the window opens outsize your looking area -If not replace it inside! To know your looking area you can take help from this piece of code. You can use this code into your programs (commercial or not) but I do not give you the right to have money from this only code. I am the only person who may send this listing to a magazin, a net, or write it into a book. I hope that future applications (even WBench :) will be user-friendly enough so that they will not open outside the looking area. Yes, there is too many things to take care with the new system, or that we have to do ourself (be careful with the WBench font height, that does often bad things with applications menus). #include <exec/types.h> #include <intuition/intuition.h> #include <intuition/screens.h> #include <graphics/displayinfo.h> ULONG GetBoxFromScreen( LScreen, Box, all, OverScan ) struct Screen *LScreen; struct IBox *Box; ULONG all, OverScan; { ULONG vpmid; struct DimensionInfo di; struct Rectangle *rect; Box->Left = Box->Top = 0; if ((vpmid = GetVPModeID( &LScreen->ViewPort )) != INVALID_ID) { if (all) { Box->Width = LScreen->Width; Box->Height = LScreen->Height; } else{ GetDisplayInfoData( 0, &di, sizeof(struct DimensionInfo), DTAG_DIMS, vpmid ); switch (OverScan) { case OSCAN_TEXT: rect = &di.TxtOScan; break; case OSCAN_STANDARD: rect = &di.StdOScan; break; case OSCAN_MAX: rect = &di.MaxOScan; break; case OSCAN_VIDEO: rect = &di.VideoOScan; break; default: rect = &di.Nominal; break; } Box->Width = rect->MaxX - rect->MinX + 1; Box->Height = rect->MaxY - rect->MinY + 1; Box->Left = LScreen->LeftEdge < 0 ? -LScreen->LeftEdge : 0; Box->Top = LScreen->TopEdge < 0 ? -LScreen->TopEdge : 0; } } return( vpmid ); } extern ULONG IntuitionBase, GfxBase; void main() { struct Screen *ls; ULONG vpmid; struct IBox Box; if (IntuitionBase = OpenLibrary( "intuition.library", 36 )) { if (GfxBase = OpenLibrary( "graphics.library", 36 )) { if (ls = LockPubScreen( "Workbench" )) { printf("BarHeight=%ld\n",ls->BarHeight); if ((vpmid = GetBoxFromScreen( ls, &Box, 0, 0 ) ) == INVALID_ID) printf("INVALID_ID\n"); else{ printf("nominal: l=%ld, t=%ld, w=%ld, h=%ld\n", Box.Left, Box.Top, Box.Width, Box.Height ); GetBoxFromScreen( ls, &Box, 0, OSCAN_TEXT ); printf("ostext: l=%ld, t=%ld, w=%ld, h=%ld\n", Box.Left, Box.Top, Box.Width, Box.Height ); GetBoxFromScreen( ls, &Box, 0, OSCAN_STANDARD ); printf("osstd: l=%ld, t=%ld, w=%ld, h=%ld\n", Box.Left, Box.Top, Box.Width, Box.Height ); GetBoxFromScreen( ls, &Box, 0, OSCAN_VIDEO ); printf("osvideo: l=%ld, t=%ld, w=%ld, h=%ld\n", Box.Left, Box.Top, Box.Width, Box.Height ); GetBoxFromScreen( ls, &Box, 0, OSCAN_MAX ); printf("osmax: l=%ld, t=%ld, w=%ld, h=%ld\n", Box.Left, Box.Top, Box.Width, Box.Height ); GetBoxFromScreen( ls, &Box, 1, 0 ); printf("all: l=%ld, t=%ld, w=%ld, h=%ld\n", Box.Left, Box.Top, Box.Width, Box.Height ); } UnlockPubScreen( 0, ls ); } CloseLibrary( GfxBase ); } CloseLibrary( IntuitionBase ); } exit(0); } -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?
peter@sugar.hackercorp.com (Peter da Silva) (11/26/90)
This is a solution to a problem that should not exist. The panning workbench itself is a bad solution to a simple problem: getting windows out of the way so you can work on something else. What's a good solution? Being able to drag windows off-screen. Every other window system in the world manages this little trick (outside of systems that haven't been supported in 5 years like the 3b1), and it's a simple extension of overlapping windows. That way you only use the extra RAM when you need it. -- Peter da Silva. `-_-' <peter@sugar.hackercorp.com>.