class
UIng::Table::Model::Handler
- UIng::Table::Model::Handler
- Reference
- Object
Overview
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.
Included Modules
- UIng::BlockConstructor
Defined in:
uing/table/model/handler.crConstructors
- .new(*args, &)
- .new(*args, **kwargs, &)
-
.new
Ameba counts branches inside the C callback closures as branches of this initializer even though each closure is an independent handler.
Instance Method Summary
- #cell_value(&block : LibC::Int, LibC::Int -> Value | Nil)
-
#clear_set_cell_value : Nil
Removes the optional edit/click callback; equivalent to
#set_cell_value(nil). - #column_type(&block : LibC::Int -> Value::Type)
- #num_columns(&block : -> Int32)
- #num_rows(&block : -> Int32)
- #set_cell_value(&block : LibC::Int, LibC::Int, Value | Nil -> Nil)
- #set_cell_value(callback : Nil) : Nil
- #to_unsafe
Macros inherited from module UIng::BlockConstructor
block_constructor
block_constructor
Constructor Detail
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
Instance Method Detail
Removes the optional edit/click callback; equivalent to #set_cell_value(nil).