Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
module Fox
#
# 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
#
class FXRuler < FXFrame
# Current position [Integer]
attr_accessor :position
# Content size [Integer]
attr_accessor :contentSize
# Document size [Integer]
attr_accessor :documentSize
# Document size [Integer]
attr_accessor :edgeSpacing
# Lower document margin [Integer]
attr_accessor :marginLower
# Upper document margin [Integer]
attr_accessor :marginUpper
# First line indent [Integer]
attr_accessor :indentFirst
# Lower indent [Integer]
attr_accessor :indentLower
# Upper indent [Integer]
attr_accessor :indentUpper
# Document number placement [Integer]
attr_accessor :numberTicks
# Document major ticks [Integer]
attr_accessor :majorTicks
# Document minor ticks [Integer]
attr_accessor :minorTicks
# Document tiny ticks [Integer]
attr_accessor :tinyTicks
# Pixels per tick spacing [Float]
attr_accessor :pixelsPerTick
# The text font [FXFont]
attr_accessor :font
# The slider value [Integer]
attr_accessor :value
# The ruler style [Integer]
attr_accessor :rulerStyle
# Ruler alignment [Integer]
attr_accessor :rulerAlignment
# The current text color [FXColor]
attr_accessor :textColor
# The status line help text for this ruler [String]
attr_accessor :helpText
# The tool tip message for this ruler [String]
attr_accessor :tipText
#
# Return an initialized FXRuler instance.
#
def initialize(p, target=nil, selector=0, opts=RULER_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theRuler
end
# Return lower edge of document (an integer)
def documentLower; end
# Return upper edge of document (an integer)
def documentUpper; end
end
end