Class: Fox::FXPacker
- Inherits:
-
FXComposite
- Object
- FXObject
- FXId
- FXDrawable
- FXWindow
- FXComposite
- Fox::FXPacker
- Defined in:
- rdoc-sources/FXPacker.rb
Overview
FXPacker is a layout manager which automatically places child windows inside its area against the left, right, top, or bottom side. Each time a child is placed, the remaining space is decreased by the amount of space taken by the child window. The side against which a child is placed is determined by the LAYOUT_SIDE_TOP
, LAYOUT_SIDE_BOTTOM
, LAYOUT_SIDE_LEFT
, and LAYOUT_SIDE_RIGHT
hints given by the child window. Other layout hints from the child are observed as far as sensible. So for example, a child placed against the right edge can still have LAYOUT_FILL_Y
or LAYOUT_TOP
, and so on. The last child may have both LAYOUT_FILL_X
and LAYOUT_FILL_Y
, in which case it will be placed to take all remaining space.
Direct Known Subclasses
FXColorSelector, FXComboBox, FXDirSelector, FXDockBar, FXDockSite, FXFileSelector, FXFontSelector, FXGroupBox, FXHorizontalFrame, FXListBox, FXMatrix, FXRealSpinner, FXSpinner, FXSpring, FXSwitcher, FXTabBar, FXTreeListBox, FXVerticalFrame
Instance Attribute Summary collapse
-
#baseColor ⇒ Object
Base GUI color FXColor.
-
#borderColor ⇒ Object
Border color FXColor.
-
#borderWidth ⇒ Object
readonly
Border width, in pixels [Integer].
-
#frameStyle ⇒ Object
Current frame style [Integer].
-
#hiliteColor ⇒ Object
Highlight color FXColor.
-
#hSpacing ⇒ Object
Horizontal inter-child spacing, in pixels [Integer].
-
#packingHints ⇒ Object
Packing hints [Integer].
-
#padBottom ⇒ Object
Bottom padding, in pixels [Integer].
-
#padLeft ⇒ Object
Left padding, in pixels [Integer].
-
#padRight ⇒ Object
Right padding, in pixels [Integer].
-
#padTop ⇒ Object
Top padding, in pixels [Integer].
-
#shadowColor ⇒ Object
Shadow color FXColor.
-
#vSpacing ⇒ Object
Vertical inter-child spacing, in pixels [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
-
#initialize(parent, opts = 0, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_SPACING, padRight = DEFAULT_SPACING, padTop = DEFAULT_SPACING, padBottom = DEFAULT_SPACING, hSpacing = DEFAULT_SPACING, vSpacing = DEFAULT_SPACING) ⇒ FXPacker
constructor
Construct a packer layout manager.
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(parent, opts = 0, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_SPACING, padRight = DEFAULT_SPACING, padTop = DEFAULT_SPACING, padBottom = DEFAULT_SPACING, hSpacing = DEFAULT_SPACING, vSpacing = DEFAULT_SPACING) ⇒ FXPacker
Construct a packer layout manager
59 60 |
# File 'rdoc-sources/FXPacker.rb', line 59 def initialize(parent, opts=0, x=0, y=0, width=0, height=0, padLeft=DEFAULT_SPACING, padRight=DEFAULT_SPACING, padTop=DEFAULT_SPACING, padBottom=DEFAULT_SPACING, hSpacing=DEFAULT_SPACING, vSpacing=DEFAULT_SPACING) # :yields: thePacker end |
Instance Attribute Details
#baseColor ⇒ Object
Base GUI color Fox::FXColor
48 49 50 |
# File 'rdoc-sources/FXPacker.rb', line 48 def baseColor @baseColor end |
#borderColor ⇒ Object
Border color Fox::FXColor
45 46 47 |
# File 'rdoc-sources/FXPacker.rb', line 45 def borderColor @borderColor end |
#borderWidth ⇒ Object (readonly)
Border width, in pixels [Integer]
24 25 26 |
# File 'rdoc-sources/FXPacker.rb', line 24 def borderWidth @borderWidth end |
#frameStyle ⇒ Object
Current frame style [Integer]
18 19 20 |
# File 'rdoc-sources/FXPacker.rb', line 18 def frameStyle @frameStyle end |
#hiliteColor ⇒ Object
Highlight color Fox::FXColor
39 40 41 |
# File 'rdoc-sources/FXPacker.rb', line 39 def hiliteColor @hiliteColor end |
#hSpacing ⇒ Object
Horizontal inter-child spacing, in pixels [Integer]
51 52 53 |
# File 'rdoc-sources/FXPacker.rb', line 51 def hSpacing @hSpacing end |
#packingHints ⇒ Object
Packing hints [Integer]
21 22 23 |
# File 'rdoc-sources/FXPacker.rb', line 21 def packingHints @packingHints end |
#padBottom ⇒ Object
Bottom padding, in pixels [Integer]
30 31 32 |
# File 'rdoc-sources/FXPacker.rb', line 30 def padBottom @padBottom end |
#padLeft ⇒ Object
Left padding, in pixels [Integer]
33 34 35 |
# File 'rdoc-sources/FXPacker.rb', line 33 def padLeft @padLeft end |
#padRight ⇒ Object
Right padding, in pixels [Integer]
36 37 38 |
# File 'rdoc-sources/FXPacker.rb', line 36 def padRight @padRight end |
#padTop ⇒ Object
Top padding, in pixels [Integer]
27 28 29 |
# File 'rdoc-sources/FXPacker.rb', line 27 def padTop @padTop end |
#shadowColor ⇒ Object
Shadow color Fox::FXColor
42 43 44 |
# File 'rdoc-sources/FXPacker.rb', line 42 def shadowColor @shadowColor end |
#vSpacing ⇒ Object
Vertical inter-child spacing, in pixels [Integer]
54 55 56 |
# File 'rdoc-sources/FXPacker.rb', line 54 def vSpacing @vSpacing end |