uiTableModelHandler

Struct 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

Source§

fn clone(&self) -> uiTableModelHandler

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for uiTableModelHandler

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for uiTableModelHandler

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.