Class: Fox::FXToolBarTab
- 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_KEYPRESSSent when a key goes down; the message data is an FXEvent instance.
SEL_KEYRELEASESent when a key goes up; the message data is an FXEvent instance.
SEL_COMMANDSent after the toolbar tab is collapsed (or uncollapsed). The message data indicates the new collapsed state (i.e. it's
trueif the toolbar tab is now collapsed,falseif it is now uncollapsed).
Toolbar tab styles
TOOLBARTAB_HORIZONTALDefault is for horizontal toolbar
TOOLBARTAB_VERTICALFor vertical toolbar
Message identifiers
ID_COLLAPSECollapse the toolbar tab
ID_UNCOLLAPSEUncollapse the toolbar tab
Instance Attribute Summary collapse
-
#activeColor ⇒ Object
The active color FXColor.
-
#tabStyle ⇒ Object
The tab style [Integer].
-
#tipText ⇒ Object
Tooltip message [String].
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
-
#collapse(fold, notify = false) ⇒ Object
Collapse (if fold is
true) or uncollapse the toolbar. -
#collapsed? ⇒ Boolean
Return
trueif the toolbar is collapsed,falseotherwise. -
#initialize(p, target = nil, selector = 0, opts = FRAME_RAISED, x = 0, y = 0, width = 0, height = 0) ⇒ FXToolBarTab
constructor
Return an initialized FXToolBarTab instance.
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 = FRAME_RAISED, x = 0, y = 0, width = 0, height = 0) ⇒ FXToolBarTab
Return an initialized FXToolBarTab instance.
Parameters:
pthe parent window for this toolbar tab Fox::FXWindow
targetthe message target Fox::FXObject
selectorthe message identifier [Integer]
optsthe options [Integer]
xx-coordinate of window upper left corner [Integer]
yy-coordinate of window upper left corner [Integer]
widthwindow width [Integer]
heightwindow 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
#activeColor ⇒ Object
The active color Fox::FXColor
39 40 41 |
# File 'rdoc-sources/FXToolBarTab.rb', line 39 def activeColor @activeColor end |
#tabStyle ⇒ Object
The tab style [Integer]
36 37 38 |
# File 'rdoc-sources/FXToolBarTab.rb', line 36 def tabStyle @tabStyle end |
#tipText ⇒ Object
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.
71 |
# File 'rdoc-sources/FXToolBarTab.rb', line 71 def collapsed?; end |