pub struct Frame { /* private fields */ }
Expand description
Frame main data structure.
Implementations§
Source§impl Frame
Public constructors and destructor.
impl Frame
Public constructors and destructor.
Sourcepub fn new(
sid: SurfaceId,
geometry: Geometry,
mobility: Mobility,
mode: Mode,
pos: Position,
size: Size,
title: String,
) -> Self
pub fn new( sid: SurfaceId, geometry: Geometry, mobility: Mobility, mode: Mode, pos: Position, size: Size, title: String, ) -> Self
Creates new generic frame.
Sourcepub fn new_display(id: i32, area: Area, title: String) -> Self
pub fn new_display(id: i32, area: Area, title: String) -> Self
Creates new display frame.
Sourcepub fn new_workspace(title: String, geometry: Geometry, active: bool) -> Self
pub fn new_workspace(title: String, geometry: Geometry, active: bool) -> Self
Creates new workspace frame.
Sourcepub fn new_container(geometry: Geometry) -> Self
pub fn new_container(geometry: Geometry) -> Self
Creates new container frame.
Source§impl Frame
Getting iterators.
impl Frame
Getting iterators.
Sourcepub fn time_iter(&self) -> FrameTimeIterator ⓘ
pub fn time_iter(&self) -> FrameTimeIterator ⓘ
Gets iterator over children in time order.
Sourcepub fn time_rev_iter(&self) -> FrameTimeReveresedIterator
pub fn time_rev_iter(&self) -> FrameTimeReveresedIterator
Gets iterator over children in time reversed order.
Sourcepub fn space_iter(&self) -> FrameSpaceIterator ⓘ
pub fn space_iter(&self) -> FrameSpaceIterator ⓘ
Gets iterator over children in space order.
Sourcepub fn space_rev_iter(&self) -> FrameSpaceReveresedIterator
pub fn space_rev_iter(&self) -> FrameSpaceReveresedIterator
Gets iterator over children in space reversed order.
Source§impl Frame
Public getters for frame internals.
impl Frame
Public getters for frame internals.
Sourcepub fn get_geometry(&self) -> Geometry
pub fn get_geometry(&self) -> Geometry
Gets geometry.
Sourcepub fn get_mobility(&self) -> Mobility
pub fn get_mobility(&self) -> Mobility
Gets mobility.
Sourcepub fn get_position(&self) -> Position
pub fn get_position(&self) -> Position
Gets position.
Sourcepub fn is_top(&self) -> bool
pub fn is_top(&self) -> bool
Check if frame is spacial and should be ignored while normal surface management.
Sourcepub fn is_reanchorizable(&self) -> bool
pub fn is_reanchorizable(&self) -> bool
Returns true
if frame with this mode can be reanchorized, false
otherwise.
NOTE: Display must be floating. Otherwise it could be relaxed. For the same reason workspace must be anchored.
Sourcepub fn is_reorientable(&self) -> bool
pub fn is_reorientable(&self) -> bool
Check if it should be possible to reorient or resize contents of frame.
Sourcepub fn make_active(&self, active: bool)
pub fn make_active(&self, active: bool)
Activates or deactivates the frame.
This method has effect only on workspaces. Not active workspace should not be drawn on screen.
Source§impl Frame
Public setters for frame internals.
impl Frame
Public setters for frame internals.
Sourcepub fn set_plumbing_sid(&mut self, sid: SurfaceId)
pub fn set_plumbing_sid(&mut self, sid: SurfaceId)
Sets surface id without informing other parts of application.
Sourcepub fn set_plumbing_position(&mut self, pos: Position)
pub fn set_plumbing_position(&mut self, pos: Position)
Sets size without informing other parts of application.
Sourcepub fn set_plumbing_size(&mut self, size: Size)
pub fn set_plumbing_size(&mut self, size: Size)
Sets size without informing other parts of application.
Sourcepub fn set_plumbing_geometry(&mut self, geometry: Geometry)
pub fn set_plumbing_geometry(&mut self, geometry: Geometry)
Sets geometry without adjusting any sizes an positions.
Sourcepub fn set_plumbing_mobility(&mut self, mobility: Mobility)
pub fn set_plumbing_mobility(&mut self, mobility: Mobility)
Sets mobility without any checks.
Sourcepub fn set_plumbing_mode(&mut self, mode: Mode)
pub fn set_plumbing_mode(&mut self, mode: Mode)
Sets mode without any checks.
Sourcepub fn set_plumbing_position_and_size(&mut self, pos: Position, size: Size)
pub fn set_plumbing_position_and_size(&mut self, pos: Position, size: Size)
Sets position and size without informing other parts of application.
Source§impl Frame
Public getters for neighbouring frames.
impl Frame
Public getters for neighbouring frames.
Sourcepub fn has_parent(&self) -> bool
pub fn has_parent(&self) -> bool
Checks if frame has parent.
Sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Checks if frame has children.
Sourcepub fn get_parent(&self) -> Option<Frame>
pub fn get_parent(&self) -> Option<Frame>
Optionally returns frames parent.
Sourcepub fn get_first_time(&self) -> Option<Frame>
pub fn get_first_time(&self) -> Option<Frame>
Optionally returns child first in time order.
Sourcepub fn get_last_time(&self) -> Option<Frame>
pub fn get_last_time(&self) -> Option<Frame>
Optionally returns child last in time order.
Sourcepub fn get_prev_time(&self) -> Option<Frame>
pub fn get_prev_time(&self) -> Option<Frame>
Optionally returns sibling previous in time order.
Sourcepub fn get_next_time(&self) -> Option<Frame>
pub fn get_next_time(&self) -> Option<Frame>
Optionally returns sibling next in time order.
Sourcepub fn get_first_space(&self) -> Option<Frame>
pub fn get_first_space(&self) -> Option<Frame>
Optionally returns child first in space order.
Sourcepub fn get_last_space(&self) -> Option<Frame>
pub fn get_last_space(&self) -> Option<Frame>
Optionally returns child last in space order.
Sourcepub fn get_prev_space(&self) -> Option<Frame>
pub fn get_prev_space(&self) -> Option<Frame>
Optionally returns sibling previous in space order.
Sourcepub fn get_next_space(&self) -> Option<Frame>
pub fn get_next_space(&self) -> Option<Frame>
Optionally returns sibling next in space order.
Source§impl Frame
Public manipulators. Allow to change order relations between frames.
impl Frame
Public manipulators. Allow to change order relations between frames.
Sourcepub fn prepend(&mut self, frame: &mut Frame)
pub fn prepend(&mut self, frame: &mut Frame)
Prepends in spatial order and appends in time order given frame to self children.
Sourcepub fn append(&mut self, frame: &mut Frame)
pub fn append(&mut self, frame: &mut Frame)
Appends in spatial order and appends in time order given frame to self children.
Sourcepub fn prejoin(&mut self, frame: &mut Frame)
pub fn prejoin(&mut self, frame: &mut Frame)
Inserts given frame as previous in spatial order sibling of self. Frame becomes last sibling in time order.
Sourcepub fn adjoin(&mut self, frame: &mut Frame)
pub fn adjoin(&mut self, frame: &mut Frame)
Inserts given frame as next in spatial order sibling of self. Frame becomes last sibling in time order.
Source§impl Frame
Miscellaneous other methods.
impl Frame
Miscellaneous other methods.
Sourcepub fn equals_exact(&self, other: &Frame) -> bool
pub fn equals_exact(&self, other: &Frame) -> bool
Compares frame internals for check if frames are not only same but the same.
Sourcepub fn count_children(&self) -> usize
pub fn count_children(&self) -> usize
Counts children and returns their number.
Sourcepub fn count_anchored_children(&self) -> usize
pub fn count_anchored_children(&self) -> usize
Counts anchored children and returns their number.
Sourcepub fn calculate_global_position(&self) -> Position
pub fn calculate_global_position(&self) -> Position
Calculates global position of the frame.
Trait Implementations§
Source§impl Converting for Frame
impl Converting for Frame
Source§fn to_array(
&self,
relative_position: Position,
listing: &dyn SurfaceListing,
) -> Vec<SurfaceContext>
fn to_array( &self, relative_position: Position, listing: &dyn SurfaceListing, ) -> Vec<SurfaceContext>
SurfaceContext
suitable for drawing by renderer.Source§fn to_workspace_state(&self) -> WorkspaceState
fn to_workspace_state(&self) -> WorkspaceState
Source§impl Packing for Frame
impl Packing for Frame
Source§fn relax(&mut self, sa: &mut dyn SurfaceAccess)
fn relax(&mut self, sa: &mut dyn SurfaceAccess)
Source§fn homogenize(&mut self, sa: &mut dyn SurfaceAccess)
fn homogenize(&mut self, sa: &mut dyn SurfaceAccess)
Source§fn change_size(&mut self, vector: Vector, sa: &mut dyn SurfaceAccess)
fn change_size(&mut self, vector: Vector, sa: &mut dyn SurfaceAccess)
Source§fn set_size(&mut self, size: Size, sa: &mut dyn SurfaceAccess)
fn set_size(&mut self, size: Size, sa: &mut dyn SurfaceAccess)
Source§fn remove_self(&mut self, sa: &mut dyn SurfaceAccess)
fn remove_self(&mut self, sa: &mut dyn SurfaceAccess)
Source§impl Searching for Frame
impl Searching for Frame
Source§fn find(&self, matcher: &dyn Fn(&Frame) -> bool) -> Option<Frame>
fn find(&self, matcher: &dyn Fn(&Frame) -> bool) -> Option<Frame>
matcher
returned true
.Source§fn find_buildable(&self) -> Option<Frame>
fn find_buildable(&self) -> Option<Frame>
self
if self
has no surface ID set, its parent otherwise.Source§fn find_pointed(&self, point: Position) -> Frame
fn find_pointed(&self, point: Position) -> Frame
self
containing point
or the closest one if point
lies outside self
.Source§fn find_neighbouring(&self, direction: Direction) -> Option<Frame>
fn find_neighbouring(&self, direction: Direction) -> Option<Frame>
None
.Source§impl Settling for Frame
impl Settling for Frame
Source§fn settle(
&mut self,
target: &mut Frame,
area: Option<Area>,
sa: &mut dyn SurfaceAccess,
)
fn settle( &mut self, target: &mut Frame, area: Option<Area>, sa: &mut dyn SurfaceAccess, )
Source§fn resettle(
&mut self,
target: &mut Frame,
position: Option<Position>,
sa: &mut dyn SurfaceAccess,
)
fn resettle( &mut self, target: &mut Frame, position: Option<Position>, sa: &mut dyn SurfaceAccess, )
Source§fn pop_recursively(&mut self, pop: &mut Frame)
fn pop_recursively(&mut self, pop: &mut Frame)
Source§fn change_geometry(&mut self, geometry: Geometry, sa: &mut dyn SurfaceAccess)
fn change_geometry(&mut self, geometry: Geometry, sa: &mut dyn SurfaceAccess)
Source§fn ramify(&mut self, geometry: Geometry) -> Frame
fn ramify(&mut self, geometry: Geometry) -> Frame
Source§fn deramify(&mut self)
fn deramify(&mut self)
Source§fn jumpin(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
fn jumpin(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
self
on given side
of target
frame.Source§fn jump(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
fn jump(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
self
from frame layout and then places it using jumpin
method.Source§fn dock(&mut self, target: &mut Frame, size: Size, sa: &mut dyn SurfaceAccess)
fn dock(&mut self, target: &mut Frame, size: Size, sa: &mut dyn SurfaceAccess)
self
in target
frame as dock.Source§fn anchorize(&mut self, sa: &mut dyn SurfaceAccess)
fn anchorize(&mut self, sa: &mut dyn SurfaceAccess)
Source§fn deanchorize(&mut self, area: Area, sa: &mut dyn SurfaceAccess)
fn deanchorize(&mut self, area: Area, sa: &mut dyn SurfaceAccess)
Source§fn resize(
&mut self,
direction: Direction,
magnitude: isize,
sa: &mut dyn SurfaceAccess,
)
fn resize( &mut self, direction: Direction, magnitude: isize, sa: &mut dyn SurfaceAccess, )
direction
indicates the border which will be moved and magnitude
is
move distance in pixels.Source§fn move_with_contents(&mut self, vector: Vector)
fn move_with_contents(&mut self, vector: Vector)
Source§fn destroy_self(&mut self, sa: &mut dyn SurfaceAccess)
fn destroy_self(&mut self, sa: &mut dyn SurfaceAccess)
self
, relaxes old parent and destroys the frame.