pub( crate ) mod private
{
use crate::*;
#[ allow( dead_code ) ]
#[ derive( Debug, Clone ) ]
pub struct RectChanger
{
pub( crate ) id : Id,
pub( crate ) draw : DrawChanger,
}
impl RectChanger
{
#[ inline ]
pub fn _new( draw : DrawChanger ) -> Self
{
let id = Id::new::< Self >();
let change = RectChange::new( id );
let mut result = Self{ id, draw };
change.add_to( &mut result );
result
}
#[ inline ]
pub fn region( mut self, left_top : X2< f32 >, right_bottom : X2< f32 > ) -> Self
{
let change = RectChange::new( self.id() ).region( left_top, right_bottom );
self.change_add( change );
self
}
#[ inline ]
pub fn draw( self ) -> DrawChanger
{
self.draw
}
#[ inline ]
pub fn context( self ) -> ContextChanger
{
self.draw.context_changer
}
}
impl ChangerInterface for RectChanger
{
type Parent = DrawChanger;
type Root = ContextChanger;
fn context( self ) -> Self::Root
{
self.draw.context_changer
}
fn parent( &mut self ) -> &mut Self::Parent
{
&mut self.draw
}
fn end( self ) -> Self::Parent
{
self.draw
}
}
impl HasIdInterface for RectChanger
{
#[ inline ]
fn id( &self ) -> Id
{
self.draw.id()
}
}
}
pub mod protected
{
pub use super::orphan::*;
}
pub use protected::*;
pub mod orphan
{
pub use super::
{
exposed::*,
};
}
pub mod exposed
{
pub use super::
{
prelude::*,
private::RectChanger,
};
}
pub use exposed::*;
pub mod prelude
{
pub use super::private::
{
};
}