Class: Fox::FXToolBarTab

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

Overview

A toolbar tab is used to collapse or uncollapse a sibling widget. The sibling affected is the widget immediately following the toolbar tab or, if the toolbar tab is the last widget in the list, the widget immediately preceding the toolbar tab. Typically, the toolbar tab is paired with just one sibling widget inside a paired container, e.g.

FXHorizontalFrame.new(...) do |p|
  FXToolBarTab.new(p)
  FXLabel.new(p, "Hideable label", nil, LAYOUT_FILL_X)
end

Events

The following messages are sent by FXToolBarTab 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 after the toolbar tab is collapsed (or uncollapsed). The message data indicates the new collapsed state (i.e. it’s true if the toolbar tab is now collapsed, false if it is now uncollapsed).

Toolbar tab styles

TOOLBARTAB_HORIZONTAL

Default is for horizontal toolbar

TOOLBARTAB_VERTICAL

For vertical toolbar

Message identifiers

ID_COLLAPSE

Collapse the toolbar tab

ID_UNCOLLAPSE

Uncollapse the toolbar tab

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(p, target = nil, selector = 0, opts = FRAME_RAISED, x = 0, y = 0, width = 0, height = 0) ⇒ FXToolBarTab

Return an initialized FXToolBarTab instance.

Parameters:

p

the parent window for this toolbar tab Fox::FXWindow

target

the message target Fox::FXObject

selector

the message identifier [Integer]

opts

the options [Integer]

x

x-coordinate of window upper left corner [Integer]

y

y-coordinate of window upper left corner [Integer]

width

window width [Integer]

height

window height [Integer]



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

def initialize(p, target=nil, selector=0, opts=FRAME_RAISED, x=0, y=0, width=0, height=0) # :yield: theToolBarTab
end

Instance Attribute Details

#activeColorObject

The active color Fox::FXColor



39
40
41
# File 'rdoc-sources/FXToolBarTab.rb', line 39

def activeColor
  @activeColor
end

#tabStyleObject

The tab style [Integer]



36
37
38
# File 'rdoc-sources/FXToolBarTab.rb', line 36

def tabStyle
  @tabStyle
end

#tipTextObject

Tooltip message [String]



42
43
44
# File 'rdoc-sources/FXToolBarTab.rb', line 42

def tipText
  @tipText
end

Instance Method Details

#collapse(fold, notify = false) ⇒ Object

Collapse (if fold is true) or uncollapse the toolbar. If notify is true, a SEL_COMMAND message is sent to the toolbar tab’s message target after the toolbar tab is collapsed (or uncollapsed).



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

def collapse(fold, notify=false); end

#collapsed?Boolean

Return true if the toolbar is collapsed, false otherwise.

Returns:

  • (Boolean)


71
# File 'rdoc-sources/FXToolBarTab.rb', line 71

def collapsed?; end