Class: Fox::FXScrollArea

Inherits:
FXComposite show all
Defined in:
rdoc-sources/FXScrollArea.rb,
lib/fox16/core.rb

Overview

The scroll area widget manages a content area and a viewport area through which the content is viewed. When the content area becomes larger than the viewport area, scrollbars are placed to permit viewing of the entire content by scrolling the content. Depending on the mode, scrollbars may be displayed on an as-needed basis, always, or never. Normally, the scroll area's size and the content's size are independent; however, it is possible to disable scrolling in the horizontal (vertical) direction. In this case, the content width (height) will influence the width (height) of the scroll area widget. For content which is time-consuming to repaint, continuous scrolling may be turned off.

Scrollbar options

SCROLLERS_NORMAL

Show the scrollbars when needed

HSCROLLER_ALWAYS

Always show horizontal scrollers

HSCROLLER_NEVER

Never show horizontal scrollers

VSCROLLER_ALWAYS

Always show vertical scrollers

VSCROLLER_NEVER

Never show vertical scrollers

HSCROLLING_ON

Horizontal scrolling turned on (default)

HSCROLLING_OFF

Horizontal scrolling turned off

VSCROLLING_ON

Vertical scrolling turned on (default)

VSCROLLING_OFF

Vertical scrolling turned off

SCROLLERS_TRACK

Scrollers track continuously for smooth scrolling

SCROLLERS_DONT_TRACK

Scrollers don't track continuously

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?, #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) ⇒ FXScrollArea

Return an initialized FXScrollArea instance.

Parameters:

parent

the parent widget for this scroll area Fox::FXComposite

opts

the options [Integer]

x

initial x-position, when the LAYOUT_FIX_X layout hint is in effect [Integer]

y

initial y-position, when the LAYOUT_FIX_Y layout hint is in effect [Integer]

width

initial width, when the LAYOUT_FIX_WIDTH layout hint is in effect [Integer]

height

initial height, when the LAYOUT_FIX_HEIGHT layout hint is in effect [Integer]


71
72
# File 'rdoc-sources/FXScrollArea.rb', line 71

def initialize(parent, opts=0, x=0, y=0, width=0, height=0) # :yields: theScrollArea
end

Instance Attribute Details

#contentHeightObject (readonly)

Content height, in pixels [Integer]


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

def contentHeight
  @contentHeight
end

#contentWidthObject (readonly)

Content width, in pixels [Integer]


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

def contentWidth
  @contentWidth
end

#horizontalScrollBarObject (readonly)

Horizontal scrollbar Fox::FXScrollBar


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

def horizontalScrollBar
  @horizontalScrollBar
end

#scrollStyleObject

Scroll style [Integer]


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

def scrollStyle
  @scrollStyle
end

#verticalScrollBarObject (readonly)

Vertical scrollbar Fox::FXScrollBar


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

def verticalScrollBar
  @verticalScrollBar
end

#viewportHeightObject (readonly)

Viewport height, in pixels [Integer]


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

def viewportHeight
  @viewportHeight
end

#viewportWidthObject (readonly)

Viewport width, in pixels [Integer]


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

def viewportWidth
  @viewportWidth
end

#xPositionObject (readonly)

Current x-position [Integer]


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

def xPosition
  @xPosition
end

#yPositionObject (readonly)

Current y-position [Integer]


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

def yPosition
  @yPosition
end

Instance Method Details

#horizontalScrollable?Boolean

Return true if horizontally scrollable


75
# File 'rdoc-sources/FXScrollArea.rb', line 75

def horizontalScrollable?() ; end

#positionObject

Get the current position as an array [x, y]


84
# File 'rdoc-sources/FXScrollArea.rb', line 84

def position() ; end

#scrollCornerObject

Returns a reference to the scroll corner (an FXScrollCorner instance) for this window.


207
208
209
# File 'lib/fox16/core.rb', line 207

def scrollCorner
  verticalScrollBar.next
end

#setPosition(x, y) ⇒ Object

Set the current position to (x, y)


81
# File 'rdoc-sources/FXScrollArea.rb', line 81

def setPosition(x, y) ; end

#verticalScrollable?Boolean

Return true if vertically scrollable


78
# File 'rdoc-sources/FXScrollArea.rb', line 78

def verticalScrollable?() ; end