Class: Fox::FXSplitter
- Inherits:
-
FXComposite
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- Fox::FXSplitter
- Defined in:
- rdoc-sources/FXSplitter.rb
Overview
A splitter window is used to interactively repartition two or more subpanels. Space may be subdivided horizontally (SPLITTER_HORIZONTAL
, which the default) or vertically (SPLITTER_VERTICAL
option). When the splitter is itself resized, the right-most (or bottom-most) child window will be resized unless the splitter window is reversed; if the splitter is reversed, the left-most (or top-most) child window will be resized instead. Normally, children are resizable from size 0 upwards; however, if the child in a horizontally-oriented splitter has LAYOUT_FILL_X
in combination with LAYOUT_FIX_WIDTH
, it will not be made smaller than its default width, except when the child is the last visible widget (or first when the SPLITTER_REVERSED
option has been passed to the splitter). In a vertically-oriented splitter, children with LAYOUT_FILL_Y
and LAYOUT_FIX_HEIGHT
behave analogously.
Events
The following messages are sent by FXSplitter to its target:
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 at the end of a resize operation, to signal that the resize is complete
SEL_CHANGED
-
sent continuously while a resize operation is occurring
Splitter options
SPLITTER_HORIZONTAL
-
Split horizontally
SPLITTER_VERTICAL
-
Split vertically
SPLITTER_REVERSED
-
Reverse-anchored
SPLITTER_TRACKING
-
Track continuous during split
SPLITTER_NORMAL
-
same as
SPLITTER_HORIZONTAL
Instance Attribute Summary collapse
-
#barSize ⇒ Object
Splitter bar size, in pixels [Integer].
-
#splitterStyle ⇒ Object
Splitter style [Integer].
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
-
#getSplit(index) ⇒ Object
Return size of the panel at index.
-
#initialize(p, tgt, sel, opts = SPLITTER_NORMAL, x = 0, y = 0, width = 0, height = 0) ⇒ FXSplitter
constructor
Return an initialized FXSplitter instance.
-
#setSplit(index, size) ⇒ Object
Change the size of panel at the given index.
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
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, tgt, sel, opts = SPLITTER_NORMAL, x = 0, y = 0, width = 0, height = 0) ⇒ FXSplitter
Return an initialized FXSplitter instance.
Parameters:
p
-
the parent widget for this splitter Fox::FXComposite
target
-
the message target for this splitter Fox::FXObject
selector
-
the message identifier for this splitter [Integer]
opts
-
the options [Integer]
x
-
initial x-position [Integer]
y
-
initial y-position [Integer]
width
-
initial width [Integer]
height
-
initial height [Integer]
56 57 |
# File 'rdoc-sources/FXSplitter.rb', line 56 def initialize(p, opts=SPLITTER_NORMAL, x=0, y=0, width=0, height=0) # :yields: theSplitter end |
Instance Attribute Details
#barSize ⇒ Object
Splitter bar size, in pixels [Integer]
42 43 44 |
# File 'rdoc-sources/FXSplitter.rb', line 42 def @barSize end |
#splitterStyle ⇒ Object
Splitter style [Integer]
39 40 41 |
# File 'rdoc-sources/FXSplitter.rb', line 39 def splitterStyle @splitterStyle end |
Instance Method Details
#getSplit(index) ⇒ Object
Return size of the panel at index. Raises IndexError if index is out of range.
80 |
# File 'rdoc-sources/FXSplitter.rb', line 80 def getSplit(index); end |
#setSplit(index, size) ⇒ Object
Change the size of panel at the given index. Raises IndexError if index is out of range.
86 |
# File 'rdoc-sources/FXSplitter.rb', line 86 def setSplit(index, size); end |