class Gtk::CellRendererCombo

Overview

Renders a combobox in a cell

Gtk::CellRendererCombo renders text in a cell like Gtk::CellRendererText from which it is derived. But while Gtk::CellRendererText offers a simple entry to edit the text, Gtk::CellRendererCombo offers a Gtk::ComboBox widget to edit the text. The values to display in the combo box are taken from the tree model specified in the Gtk::CellRendererCombo:model property.

The combo cell renderer takes care of adding a text cell renderer to the combo box and sets it to display the column specified by its Gtk::CellRendererCombo:text-column property. Further properties of the combo box can be set in a handler for the Gtk::CellRenderer::editing-started signal.

Defined in:

lib/gi-crystal/src/auto/gtk-4.0/cell_renderer_combo.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Gtk::CellRendererText

align_set=(value : Bool) : Bool align_set=, align_set? : Bool align_set?, alignment : Pango::Alignment alignment, alignment=(value : Pango::Alignment) : Pango::Alignment alignment=, attributes : Pango::AttrList? attributes, attributes=(value : Pango::AttrList?) : Pango::AttrList? attributes=, background=(value : String) : String background=, background_rgba : Gdk::RGBA? background_rgba, background_rgba=(value : Gdk::RGBA?) : Gdk::RGBA? background_rgba=, background_set=(value : Bool) : Bool background_set=, background_set? : Bool background_set?, editable=(value : Bool) : Bool editable=, editable? : Bool editable?, editable_set=(value : Bool) : Bool editable_set=, editable_set? : Bool editable_set?, edited_signal edited_signal, ellipsize : Pango::EllipsizeMode ellipsize, ellipsize=(value : Pango::EllipsizeMode) : Pango::EllipsizeMode ellipsize=, ellipsize_set=(value : Bool) : Bool ellipsize_set=, ellipsize_set? : Bool ellipsize_set?, family : String family, family=(value : String) : String family=, family_set=(value : Bool) : Bool family_set=, family_set? : Bool family_set?, fixed_height_from_font=(number_of_rows : Int32) : Nil fixed_height_from_font=, font : String font, font=(value : String) : String font=, font_desc : Pango::FontDescription? font_desc, font_desc=(value : Pango::FontDescription?) : Pango::FontDescription? font_desc=, foreground=(value : String) : String foreground=, foreground_rgba : Gdk::RGBA? foreground_rgba, foreground_rgba=(value : Gdk::RGBA?) : Gdk::RGBA? foreground_rgba=, foreground_set=(value : Bool) : Bool foreground_set=, foreground_set? : Bool foreground_set?, language : String language, language=(value : String) : String language=, language_set=(value : Bool) : Bool language_set=, language_set? : Bool language_set?, markup=(value : String) : String markup=, max_width_chars : Int32 max_width_chars, max_width_chars=(value : Int32) : Int32 max_width_chars=, placeholder_text : String placeholder_text, placeholder_text=(value : String) : String placeholder_text=, rise : Int32 rise, rise=(value : Int32) : Int32 rise=, rise_set=(value : Bool) : Bool rise_set=, rise_set? : Bool rise_set?, scale : Float64 scale, scale=(value : Float64) : Float64 scale=, scale_set=(value : Bool) : Bool scale_set=, scale_set? : Bool scale_set?, single_paragraph_mode=(value : Bool) : Bool single_paragraph_mode=, single_paragraph_mode? : Bool single_paragraph_mode?, size : Int32 size, size=(value : Int32) : Int32 size=, size_points : Float64 size_points, size_points=(value : Float64) : Float64 size_points=, size_set=(value : Bool) : Bool size_set=, size_set? : Bool size_set?, stretch : Pango::Stretch stretch, stretch=(value : Pango::Stretch) : Pango::Stretch stretch=, stretch_set=(value : Bool) : Bool stretch_set=, stretch_set? : Bool stretch_set?, strikethrough=(value : Bool) : Bool strikethrough=, strikethrough? : Bool strikethrough?, strikethrough_set=(value : Bool) : Bool strikethrough_set=, strikethrough_set? : Bool strikethrough_set?, style : Pango::Style style, style=(value : Pango::Style) : Pango::Style style=, style_set=(value : Bool) : Bool style_set=, style_set? : Bool style_set?, text : String text, text=(value : String) : String text=, underline : Pango::Underline underline, underline=(value : Pango::Underline) : Pango::Underline underline=, underline_set=(value : Bool) : Bool underline_set=, underline_set? : Bool underline_set?, variant : Pango::Variant variant, variant=(value : Pango::Variant) : Pango::Variant variant=, variant_set=(value : Bool) : Bool variant_set=, variant_set? : Bool variant_set?, weight : Int32 weight, weight=(value : Int32) : Int32 weight=, weight_set=(value : Bool) : Bool weight_set=, weight_set? : Bool weight_set?, width_chars : Int32 width_chars, width_chars=(value : Int32) : Int32 width_chars=, wrap_mode : Pango::WrapMode wrap_mode, wrap_mode=(value : Pango::WrapMode) : Pango::WrapMode wrap_mode=, wrap_width : Int32 wrap_width, wrap_width=(value : Int32) : Int32 wrap_width=

Constructor methods inherited from class Gtk::CellRendererText

new : self
new(*, align_set : Bool? = nil, alignment : Pango::Alignment? = nil, attributes : Pango::AttrList? = nil, background : String? = nil, background_rgba : Gdk::RGBA? = nil, background_set : Bool? = nil, cell_background : String? = nil, cell_background_rgba : Gdk::RGBA? = nil, cell_background_set : Bool? = nil, editable : Bool? = nil, editable_set : Bool? = nil, editing : Bool? = nil, ellipsize : Pango::EllipsizeMode? = nil, ellipsize_set : Bool? = nil, family : String? = nil, family_set : Bool? = nil, font : String? = nil, font_desc : Pango::FontDescription? = nil, foreground : String? = nil, foreground_rgba : Gdk::RGBA? = nil, foreground_set : Bool? = nil, height : Int32? = nil, is_expanded : Bool? = nil, is_expander : Bool? = nil, language : String? = nil, language_set : Bool? = nil, markup : String? = nil, max_width_chars : Int32? = nil, mode : Gtk::CellRendererMode? = nil, placeholder_text : String? = nil, rise : Int32? = nil, rise_set : Bool? = nil, scale : Float64? = nil, scale_set : Bool? = nil, sensitive : Bool? = nil, single_paragraph_mode : Bool? = nil, size : Int32? = nil, size_points : Float64? = nil, size_set : Bool? = nil, stretch : Pango::Stretch? = nil, stretch_set : Bool? = nil, strikethrough : Bool? = nil, strikethrough_set : Bool? = nil, style : Pango::Style? = nil, style_set : Bool? = nil, text : String? = nil, underline : Pango::Underline? = nil, underline_set : Bool? = nil, variant : Pango::Variant? = nil, variant_set : Bool? = nil, visible : Bool? = nil, weight : Int32? = nil, weight_set : Bool? = nil, width : Int32? = nil, width_chars : Int32? = nil, wrap_mode : Pango::WrapMode? = nil, wrap_width : Int32? = nil, xalign : Float32? = nil, xpad : UInt32? = nil, yalign : Float32? = nil, ypad : UInt32? = nil)
new

Class methods inherited from class Gtk::CellRendererText

g_type : UInt64 g_type

Instance methods inherited from class Gtk::CellRenderer

activate(event : Gdk::Event, widget : Gtk::Widget, path : String, background_area : Gdk::Rectangle, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState) : Bool activate, aligned_area(widget : Gtk::Widget, flags : Gtk::CellRendererState, cell_area : Gdk::Rectangle) : Gdk::Rectangle aligned_area, alignment : Nil alignment, cell_background=(value : String) : String cell_background=, cell_background_rgba : Gdk::RGBA? cell_background_rgba, cell_background_rgba=(value : Gdk::RGBA?) : Gdk::RGBA? cell_background_rgba=, cell_background_set=(value : Bool) : Bool cell_background_set=, cell_background_set? : Bool cell_background_set?, editing? : Bool editing?, editing_canceled_signal editing_canceled_signal, editing_started_signal editing_started_signal, fixed_size : Nil fixed_size, height : Int32 height, height=(value : Int32) : Int32 height=, is_activatable : Bool is_activatable, is_expanded : Bool is_expanded, is_expanded=(is_expanded : Bool) : Nil is_expanded=, is_expanded? : Bool is_expanded?, is_expander : Bool is_expander, is_expander=(is_expander : Bool) : Nil is_expander=, is_expander? : Bool is_expander?, mode : Gtk::CellRendererMode mode, mode=(value : Gtk::CellRendererMode) : Gtk::CellRendererMode mode=, padding : Nil padding, preferred_height(widget : Gtk::Widget) : Nil preferred_height, preferred_height_for_width(widget : Gtk::Widget, width : Int32) : Nil preferred_height_for_width, preferred_size(widget : Gtk::Widget) : Gtk::Requisition preferred_size, preferred_width(widget : Gtk::Widget) : Nil preferred_width, preferred_width_for_height(widget : Gtk::Widget, height : Int32) : Nil preferred_width_for_height, request_mode : Gtk::SizeRequestMode request_mode, sensitive : Bool sensitive, sensitive=(sensitive : Bool) : Nil sensitive=, sensitive? : Bool sensitive?, set_alignment(xalign : Float32, yalign : Float32) : Nil set_alignment, set_fixed_size(width : Int32, height : Int32) : Nil set_fixed_size, set_padding(xpad : Int32, ypad : Int32) : Nil set_padding, snapshot(snapshot : Gtk::Snapshot, widget : Gtk::Widget, background_area : Gdk::Rectangle, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState) : Nil snapshot, start_editing(event : Gdk::Event?, widget : Gtk::Widget, path : String, background_area : Gdk::Rectangle, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState) : Gtk::CellEditable? start_editing, state(widget : Gtk::Widget?, cell_state : Gtk::CellRendererState) : Gtk::StateFlags state, stop_editing(canceled : Bool) : Nil stop_editing, visible : Bool visible, visible=(visible : Bool) : Nil visible=, visible? : Bool visible?, width : Int32 width, width=(value : Int32) : Int32 width=, xalign : Float32 xalign, xalign=(value : Float32) : Float32 xalign=, xpad : UInt32 xpad, xpad=(value : UInt32) : UInt32 xpad=, yalign : Float32 yalign, yalign=(value : Float32) : Float32 yalign=, ypad : UInt32 ypad, ypad=(value : UInt32) : UInt32 ypad=

Constructor methods inherited from class Gtk::CellRenderer

new
new(*, cell_background : String? = nil, cell_background_rgba : Gdk::RGBA? = nil, cell_background_set : Bool? = nil, editing : Bool? = nil, height : Int32? = nil, is_expanded : Bool? = nil, is_expander : Bool? = nil, mode : Gtk::CellRendererMode? = nil, sensitive : Bool? = nil, visible : Bool? = nil, width : Int32? = nil, xalign : Float32? = nil, xpad : UInt32? = nil, yalign : Float32? = nil, ypad : UInt32? = nil)
new

Class methods inherited from class Gtk::CellRenderer

g_type : UInt64 g_type

Constructor methods inherited from class GObject::InitiallyUnowned

new new

Class methods inherited from class GObject::InitiallyUnowned

g_type : UInt64 g_type

Instance methods inherited from class GObject::Object

bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding bind_property, bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding bind_property_full, data(key : String) : Pointer(Void)? data, finalize finalize, freeze_notify : Nil freeze_notify, getv(names : Enumerable(String), values : Enumerable(_)) : Nil getv, notify(property_name : String) : Nil notify, notify_by_pspec(pspec : GObject::ParamSpec) : Nil notify_by_pspec, notify_signal notify_signal, property(property_name : String, value : _) : Nil property, qdata(quark : UInt32) : Pointer(Void)? qdata, ref_count : UInt32 ref_count, run_dispose : Nil run_dispose, set_data(key : String, data : Pointer(Void)?) : Nil set_data, set_property(property_name : String, value : _) : Nil set_property, steal_data(key : String) : Pointer(Void)? steal_data, steal_qdata(quark : UInt32) : Pointer(Void)? steal_qdata, thaw_notify : Nil thaw_notify, to_unsafe : Pointer(Void) to_unsafe, watch_closure(closure : GObject::Closure) : Nil watch_closure

Constructor methods inherited from class GObject::Object

cast(obj : GObject::Object) : self cast, cast?(obj : GObject::Object) : self? cast?, new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
new
new
, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv

Class methods inherited from class GObject::Object

compat_control(what : UInt64, data : Pointer(Void)?) : UInt64 compat_control, g_type : UInt64 g_type, interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec interface_find_property, interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec) interface_list_properties

Constructor Detail

def self.new : self #

Creates a new Gtk::CellRendererCombo. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set()). Also, with Gtk::TreeViewColumn, you can bind a property to a value in a Gtk::TreeModel. For example, you can bind the “text” property on the cell renderer to a string value in the model, thus rendering a different string in each row of the Gtk::TreeView.


def self.new(*, align_set : Bool? = nil, alignment : Pango::Alignment? = nil, attributes : Pango::AttrList? = nil, background : String? = nil, background_rgba : Gdk::RGBA? = nil, background_set : Bool? = nil, cell_background : String? = nil, cell_background_rgba : Gdk::RGBA? = nil, cell_background_set : Bool? = nil, editable : Bool? = nil, editable_set : Bool? = nil, editing : Bool? = nil, ellipsize : Pango::EllipsizeMode? = nil, ellipsize_set : Bool? = nil, family : String? = nil, family_set : Bool? = nil, font : String? = nil, font_desc : Pango::FontDescription? = nil, foreground : String? = nil, foreground_rgba : Gdk::RGBA? = nil, foreground_set : Bool? = nil, has_entry : Bool? = nil, height : Int32? = nil, is_expanded : Bool? = nil, is_expander : Bool? = nil, language : String? = nil, language_set : Bool? = nil, markup : String? = nil, max_width_chars : Int32? = nil, mode : Gtk::CellRendererMode? = nil, model : Gtk::TreeModel? = nil, placeholder_text : String? = nil, rise : Int32? = nil, rise_set : Bool? = nil, scale : Float64? = nil, scale_set : Bool? = nil, sensitive : Bool? = nil, single_paragraph_mode : Bool? = nil, size : Int32? = nil, size_points : Float64? = nil, size_set : Bool? = nil, stretch : Pango::Stretch? = nil, stretch_set : Bool? = nil, strikethrough : Bool? = nil, strikethrough_set : Bool? = nil, style : Pango::Style? = nil, style_set : Bool? = nil, text : String? = nil, text_column : Int32? = nil, underline : Pango::Underline? = nil, underline_set : Bool? = nil, variant : Pango::Variant? = nil, variant_set : Bool? = nil, visible : Bool? = nil, weight : Int32? = nil, weight_set : Bool? = nil, width : Int32? = nil, width_chars : Int32? = nil, wrap_mode : Pango::WrapMode? = nil, wrap_width : Int32? = nil, xalign : Float32? = nil, xpad : UInt32? = nil, yalign : Float32? = nil, ypad : UInt32? = nil) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def changed_signal #

def has_entry=(value : Bool) : Bool #

def has_entry? : Bool #

def model : Gtk::TreeModel? #

def model=(value : Gtk::TreeModel?) : Gtk::TreeModel? #

def text_column : Int32 #

def text_column=(value : Int32) : Int32 #