Class Fox::FXRuler
In: rdoc-sources/FXRuler.rb
Parent: FXFrame

The ruler widget is placed alongside a document to measure position and size of entities within the document, such as margins, paragraph indents, and tickmarks. The ruler widget sends a SEL_CHANGED message when the indentation or margins are interactively changed by the user. If the document size exceeds the available space, it is possible to scroll the document using setPosition(). When the document size is less than the available space, the alignment options can be used to center, left-adjust, or right-adjust the document. Finally, a special option exists to stretch the document to the available space, that is to say, the document will always be fitten with given left and right edges substracted from the available space.

Events

The following messages are sent by FXRuler to its target:

SEL_LEFTBUTTONPRESS:sent when the left mouse button goes down; the message data is an FXEvent instance.
SEL_LEFTBUTTONRELEASE:sent when the left mouse button goes up; the message data is an FXEvent instance.
SEL_CHANGED:sent whenever something about the ruler changes

Ruler options

RULER_NORMAL:Default appearance (default)
RULER_HORIZONTAL:Ruler is horizontal (default)
RULER_VERTICAL:Ruler is vertical
RULER_TICKS_OFF:Tick marks off (default)
RULER_TICKS_TOP:Ticks on the top (if horizontal)
RULER_TICKS_BOTTOM:Ticks on the bottom (if horizontal)
RULER_TICKS_LEFT:Ticks on the left (if vertical)
RULER_TICKS_RIGHT:Ticks on the right (if vertical)
RULER_TICKS_CENTER:Tickmarks centered
RULER_NUMBERS:Show numbers
RULER_ARROW:Draw small arrow for cursor position
RULER_MARKERS:Draw markers for indentation settings
RULER_METRIC:Metric subdivision (default)
RULER_ENGLISH:English subdivision
RULER_MARGIN_ADJUST:Allow margin adjustment
RULER_ALIGN_CENTER:Center document horizontally
RULER_ALIGN_LEFT:Align document to the left
RULER_ALIGN_RIGHT:Align document to the right
RULER_ALIGN_TOP:Align document to the top
RULER_ALIGN_BOTTOM:Align document to the bottom
RULER_ALIGN_STRETCH:Stretch document to fit horizontally
RULER_ALIGN_NORMAL:Normally, document is centered both ways

Message identifiers:

ID_ARROW:write me

Methods

Attributes

contentSize  [RW]  Content size [Integer]
documentSize  [RW]  Document size [Integer]
edgeSpacing  [RW]  Document size [Integer]
font  [RW]  The text font [FXFont]
helpText  [RW]  The status line help text for this ruler [String]
indentFirst  [RW]  First line indent [Integer]
indentLower  [RW]  Lower indent [Integer]
indentUpper  [RW]  Upper indent [Integer]
majorTicks  [RW]  Document major ticks [Integer]
marginLower  [RW]  Lower document margin [Integer]
marginUpper  [RW]  Upper document margin [Integer]
minorTicks  [RW]  Document minor ticks [Integer]
numberTicks  [RW]  Document number placement [Integer]
pixelsPerTick  [RW]  Pixels per tick spacing [Float]
position  [RW]  Current position [Integer]
rulerAlignment  [RW]  Ruler alignment [Integer]
rulerStyle  [RW]  The ruler style [Integer]
textColor  [RW]  The current text color [FXColor]
tinyTicks  [RW]  Document tiny ticks [Integer]
tipText  [RW]  The tool tip message for this ruler [String]
value  [RW]  The slider value [Integer]

Public Class methods

Public Instance methods

Return lower edge of document (an integer)

Return upper edge of document (an integer)

[Validate]