Struct iup::element::Handle [] [src]

pub struct Handle(_);

An object that can wrap any IUP element.

The handle also provides implementation for traits that mayn't be implemented for the contained element, so be careful when using it.

Methods

impl Handle

fn from_named<S: Into<String>>(name: S) -> Option<Handle>

Constructs from a name associated with a element handle (with Element::add_handle_name or LED).

fn try_downcast<E: Element>(self) -> Result<E, Handle>

Converts this handle object into a element object if they are compatible.

Trait Implementations

impl Element for Handle

fn raw(&self) -> *mut Ihandle

unsafe fn from_raw_unchecked(ih: *mut Ihandle) -> Self

unsafe fn target_classname() -> &'static str

fn from_handle(handle: Handle) -> Result<Self, Handle>

fn from_name<S: Into<String>>(name: S) -> Option<Handle>

fn from_raw(ih: *mut Ihandle) -> Self

unsafe fn classname(&self) -> &CStr

fn destroy(self)

fn does_attrib_exist(&self, cname: &CString) -> bool

fn attribs(&self) -> Vec<String>

fn set_attrib<S1, S2>(&mut self, name: S1, value: S2) -> Self where S1: Into<String>, S2: Into<String>

fn attrib<S: Into<String>>(&self, name: S) -> Option<String>

fn set_attrib_data<S1>(&mut self, name: S1, data: *const c_void) -> Self where S1: Into<String>

fn attrib_data<S1>(&mut self, name: S1) -> *mut c_void where S1: Into<String>

fn set_attrib_handle<S1, E>(&mut self, name: S1, elem: E) -> Self where S1: Into<String>, E: Element

fn attrib_handle<S1>(&mut self, name: S1) -> Option<Handle> where S1: Into<String>

fn clear_attrib<S: Into<String>>(&mut self, name: S) -> Self

fn reset_attrib<S: Into<String>>(&mut self, name: S) -> Self

fn handle_name(&self) -> Option<String>

fn add_handle_name<S: Into<String>>(&self, name: S) -> Option<Handle>

fn clear_handle_name<S: Into<String>>(name: S) -> Option<Handle>

impl Debug for Handle

fn fmt(&self, fmt: &mut Formatter) -> Result

impl Copy for Handle

impl Clone for Handle

fn clone(&self) -> Handle

fn clone_from(&mut self, source: &Self)

impl DestroyCb for Handle

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 Container for Handle

Note: The wrapped element may not support Container.

fn append<E: Node>(&mut self, new_child: E) -> Result<Handle, E>

fn insert<E1, E2>(&mut self, ref_child: &E1, new_child: E2) -> Result<Handle, E2> where E1: Node, E2: Node

fn child(&self, pos: usize) -> Option<Handle>

fn child_pos<E: Node>(&self, child: &E) -> Option<usize>

fn child_count(&self) -> usize

impl Node for Handle

Note: The wrapped element may not support Node.

fn detach(&mut self) -> Self

fn reparent<E1, E2>(&mut self, new_parent: E1, ref_child: E2) -> Result<Self, Self> where E1: Container, E2: Node

fn parent(&self) -> Option<Handle>

fn brother(&self) -> Option<Handle>

fn dialog(&self) -> Option<Handle>

fn dialog_child<S: Into<String>>(&self, name: S) -> Option<Handle>

fn refresh(&mut self)

fn refresh_children(&mut self)

fn update(&self)

fn update_children(&self)

fn redraw(&self, also_redraw_children: bool)

impl Widget for Handle

Note: The wrapped element may not support Widget.

fn map(&mut self) -> Result<Self, Self>

fn unmap(&mut self)

fn show(&mut self) -> Result<(), String>

fn hide(&mut self) -> Self

impl MapCb for Handle

Note: The wrapped element may not support MapCb.

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 Handle

Note: The wrapped element may not support UnmapCb.

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 Handle

Note: The wrapped element may not support GetFocusCb.

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 Handle

Note: The wrapped element may not support KillFocusCb.

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 Handle

Note: The wrapped element may not support EnterWindowCb.

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 Handle

Note: The wrapped element may not support LeaveWindowCb.

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 Handle

Note: The wrapped element may not support HelpCb.

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 From<Dialog> for Handle

fn from(elem: Dialog) -> Handle

impl From<MessageDlg> for Handle

fn from(elem: MessageDlg) -> Handle

impl From<FileDlg> for Handle

fn from(elem: FileDlg) -> Handle

impl From<VBox> for Handle

fn from(elem: VBox) -> Handle

impl From<HBox> for Handle

fn from(elem: HBox) -> Handle

impl From<Radio> for Handle

fn from(elem: Radio) -> Handle

impl From<Fill> for Handle

fn from(elem: Fill) -> Handle

impl From<Label> for Handle

fn from(elem: Label) -> Handle

impl From<Text> for Handle

fn from(elem: Text) -> Handle

impl From<Button> for Handle

fn from(elem: Button) -> Handle

impl From<ProgressBar> for Handle

fn from(elem: ProgressBar) -> Handle

impl From<Toggle> for Handle

fn from(elem: Toggle) -> Handle

impl From<Frame> for Handle

fn from(elem: Frame) -> Handle

impl From<List> for Handle

fn from(elem: List) -> Handle

impl From<Image> for Handle

fn from(elem: Image) -> Handle

impl From<ImageRgb> for Handle

fn from(elem: ImageRgb) -> Handle

impl From<ImageRgba> for Handle

fn from(elem: ImageRgba) -> Handle

impl From<Timer> for Handle

fn from(elem: Timer) -> Handle

impl From<Clipboard> for Handle

fn from(elem: Clipboard) -> Handle