Class: Fox::FX4Splitter

Inherits:
FXComposite show all
Defined in:
rdoc-sources/FX4Splitter.rb

Overview

The four-way splitter is a layout manager which manages four children like four panes in a window. You can use a four-way splitter for example in a CAD program where you may want to maintain three orthographic views, and one oblique view of a model. The four-way splitter allows interactive repartitioning of the panes by means of moving the central splitter bars. When the four-way splitter is itself resized, each child is proportionally resized, maintaining the same split-percentage.

Events

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

FOURSPLITTER_TRACKING

Track continuously during split

FOURSPLITTER_NORMAL

Normal mode (no continuous tracking)

Expansion options

ExpandNone

None expanded

ExpandTopLeft

Expand top left child

ExpandTopRight

Expand top right child

ExpandBottomLeft

Expand bottom left child

ExpandBottomRight

Expand bottom right child

ExpandTop

Expand top children

ExpandBottom

Expand bottom children

ExpandLeft

Expand left children

ExpandRight

Expand right children

ExpandAll

Expand all children

Message identifiers

ID_EXPAND_NONE

None expanded

ID_EXPAND_TOP

Expand top left and top right panes

ID_EXPAND_BOTTOM

Expand bottom left and bottom right panes

ID_EXPAND_LEFT

Expand leftmost panes

ID_EXPAND_RIGHT

Expand rightmost panes

ID_EXPAND_TOPLEFT

Expand top left pane

ID_EXPAND_TOPRIGHT

Expand top right pane

ID_EXPAND_BOTTOMLEFT

Expand bottom left pane

ID_EXPAND_BOTTOMRIGHT

Expand bottom right pane

ID_EXPAND_ALL

Expand all panes

Instance Attribute Summary collapse

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, tgt, sel, opts = FOURSPLITTER_NORMAL, x = 0, y = 0, width = 0, height = 0) ⇒ FX4Splitter

Return an initialized FX4Splitter instance, initially shown as four unexpanded panes; notifies tgt about size changes.

Parameters:

p

the parent widget for this splitter Fox::FXComposite

target

message target Fox::FXObject

selector

message identifier [Integer]

opts

the options [Integer]

x

initial x-position [Integer]

y

initial y-position [Integer]

width

initial width [Integer]

height

initial height [Integer]



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

def initialize(p, opts=FOURSPLITTER_NORMAL, x=0, y=0, width=0, height=0) # :yields: theSplitter
end

Instance Attribute Details

#barSizeObject

Splitter bar width, in pixels [Integer]



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

def barSize
  @barSize
end

#bottomLeftObject (readonly)

Bottom left child window, if any Fox::FXWindow



78
79
80
# File 'rdoc-sources/FX4Splitter.rb', line 78

def bottomLeft
  @bottomLeft
end

#bottomRightObject (readonly)

Bottom right child window, if any Fox::FXWindow



81
82
83
# File 'rdoc-sources/FX4Splitter.rb', line 81

def bottomRight
  @bottomRight
end

#expandedObject

Currently expanded child (some combination of the expansion flags, or zero if no panes are expanded)



69
70
71
# File 'rdoc-sources/FX4Splitter.rb', line 69

def expanded
  @expanded
end

#hSplitObject

Horizontal split fraction [Integer]



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

def hSplit
  @hSplit
end

#splitterStyleObject

Current splitter style, either FOURSPLITTER_TRACKING or FOURSPLITTER_NORMAL



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

def splitterStyle
  @splitterStyle
end

#topLeftObject (readonly)

Top left child window, if any Fox::FXWindow



72
73
74
# File 'rdoc-sources/FX4Splitter.rb', line 72

def topLeft
  @topLeft
end

#topRightObject (readonly)

Top right child window, if any Fox::FXWindow



75
76
77
# File 'rdoc-sources/FX4Splitter.rb', line 75

def topRight
  @topRight
end

#vSplitObject

Vertical split fraction [Integer]



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

def vSplit
  @vSplit
end

Instance Method Details

#getHSplitObject

Return the horizontal split fraction, an integer between 0 and 10000 inclusive. See #setHSplit for more information.



134
# File 'rdoc-sources/FX4Splitter.rb', line 134

def getHSplit(); end

#getVSplitObject

Return the vertical split fraction, an integer between 0 and 10000 inclusive. See #setVSplit for more information.



154
# File 'rdoc-sources/FX4Splitter.rb', line 154

def getVSplit(); end

#setHSplit(s) ⇒ Object

Change horizontal split fraction. The split fraction s is an integer value between 0 and 10000 (inclusive), indicating how much space to allocate to the leftmost panes. For example, to split the panes at 35 percent, use:

fourSplitter.setHSplit(3500)

or just:

fourSplitter.hSplit = 3500


128
# File 'rdoc-sources/FX4Splitter.rb', line 128

def setHSplit(s); end

#setVSplit(s) ⇒ Object

Change vertical split fraction. The split fraction s is an integer value between 0 and 10000 (inclusive), indicating how much space to allocate to the topmost panes. For example, to split the panes at 35 percent, use:

fourSplitter.setVSplit(3500)

or just:

fourSplitter.vSplit = 3500


148
# File 'rdoc-sources/FX4Splitter.rb', line 148

def setVSplit(s); end