Class: Tk::Iwidgets::Scrolledlistbox

Class | Tk::Iwidgets::Scrolledlistbox
In: | tk/lib/tkextlib/iwidgets/scrolledlistbox.rb
Parent: | Tk::Iwidgets::Scrolledwidget

### Methods

activate bbox clear curselection delete get get get_curselection index insert justify method_missing nearest new scan_dragto scan_mark see selected_item_count selection_anchor selection_clear selection_includes selection_set size sort sort_ascending sort_descending xview xview_moveto xview_scroll yview yview_moveto yview_scroll

### Included Modules

TkListItemConfig

### Constants

TkCommandNames | = | ['::iwidgets::scrolledlistbox'.freeze].freeze
WidgetClassName | = | 'Scrolledlistbox'.freeze

### Public Class methods

new(*args)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 39
      def initialize(*args)
        super(*args)
        @listbox = component_widget('listbox')
      end

### Public Instance methods

activate(y)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 134
      def activate(y)
        tk_send_without_enc('activate', y)
        self
      end

bbox(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 92
      def bbox(index)
        list(tk_send_without_enc('bbox', index))
      end

clear()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 54
      def clear
        tk_call(@path, 'clear')
        self
      end

curselection()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 138
      def curselection
        list(tk_send_without_enc('curselection'))
      end

delete(first, last=None)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 95
      def delete(first, last=None)
        tk_send_without_enc('delete', first, last)
        self
      end

get(first, last=nil)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 141
      def get(first, last=nil)
        if last
          # tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
          tk_split_simplelist(tk_send_without_enc('get', first, last),
                              false, true)
        else
          _fromUTF8(tk_send_without_enc('get', first))
        end
      end

get(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 99
      def get(*index)
        _fromUTF8(tk_send_without_enc('get', *index))
      end

get_curselection()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 59
      def get_curselection
        tk_call(@path, 'getcurselection')
      end

index(idx)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 172
      def index(idx)
        tk_send_without_enc('index', idx).to_i
      end

insert(index, *args)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 102
      def insert(index, *args)
        tk_send('insert', index, *args)
        self
      end

justify(dir)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 63
      def justify(dir)
        tk_call(@path, 'justify', dir)
        self
      end

method_missing(id, *args)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 44
      def method_missing(id, *args)
        if @listbox.methods.include?(id.id2name)
          @listbox.__send__(id, *args)
        else
          super(id, *args)
        end
      end

nearest(y)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 150
      def nearest(y)
        tk_send_without_enc('nearest', y).to_i
      end

scan_dragto(x, y)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 110
      def scan_dragto(x, y)
        tk_send_without_enc('scan', 'dragto', x, y)
        self
      end

scan_mark(x, y)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 106
      def scan_mark(x, y)
        tk_send_without_enc('scan', 'mark', x, y)
        self
      end

see(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 114
      def see(index)
        tk_send_without_enc('see', index)
        self
      end

selected_item_count()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 68
      def selected_item_count
        number(tk_call(@path, 'selecteditemcount'))
      end

selection_anchor(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 156
      def selection_anchor(index)
        tk_send_without_enc('selection', 'anchor', index)
        self
      end

selection_clear(first, last=None)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 160
      def selection_clear(first, last=None)
        tk_send_without_enc('selection', 'clear', first, last)
        self
      end

selection_includes(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 164
      def selection_includes(index)
        bool(tk_send_without_enc('selection', 'includes', index))
      end

selection_set(first, last=None)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 167
      def selection_set(first, last=None)
        tk_send_without_enc('selection', 'set', first, last)
        self
      end

size()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 153
      def size
        tk_send_without_enc('size').to_i
      end

sort(*params, &b)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 72
      def sort(*params, &b)
        # see 'lsort' man page about params
        if b
          tk_call(@path, 'sort', '-command', proc(&b), *params)
        else
          tk_call(@path, 'sort', *params)
        end
        self
      end

sort_ascending()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 81
      def sort_ascending
        tk_call(@path, 'sort', 'ascending')
        self
      end

sort_descending()

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 85
      def sort_descending
        tk_call(@path, 'sort', 'descending')
        self
      end

xview(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 178
      def xview(*index)
        if index.size == 0
          list(tk_send_without_enc('xview'))
        else
          tk_send_without_enc('xview', *index)
          self
        end
      end

xview_moveto(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 186
      def xview_moveto(*index)
        xview('moveto', *index)
      end

xview_scroll(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 189
      def xview_scroll(*index)
        xview('scroll', *index)
      end

yview(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 193
      def yview(*index)
        if index.size == 0
          list(tk_send_without_enc('yview'))
        else
          tk_send_without_enc('yview', *index)
          self
        end
      end

yview_moveto(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 201
      def yview_moveto(*index)
        yview('moveto', *index)
      end

yview_scroll(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, line 204
      def yview_scroll(*index)
        yview('scroll', *index)
      end

[Validate]