Struct droom_ui::dialog::dialog::Dialog
[−]
[src]
pub struct Dialog(_);
Dialog elements manages user interaction with the interface elements. For any interface element to be shown, it must be encapsulated in a dialog.
See the IUP Dialog Documentation.
Methods
impl Dialog
[src]
fn new<E: Element>(child: E) -> Dialog
Creates a dialog with a child element.
fn new_empty() -> Dialog
Creates a dialog with no elements.
Trait Implementations
impl Element for Dialog
[src]
fn raw(&self) -> *mut Ihandle
Gets the raw IUP handle associated with this element.
unsafe fn from_raw_unchecked(ih: *mut Ihandle) -> Self
Constructs an Element from a raw IUP handle. Read more
unsafe fn target_classname() -> &'static str
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>
Constructs a specialized Element object from a general Handle if they are compatible.
fn from_name<S: Into<String>>(name: S) -> Option<Handle>
Constructs from a name associated with a element handle (with Element::add_handle_name
or LED).
fn from_raw(ih: *mut Ihandle) -> Self
Constructs an Element from a raw IUP handle. Read more
unsafe fn classname(&self) -> &CStr
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)
Destroys an interface element and all its children. Read more
fn does_attrib_exist(&self, cname: &CString) -> bool
Checks if a specific attribute exists in the element.
fn attribs(&self) -> Vec<String>
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>
Sets an interface element attribute. Read more
fn attrib<S: Into<String>>(&self, name: S) -> Option<String>
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>
Sets a raw interface element attribute. Read more
fn attrib_data<S1>(&mut self, name: S1) -> *mut c_void where 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
Associates a element with an attribute. Read more
fn attrib_handle<S1>(&mut self, name: S1) -> Option<Handle> where S1: Into<String>
Gets the handle associated with an attribute.
fn clear_attrib<S: Into<String>>(&mut self, name: S) -> Self
Clears the value associated with an attribute and use the default value.
fn reset_attrib<S: Into<String>>(&mut self, name: S) -> Self
Removes an attribute from element and its children if the attrib is inheritable. Read more
fn handle_name(&self) -> Option<String>
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>
Associates a handle name with an interface element. Read more
fn clear_handle_name<S: Into<String>>(name: S) -> Option<Handle>
Clears the handle name association on the specified name. Read more
impl Debug for Dialog
[src]
impl Copy for Dialog
[src]
impl Clone for Dialog
[src]
fn clone(&self) -> Dialog
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl DestroyCb for Dialog
[src]
fn set_destroy_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_destroy_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl Widget for Dialog
[src]
fn map(&mut self) -> Result<Self, Self>
Creates (maps) the native interface objects corresponding to the given IUP interface elements. Read more
fn unmap(&mut self)
Unmap the element from the native system. It will also unmap all its children. Read more
fn show(&mut self) -> Result<(), String>
Shows an interfance element. Read more
fn hide(&mut self) -> Self
Hides an interface element. Read more
impl Node for Dialog
[src]
fn detach(&mut self) -> Self
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
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>
Returns the parent of a element.
fn brother(&self) -> Option<Handle>
Returns the brother of an element.
fn dialog(&self) -> Option<Handle>
Returns the handle of the dialog that contains that interface element. Read more
fn dialog_child<S: Into<String>>(&self, name: S) -> Option<Handle>
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)
Updates the size and layout of all controls in the same dialog. Read more
fn refresh_children(&mut self)
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)
Mark the element to be redraw when the control returns to the system.
fn update_children(&self)
Mark the element children to be redraw when the control returns to the system.
fn redraw(&self, also_redraw_children: bool)
Force the element and its children to be redraw immediately.
impl Container for Dialog
[src]
fn append<E: Node>(&mut self, new_child: E) -> Result<Handle, E>
Inserts an interface element at the end of the container, after the last element on it. Read more
fn insert<E1, E2>(&mut self,
ref_child: &E1,
new_child: E2)
-> Result<Handle, E2> where E1: Node, E2: Node
ref_child: &E1,
new_child: E2)
-> Result<Handle, E2> where E1: Node, E2: Node
Inserts an interface element before another child of the container. Read more
fn child(&self, pos: usize) -> Option<Handle>
Returns the a child of the element given its position. Read more
fn child_pos<E: Node>(&self, child: &E) -> Option<usize>
Returns the position of a child of the given control. Read more
fn child_count(&self) -> usize
Returns the number of children of the given element.
impl DialogElement for Dialog
[src]
fn showxy(&mut self, x: DialogPos, y: DialogPos) -> Result<(), String>
Displays a dialog in a given position on the screen. Read more
fn popup(&mut self, x: DialogPos, y: DialogPos) -> Result<Self, Self>
Shows a dialog or menu and restricts user interaction only to the specified element. Read more
impl MapCb for Dialog
[src]
fn set_map_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_map_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl UnmapCb for Dialog
[src]
fn set_unmap_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_unmap_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl GetFocusCb for Dialog
[src]
fn set_getfocus_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_getfocus_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl KillFocusCb for Dialog
[src]
fn set_killfocus_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_killfocus_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl EnterWindowCb for Dialog
[src]
fn set_enterwindow_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_enterwindow_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl LeaveWindowCb for Dialog
[src]
fn set_leavewindow_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_leavewindow_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl HelpCb for Dialog
[src]
fn set_help_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_help_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl CloseCb for Dialog
[src]
Called right before the dialog is closed.
fn set_move_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_move_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl DropFilesCb for Dialog
[src]
Action generated when one or more files are dropped in the dialog.
fn set_dropfiles_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, PathBuf, usize, i32, i32)>
fn remove_dropfiles_cb(&mut self)
-> Option<Box<Callback<(Self, PathBuf, usize, i32, i32)>>>
-> Option<Box<Callback<(Self, PathBuf, usize, i32, i32)>>>
impl MoveCb for Dialog
[src]
Called after the dialog was moved on screen.
The coordinates are the same as the SCREENPOSITION attribute.
fn set_move_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, i32, i32)>
fn remove_move_cb(&mut self) -> Option<Box<Callback<(Self, i32, i32)>>>
impl ResizeCb for Dialog
[src]
Action generated when the dialog size is changed.
This action is also generated when the dialog is mapped, after the map and before the show.
If returns CallbackReturn::Ignore
the dialog layout is not recalculated.
fn set_move_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, i32, i32)>
fn remove_move_cb(&mut self) -> Option<Box<Callback<(Self, i32, i32)>>>
impl CopyDataCb for Dialog
[src]
See the CopyDataCb
documentation.
fn set_copydata_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, String)>
fn remove_copydata_cb(&mut self) -> Option<Box<Callback<(Self, String)>>>
impl MdiActivateCb for Dialog
[src]
See the MdiActivateCb
documentation.
fn set_mdiactivate_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self,)>
fn remove_mdiactivate_cb(&mut self) -> Option<Box<Callback<(Self,)>>>
impl ShowCb for Dialog
[src]
See the ShowCb
documentation.
fn set_move_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, ShowState)>
fn remove_move_cb(&mut self) -> Option<Box<Callback<(Self, ShowState)>>>
impl TrayClickCb for Dialog
[src]
See the TrayClickCb
documentation.
fn set_trayclick_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, MouseButton, MouseButtonState, bool)>
fn remove_trayclick_cb(&mut self)
-> Option<Box<Callback<(Self, MouseButton, MouseButtonState, bool)>>>
-> Option<Box<Callback<(Self, MouseButton, MouseButtonState, bool)>>>