DataViewListModel

Struct DataViewListModel 

Source
pub struct DataViewListModel { /* private fields */ }
Expand description

A basic list model for DataViewCtrl that stores data in a 2D array

Implementations§

Source§

impl DataViewListModel

Source

pub fn new() -> Self

Create a new empty DataViewListModel

Source

pub fn append_column(&self, name: &str) -> bool

Add a new column to the model

Source

pub fn append_row(&self) -> bool

Add a new row to the model

Source

pub fn set_value<T: Into<Variant>>( &self, row: usize, col: usize, value: T, ) -> bool

Set a value in the model

Trait Implementations§

Source§

impl DataViewModel for DataViewListModel

Source§

fn handle_ptr(&self) -> *mut wxd_DataViewModel_t

Get the handle to the underlying wxDataViewModel
Source§

fn get_column_count(&self) -> usize

Get the number of columns in the model
Source§

fn get_row_count(&self) -> usize

Get the number of rows in the model
Source§

fn get_value(&self, _row: usize, _col: usize) -> Variant

Get the value at the specified row and column
Source§

fn set_value(&self, row: usize, col: usize, value: &Variant) -> bool

Set the value at the specified row and column
Source§

fn get_attributes(&self, row: usize, col: usize) -> Option<DataViewItemAttr>

Get display attributes for a cell
Source§

fn is_enabled(&self, row: usize, col: usize) -> bool

Check if a cell is enabled for editing
Source§

impl Default for DataViewListModel

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> 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, 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.