Class: Fox::FXArrowButton

Inherits:
FXFrame show all
Defined in:
rdoc-sources/FXArrowButton.rb

Overview

Button with an arrow; the arrow can point in any direction. When clicked, the arrow button sends a SEL_COMMAND to its target. When ARROW_REPEAT is passed, the arrow button sends a SEL_COMMAND repeatedly while the button is pressed. The option ARROW_AUTO together with ARROW_REPEAT makes the arrow button work in repeat mode simply by hovering the cursor over it.

Events

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

sent when the button is clicked (or repeatedly while the button is held down, if the ARROW_REPEAT option is in effect).

Arrow style options

ARROW_NONE

no arrow

ARROW_UP

arrow points up

ARROW_DOWN

arrow points down

ARROW_LEFT

arrow points left

ARROW_RIGHT

arrow points right

ARROW_AUTO

automatically fire when hovering mouse over button

ARROW_REPEAT

button repeats if held down

ARROW_AUTOGRAY

automatically gray out when not updated

ARROW_AUTOHIDE

automatically hide when not updated

ARROW_TOOLBAR

button is toolbar-style

ARROW_NORMAL

same as FRAME_RAISED|FRAME_THICK|ARROW_UP

Message identifiers

ID_REPEAT

message identifier used by the timer (internally) that handles the auto-repeat feature (activated by the ARROW_REPEAT option).

Instance Attribute Summary collapse

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

#height, #visual, #width

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary collapse

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(parent, target = nil, selector = 0, opts = ARROW_NORMAL, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_PAD, padRight = DEFAULT_PAD, padTop = DEFAULT_PAD, padBottom = DEFAULT_PAD) ⇒ FXArrowButton

Construct arrow button



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

def initialize(parent, target=nil, selector=0, opts=ARROW_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theArrowButton
end

Instance Attribute Details

#arrowColorObject

Fill color for the arrow Fox::FXColor



63
64
65
# File 'rdoc-sources/FXArrowButton.rb', line 63

def arrowColor
  @arrowColor
end

#arrowSizeObject

Default arrow size, in pixels [Integer]



57
58
59
# File 'rdoc-sources/FXArrowButton.rb', line 57

def arrowSize
  @arrowSize
end

#arrowStyleObject

Arrow style flags (see above)



54
55
56
# File 'rdoc-sources/FXArrowButton.rb', line 54

def arrowStyle
  @arrowStyle
end

#helpTextObject

Status line help text for this arrow button [String]



48
49
50
# File 'rdoc-sources/FXArrowButton.rb', line 48

def helpText
  @helpText
end

#justifyObject

Justification mode



60
61
62
# File 'rdoc-sources/FXArrowButton.rb', line 60

def justify
  @justify
end

#stateObject

Arrow button state, where true means the button is down [Boolean]



45
46
47
# File 'rdoc-sources/FXArrowButton.rb', line 45

def state
  @state
end

#tipTextObject

Tool tip message for this arrow button [String]



51
52
53
# File 'rdoc-sources/FXArrowButton.rb', line 51

def tipText
  @tipText
end