class Gtk::CellAreaBox

Overview

A cell area that renders Gtk::CellRenderers into a row or a column

The Gtk::CellAreaBox renders cell renderers into a row or a column depending on its Gtk::Orientation.

Gtk::CellAreaBox uses a notion of packing. Packing refers to adding cell renderers with reference to a particular position in a Gtk::CellAreaBox. There are two reference positions: the start and the end of the box. When the Gtk::CellAreaBox is oriented in the %GTK_ORIENTATION_VERTICAL orientation, the start is defined as the top of the box and the end is defined as the bottom. In the %GTK_ORIENTATION_HORIZONTAL orientation start is defined as the left side and the end is defined as the right side.

Alignments of Gtk::CellRenderers rendered in adjacent rows can be configured by configuring the Gtk::CellAreaBox align child cell property with gtk_cell_area_cell_set_property() or by specifying the "align" argument to gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end().

Included Modules

Defined in:

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

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Gtk::Orientable

orientation : Gtk::Orientation orientation, orientation=(orientation : Gtk::Orientation) : Nil orientation=, to_unsafe to_unsafe

Class methods inherited from module Gtk::Orientable

g_type : UInt64 g_type

Instance methods inherited from module Gtk::CellLayout

add_attribute(cell : Gtk::CellRenderer, attribute : String, column : Int32) : Nil add_attribute, area : Gtk::CellArea? area, cells : GLib::List cells, clear : Nil clear, clear_attributes(cell : Gtk::CellRenderer) : Nil clear_attributes, pack_end(cell : Gtk::CellRenderer, expand : Bool) : Nil pack_end, pack_start(cell : Gtk::CellRenderer, expand : Bool) : Nil pack_start, reorder(cell : Gtk::CellRenderer, position : Int32) : Nil reorder, set_cell_data_func(cell : Gtk::CellRenderer, func : Gtk::CellLayoutDataFunc?) : Nil set_cell_data_func, to_unsafe to_unsafe

Class methods inherited from module Gtk::CellLayout

g_type : UInt64 g_type

Instance methods inherited from module Gtk::Buildable

buildable_id : String? buildable_id, to_unsafe to_unsafe

Class methods inherited from module Gtk::Buildable

g_type : UInt64 g_type

Instance methods inherited from class Gtk::CellArea

activate(context : Gtk::CellAreaContext, widget : Gtk::Widget, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState, edit_only : Bool) : Bool activate, activate_cell(widget : Gtk::Widget, renderer : Gtk::CellRenderer, event : Gdk::Event, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState) : Bool activate_cell, add(renderer : Gtk::CellRenderer) : Nil add, add_editable_signal add_editable_signal, add_focus_sibling(renderer : Gtk::CellRenderer, sibling : Gtk::CellRenderer) : Nil add_focus_sibling, apply_attributes(tree_model : Gtk::TreeModel, iter : Gtk::TreeIter, is_expander : Bool, is_expanded : Bool) : Nil apply_attributes, apply_attributes_signal apply_attributes_signal, attribute_connect(renderer : Gtk::CellRenderer, attribute : String, column : Int32) : Nil attribute_connect, attribute_disconnect(renderer : Gtk::CellRenderer, attribute : String) : Nil attribute_disconnect, attribute_get_column(renderer : Gtk::CellRenderer, attribute : String) : Int32 attribute_get_column, cell_allocation(context : Gtk::CellAreaContext, widget : Gtk::Widget, renderer : Gtk::CellRenderer, cell_area : Gdk::Rectangle) : Gdk::Rectangle cell_allocation, cell_at_position(context : Gtk::CellAreaContext, widget : Gtk::Widget, cell_area : Gdk::Rectangle, x : Int32, y : Int32) : Gdk::Rectangle cell_at_position, cell_get_property(renderer : Gtk::CellRenderer, property_name : String, value : _) : Nil cell_get_property, cell_set_property(renderer : Gtk::CellRenderer, property_name : String, value : _) : Nil cell_set_property, copy_context(context : Gtk::CellAreaContext) : Gtk::CellAreaContext copy_context, create_context : Gtk::CellAreaContext create_context, current_path_string : String current_path_string, edit_widget : Gtk::CellEditable? edit_widget, edited_cell : Gtk::CellRenderer? edited_cell, event(context : Gtk::CellAreaContext, widget : Gtk::Widget, event : Gdk::Event, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState) : Int32 event, focus(direction : Gtk::DirectionType) : Bool focus, focus_cell : Gtk::CellRenderer? focus_cell, focus_cell=(renderer : Gtk::CellRenderer?) : Nil focus_cell=, focus_changed_signal focus_changed_signal, focus_from_sibling(renderer : Gtk::CellRenderer) : Gtk::CellRenderer? focus_from_sibling, focus_siblings(renderer : Gtk::CellRenderer) : GLib::List focus_siblings, foreach(callback : Gtk::CellCallback, callback_data : Pointer(Void)?) : Nil foreach, foreach_alloc(context : Gtk::CellAreaContext, widget : Gtk::Widget, cell_area : Gdk::Rectangle, background_area : Gdk::Rectangle, callback : Gtk::CellAllocCallback, callback_data : Pointer(Void)?) : Nil foreach_alloc, has_renderer(renderer : Gtk::CellRenderer) : Bool has_renderer, inner_cell_area(widget : Gtk::Widget, cell_area : Gdk::Rectangle) : Gdk::Rectangle inner_cell_area, is_activatable : Bool is_activatable, is_focus_sibling(renderer : Gtk::CellRenderer, sibling : Gtk::CellRenderer) : Bool is_focus_sibling, preferred_height(context : Gtk::CellAreaContext, widget : Gtk::Widget) : Nil preferred_height, preferred_height_for_width(context : Gtk::CellAreaContext, widget : Gtk::Widget, width : Int32) : Nil preferred_height_for_width, preferred_width(context : Gtk::CellAreaContext, widget : Gtk::Widget) : Nil preferred_width, preferred_width_for_height(context : Gtk::CellAreaContext, widget : Gtk::Widget, height : Int32) : Nil preferred_width_for_height, remove(renderer : Gtk::CellRenderer) : Nil remove, remove_editable_signal remove_editable_signal, remove_focus_sibling(renderer : Gtk::CellRenderer, sibling : Gtk::CellRenderer) : Nil remove_focus_sibling, request_mode : Gtk::SizeRequestMode request_mode, request_renderer(renderer : Gtk::CellRenderer, orientation : Gtk::Orientation, widget : Gtk::Widget, for_size : Int32) : Nil request_renderer, snapshot(context : Gtk::CellAreaContext, widget : Gtk::Widget, snapshot : Gtk::Snapshot, background_area : Gdk::Rectangle, cell_area : Gdk::Rectangle, flags : Gtk::CellRendererState, paint_focus : Bool) : Nil snapshot, stop_editing(canceled : Bool) : Nil stop_editing

Constructor methods inherited from class Gtk::CellArea

new
new(*, edit_widget : Gtk::CellEditable? = nil, edited_cell : Gtk::CellRenderer? = nil, focus_cell : Gtk::CellRenderer? = nil)
new

Class methods inherited from class Gtk::CellArea

g_type : UInt64 g_type

Instance methods inherited from module Gtk::CellLayout

add_attribute(cell : Gtk::CellRenderer, attribute : String, column : Int32) : Nil add_attribute, area : Gtk::CellArea? area, cells : GLib::List cells, clear : Nil clear, clear_attributes(cell : Gtk::CellRenderer) : Nil clear_attributes, pack_end(cell : Gtk::CellRenderer, expand : Bool) : Nil pack_end, pack_start(cell : Gtk::CellRenderer, expand : Bool) : Nil pack_start, reorder(cell : Gtk::CellRenderer, position : Int32) : Nil reorder, set_cell_data_func(cell : Gtk::CellRenderer, func : Gtk::CellLayoutDataFunc?) : Nil set_cell_data_func, to_unsafe to_unsafe

Class methods inherited from module Gtk::CellLayout

g_type : UInt64 g_type

Instance methods inherited from module Gtk::Buildable

buildable_id : String? buildable_id, to_unsafe to_unsafe

Class methods inherited from module Gtk::Buildable

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::CellAreaBox.


def self.new(*, edit_widget : Gtk::CellEditable? = nil, edited_cell : Gtk::CellRenderer? = nil, focus_cell : Gtk::CellRenderer? = nil, orientation : Gtk::Orientation? = nil, spacing : Int32? = nil) #

Class Method Detail

def self.g_type : UInt64 #

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


Instance Method Detail

def pack_end(renderer : Gtk::CellRenderer, expand : Bool, align : Bool, fixed : Bool) : Nil #

Adds @renderer to @box, packed with reference to the end of @box.

The @renderer is packed after (away from end of) any other Gtk::CellRenderer packed with reference to the end of @box.


def pack_start(renderer : Gtk::CellRenderer, expand : Bool, align : Bool, fixed : Bool) : Nil #

Adds @renderer to @box, packed with reference to the start of @box.

The @renderer is packed after any other Gtk::CellRenderer packed with reference to the start of @box.


def spacing : Int32 #

Gets the spacing added between cell renderers.


def spacing=(spacing : Int32) : Nil #

Sets the spacing to add between cell renderers in @box.