Class: Iup::ScrollBox

Inherits:
Canvas show all
Includes:
DynamicFillMethods
Defined in:
lib/wrapped/scrollbox.rb

Overview

A container holding a single child widget, enabling that child widget to be scrolled.

Example

Wrapping a matrix element in a scroll box before showing on a dialog:

Iup::Dialog.new(
  Iup::ScrollBox.new(matrix)
).map

Instance Attribute Summary

Attributes inherited from Widget

#handle

Instance Method Summary collapse

Methods included from DynamicFillMethods

#append, #insert

Methods inherited from Canvas

#action=, #activate, #arc, #background, #background=, #backopacity, #backopacity=, #begin_block, #border, #box, #canfocus, #chord, #clear, #cursor, #deactivate, #drawsize, #end_block, #expand, #fillmode, #fillmode=, #focus_cb=, #font, #foreground, #foreground=, #hatch, #hatch=, #init, #interiorstyle, #interiorstyle=, #keypress_cb=, #kill, #line, #linecap, #linecap=, #linejoin, #linejoin=, #linestyle, #linestyle=, #linewidth, #linewidth=, #mark, #marksize, #marksize=, #marktype, #marktype=, #motion_cb=, #nativefont=, #padding, #pathset, #pixel, #position, #rastersize, #rectangle, #redraw, #resize_cb=, #screenposition, #sector, #stipple, #text, #textalignment, #textalignment=, #textorientation, #textorientation=, #tip, #vectortext, #vectortext_charsize, #vectortext_charsize=, #vectortext_direction, #vectortext_fontsize, #vectortext_loadfont, #vectortext_size, #vertex, #viewport, #wheel_cb=, #window, #writemode, #writemode=

Methods included from ButtonCallback

#button_cb=

Methods included from ScrollBarAttributes

#dx, #dx=, #dy, #dy=, #linex, #linex=, #liney, #liney=, #posx, #posx=, #posy, #posy=, #scroll_cb=, #scrollbar, #xautohide, #xmax, #xmax=, #xmin, #xmin=, #yautohide, #ymax, #ymax=, #ymin, #ymin=

Methods included from AttributeBuilders

#define_attribute, #define_id_attribute, #define_id_reader, #define_id_writer, #define_property_attribute, #define_property_reader, #define_property_writer, #define_reader, #define_writer

Methods included from DragDropAttributes

#dragbegin_cb=, #dragdata_cb=, #dragdatasize_cb=, #dragend_cb=, #dragsource, #dragsourcemove, #dragtypes, #dropdata_cb=, #dropmotion_cb=, #droptarget, #droptypes

Methods inherited from Widget

#active, #assign_handle, #bgcolor, #destroy, #enterwindow_cb=, #fgcolor, #font, #getfocus_cb=, #help_cb=, #k_any=, #killfocus_cb=, #leavewindow_cb=, #map_cb=, #maxsize, #minsize, #open_controls, #size, #unmap_cb=, #visible, #wid, #zorder

Methods included from CallbackSetter

#define_callback

Constructor Details

#initialize(widget) {|_self| ... } ⇒ ScrollBox

Creates a new instance of the container. If a block is given, the new instance is yielded to it.

  • widget - the child widget to display.

Yields:

  • (_self)

Yield Parameters:



21
22
23
24
25
26
# File 'lib/wrapped/scrollbox.rb', line 21

def initialize widget
  @handle = IupLib.IupScrollBox(widget.handle)

  # run any provided block on instance, to set up further attributes
  yield self if block_given?
end

Instance Method Details

#clientoffsetObject

:attr_reader: clientoffset Returns current offset of box in its client as “widthxheight”.



33
# File 'lib/wrapped/scrollbox.rb', line 33

define_reader :clientoffset

#clientsizeObject

:attr_reader: clientsize Returns current size of box as “widthxheight”.



38
# File 'lib/wrapped/scrollbox.rb', line 38

define_reader :clientsize