class

UIng::Table::Model::Handler

Inherits UIng::BlockConstructor < Reference < Object

Table model callbacks with closure support. Model retains the Handler and its Procs; native UserData points back to it. Direct LibUI callers must retain the Handler themselves.

Column count and types are sealed when first passed to libui-ng. cell_value returns a new owned Value (or nil where allowed), transferred to libui-ng. set_cell_value receives a borrowed Value?, valid only during that callback. Keep captured native resources unfreed while used.

Constructors

new(*args, &)
Source
new(*args, **kwargs, &)
Source
new

Ameba counts branches inside the C callback closures as branches of this initializer even though each closure is an independent handler. ameba:disable Metrics/CyclomaticComplexity

Source

Instance methods

cell_value
Source
clear_set_cell_value

Removes the optional edit/click callback; equivalent to set_cell_value(nil).

Source
column_type
Source
num_columns
Source
num_rows
Source
set_cell_value
Source
set_cell_value(callback : Nil) : Nil
Source
to_unsafe
Source