Class: Fox::FXRealSpinner

Inherits:
FXPacker show all
Defined in:
rdoc-sources/FXRealSpinner.rb

Overview

Real-valued spinner control

Events

The following messages are sent by FXRealSpinner 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_COMMAND

sent whenever the spinner's value changes; the message data is a Float indicating the new spinner value.

SEL_CHANGED

sent whenever the text in the spinner's text field changes; the message data is a Float indicating the new spinner value.

Spinner options

REALSPIN_NORMAL

Normal, non-cyclic

REALSPIN_CYCLIC

Cyclic spinner

REALSPIN_NOTEXT

No text visible

REALSPIN_NOMAX

Spin all the way up to infinity

REALSPIN_NOMIN

Spin all the way down to -infinity

REALSPIN_LOG

Logarithmic rather than linear

Message identifiers

ID_INCREMENT

x

ID_DECREMENT

x

ID_ENTRY

x

Instance Attribute Summary collapse

Attributes inherited from FXPacker

#baseColor, #borderColor, #borderWidth, #frameStyle, #hSpacing, #hiliteColor, #packingHints, #padBottom, #padLeft, #padRight, #padTop, #shadowColor, #vSpacing

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

#height, #visual, #width

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary collapse

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

#connect

Methods inherited from FXDrawable

#resize

Methods inherited from FXId

#create, #created?, #destroy, #detach, #runOnUiThread

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(p, cols, target = nil, selector = 0, opts = REALSPIN_NORMAL, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_PAD, padRight = DEFAULT_PAD, padTop = DEFAULT_PAD, padBottom = DEFAULT_PAD) ⇒ FXRealSpinner

Return an initialized FXRealSpinner instance.

Parameters:

p

the parent window for this spinner Fox::FXComposite

cols

number of columns to display in the text field [Integer]

target

the message target, if any, for this spinner Fox::FXObject

selector

the message identifier for this spinner [Integer]

opts

the options [Integer]

x

initial x-position [Integer]

y

initial y-position [Integer]

width

initial width [Integer]

height

initial height [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]


95
96
# File 'rdoc-sources/FXRealSpinner.rb', line 95

def initialize(p, cols, target=nil, selector=0, opts=REALSPIN_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theRealSpinner
end

Instance Attribute Details

#cursorColorObject

Cursor color Fox::FXColor


68
69
70
# File 'rdoc-sources/FXRealSpinner.rb', line 68

def cursorColor
  @cursorColor
end

#downArrowColorObject

Color of the “down” arrow Fox::FXColor


56
57
58
# File 'rdoc-sources/FXRealSpinner.rb', line 56

def downArrowColor
  @downArrowColor
end

#fontObject

Text font for this spinner Fox::FXFont


41
42
43
# File 'rdoc-sources/FXRealSpinner.rb', line 41

def font
  @font
end

#granularityObject

Spinner granularity [Float]


74
75
76
# File 'rdoc-sources/FXRealSpinner.rb', line 74

def granularity
  @granularity
end

#helpTextObject

Status line help text for this spinner [String]


44
45
46
# File 'rdoc-sources/FXRealSpinner.rb', line 44

def helpText
  @helpText
end

#numColumnsObject

Number of columns (i.e. width of spinner's text field, in terms of number of columns of 'm') [Integer]


71
72
73
# File 'rdoc-sources/FXRealSpinner.rb', line 71

def numColumns
  @numColumns
end

#rangeObject

Spinner range (low and high values) [Range]


38
39
40
# File 'rdoc-sources/FXRealSpinner.rb', line 38

def range
  @range
end

#selBackColorObject

Background color for selected text Fox::FXColor


62
63
64
# File 'rdoc-sources/FXRealSpinner.rb', line 62

def selBackColor
  @selBackColor
end

#selTextColorObject

Foreground color for selected text Fox::FXColor


65
66
67
# File 'rdoc-sources/FXRealSpinner.rb', line 65

def selTextColor
  @selTextColor
end

#spinnerStyleObject

Spinner style [Integer]


50
51
52
# File 'rdoc-sources/FXRealSpinner.rb', line 50

def spinnerStyle
  @spinnerStyle
end

#textColorObject

Normal text color Fox::FXColor


59
60
61
# File 'rdoc-sources/FXRealSpinner.rb', line 59

def textColor
  @textColor
end

#tipTextObject

Tool tip text for this spinner [String]


47
48
49
# File 'rdoc-sources/FXRealSpinner.rb', line 47

def tipText
  @tipText
end

#upArrowColorObject

Color of the “up” arrow Fox::FXColor


53
54
55
# File 'rdoc-sources/FXRealSpinner.rb', line 53

def upArrowColor
  @upArrowColor
end

#valueObject

Current value [Float]


35
36
37
# File 'rdoc-sources/FXRealSpinner.rb', line 35

def value
  @value
end

Instance Method Details

#cyclic=(cyc) ⇒ Object

Set to cyclic mode, i.e. wrap around at maximum/minimum.


116
# File 'rdoc-sources/FXRealSpinner.rb', line 116

def cyclic=(cyc); end

#cyclic?Boolean

Return true if the spinner is in cyclic mode.

Returns:

  • (Boolean)

111
# File 'rdoc-sources/FXRealSpinner.rb', line 111

def cyclic?; end

#decrement(notify = false) ⇒ Object

Decrement spinner


105
# File 'rdoc-sources/FXRealSpinner.rb', line 105

def decrement(notify=false); end

#decrementByAmount(amt, notify = false) ⇒ Object

Decrement spinner by certain amount


108
# File 'rdoc-sources/FXRealSpinner.rb', line 108

def decrementByAmount(amt, notify=false); end

#editable=(ed) ⇒ Object

Set the “editability” of this spinner's text field.


134
# File 'rdoc-sources/FXRealSpinner.rb', line 134

def editable=(ed); end

#editable?Boolean

Return true if the spinner's text field is editable.

Returns:

  • (Boolean)

137
# File 'rdoc-sources/FXRealSpinner.rb', line 137

def editable?; end

#getIncrementObject

Get the spinner increment value.


131
# File 'rdoc-sources/FXRealSpinner.rb', line 131

def getIncrement(); end

#increment(notify = false) ⇒ Object

Increment spinner


99
# File 'rdoc-sources/FXRealSpinner.rb', line 99

def increment(notify=false); end

#incrementByAmount(amt, notify = false) ⇒ Object

Increment spinner by certain amount


102
# File 'rdoc-sources/FXRealSpinner.rb', line 102

def incrementByAmount(amt, notify=false); end

#setIncrement(inc) ⇒ Object

Change the spinner increment value, i.e. the amount by which the spinner's value increases when the up arrow is clicked.


128
# File 'rdoc-sources/FXRealSpinner.rb', line 128

def setIncrement(inc); end

#textVisible=(shown) ⇒ Object

Set the visibility of this spinner's text field.


122
# File 'rdoc-sources/FXRealSpinner.rb', line 122

def textVisible=(shown); end

#textVisible?Boolean

Return true if this spinner's text field is visible.

Returns:

  • (Boolean)

119
# File 'rdoc-sources/FXRealSpinner.rb', line 119

def textVisible?; end