Struct enamel::Element
[−]
[src]
pub struct Element<R> where
R: EventRemainder, { /* fields omitted */ }
Methods
impl<'a, R> Element<R> where
R: EventRemainder,
[src]
R: EventRemainder,
fn new(
kind: ElementKind,
anchor_point: [f32; 3],
anchor_ofs: [f32; 3],
shape: Shape2d
) -> Element<R>
kind: ElementKind,
anchor_point: [f32; 3],
anchor_ofs: [f32; 3],
shape: Shape2d
) -> Element<R>
fn mouse_event_handler(self, handler: MouseEventHandler<R>) -> Element<R>
fn keyboard_event_handler(self, handler: KeyboardEventHandler<R>) -> Element<R>
fn keyboard_event_placeholder(self) -> Element<R>
fn sub(self, sub_element: Element<R>) -> Element<R>
fn text_string(self, text_string: &str) -> Element<R>
fn text_color(self, color: (f32, f32, f32, f32)) -> Element<R>
fn text_offset(self, element_offset: (f32, f32)) -> Element<R>
fn border(self, thickness: f32, color: [f32; 4], is_visible: bool) -> Element<R>
fn vertices_raw(&self) -> &[Vertex]
fn indices_raw(&self) -> &[u16]
fn vertices(&mut self, window_dims: (u32, u32), ui_scale: f32) -> Vec<Vertex>
fn indices(&self, vertex_idz: u16) -> Vec<u16>
Returns the list of indices with 'vertex_idz' added to each one.
fn draw_text<S: Surface>(
&self,
text_system: &TextSystem,
target: &mut S,
font_texture: &FontTexture
)
&self,
text_system: &TextSystem,
target: &mut S,
font_texture: &FontTexture
)
fn set_text_width(&mut self, ts: &TextSystem, ft: &FontTexture)
fn position(&self) -> [f32; 3]
fn scale(&self) -> [f32; 3]
fn get_text(&self) -> &str
fn text(&self) -> &ElementText
fn set_mouse_focus(&mut self, has_focus: bool)
Sets whether or not the mouse cursor is hovering over this element.
fn text_matrix(&self) -> [[f32; 4]; 4]
fn has_mouse_focus(&mut self, mouse_pos: (f32, f32)) -> bool
fn set_keybd_focus(&mut self, has_focus: bool)
fn handle_mouse_input(
&mut self,
state: ElementState,
button: MouseButton,
event: Event
) -> (UiRequest, R)
&mut self,
state: ElementState,
button: MouseButton,
event: Event
) -> (UiRequest, R)
fn handle_keyboard_input(
&mut self,
key_state: ElementState,
vk_code: Option<VirtualKeyCode>,
kb_state: &KeyboardState,
event: Event
) -> (UiRequest, R)
&mut self,
key_state: ElementState,
vk_code: Option<VirtualKeyCode>,
kb_state: &KeyboardState,
event: Event
) -> (UiRequest, R)