pub struct RALayer {Show 20 fields
pub name: String,
pub x: i32,
pub y: i32,
pub z: f32,
pub width: u32,
pub height: u32,
pub anchor_x: f32,
pub anchor_y: f32,
pub scale_x: f32,
pub scale_y: f32,
pub rotation: i32,
pub visible: bool,
pub opacity: f32,
pub image_path: String,
pub sub_layer_list: Vec<RALayer>,
pub animated: bool,
pub animation: Option<Animation>,
pub needs_update: bool,
pub node: Option<Node>,
pub style: Option<Style>,
/* private fields */
}Fields§
§name: String§x: i32§y: i32§z: f32§width: u32§height: u32§anchor_x: f32§anchor_y: f32§scale_x: f32§scale_y: f32§rotation: i32§visible: bool§opacity: f32§image_path: String§sub_layer_list: Vec<RALayer>§animated: bool§animation: Option<Animation>§needs_update: bool§node: Option<Node>§style: Option<Style>Implementations§
Source§impl RALayer
impl RALayer
pub fn new( name: String, w: u32, h: u32, event_handler: Option<Box<dyn EventHandler>>, ) -> Self
pub fn init_gl(&mut self)
pub fn set_color(&mut self, r: f32, g: f32, b: f32)
pub fn set_text(&mut self, text: &str)
pub fn set_image(&mut self, path: String)
pub fn set_layout(&mut self, layout: Option<Box<dyn Layout>>)
pub fn set_animation(&mut self, animation: Option<Animation>)
pub fn set_style(&mut self, style: Style)
pub fn set_visible(&mut self, visible: bool)
pub fn animate(&mut self)
pub fn select_next_sub_layer(&mut self)
pub fn select_prev_sub_layer(&mut self)
pub fn set_focus(&mut self, focused: bool)
pub fn handle_input(&mut self, key: Key)
pub fn layout_sub_layers( &mut self, parent_layer: Option<&RALayer>, stretch: &mut Option<Stretch>, )
pub fn update_layout(&mut self, stretch: &mut Option<Stretch>)
pub fn finalize_layout(&mut self)
pub fn model_matrix(&self) -> Matrix4<f32>
pub fn render( &mut self, shader_program: GLuint, parent_model_matrix: Option<&Matrix4<f32>>, projection: &Matrix4<f32>, )
pub fn add_sub_layer(&mut self, layer: RALayer)
Sourcepub fn set_position(&mut self, x: i32, y: i32)
pub fn set_position(&mut self, x: i32, y: i32)
Set position (CoreAnimation-style API)
Sourcepub fn set_bounds(&mut self, width: u32, height: u32)
pub fn set_bounds(&mut self, width: u32, height: u32)
Set bounds (CoreAnimation-style API)
Sourcepub fn set_opacity(&mut self, opacity: f32)
pub fn set_opacity(&mut self, opacity: f32)
Set opacity (CoreAnimation-style API)
Sourcepub fn set_background_color(&mut self, r: f32, g: f32, b: f32)
pub fn set_background_color(&mut self, r: f32, g: f32, b: f32)
Set background color (CoreAnimation-style API)
Sourcepub fn background_color(&self) -> (f32, f32, f32)
pub fn background_color(&self) -> (f32, f32, f32)
Get background color (CoreAnimation-style API)
Sourcepub fn add_animation(&mut self, animation: Animation, key: Option<&str>)
pub fn add_animation(&mut self, animation: Animation, key: Option<&str>)
Add an animation for a specific key (CoreAnimation-style API)
Sourcepub fn remove_all_animations(&mut self)
pub fn remove_all_animations(&mut self)
Remove all animations (CoreAnimation-style API)
Sourcepub fn remove_animation(&mut self, key: &str)
pub fn remove_animation(&mut self, key: &str)
Remove animation for a specific key (CoreAnimation-style API)
Sourcepub fn add_sublayer(&mut self, layer: RALayer)
pub fn add_sublayer(&mut self, layer: RALayer)
Add a sublayer (CoreAnimation-style API, alias for add_sub_layer)
Sourcepub fn sublayers_mut(&mut self) -> &mut Vec<RALayer>
pub fn sublayers_mut(&mut self) -> &mut Vec<RALayer>
Get mutable sublayers (CoreAnimation-style API)
Auto Trait Implementations§
impl Freeze for RALayer
impl !RefUnwindSafe for RALayer
impl !Send for RALayer
impl !Sync for RALayer
impl Unpin for RALayer
impl !UnwindSafe for RALayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more