Class: Fox::FXPacker

Inherits:
FXComposite show all
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.

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(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

#baseColorObject

Base GUI color Fox::FXColor



48
49
50
# File 'rdoc-sources/FXPacker.rb', line 48

def baseColor
  @baseColor
end

#borderColorObject

Border color Fox::FXColor



45
46
47
# File 'rdoc-sources/FXPacker.rb', line 45

def borderColor
  @borderColor
end

#borderWidthObject (readonly)

Border width, in pixels [Integer]



24
25
26
# File 'rdoc-sources/FXPacker.rb', line 24

def borderWidth
  @borderWidth
end

#frameStyleObject

Current frame style [Integer]



18
19
20
# File 'rdoc-sources/FXPacker.rb', line 18

def frameStyle
  @frameStyle
end

#hiliteColorObject

Highlight color Fox::FXColor



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

def hiliteColor
  @hiliteColor
end

#hSpacingObject

Horizontal inter-child spacing, in pixels [Integer]



51
52
53
# File 'rdoc-sources/FXPacker.rb', line 51

def hSpacing
  @hSpacing
end

#packingHintsObject

Packing hints [Integer]



21
22
23
# File 'rdoc-sources/FXPacker.rb', line 21

def packingHints
  @packingHints
end

#padBottomObject

Bottom padding, in pixels [Integer]



30
31
32
# File 'rdoc-sources/FXPacker.rb', line 30

def padBottom
  @padBottom
end

#padLeftObject

Left padding, in pixels [Integer]



33
34
35
# File 'rdoc-sources/FXPacker.rb', line 33

def padLeft
  @padLeft
end

#padRightObject

Right padding, in pixels [Integer]



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

def padRight
  @padRight
end

#padTopObject

Top padding, in pixels [Integer]



27
28
29
# File 'rdoc-sources/FXPacker.rb', line 27

def padTop
  @padTop
end

#shadowColorObject

Shadow color Fox::FXColor



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

def shadowColor
  @shadowColor
end

#vSpacingObject

Vertical inter-child spacing, in pixels [Integer]



54
55
56
# File 'rdoc-sources/FXPacker.rb', line 54

def vSpacing
  @vSpacing
end