Struct libui_ng_sys::uiTableModelHandler
source · #[repr(C)]pub struct uiTableModelHandler {
pub NumColumns: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel) -> c_int>,
pub ColumnType: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel, column: c_int) -> uiTableValueType>,
pub NumRows: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel) -> c_int>,
pub CellValue: Option<unsafe extern "C" fn(mh: *mut uiTableModelHandler, m: *mut uiTableModel, row: c_int, column: c_int) -> *mut uiTableValue>,
pub SetCellValue: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel, arg3: c_int, arg4: c_int, arg5: *const uiTableValue)>,
}
Fields§
§NumColumns: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel) -> c_int>
Returns the number of columns in the uiTableModel.
@warning This value MUST remain constant throughout the lifetime of the uiTableModel. @warning This method is not guaranteed to be called depending on the system. @todo strongly check column numbers and types on all platforms so these clauses can go away
ColumnType: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel, column: c_int) -> uiTableValueType>
Returns the column type in for of a #uiTableValueType.
@warning This value MUST remain constant throughout the lifetime of the uiTableModel. @warning This method is not guaranteed to be called depending on the system.
NumRows: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel) -> c_int>
Returns the number of rows in the uiTableModel.
CellValue: Option<unsafe extern "C" fn(mh: *mut uiTableModelHandler, m: *mut uiTableModel, row: c_int, column: c_int) -> *mut uiTableValue>
Returns the cell value for (row, column).
Make sure to use the uiTableValue constructors. The returned value must match the #uiTableValueType defined in ColumnType().
Some columns may return NULL
as a special value. Refer to the
appropriate uiTableAppend*Column()
documentation.
@note uiTableValue objects are automatically freed when requested by a uiTable.
SetCellValue: Option<unsafe extern "C" fn(arg1: *mut uiTableModelHandler, arg2: *mut uiTableModel, arg3: c_int, arg4: c_int, arg5: *const uiTableValue)>
Sets the cell value for (row, column).
It is up to the handler to decide what to do with the value: change the model or reject the change, keeping the old value.
Some columns may call this function with NULL
as a special value.
Refer to the appropriate uiTableAppend*Column()
documentation.
@note uiTableValue objects are automatically freed upon return when set by a uiTable.
Trait Implementations§
source§impl Clone for uiTableModelHandler
impl Clone for uiTableModelHandler
source§fn clone(&self) -> uiTableModelHandler
fn clone(&self) -> uiTableModelHandler
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more