Class: Fox::FXRealSlider
- Defined in:
- rdoc-sources/FXRealSlider.rb
Overview
The slider widget is a valuator widget which provides simple linear value range. Two visual appearances are supported:- the sunken look, which is enabled with the REALSLIDER_INSIDE_BAR
option and the regular look. The latter may have optional arrows on the slider thumb.
Events
The following messages are sent by FXRealSlider to its target:
SEL_KEYPRESS
-
sent when a key goes down; the message data is an FXEvent instance.
SEL_KEYRELEASE
-
sent when a key goes up; the message data is an FXEvent instance.
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_MIDDLEBUTTONPRESS
-
sent when the middle mouse button goes down; the message data is an FXEvent instance.
SEL_MIDDLEBUTTONRELEASE
-
sent when the middle mouse button goes up; the message data is an FXEvent instance.
SEL_COMMAND
-
sent at the end of a slider move; the message data is the new position of the slider (a Float).
SEL_CHANGED
-
sent continuously while the slider is being moved; the message data is a Float indicating the current slider position.
Real slider control styles
REALSLIDER_HORIZONTAL
-
RealSlider shown horizontally
REALSLIDER_VERTICAL
-
RealSlider shown vertically
REALSLIDER_ARROW_UP
-
RealSlider has arrow head pointing up
REALSLIDER_ARROW_DOWN
-
RealSlider has arrow head pointing down
REALSLIDER_ARROW_LEFT
-
RealSlider has arrow head pointing left
REALSLIDER_ARROW_RIGHT
-
RealSlider has arrow head pointing right
REALSLIDER_INSIDE_BAR
-
RealSlider is inside the slot rather than overhanging
REALSLIDER_TICKS_TOP
-
Ticks on the top of horizontal slider
REALSLIDER_TICKS_BOTTOM
-
Ticks on the bottom of horizontal slider
REALSLIDER_TICKS_LEFT
-
Ticks on the left of vertical slider
REALSLIDER_TICKS_RIGHT
-
Ticks on the right of vertical slider
REALSLIDER_NORMAL
-
same as
REALSLIDER_HORIZONTAL
Message identifiers
ID_AUTOINC
-
x
ID_AUTODEC
-
x
Instance Attribute Summary collapse
-
#headSize ⇒ Object
Slider head size, in pixels [Integer].
-
#helpText ⇒ Object
Status line help text for this slider [String].
-
#increment ⇒ Object
Slider auto-increment (or decrement) value [Float].
-
#sliderStyle ⇒ Object
Slider style [Integer].
-
#slotColor ⇒ Object
Color of the slot that the slider head moves in FXColor.
-
#slotSize ⇒ Object
Slider slot size, in pixels [Integer].
-
#tickDelta ⇒ Object
Delta between ticks [Float].
-
#tipText ⇒ Object
Tool tip text for this slider [String].
-
#value ⇒ Object
Slider value [Float].
Attributes inherited from FXFrame
#baseColor, #borderColor, #borderWidth, #frameStyle, #hiliteColor, #padBottom, #padLeft, #padRight, #padTop, #shadowColor
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
-
#getRange ⇒ Object
Return the slider range as an array of Float values [lo, hi].
-
#initialize(p, target = nil, selector = 0, opts = REALSLIDER_NORMAL, x = 0, y = 0, width = 0, height = 0, padLeft = 0, padRight = 0, padTop = 0, padBottom = 0) ⇒ FXRealSlider
constructor
Return an initialized FXRealSlider instance.
-
#setRange(lo, hi, notify = false) ⇒ Object
Set slider range (where lo and hi are Float values).
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 = REALSLIDER_NORMAL, x = 0, y = 0, width = 0, height = 0, padLeft = 0, padRight = 0, padTop = 0, padBottom = 0) ⇒ FXRealSlider
Return an initialized FXRealSlider instance.
Parameters:
p
-
the parent window for this slider Fox::FXComposite
target
-
the message target, if any, for this slider Fox::FXObject
selector
-
the message identifier for this slider [Integer]
opts
-
slider options [Integer]
x
-
initial x-position, when the
LAYOUT_FIX_X
layout hint is in effect [Integer] y
-
initial y-position, when the
LAYOUT_FIX_Y
layout hint is in effect [Integer] width
-
initial width, when the
LAYOUT_FIX_WIDTH
layout hint is in effect [Integer] height
-
initial height, when the
LAYOUT_FIX_HEIGHT
layout hint is in effect [Integer] padLeft
-
internal padding on the left side, in pixels [Integer]
padRight
-
internal padding on the right side, in pixels [Integer]
padTop
-
internal padding on the top side, in pixels [Integer]
padBottom
-
internal padding on the bottom side, in pixels [Integer]
91 92 |
# File 'rdoc-sources/FXRealSlider.rb', line 91 def initialize(p, target=nil, selector=0, opts=REALSLIDER_NORMAL, x=0, y=0, width=0, height=0, padLeft=0, padRight=0, padTop=0, padBottom=0) # :yields: theRealSlider end |
Instance Attribute Details
#headSize ⇒ Object
Slider head size, in pixels [Integer]
53 54 55 |
# File 'rdoc-sources/FXRealSlider.rb', line 53 def headSize @headSize end |
#helpText ⇒ Object
Status line help text for this slider [String]
68 69 70 |
# File 'rdoc-sources/FXRealSlider.rb', line 68 def helpText @helpText end |
#increment ⇒ Object
Slider auto-increment (or decrement) value [Float]
59 60 61 |
# File 'rdoc-sources/FXRealSlider.rb', line 59 def increment @increment end |
#sliderStyle ⇒ Object
Slider style [Integer]
50 51 52 |
# File 'rdoc-sources/FXRealSlider.rb', line 50 def @sliderStyle end |
#slotColor ⇒ Object
Color of the slot that the slider head moves in Fox::FXColor
65 66 67 |
# File 'rdoc-sources/FXRealSlider.rb', line 65 def slotColor @slotColor end |
#slotSize ⇒ Object
Slider slot size, in pixels [Integer]
56 57 58 |
# File 'rdoc-sources/FXRealSlider.rb', line 56 def slotSize @slotSize end |
#tickDelta ⇒ Object
Delta between ticks [Float]
62 63 64 |
# File 'rdoc-sources/FXRealSlider.rb', line 62 def tickDelta @tickDelta end |
#tipText ⇒ Object
Tool tip text for this slider [String]
71 72 73 |
# File 'rdoc-sources/FXRealSlider.rb', line 71 def tipText @tipText end |
#value ⇒ Object
Slider value [Float]
47 48 49 |
# File 'rdoc-sources/FXRealSlider.rb', line 47 def value @value end |
Instance Method Details
#getRange ⇒ Object
Return the slider range as an array of Float values [lo, hi].
98 |
# File 'rdoc-sources/FXRealSlider.rb', line 98 def getRange(); end |
#setRange(lo, hi, notify = false) ⇒ Object
Set slider range (where lo and hi are Float values).
95 |
# File 'rdoc-sources/FXRealSlider.rb', line 95 def setRange(lo, hi, notify=false); end |