Sha256: fc97df16e4aaf6d7dad96efe4a0d2f60e60057ccac11c5bf3f312ed00ae6dd83

Contents?: true

Size: 1.73 KB

Versions: 89

Compression:

Stored size: 1.73 KB

Contents

# Copyright (C) 2015  Ruby-GNOME2 Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module Gtk
  class ListStore
    alias_method :initialize_raw, :initialize
    def initialize(*columns)
      if columns.empty?
        raise ArgumentError, "No column type is specified"
      end
      initialize_raw(columns)
    end

    alias_method :append_raw, :append
    def append
      iter = append_raw
      setup_iter(iter)
      iter
    end

    alias_method :prepend_raw, :prepend
    def prepend
      iter = prepend_raw
      setup_iter(iter)
      iter
    end

    alias_method :insert_raw, :insert
    def insert(index, values=nil)
      iter = insert_raw(index)
      setup_iter(iter)
      set_values(iter, values) if values
      iter
    end

    alias_method :insert_before_raw, :insert_before
    def insert_before(index)
      iter = insert_before_raw(index)
      setup_iter(iter)
      iter
    end

    alias_method :insert_after_raw, :insert_after
    def insert_after(index)
      iter = insert_after_raw(index)
      setup_iter(iter)
      iter
    end
  end
end

Version data entries

89 entries across 81 versions & 3 rubygems

Version Path
gtk4-3.5.1 lib/gtk4/list-store.rb
gtk4-3.5.0 lib/gtk4/list-store.rb
gtk4-3.4.9 lib/gtk4/list-store.rb
gtk4-3.4.8 lib/gtk4/list-store.rb
gtk4-3.4.7 lib/gtk4/list-store.rb
gtk4-3.4.6 lib/gtk4/list-store.rb
gtk4-3.4.5 lib/gtk4/list-store.rb
gtk4-3.4.4 lib/gtk4/list-store.rb
gtk3-3.2.9-x64-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.9-x86-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.9 lib/gtk3/list-store.rb
gtk3-3.2.8-x64-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.8-x86-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.8 lib/gtk3/list-store.rb
gtk3-3.2.7-x86-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.7-x64-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.7 lib/gtk3/list-store.rb
gtk3-3.2.6-x64-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.6-x86-mingw32 lib/gtk3/list-store.rb
gtk3-3.2.6 lib/gtk3/list-store.rb