pub struct DataViewListCtrl { /* private fields */ }Expand description
A simplified DataViewCtrl that displays data in a list format.
DataViewListCtrl is a convenience wrapper around DataViewCtrl that simplifies the display of tabular data without requiring a custom model.
Implementations§
Source§impl DataViewListCtrl
impl DataViewListCtrl
Sourcepub fn builder(parent: &dyn WxWidget) -> DataViewListCtrlBuilder<'_>
pub fn builder(parent: &dyn WxWidget) -> DataViewListCtrlBuilder<'_>
Creates a builder for configuring and constructing a DataViewListCtrl.
Sourcepub fn append_text_column(
&self,
label: &str,
model_column: usize,
align: DataViewAlign,
width: i32,
flags: DataViewColumnFlags,
) -> bool
pub fn append_text_column( &self, label: &str, model_column: usize, align: DataViewAlign, width: i32, flags: DataViewColumnFlags, ) -> bool
Appends a text column to this list control.
§Parameters
label- The header label for the columnmodel_column- The column index in the data modelalign- The text alignmentwidth- The column width (in pixels)flags- Column flags (e.g., resizable, sortable)
§Returns
true if the column was successfully appended, false otherwise.
Sourcepub fn append_toggle_column(
&self,
label: &str,
model_column: usize,
align: DataViewAlign,
width: i32,
flags: DataViewColumnFlags,
) -> bool
pub fn append_toggle_column( &self, label: &str, model_column: usize, align: DataViewAlign, width: i32, flags: DataViewColumnFlags, ) -> bool
Appends a toggle column to this list control.
§Parameters
label- The header label for the columnmodel_column- The column index in the data modelalign- The alignment of the checkboxwidth- The column width (in pixels)flags- Column flags
§Returns
true if the column was successfully appended, false otherwise.
Sourcepub fn append_progress_column(
&self,
label: &str,
model_column: usize,
width: i32,
flags: DataViewColumnFlags,
) -> bool
pub fn append_progress_column( &self, label: &str, model_column: usize, width: i32, flags: DataViewColumnFlags, ) -> bool
Sourcepub fn select_row(&self, row: usize) -> bool
pub fn select_row(&self, row: usize) -> bool
Sourcepub fn get_selected_row(&self) -> Option<usize>
pub fn get_selected_row(&self) -> Option<usize>
Gets the currently selected row.
§Returns
An Option containing the index of the selected row, or None if no row is selected.
Sourcepub fn unselect_all(&self)
pub fn unselect_all(&self)
Deselects all currently selected items.
Methods from Deref<Target = Window>§
Sourcepub fn as_ptr(&self) -> *mut wxd_Window_t
pub fn as_ptr(&self) -> *mut wxd_Window_t
Returns the raw underlying pointer. Temporary: Made public for FFI callbacks until safe event handling is done.
Sourcepub fn set_sizer(&self, sizer: impl WxSizer, delete_old_sizer: bool)
pub fn set_sizer(&self, sizer: impl WxSizer, delete_old_sizer: bool)
Sets the window’s sizer.
Takes ownership of the Sizer object (caller should std::mem::forget it).
delete_old_sizer: If true, the previous sizer (if any) is deleted.
Sourcepub fn set_sizer_and_fit(&self, sizer: impl WxSizer, delete_old_sizer: bool)
pub fn set_sizer_and_fit(&self, sizer: impl WxSizer, delete_old_sizer: bool)
Sets the window’s sizer and calls Fit() on the window.
Takes ownership of the Sizer object (caller should std::mem::forget it).
delete_old_sizer: If true, the previous sizer (if any) is deleted.
Sourcepub fn get_class_name(&self) -> Option<String>
pub fn get_class_name(&self) -> Option<String>
Gets the wxWidgets class name for this window using built-in RTTI
Sourcepub fn as_widget<T: FromWindowWithClassName>(&self) -> Option<T>
pub fn as_widget<T: FromWindowWithClassName>(&self) -> Option<T>
Generic method to cast this window to a specific widget type Uses wxWidgets’ built-in RTTI to safely verify the type before casting
Trait Implementations§
Source§impl DataViewEventHandler for DataViewListCtrl
impl DataViewEventHandler for DataViewListCtrl
Source§fn bind_dataview_event<F>(&self, event: DataViewEvent, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn bind_dataview_event<F>(&self, event: DataViewEvent, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_selection_changed<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_selection_changed<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_item_activated<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_item_activated<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_item_editing_started<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_item_editing_started<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_item_editing_done<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_item_editing_done<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_item_editing_cancelled<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_item_editing_cancelled<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_column_header_click<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_column_header_click<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_column_header_right_click<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_column_header_right_click<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_column_sorted<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_column_sorted<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§fn on_column_reordered<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
fn on_column_reordered<F>(&self, callback: F)where
F: FnMut(DataViewEventData) + 'static,
Source§impl DerefMut for DataViewListCtrl
impl DerefMut for DataViewListCtrl
Source§impl Drop for DataViewListCtrl
impl Drop for DataViewListCtrl
Source§impl MenuEvents for DataViewListCtrl
impl MenuEvents for DataViewListCtrl
Source§impl WindowEvents for DataViewListCtrl
impl WindowEvents for DataViewListCtrl
Source§fn on_mouse_left_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_left_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_left_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_left_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_right_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_right_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_right_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_right_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_middle_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_middle_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_middle_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_middle_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_motion<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_motion<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_wheel<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_wheel<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_enter<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_enter<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_mouse_leave<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_mouse_leave<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_key_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_key_down<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_key_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_key_up<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_char<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_char<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_size<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_size<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_move_event<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_move_event<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_paint<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_paint<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_erase_background<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_erase_background<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_set_focus<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_set_focus<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_kill_focus<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_kill_focus<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_idle<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_idle<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_close<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_close<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§fn on_destroy<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
fn on_destroy<F>(&self, callback: F)where
F: FnMut(WindowEventData) + 'static,
Source§impl WxEvtHandler for DataViewListCtrl
impl WxEvtHandler for DataViewListCtrl
Source§unsafe fn get_event_handler_ptr(&self) -> *mut wxd_EvtHandler_t
unsafe fn get_event_handler_ptr(&self) -> *mut wxd_EvtHandler_t
Source§impl WxWidget for DataViewListCtrl
impl WxWidget for DataViewListCtrl
Source§fn handle_ptr(&self) -> *mut wxd_Window_t
fn handle_ptr(&self) -> *mut wxd_Window_t
Source§fn layout(&self)
fn layout(&self)
Source§fn get_best_size(&self) -> Size
fn get_best_size(&self) -> Size
Source§fn set_background_color(&self, color: Colour)
fn set_background_color(&self, color: Colour)
Source§fn set_background_style(&self, style: BackgroundStyle)
fn set_background_style(&self, style: BackgroundStyle)
Source§fn get_background_style(&self) -> BackgroundStyle
fn get_background_style(&self) -> BackgroundStyle
Source§fn set_min_size(&self, size: Size)
fn set_min_size(&self, size: Size)
Source§fn refresh(&self, erase_background: bool, rect: Option<&Rect>)
fn refresh(&self, erase_background: bool, rect: Option<&Rect>)
Source§fn set_tooltip(&self, tip: &str)
fn set_tooltip(&self, tip: &str)
Source§fn destroy(&self)
fn destroy(&self)
fn set_font(&self, font: &Font)
Source§fn get_sizer(&self) -> Option<Sizer>
fn get_sizer(&self) -> Option<Sizer>
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
true if the widget is enabled, false otherwise.Source§fn get_position(&self) -> Point
fn get_position(&self) -> Point
Source§fn set_size_with_pos(&self, x: i32, y: i32, width: i32, height: i32)
fn set_size_with_pos(&self, x: i32, y: i32, width: i32, height: i32)
Source§fn set_client_size(&self, size: Size)
fn set_client_size(&self, size: Size)
Source§fn get_client_size(&self) -> Size
fn get_client_size(&self) -> Size
Source§fn get_min_size(&self) -> Size
fn get_min_size(&self) -> Size
Source§fn move_window(&self, x: i32, y: i32)
fn move_window(&self, x: i32, y: i32)
Source§fn client_to_screen(&self, pt: Point) -> Point
fn client_to_screen(&self, pt: Point) -> Point
Source§fn screen_to_client(&self, pt: Point) -> Point
fn screen_to_client(&self, pt: Point) -> Point
Source§fn get_label(&self) -> Option<String>
fn get_label(&self) -> Option<String>
None if the label is not set, cannot be converted to UTF-8, or an error occurs.Source§fn set_extra_style(&self, extra_style: ExtraWindowStyle)
fn set_extra_style(&self, extra_style: ExtraWindowStyle)
Source§fn set_extra_style_raw(&self, extra_style: i64)
fn set_extra_style_raw(&self, extra_style: i64)
Source§fn get_extra_style_raw(&self) -> i64
fn get_extra_style_raw(&self) -> i64
Source§fn has_extra_style(&self, style: ExtraWindowStyle) -> bool
fn has_extra_style(&self, style: ExtraWindowStyle) -> bool
Source§fn add_extra_style(&self, style: ExtraWindowStyle)
fn add_extra_style(&self, style: ExtraWindowStyle)
Source§fn remove_extra_style(&self, style: ExtraWindowStyle)
fn remove_extra_style(&self, style: ExtraWindowStyle)
Source§fn set_foreground_color(&self, color: Colour)
fn set_foreground_color(&self, color: Colour)
Source§fn get_foreground_color(&self) -> Colour
fn get_foreground_color(&self) -> Colour
Source§fn get_background_color(&self) -> Colour
fn get_background_color(&self) -> Colour
Source§fn can_accept_focus(&self) -> bool
fn can_accept_focus(&self) -> bool
true if this window can accept focus. Read moreSource§fn accepts_focus_from_keyboard(&self) -> bool
fn accepts_focus_from_keyboard(&self) -> bool
true if this window accepts focus from keyboard navigation. Read moreSource§fn set_can_focus(&self, can_focus: bool)
fn set_can_focus(&self, can_focus: bool)
Source§fn set_max_size(&self, size: Size)
fn set_max_size(&self, size: Size)
Source§fn get_max_size(&self) -> Size
fn get_max_size(&self) -> Size
Source§fn find_window_by_name(&self, name: &str) -> Option<Window>
fn find_window_by_name(&self, name: &str) -> Option<Window>
Source§fn get_cursor(&self) -> Option<Cursor>
fn get_cursor(&self) -> Option<Cursor>
Source§fn capture_mouse(&self)
fn capture_mouse(&self)
Source§fn release_mouse(&self)
fn release_mouse(&self)
Source§fn has_capture(&self) -> bool
fn has_capture(&self) -> bool
true if this window currently has mouse capture.Source§fn get_capture() -> Option<Window>where
Self: Sized,
fn get_capture() -> Option<Window>where
Self: Sized,
Source§fn get_text_extent(&self, text: &str) -> Size
fn get_text_extent(&self, text: &str) -> Size
Source§fn get_full_text_extent(
&self,
text: &str,
font: Option<&Font>,
) -> (Size, i32, i32)
fn get_full_text_extent( &self, text: &str, font: Option<&Font>, ) -> (Size, i32, i32)
Source§fn get_char_height(&self) -> i32
fn get_char_height(&self) -> i32
Source§fn get_char_width(&self) -> i32
fn get_char_width(&self) -> i32
Source§fn set_style(&self, style: WindowStyle)
fn set_style(&self, style: WindowStyle)
Source§fn set_style_raw(&self, style: i64)
fn set_style_raw(&self, style: i64)
Source§fn get_style_raw(&self) -> i64
fn get_style_raw(&self) -> i64
Source§fn has_style(&self, style: WindowStyle) -> bool
fn has_style(&self, style: WindowStyle) -> bool
Source§fn add_style(&self, style: WindowStyle)
fn add_style(&self, style: WindowStyle)
Source§fn remove_style(&self, style: WindowStyle)
fn remove_style(&self, style: WindowStyle)
Source§fn get_handle(&self) -> *mut c_void
fn get_handle(&self) -> *mut c_void
Source§fn move_after_in_tab_order(&self, win: &dyn WxWidget)
fn move_after_in_tab_order(&self, win: &dyn WxWidget)
Source§fn move_before_in_tab_order(&self, win: &dyn WxWidget)
fn move_before_in_tab_order(&self, win: &dyn WxWidget)
Source§fn get_next_sibling(&self) -> Option<Window>
fn get_next_sibling(&self) -> Option<Window>
Source§fn get_prev_sibling(&self) -> Option<Window>
fn get_prev_sibling(&self) -> Option<Window>
Auto Trait Implementations§
impl Freeze for DataViewListCtrl
impl RefUnwindSafe for DataViewListCtrl
impl !Send for DataViewListCtrl
impl !Sync for DataViewListCtrl
impl Unpin for DataViewListCtrl
impl UnwindSafe for DataViewListCtrl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<W> WxWidgetDowncast for W
impl<W> WxWidgetDowncast for W
Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: WxWidget + 'static,
fn downcast_ref<T>(&self) -> Option<&T>where
T: WxWidget + 'static,
Some(&T) if the widget is of type T, None otherwise.Source§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: WxWidget + 'static,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: WxWidget + 'static,
Some(&mut T) if the widget is of type T, None otherwise.