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

Constructor methods inherited from module Gtk::Orientable

cast(obj : GObject::Object) : self cast

Class methods inherited from module Gtk::Orientable

cast?(obj : GObject::Object) : self | Nil cast?, 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 | Nil 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) : Nil set_cell_data_func, to_unsafe to_unsafe

Constructor methods inherited from module Gtk::CellLayout

cast(obj : GObject::Object) : self cast

Class methods inherited from module Gtk::CellLayout

cast?(obj : GObject::Object) : self | Nil cast?, g_type : UInt64 g_type

Instance methods inherited from module Gtk::Buildable

buildable_id : String | Nil buildable_id, to_unsafe to_unsafe

Constructor methods inherited from module Gtk::Buildable

cast(obj : GObject::Object) : self cast

Class methods inherited from module Gtk::Buildable

cast?(obj : GObject::Object) : self | Nil cast?, g_type : UInt64 g_type

Instance methods inherited from class Gtk::CellArea

==(other : self) ==, 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 | Nil edit_widget, edited_cell : Gtk::CellRenderer | Nil 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 | Nil focus_cell, focus_cell=(renderer : Gtk::CellRenderer | Nil) : Nil focus_cell=, focus_changed_signal focus_changed_signal, focus_from_sibling(renderer : Gtk::CellRenderer) : Gtk::CellRenderer | Nil focus_from_sibling, focus_siblings(renderer : Gtk::CellRenderer) : GLib::List focus_siblings, foreach(callback : Gtk::CellCallback, callback_data : Pointer(Void) | Nil) : 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) : Nil foreach_alloc, has_renderer(renderer : Gtk::CellRenderer) : Bool has_renderer, hash(hasher) hash, 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 = nil, edited_cell : Gtk::CellRenderer | Nil = nil, focus_cell : Gtk::CellRenderer | Nil = 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 | Nil 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) : Nil set_cell_data_func, to_unsafe to_unsafe

Constructor methods inherited from module Gtk::CellLayout

cast(obj : GObject::Object) : self cast

Class methods inherited from module Gtk::CellLayout

cast?(obj : GObject::Object) : self | Nil cast?, g_type : UInt64 g_type

Instance methods inherited from module Gtk::Buildable

buildable_id : String | Nil buildable_id, to_unsafe to_unsafe

Constructor methods inherited from module Gtk::Buildable

cast(obj : GObject::Object) : self cast

Class methods inherited from module Gtk::Buildable

cast?(obj : GObject::Object) : self | Nil cast?, g_type : UInt64 g_type

Instance methods inherited from class GObject::InitiallyUnowned

==(other : self) ==, hash(hasher) hash

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

==(other : self) ==, 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) | Nil data, finalize finalize, freeze_notify : Nil freeze_notify, getv(names : Enumerable(String), values : Enumerable(_)) : Nil getv, hash(hasher) hash, 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) | Nil qdata, ref_count : UInt32 ref_count, run_dispose : Nil run_dispose, set_data(key : String, data : Pointer(Void) | Nil) : Nil set_data, set_property(property_name : String, value : _) : Nil set_property, steal_data(key : String) : Pointer(Void) | Nil steal_data, steal_qdata(quark : UInt32) : Pointer(Void) | Nil 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, 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

cast?(obj : GObject::Object) : self | Nil cast?, compat_control(what : UInt64, data : Pointer(Void) | Nil) : 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

Macros inherited from class GObject::Object

previous_vfunc(*args) previous_vfunc, previous_vfunc!(*args) previous_vfunc!, signal(signature) signal

Constructor Detail

def self.new : self #

Creates a new Gtk::CellAreaBox.


[View source]
def self.new(*, edit_widget : Gtk::CellEditable | Nil = nil, edited_cell : Gtk::CellRenderer | Nil = nil, focus_cell : Gtk::CellRenderer | Nil = nil, orientation : Gtk::Orientation | Nil = nil, spacing : Int32 | Nil = nil) #

[View source]

Class Method Detail

def self.g_type : UInt64 #

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


[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


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.


[View source]
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.


[View source]
def spacing : Int32 #

Gets the spacing added between cell renderers.


[View source]
def spacing=(spacing : Int32) : Nil #

Sets the spacing to add between cell renderers in box.


[View source]