Struct dui::control::list::List
[−]
[src]
pub struct List(_);
See the [IUP List Documentation][1]. [1]: http://webserver2.tecgraf.puc-rio.br/iup/en/elem/iuplist.html
Methods
impl List
[src]
pub fn new() -> List
[src]
Creates an interface element that displays a list of items.
pub fn new_dropdown() -> List
[src]
Creates an interface element that displays a list of items in a dropdown.
pub fn new_editbox() -> List
[src]
Creates an interface element that displays a list of items with a edit box for text input.
pub fn set_items<A>(&mut self, items: A) -> Self where
A: AsRef<[String]>,
[src]
A: AsRef<[String]>,
Sets the list of items.
pub fn item<A>(&self, id: u32) -> Option<String>
[src]
pub fn clear(&mut self) -> Self
[src]
Clears the list of items. Ignored if called before being mapped.
Trait Implementations
impl Element for List
[src]
fn raw(&self) -> *mut Ihandle
[src]
Gets the raw IUP handle associated with this element.
unsafe fn from_raw_unchecked(ih: *mut Ihandle) -> Self
[src]
Constructs an Element from a raw IUP handle. Read more
unsafe fn target_classname() -> &'static str
[src]
Gets the [class name][1] the derived object should be targeting. [1]: http://webserver2.tecgraf.puc-rio.br/iup/en/func/iupgetclassname.html Read more
fn from_handle(handle: Handle) -> Result<Self, Handle>
[src]
Constructs a specialized Element object from a general Handle if they are compatible.
fn from_name<S: Into<String>>(name: S) -> Option<Handle>
[src]
Constructs from a name associated with a element handle (with Element::add_handle_name
or LED).
fn from_raw(ih: *mut Ihandle) -> Self
[src]
Constructs an Element from a raw IUP handle. Read more
unsafe fn classname(&self) -> &CStr
[src]
Gets the [class name][1] of this element. [1]: http://webserver2.tecgraf.puc-rio.br/iup/en/func/iupgetclassname.html Read more
fn destroy(self)
[src]
Destroys an interface element and all its children. Read more
fn does_attrib_exist(&self, cname: &CString) -> bool
[src]
Checks if a specific attribute exists in the element.
fn attribs(&self) -> Vec<String>
[src]
Returns the names of all attributes of an element that are set in its internal hash table only. Read more
fn set_attrib<S1, S2>(&mut self, name: S1, value: S2) -> Self where
S1: Into<String>,
S2: Into<String>,
[src]
S1: Into<String>,
S2: Into<String>,
Sets an interface element attribute. Read more
fn attrib<S: Into<String>>(&self, name: S) -> Option<String>
[src]
Gets an interface element attribute. Read more
fn set_attrib_data<S1>(&mut self, name: S1, data: *const c_void) -> Self where
S1: Into<String>,
[src]
S1: Into<String>,
Sets a raw interface element attribute. Read more
fn attrib_data<S1>(&mut self, name: S1) -> *mut c_void where
S1: Into<String>,
[src]
S1: Into<String>,
Gets a raw interface element attribute.
fn set_attrib_handle<S1, E>(&mut self, name: S1, elem: E) -> Self where
S1: Into<String>,
E: Element,
[src]
S1: Into<String>,
E: Element,
Associates a element with an attribute. Read more
fn attrib_handle<S1>(&mut self, name: S1) -> Option<Handle> where
S1: Into<String>,
[src]
S1: Into<String>,
Gets the handle associated with an attribute.
fn clear_attrib<S: Into<String>>(&mut self, name: S) -> Self
[src]
Clears the value associated with an attribute and use the default value.
fn reset_attrib<S: Into<String>>(&mut self, name: S) -> Self
[src]
Removes an attribute from element and its children if the attrib is inheritable. Read more
fn handle_name(&self) -> Option<String>
[src]
Returns the identifier of an interface element that has an associated handle name using Element::add_handle_name
or using LED. Read more
fn add_handle_name<S: Into<String>>(&self, name: S) -> Option<Handle>
[src]
Associates a handle name with an interface element. Read more
fn clear_handle_name<S: Into<String>>(name: S) -> Option<Handle>
[src]
Clears the handle name association on the specified name. Read more
impl Debug for List
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for List
[src]
impl Clone for List
[src]
fn clone(&self) -> List
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl DestroyCb for List
[src]
fn set_destroy_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_destroy_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl From<List> for Handle
[src]
impl Widget for List
[src]
fn map(&mut self) -> Result<Self, Self>
[src]
Creates (maps) the native interface objects corresponding to the given IUP interface elements. Read more
fn unmap(&mut self)
[src]
Unmap the element from the native system. It will also unmap all its children. Read more
fn show(&mut self) -> Result<(), String>
[src]
Shows an interfance element. Read more
fn hide(&mut self) -> Self
[src]
Hides an interface element. Read more
impl Node for List
[src]
fn detach(&mut self) -> Self
[src]
Detaches an interface element from its parent. Read more
fn reparent<E1, E2>(
&mut self,
new_parent: E1,
ref_child: E2
) -> Result<Self, Self> where
E1: Container,
E2: Node,
[src]
&mut self,
new_parent: E1,
ref_child: E2
) -> Result<Self, Self> where
E1: Container,
E2: Node,
Moves an interface element from one position in the hierarchy tree to another. Read more
fn parent(&self) -> Option<Handle>
[src]
Returns the parent of a element.
fn brother(&self) -> Option<Handle>
[src]
Returns the brother of an element.
fn dialog(&self) -> Option<Handle>
[src]
Returns the handle of the dialog that contains that interface element. Read more
fn dialog_child<S: Into<String>>(&self, name: S) -> Option<Handle>
[src]
Returns the identifier of the child element that has the NAME attribute equals to the given value on the same dialog hierarchy. Read more
fn refresh(&mut self)
[src]
Updates the size and layout of all controls in the same dialog. Read more
fn refresh_children(&mut self)
[src]
Updates the size and layout of controls after changing size attributes, or attributes that affect the size of the control. Read more
fn update(&self)
[src]
Mark the element to be redraw when the control returns to the system.
fn update_children(&self)
[src]
Mark the element children to be redraw when the control returns to the system.
fn redraw(&self, also_redraw_children: bool)
[src]
Force the element and its children to be redraw immediately.
impl ConvertXYToPos for List
[src]
Returns a list item position from it's xy coordinate.
fn convert_xy_to_pos(&self, x: i32, y: i32) -> Option<i32>
[src]
Converts a x,y coordinate in an item position in the container. Read more
impl MapCb for List
[src]
fn set_map_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_map_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl UnmapCb for List
[src]
fn set_unmap_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_unmap_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl GetFocusCb for List
[src]
fn set_getfocus_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_getfocus_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl KillFocusCb for List
[src]
fn set_killfocus_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_killfocus_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl EnterWindowCb for List
[src]
fn set_enterwindow_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_enterwindow_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl LeaveWindowCb for List
[src]
fn set_leavewindow_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_leavewindow_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl HelpCb for List
[src]
fn set_help_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_help_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl ButtonCb for List
[src]
Action generated when any mouse button is pressed or released inside the list.
Called only when DROPDOWN=NO. If the list has an editbox the message is called when cursor is at the listbox only (ignored at the editbox).
Use convert_xy_to_pos
to convert (x,y) coordinates in item position.
impl CaretCb for List
[src]
Action generated when the caret/cursor position is changed. Valid only when EDITBOX=YES.
For lists lin
(2nd param) is always 1, and pos (3rd param) is always col-1.
fn set_caret_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self, i32, i32, usize)>,
[src]
F: Callback<(Self, i32, i32, usize)>,
fn remove_caret_cb(&mut self) -> Option<Box<Callback<(Self, i32, i32, usize)>>>
[src]
impl DropFilesCb for List
[src]
Action generated when one or more files are dropped in the element.
fn set_dropfiles_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self, PathBuf, usize, i32, i32)>,
[src]
F: Callback<(Self, PathBuf, usize, i32, i32)>,
fn remove_dropfiles_cb(
&mut self
) -> Option<Box<Callback<(Self, PathBuf, usize, i32, i32)>>>
[src]
&mut self
) -> Option<Box<Callback<(Self, PathBuf, usize, i32, i32)>>>
impl MotionCb for List
[src]
Action generated when the mouse is moved over the list. Called only when DROPDOWN=NO.
If the list has an editbox the message is called when cursor is at the listbox only (ignored at the editbox).
Use convert_xy_to_pos
to convert (x,y) coordinates in item position.
fn set_motion_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self, i32, i32, KeyStates)>,
[src]
F: Callback<(Self, i32, i32, KeyStates)>,
fn remove_motion_cb(
&mut self
) -> Option<Box<Callback<(Self, i32, i32, KeyStates)>>>
[src]
&mut self
) -> Option<Box<Callback<(Self, i32, i32, KeyStates)>>>
impl ValueChangedCb for List
[src]
Called after the value was interactively changed by the user. Called when the selection is changed or when the text is edited.
fn set_valuechanged_cb<F>(&mut self, cb: F) -> Self where
F: Callback<(Self,)>,
[src]
F: Callback<(Self,)>,
fn remove_valuechanged_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
[src]
impl ListAction for List
[src]
See the ListAction
documentation.
fn set_action<F>(&mut self, cb: F) -> Self where
F: Callback<(Self, String, u32, ListItemState)>,
[src]
F: Callback<(Self, String, u32, ListItemState)>,
fn remove_action(
&mut self
) -> Option<Box<Callback<(Self, String, u32, ListItemState)>>>
[src]
&mut self
) -> Option<Box<Callback<(Self, String, u32, ListItemState)>>>