[−][src]Struct div::div_handle::DivHandle
A light-weight key to refer to the state necessary to manipulate a div.
This is a unique identifier that will become invalid once the div has been deleted.
Implementations
impl DivHandle
[src]
pub fn hide(&self) -> Result<(), DivError>
[src]
Hides the div and all child nodes.
The div node is removed from the DOM but it is kept in memory.
Call delete
to give up memory or call show
later to display pane again.
pub fn show(&self) -> Result<(), DivError>
[src]
Displays a div again after it has been hidden by calling hide
pub fn reposition(&self, x: u32, y: u32) -> Result<(), DivError>
[src]
Adjust the relative position of the div.
The provided parameters are taken in the original scale when initializing, taking any calls to the global div::resize() into consideration.
pub fn resize(&self, w: u32, h: u32) -> Result<(), DivError>
[src]
Adjust the size of the div.
The provided parameters are taken in the original scale when initializing, taking any calls to the global div::resize() into consideration.
pub fn reposition_and_resize(
&self,
x: u32,
y: u32,
w: u32,
h: u32
) -> Result<(), DivError>
[src]
&self,
x: u32,
y: u32,
w: u32,
h: u32
) -> Result<(), DivError>
Adjust the position and size of the div in a single call, which is slightly more efficient than calling resize and reposition separately.
The provided parameters are taken in the original scale when initializing, taking any calls to the global div::resize() into consideration.
pub fn set_css(&self, property: &str, value: &str) -> Result<(), DivError>
[src]
Set CSS property of div
pub fn add_class(&self, css_class: &str) -> Result<(), DivError>
[src]
Add a CSS class to the div
pub fn remove_class(&self, css_class: &str) -> Result<(), DivError>
[src]
Remove a CSS class to the div
pub fn delete(&mut self) -> Result<(), DivError>
[src]
Removes a div from the DOM and deletes it
pub fn parent_element(&self) -> Result<HtmlElement, DivError>
[src]
Get a reference to the DOM element associated with the div. The provided HTML when creating a new div will be the child node(s) of the returned element.
pub fn first_inner_node(&self) -> Result<Node, DivError>
[src]
Get a reference to the DOM node created by the provided HTML when creating the pane. If multiple nodes have been created, the first node is returned.
Trait Implementations
impl Clone for DivHandle
[src]
impl Copy for DivHandle
[src]
impl Debug for DivHandle
[src]
impl Eq for DivHandle
[src]
impl Hash for DivHandle
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<DivHandle> for DivHandle
[src]
impl StructuralEq for DivHandle
[src]
impl StructuralPartialEq for DivHandle
[src]
Auto Trait Implementations
impl RefUnwindSafe for DivHandle
[src]
impl Send for DivHandle
[src]
impl Sync for DivHandle
[src]
impl Unpin for DivHandle
[src]
impl UnwindSafe for DivHandle
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,