Re: BeOS: How does the ruler work?

Paul Rohr (paul@abisource.com)
Wed, 21 Apr 1999 09:24:34 -0700


At 09:45 AM 4/21/99 -0400, Thomas Fletcher wrote:
> This might seem like a really silly question, but
>how does the ruler work? Last night I added the mouse
>event support so that now when I click in areas on
>the ruler I get little black markers the same as you
>see in the corner. I can also click on the little
>triangular tabby things to move them (indent levels
>I'm guessing) but they don't move to where my mouse
>is, but to the closest black thing. And if there
>is no black thing they they just wail off to the edge
>of the screen.

The description sounds a bit odd, but essentially right. The ruler is a
pretty straightforward direct-manipulation interface. Since all the
necessary logic is done in XP code, once you've got events hooked up
properly, it should all Just Work as follows:

1. The 3D triangles control paragraph margins and indents. By
click-dragging them around, you can change their positions. Attempts to
move any of these controls "off" the ruler are ignored.

2. The black angular markers control tabs (left, right, center, decimal).
To add one, just click where you want it. To move an existing tab, click
and drag. To remove the tab entirely, drag it off the ruler.

3. The square control in the upper-left corner allows you to toggle what
kind of tabs get added next. Note that the layout engine currently only
formats left-aligned tabs properly.

4. Ruler controls in motion "snap" to the nearest tick mark (or halfway
in-between, depending on the current unit system), rather than moving
continuously. This is because far more people want quarter inch (or .5 cm)
indents, rather than .6643 or whatever the exact position would be. Folks
who want finer control than they can get via direct manipulation will need
to use the Format/Paragraph or Format/Tabs dialogs.

5. While moving ruler controls, a reference line should be XORed on the
associated view, so you can better see and align where it will wind up.

Does that completely describe the behavior you're seeing?

Paul



This archive was generated by hypermail 1.03b2.