Skip to content

Instantly share code, notes, and snippets.

@umurgdk
Created July 2, 2017 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umurgdk/1dc56e044309845ef0fc4c271cc98cb7 to your computer and use it in GitHub Desktop.
Save umurgdk/1dc56e044309845ef0fc4c271cc98cb7 to your computer and use it in GitHub Desktop.
pub mod container;
pub mod stack_view;
pub mod label;
pub use self::container::Container;
pub use self::stack_view::StackView;
pub use self::label::Label;
use ui::geom::*;
use ui::renderer::Renderer;
use ui::iterator::ChildIterator;
pub trait View {
fn get_children(&self) -> ChildIterator;
fn layout(&mut self);
fn draw(&self, renderer: &mut Renderer);
fn set_rect(&mut self, rect: Rect);
fn get_minimum_size(&self, container_rect: Rect) -> Size;
fn needs_layout(&self) -> bool;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment