Class: Fox::FXSpinner

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

Overview

Spinner control

Events

The following messages are sent by FXSpinner 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 an integer indicating the new spinner value.

SEL_CHANGED

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

Spinner options

SPIN_NORMAL

Normal, non-cyclic

SPIN_CYCLIC

Cyclic spinner

SPIN_NOTEXT

No text visible

SPIN_NOMAX

Spin all the way up to infinity

SPIN_NOMIN

Spin all the way down to -infinity

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 = SPIN_NORMAL, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_PAD, padRight = DEFAULT_PAD, padTop = DEFAULT_PAD, padBottom = DEFAULT_PAD) ⇒ FXSpinner

Return an initialized FXSpinner 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]


91
92
# File 'rdoc-sources/FXSpinner.rb', line 91

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

Instance Attribute Details

#cursorColorObject

Cursor color Fox::FXColor


67
68
69
# File 'rdoc-sources/FXSpinner.rb', line 67

def cursorColor
  @cursorColor
end

#downArrowColorObject

Color of the “down” arrow Fox::FXColor


55
56
57
# File 'rdoc-sources/FXSpinner.rb', line 55

def downArrowColor
  @downArrowColor
end

#fontObject

Text font for this spinner Fox::FXFont


40
41
42
# File 'rdoc-sources/FXSpinner.rb', line 40

def font
  @font
end

#helpTextObject

Status line help text for this spinner [String]


43
44
45
# File 'rdoc-sources/FXSpinner.rb', line 43

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]


70
71
72
# File 'rdoc-sources/FXSpinner.rb', line 70

def numColumns
  @numColumns
end

#rangeObject

Spinner range (low and high values) [Range]


37
38
39
# File 'rdoc-sources/FXSpinner.rb', line 37

def range
  @range
end

#selBackColorObject

Background color for selected text Fox::FXColor


61
62
63
# File 'rdoc-sources/FXSpinner.rb', line 61

def selBackColor
  @selBackColor
end

#selTextColorObject

Foreground color for selected text Fox::FXColor


64
65
66
# File 'rdoc-sources/FXSpinner.rb', line 64

def selTextColor
  @selTextColor
end

#spinnerStyleObject

Spinner style [Integer]


49
50
51
# File 'rdoc-sources/FXSpinner.rb', line 49

def spinnerStyle
  @spinnerStyle
end

#textColorObject

Normal text color Fox::FXColor


58
59
60
# File 'rdoc-sources/FXSpinner.rb', line 58

def textColor
  @textColor
end

#tipTextObject

Tool tip text for this spinner [String]


46
47
48
# File 'rdoc-sources/FXSpinner.rb', line 46

def tipText
  @tipText
end

#upArrowColorObject

Color of the “up” arrow Fox::FXColor


52
53
54
# File 'rdoc-sources/FXSpinner.rb', line 52

def upArrowColor
  @upArrowColor
end

#valueObject

Current value [Integer]


34
35
36
# File 'rdoc-sources/FXSpinner.rb', line 34

def value
  @value
end

Instance Method Details

#cyclic=(cyc) ⇒ Object

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


112
# File 'rdoc-sources/FXSpinner.rb', line 112

def cyclic=(cyc); end

#cyclic?Boolean

Return true if the spinner is in cyclic mode.


107
# File 'rdoc-sources/FXSpinner.rb', line 107

def cyclic?; end

#decrement(notify = FALSE) ⇒ Object

Decrement spinner


101
# File 'rdoc-sources/FXSpinner.rb', line 101

def decrement(notify=FALSE); end

#decrementByAmount(amt, notify = false) ⇒ Object

Decrement spinner by certain amount


104
# File 'rdoc-sources/FXSpinner.rb', line 104

def decrementByAmount(amt, notify=false); end

#editable=(ed) ⇒ Object

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


130
# File 'rdoc-sources/FXSpinner.rb', line 130

def editable=(ed); end

#editable?Boolean

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


133
# File 'rdoc-sources/FXSpinner.rb', line 133

def editable?; end

#getIncrementObject

Get the spinner increment value.


127
# File 'rdoc-sources/FXSpinner.rb', line 127

def getIncrement(); end

#increment(notify = FALSE) ⇒ Object

Increment spinner


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

def increment(notify=FALSE); end

#incrementByAmount(amt, notify = false) ⇒ Object

Increment spinner by certain amount


98
# File 'rdoc-sources/FXSpinner.rb', line 98

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.


124
# File 'rdoc-sources/FXSpinner.rb', line 124

def setIncrement(inc); end

#textVisible=(shown) ⇒ Object

Set the visibility of this spinner's text field.


118
# File 'rdoc-sources/FXSpinner.rb', line 118

def textVisible=(shown); end

#textVisible?Boolean

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


115
# File 'rdoc-sources/FXSpinner.rb', line 115

def textVisible?; end