WIP: start on Select
This commit is contained in:
@@ -7,6 +7,7 @@ mod test;
|
||||
pub use assets::*;
|
||||
pub mod elements;
|
||||
pub mod font_cache;
|
||||
pub mod views;
|
||||
pub use font_cache::FontCache;
|
||||
mod clipboard;
|
||||
pub use clipboard::ClipboardItem;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
mod select;
|
||||
|
||||
pub use select::*;
|
||||
@@ -0,0 +1,24 @@
|
||||
use crate::{elements::*, Entity, RenderContext, View};
|
||||
use std::ops::Range;
|
||||
|
||||
pub struct Select {
|
||||
selected_ix: Option<usize>,
|
||||
render_selected_element: Box<dyn FnMut()>,
|
||||
render_elements: Box<dyn FnMut(Range<usize>, &mut RenderContext<Self>)>,
|
||||
}
|
||||
|
||||
pub enum Event {}
|
||||
|
||||
impl Entity for Select {
|
||||
type Event = Event;
|
||||
}
|
||||
|
||||
impl View for Select {
|
||||
fn ui_name() -> &'static str {
|
||||
"Select"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user