Class: Fox::FXRulerView
- Inherits:
-
FXScrollArea
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- FXScrollArea
- Fox::FXRulerView
- Defined in:
- rdoc-sources/FXRulerView.rb
Overview
The Ruler View provides viewing of a document with rulers. It is intended to be subclassed in order to draw actual contents and provide editing behavior for the document. The ruler view itself simply manages the geometry of the document being edited, and coordinates the movement of the ruler displays as the document is being scrolled.
Instance Attribute Summary collapse
-
#arrowPosX ⇒ Object
X arrow position, relative to document position [Integer].
-
#arrowPosY ⇒ Object
Y arrow position in document, relative to document position [Integer].
-
#documentColor ⇒ Object
Current document color FXColor.
-
#documentHeight ⇒ Object
Document height [Integer].
-
#documentWidth ⇒ Object
Document width [Integer].
-
#documentX ⇒ Object
readonly
Get document position X [Integer].
-
#documentY ⇒ Object
readonly
Get document position Y [Integer].
-
#hAlignment ⇒ Object
Horizontal alignment; the default is
RULER_ALIGN_NORMAL
[Integer]. -
#hEdgeSpacing ⇒ Object
Horizontal edge spacing around document [Integer].
-
#helpText ⇒ Object
Status line help text [String].
-
#hMajorTicks ⇒ Object
Horizontal major ticks [Integer].
-
#hMarginLower ⇒ Object
Horizontal lower margin [Integer].
-
#hMarginUpper ⇒ Object
Horizontal upper margin [Integer].
-
#hMediumTicks ⇒ Object
Horizontal medium ticks [Integer].
-
#hNumberTicks ⇒ Object
Horizontal document number placement [Integer].
-
#horizontalRuler ⇒ Object
readonly
Return a reference to the horizontal ruler FXRuler.
-
#hPixelsPerTick ⇒ Object
Horizontal pixels per tick spacing [Float].
-
#hRulerFont ⇒ Object
Horizontal ruler font FXFont.
-
#hRulerStyle ⇒ Object
Horizontal ruler style.
-
#hTinyTicks ⇒ Object
Horizontal tiny ticks [Integer].
-
#tipText ⇒ Object
Tool tip message [String].
-
#vAlignment ⇒ Object
Vertical alignment; the default is
RULER_ALIGN_NORMAL
[Integer]. -
#vEdgeSpacing ⇒ Object
Vertical edge spacing around document [Integer].
-
#verticalRuler ⇒ Object
readonly
Return a reference to the vertical ruler FXRuler.
-
#vMajorTicks ⇒ Object
Vertical major ticks [Integer].
-
#vMarginLower ⇒ Object
Vertical lower margin [Integer].
-
#vMarginUpper ⇒ Object
Vertical upper margin [Integer].
-
#vMediumTicks ⇒ Object
Vertical medium ticks [Integer].
-
#vNumberTicks ⇒ Object
Vertical document number placement [Integer].
-
#vPixelsPerTick ⇒ Object
Vertical pixels per tick spacing [Float].
-
#vRulerFont ⇒ Object
Vertical ruler font FXFont.
-
#vRulerStyle ⇒ Object
Vertical ruler style [Integer].
-
#vTinyTicks ⇒ Object
Vertical tiny ticks [Integer].
Attributes inherited from FXScrollArea
#contentHeight, #contentWidth, #horizontalScrollBar, #scrollStyle, #verticalScrollBar, #viewportHeight, #viewportWidth, #xPosition, #yPosition
Attributes inherited from FXWindow
#accelTable, #backColor, #defaultCursor, #dragCursor, #first, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y
Attributes inherited from FXDrawable
Attributes inherited from FXId
Instance Method Summary collapse
-
#initialize(p, target = nil, selector = 0, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXRulerView
constructor
Return an initialized FXRulerView instance.
-
#setDocumentHeight(h, notify = false) ⇒ Object
Set document height (in pixels).
-
#setDocumentWidth(w, notify = false) ⇒ Object
Set document width (in pixels).
-
#setHAlignment(align, notify = false) ⇒ Object
Set horizontal alignment; the default is
RULER_ALIGN_NORMAL
. -
#setHEdgeSpacing(es, notify = false) ⇒ Object
Set horizontal edge spacing around document (in pixels).
-
#setHMajorTicks(ticks, notify = false) ⇒ Object
Set number of horizontal major ticks.
-
#setHMarginLower(marg, notify = false) ⇒ Object
Set horizontal lower margin (in pixels).
-
#setHMarginUpper(marg, notify = false) ⇒ Object
Set horizontal upper margin (in pixels).
-
#setHMediumTicks(ticks, notify = false) ⇒ Object
Set number of horizontal medium ticks.
-
#setHNumberTicks(ticks, notify = false) ⇒ Object
Set number of horizontal “number” ticks.
-
#setHPixelsPerTick(space, notify = false) ⇒ Object
Set horizontal pixels per tick spacing If notify is
true
, aSEL_CHANGED
message is sent to the horizontal ruler’s target after the spacing is changed. -
#setHRulerFont(font, notify = false) ⇒ Object
Set horizontal ruler font.
-
#setHTinyTicks(ticks, notify = false) ⇒ Object
Set number of horizontal tiny ticks.
-
#setVAlignment(align, notify = false) ⇒ Object
Set vertical alignment; the default is
RULER_ALIGN_NORMAL
. -
#setVEdgeSpacing(es, notify = false) ⇒ Object
Set vertical edge spacing around document (in pixels).
-
#setVMajorTicks(ticks, notify = false) ⇒ Object
Set number of vertical major ticks.
-
#setVMarginLower(marg, notify = false) ⇒ Object
Set vertical lower margin (in pixels).
-
#setVMarginUpper(marg, notify = false) ⇒ Object
Set vertical upper margin (in pixels).
-
#setVMediumTicks(ticks, notify = false) ⇒ Object
Set number of vertical medium ticks.
-
#setVNumberTicks(ticks, notify = false) ⇒ Object
Set number of vertical “number” ticks.
-
#setVPixelsPerTick(space, notify = false) ⇒ Object
Set vertical pixels per tick spacing If notify is
true
, aSEL_CHANGED
message is sent to the vertical ruler’s target after the spacing is changed. -
#setVRulerFont(font, notify = false) ⇒ Object
Set vertical ruler font.
-
#setVTinyTicks(ticks, notify = false) ⇒ Object
Set number of vertical tiny ticks.
Methods inherited from FXScrollArea
#horizontalScrollable?, #position, #scrollCorner, #setPosition, #verticalScrollable?
Methods inherited from FXComposite
#maxChildHeight, #maxChildWidth
Methods inherited from FXWindow
#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, after?, #after?, before?, #before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=
Methods included from Responder2
Methods inherited from FXDrawable
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(p, target = nil, selector = 0, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXRulerView
Return an initialized FXRulerView instance.
114 115 |
# File 'rdoc-sources/FXRulerView.rb', line 114 def initialize(p, target=nil, selector=0, opts=0, x=0, y=0, width=0, height=0) # :yields: theRulerView end |
Instance Attribute Details
#arrowPosX ⇒ Object
X arrow position, relative to document position [Integer]
28 29 30 |
# File 'rdoc-sources/FXRulerView.rb', line 28 def arrowPosX @arrowPosX end |
#arrowPosY ⇒ Object
Y arrow position in document, relative to document position [Integer]
31 32 33 |
# File 'rdoc-sources/FXRulerView.rb', line 31 def arrowPosY @arrowPosY end |
#documentColor ⇒ Object
Current document color Fox::FXColor
25 26 27 |
# File 'rdoc-sources/FXRulerView.rb', line 25 def documentColor @documentColor end |
#documentHeight ⇒ Object
Document height [Integer]
49 50 51 |
# File 'rdoc-sources/FXRulerView.rb', line 49 def documentHeight @documentHeight end |
#documentWidth ⇒ Object
Document width [Integer]
46 47 48 |
# File 'rdoc-sources/FXRulerView.rb', line 46 def documentWidth @documentWidth end |
#documentX ⇒ Object (readonly)
Get document position X [Integer]
19 20 21 |
# File 'rdoc-sources/FXRulerView.rb', line 19 def documentX @documentX end |
#documentY ⇒ Object (readonly)
Get document position Y [Integer]
22 23 24 |
# File 'rdoc-sources/FXRulerView.rb', line 22 def documentY @documentY end |
#hAlignment ⇒ Object
Horizontal alignment; the default is RULER_ALIGN_NORMAL
[Integer]
70 71 72 |
# File 'rdoc-sources/FXRulerView.rb', line 70 def hAlignment @hAlignment end |
#hEdgeSpacing ⇒ Object
Horizontal edge spacing around document [Integer]
52 53 54 |
# File 'rdoc-sources/FXRulerView.rb', line 52 def hEdgeSpacing @hEdgeSpacing end |
#helpText ⇒ Object
Status line help text [String]
40 41 42 |
# File 'rdoc-sources/FXRulerView.rb', line 40 def helpText @helpText end |
#hMajorTicks ⇒ Object
Horizontal major ticks [Integer]
88 89 90 |
# File 'rdoc-sources/FXRulerView.rb', line 88 def hMajorTicks @hMajorTicks end |
#hMarginLower ⇒ Object
Horizontal lower margin [Integer]
58 59 60 |
# File 'rdoc-sources/FXRulerView.rb', line 58 def hMarginLower @hMarginLower end |
#hMarginUpper ⇒ Object
Horizontal upper margin [Integer]
61 62 63 |
# File 'rdoc-sources/FXRulerView.rb', line 61 def hMarginUpper @hMarginUpper end |
#hMediumTicks ⇒ Object
Horizontal medium ticks [Integer]
94 95 96 |
# File 'rdoc-sources/FXRulerView.rb', line 94 def hMediumTicks @hMediumTicks end |
#hNumberTicks ⇒ Object
Horizontal document number placement [Integer]
82 83 84 |
# File 'rdoc-sources/FXRulerView.rb', line 82 def hNumberTicks @hNumberTicks end |
#horizontalRuler ⇒ Object (readonly)
Return a reference to the horizontal ruler Fox::FXRuler
13 14 15 |
# File 'rdoc-sources/FXRulerView.rb', line 13 def horizontalRuler @horizontalRuler end |
#hPixelsPerTick ⇒ Object
Horizontal pixels per tick spacing [Float]
106 107 108 |
# File 'rdoc-sources/FXRulerView.rb', line 106 def hPixelsPerTick @hPixelsPerTick end |
#hRulerFont ⇒ Object
Horizontal ruler font Fox::FXFont
76 77 78 |
# File 'rdoc-sources/FXRulerView.rb', line 76 def hRulerFont @hRulerFont end |
#hRulerStyle ⇒ Object
Horizontal ruler style
34 35 36 |
# File 'rdoc-sources/FXRulerView.rb', line 34 def hRulerStyle @hRulerStyle end |
#hTinyTicks ⇒ Object
Horizontal tiny ticks [Integer]
100 101 102 |
# File 'rdoc-sources/FXRulerView.rb', line 100 def hTinyTicks @hTinyTicks end |
#tipText ⇒ Object
Tool tip message [String]
43 44 45 |
# File 'rdoc-sources/FXRulerView.rb', line 43 def tipText @tipText end |
#vAlignment ⇒ Object
Vertical alignment; the default is RULER_ALIGN_NORMAL
[Integer]
73 74 75 |
# File 'rdoc-sources/FXRulerView.rb', line 73 def vAlignment @vAlignment end |
#vEdgeSpacing ⇒ Object
Vertical edge spacing around document [Integer]
55 56 57 |
# File 'rdoc-sources/FXRulerView.rb', line 55 def vEdgeSpacing @vEdgeSpacing end |
#verticalRuler ⇒ Object (readonly)
Return a reference to the vertical ruler Fox::FXRuler
16 17 18 |
# File 'rdoc-sources/FXRulerView.rb', line 16 def verticalRuler @verticalRuler end |
#vMajorTicks ⇒ Object
Vertical major ticks [Integer]
91 92 93 |
# File 'rdoc-sources/FXRulerView.rb', line 91 def vMajorTicks @vMajorTicks end |
#vMarginLower ⇒ Object
Vertical lower margin [Integer]
64 65 66 |
# File 'rdoc-sources/FXRulerView.rb', line 64 def vMarginLower @vMarginLower end |
#vMarginUpper ⇒ Object
Vertical upper margin [Integer]
67 68 69 |
# File 'rdoc-sources/FXRulerView.rb', line 67 def vMarginUpper @vMarginUpper end |
#vMediumTicks ⇒ Object
Vertical medium ticks [Integer]
97 98 99 |
# File 'rdoc-sources/FXRulerView.rb', line 97 def vMediumTicks @vMediumTicks end |
#vNumberTicks ⇒ Object
Vertical document number placement [Integer]
85 86 87 |
# File 'rdoc-sources/FXRulerView.rb', line 85 def vNumberTicks @vNumberTicks end |
#vPixelsPerTick ⇒ Object
Vertical pixels per tick spacing [Float]
109 110 111 |
# File 'rdoc-sources/FXRulerView.rb', line 109 def vPixelsPerTick @vPixelsPerTick end |
#vRulerFont ⇒ Object
Vertical ruler font Fox::FXFont
79 80 81 |
# File 'rdoc-sources/FXRulerView.rb', line 79 def vRulerFont @vRulerFont end |
#vRulerStyle ⇒ Object
Vertical ruler style [Integer]
37 38 39 |
# File 'rdoc-sources/FXRulerView.rb', line 37 def vRulerStyle @vRulerStyle end |
#vTinyTicks ⇒ Object
Vertical tiny ticks [Integer]
103 104 105 |
# File 'rdoc-sources/FXRulerView.rb', line 103 def vTinyTicks @vTinyTicks end |
Instance Method Details
#setDocumentHeight(h, notify = false) ⇒ Object
Set document height (in pixels).
123 |
# File 'rdoc-sources/FXRulerView.rb', line 123 def setDocumentHeight(h, notify=false); end |
#setDocumentWidth(w, notify = false) ⇒ Object
Set document width (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the document size is changed.
120 |
# File 'rdoc-sources/FXRulerView.rb', line 120 def setDocumentWidth(w, notify=false); end |
#setHAlignment(align, notify = false) ⇒ Object
Set horizontal alignment; the default is RULER_ALIGN_NORMAL
. If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the alignment is changed.
158 |
# File 'rdoc-sources/FXRulerView.rb', line 158 def setHAlignment(align, notify=false); end |
#setHEdgeSpacing(es, notify = false) ⇒ Object
Set horizontal edge spacing around document (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the edge spacing is changed.
128 |
# File 'rdoc-sources/FXRulerView.rb', line 128 def setHEdgeSpacing(es, notify=false); end |
#setHMajorTicks(ticks, notify = false) ⇒ Object
Set number of horizontal major ticks. If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the number of ticks is changed.
188 |
# File 'rdoc-sources/FXRulerView.rb', line 188 def setHMajorTicks(ticks, notify=false); end |
#setHMarginLower(marg, notify = false) ⇒ Object
Set horizontal lower margin (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the margin is changed.
138 |
# File 'rdoc-sources/FXRulerView.rb', line 138 def setHMarginLower(marg, notify=false); end |
#setHMarginUpper(marg, notify = false) ⇒ Object
Set horizontal upper margin (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the margin is changed.
143 |
# File 'rdoc-sources/FXRulerView.rb', line 143 def setHMarginUpper(marg, notify=false); end |
#setHMediumTicks(ticks, notify = false) ⇒ Object
Set number of horizontal medium ticks. If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the number of ticks is changed.
198 |
# File 'rdoc-sources/FXRulerView.rb', line 198 def setHMediumTicks(ticks, notify=false); end |
#setHNumberTicks(ticks, notify = false) ⇒ Object
Set number of horizontal “number” ticks. If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the number of ticks is changed.
178 |
# File 'rdoc-sources/FXRulerView.rb', line 178 def setHNumberTicks(ticks, notify=false); end |
#setHPixelsPerTick(space, notify = false) ⇒ Object
Set horizontal pixels per tick spacing If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the spacing is changed.
218 |
# File 'rdoc-sources/FXRulerView.rb', line 218 def setHPixelsPerTick(space, notify=false); end |
#setHRulerFont(font, notify = false) ⇒ Object
Set horizontal ruler font. If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the font is changed.
168 |
# File 'rdoc-sources/FXRulerView.rb', line 168 def setHRulerFont(font, notify=false); end |
#setHTinyTicks(ticks, notify = false) ⇒ Object
Set number of horizontal tiny ticks. If notify is true
, a SEL_CHANGED
message is sent to the horizontal ruler’s target after the number of ticks is changed.
208 |
# File 'rdoc-sources/FXRulerView.rb', line 208 def setHTinyTicks(ticks, notify=false); end |
#setVAlignment(align, notify = false) ⇒ Object
Set vertical alignment; the default is RULER_ALIGN_NORMAL
. If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the alignment is changed.
163 |
# File 'rdoc-sources/FXRulerView.rb', line 163 def setVAlignment(align, notify=false); end |
#setVEdgeSpacing(es, notify = false) ⇒ Object
Set vertical edge spacing around document (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the edge spacing is changed.
133 |
# File 'rdoc-sources/FXRulerView.rb', line 133 def setVEdgeSpacing(es, notify=false); end |
#setVMajorTicks(ticks, notify = false) ⇒ Object
Set number of vertical major ticks. If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the number of ticks is changed.
193 |
# File 'rdoc-sources/FXRulerView.rb', line 193 def setVMajorTicks(ticks, notify=false); end |
#setVMarginLower(marg, notify = false) ⇒ Object
Set vertical lower margin (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the margin is changed.
148 |
# File 'rdoc-sources/FXRulerView.rb', line 148 def setVMarginLower(marg, notify=false); end |
#setVMarginUpper(marg, notify = false) ⇒ Object
Set vertical upper margin (in pixels). If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the margin is changed.
153 |
# File 'rdoc-sources/FXRulerView.rb', line 153 def setVMarginUpper(marg, notify=false); end |
#setVMediumTicks(ticks, notify = false) ⇒ Object
Set number of vertical medium ticks. If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the number of ticks is changed.
203 |
# File 'rdoc-sources/FXRulerView.rb', line 203 def setVMediumTicks(ticks, notify=false); end |
#setVNumberTicks(ticks, notify = false) ⇒ Object
Set number of vertical “number” ticks. If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the number of ticks is changed.
183 |
# File 'rdoc-sources/FXRulerView.rb', line 183 def setVNumberTicks(ticks, notify=false); end |
#setVPixelsPerTick(space, notify = false) ⇒ Object
Set vertical pixels per tick spacing If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the spacing is changed.
223 |
# File 'rdoc-sources/FXRulerView.rb', line 223 def setVPixelsPerTick(space, notify=false); end |
#setVRulerFont(font, notify = false) ⇒ Object
Set vertical ruler font. If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the font is changed.
173 |
# File 'rdoc-sources/FXRulerView.rb', line 173 def setVRulerFont(font, notify=false); end |
#setVTinyTicks(ticks, notify = false) ⇒ Object
Set number of vertical tiny ticks. If notify is true
, a SEL_CHANGED
message is sent to the vertical ruler’s target after the number of ticks is changed.
213 |
# File 'rdoc-sources/FXRulerView.rb', line 213 def setVTinyTicks(ticks, notify=false); end |