3

I am sizing the contents of my Intuition window relative to the space available in the window.

A regular window exposes its initial dimensions via my_window->Width and my_window->Depth, however I see no analog when using a GIMMEZEROZERO.

Must I calculate this myself, or is there something more concrete?

3
  • Doesn't appear to have anything to do with retrocomputing. Did you intend this for StackOverflow? Nov 13 at 12:59
  • 2
    Using Lattice C v5, to develop in an emulated 16bit Amiga 500 using a ROM from 1988. Nov 13 at 13:07
  • 2
    Oh, ok. Please provide system details in the question. Not all of us know what an Intuition is, nor a GIMMEZEROZERO window, etc. It's best if the average reader can at least understand the domain of the question, even if they can't answer it. Thanks. Nov 13 at 13:11
4

The intuition.h file (looking at Kickstart v2.04) defines the Window type to contain the following member variables:

/* These variables have the mouse coordinates relative to the
 * inner-Window of WFLG_GIMMEZEROZERO Windows.  This is compared with the
 * MouseX and MouseY variables, which contain the mouse coordinates
 * relative to the upper-left corner of the Window, WFLG_GIMMEZEROZERO
 * notwithstanding
 */
WORD GZZMouseX;
WORD GZZMouseY;
/* these variables contain the width and height of the inner-Window of
 * WFLG_GIMMEZEROZERO Windows
 */
WORD GZZWidth;
WORD GZZHeight;

I think you should be using the GZZWidth and GZZHeight variables, if you can confirm they exist in your version's Window type. If these variables don't exist because they were added in a later revision, then I'd assume you need to use the Width and Height for the Window but subtract the border dimensions (but I suspect these variables were there in v1.3).

4

According to the Intuition Reference manual from Commodore, chapter 4 page 51:

The unique feature of a Gimmezerozero window is that there are actually two “planes” to the window: a larger, outer plane in which the window title, gadgets, and border are placed; and a smaller, inner plane (also called the inner window) in which you can draw freely without worrying about the window border and its contents. The top left coordi­nates of the inner window are always (0,0), regardless of the size or contents of the outer window; thus the name “Gimmezerozero.”

The area in which you can draw is formally defined as the area within the variables BorderLeft, BorderTop, BorderRight, and BorderBottom. These variables are computed by Intuition when the window is opened. To draw in normal windows with the graphics primitives (for instance to draw a line from the top left to somewhere else in the window), you have to start the line away from the window title bar and borders. Otherwise, you risk drawing the line over the title bar and any gadgets that may be in the borders. In a Gimmezerozero window, you can just draw a line from (0,0) to some other point in the window without worrying about the window borders.

The Gimmezerozero window uses more RAM than other window types and degrades per­formance in the moving and sizing of windows. There can be a noticeable performance lag, especially when several Gimmezerozero windows are open at the same time.

There are some special variables in the Window structure that pertain only to Gimmezerozero windows. The GZZMouseX and GZZMouseY variables can be exam­ined to discover the position of the mouse relative to the inner window. The GZZWidth and GZZHeight variables can be used to discover the width and height of the inner window.

Here is a link to the book. The full definition of the Window stuct is shown on appendix pages B20-B21 (and corroborates Brian H's snippet of the header file).

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.