Move DummyView to views module

This commit is contained in:
Alexandre Bury 2016-07-29 23:36:40 -07:00
parent fb10e58188
commit 24e4e41a85
4 changed files with 15 additions and 11 deletions

View File

@ -121,15 +121,6 @@ pub trait View {
} }
} }
/// Dummy view.
///
/// Doesn't print anything. Minimal size is (1,1).
pub struct DummyView;
impl View for DummyView {
fn draw(&self, _: &Printer) {}
}
/// Cache around a one-dimensional layout result. /// Cache around a one-dimensional layout result.
/// ///

View File

@ -7,8 +7,8 @@ use direction::Direction;
use align::*; use align::*;
use event::*; use event::*;
use theme::ColorStyle; use theme::ColorStyle;
use view::{DummyView, Selector, View}; use view::{Selector, View};
use views::{Button, SizedView, TextView}; use views::{Button, DummyView, SizedView, TextView};
use vec::{Vec2, Vec4}; use vec::{Vec2, Vec4};
use Printer; use Printer;

11
src/views/dummy.rs Normal file
View File

@ -0,0 +1,11 @@
use Printer;
use view::View;
/// Dummy view.
///
/// Doesn't print anything. Minimal size is (1,1).
pub struct DummyView;
impl View for DummyView {
fn draw(&self, _: &Printer) {}
}

View File

@ -4,6 +4,7 @@ mod box_view;
mod button; mod button;
mod checkbox; mod checkbox;
mod dialog; mod dialog;
mod dummy;
mod edit_view; mod edit_view;
mod full_view; mod full_view;
mod id_view; mod id_view;
@ -26,6 +27,7 @@ pub use self::box_view::BoxView;
pub use self::button::Button; pub use self::button::Button;
pub use self::checkbox::Checkbox; pub use self::checkbox::Checkbox;
pub use self::dialog::Dialog; pub use self::dialog::Dialog;
pub use self::dummy::DummyView;
pub use self::edit_view::EditView; pub use self::edit_view::EditView;
pub use self::full_view::FullView; pub use self::full_view::FullView;
pub use self::key_event_view::KeyEventView; pub use self::key_event_view::KeyEventView;