Sha256: 1473a850ca65e2d669027d1788565e417c99d4a7c8025121ffd4b910caaa5d54

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true

Gtk.load_class :TreeViewColumn
module Gtk
  # Overrides for Gtk::TreeViewColumn
  class TreeViewColumn
    setup_method :new

    def self.new_with_attributes(*args)
      obj = allocate
      obj.send :initialize_with_attributes, *args
      obj
    end

    def set_attributes(renderer, attributes)
      attributes.each do |attribute, column|
        add_attribute renderer, attribute.to_s, column
      end
    end

    private

    def initialize_with_attributes(title, renderer, attributes = {})
      initialize
      set_title title
      pack_start(renderer, false)
      set_attributes(renderer, attributes)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gir_ffi-gtk-0.12.1 lib/gir_ffi-gtk/tree_view_column.rb
gir_ffi-gtk-0.12.0 lib/gir_ffi-gtk/tree_view_column.rb