Sha256: a9ddbeb3d94a5336330bf9f390e3b03382fb10981b5c16770f2454b05b8fc079

Contents?: true

Size: 1.56 KB

Versions: 5

Compression:

Stored size: 1.56 KB

Contents

# :stopdoc:
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
# :startdoc:


module Wx

  class ListCtrl

    include Enumerable

    # Iterates all items in the list control passing each item (id) to the given block.
    # @yieldparam [Integer] item
    # @return [Object] result of last block iteration
    def each(&block) end

    # Iterates all selected items in the list control (like #get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED))
    # passing each item (id) to the given block.
    # @yieldparam [Integer] item
    # @return [Object] result of last block iteration
    def each_selected(&block) end

    # Returns array of selected items.
    # @return [Array<Integer>] selected items
    def get_selections; end

    # Call this function to sort the items in the list control.
    # The sorting method will call the given block repeatedly to compare two items from the list
    # passing the <b>item data</b> for each item as well as the `data` argument given to the #sort_items method.
    # The block should return 0 if the items are equal, negative value if the first item is less than the second
    # one and positive value if the first one is greater than the second one.
    # @param [Object] data user data to pass on to the sorting block
    # @yieldparam [Object] item_data1 data for first item
    # @yieldparam [Object] item_data2 data for second item
    # @yieldparam [Object] data propagated data argument
    def sort_items(data = nil, &block) end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt lib/wx/doc/list_ctrl.rb
wxruby3-0.9.5-x64-mingw-ucrt lib/wx/doc/list_ctrl.rb
wxruby3-0.9.4-x64-mingw-ucrt lib/wx/doc/list_ctrl.rb
wxruby3-0.9.3-x64-mingw-ucrt lib/wx/doc/list_ctrl.rb
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/doc/list_ctrl.rb