pub mod doc;
mod helpers;
mod read_mut;
mod read_ref;
mod write;
#[cfg(test)]
mod tests;
pub use doc::TuiDocAccessors;
use rdom_core::NodeId;
use crate::Result;
pub trait TuiAccessors<'a> {
fn value(&self) -> Option<String>;
fn checked(&self) -> bool;
fn indeterminate(&self) -> bool;
fn disabled(&self) -> bool;
fn read_only(&self) -> bool;
fn inert(&self) -> bool;
fn is_content_editable(&self) -> bool;
fn effective_tab_index(&self) -> Option<i32>;
fn bounding_rect(&self) -> Option<DomRect>;
fn scroll_top(&self) -> Option<i32>;
fn scroll_left(&self) -> Option<i32>;
fn scroll_width(&self) -> Option<i32>;
fn scroll_height(&self) -> Option<i32>;
fn style(&self) -> Option<crate::cssom::StyleDeclaration>;
fn input_value(&self) -> Option<String>;
fn input_type(&self) -> Option<String>;
fn input_name(&self) -> Option<String>;
fn input_placeholder(&self) -> Option<String>;
fn input_form(&self) -> Option<NodeId>;
fn textarea_value(&self) -> Option<String>;
fn textarea_name(&self) -> Option<String>;
fn textarea_form(&self) -> Option<NodeId>;
fn select_value(&self) -> Option<String>;
fn select_options(&self) -> Option<Vec<NodeId>>;
fn select_selected_options(&self) -> Option<Vec<NodeId>>;
fn select_selected_index(&self) -> Option<i32>;
fn select_form(&self) -> Option<NodeId>;
fn option_value(&self) -> Option<String>;
fn option_label(&self) -> Option<String>;
fn option_selected(&self) -> bool;
fn details_open(&self) -> bool;
fn dialog_open(&self) -> bool;
fn dialog_return_value(&self) -> Option<String>;
fn button_form(&self) -> Option<NodeId>;
fn label_html_for(&self) -> Option<String>;
fn label_control(&self) -> Option<NodeId>;
fn progress_value(&self) -> Option<f64>;
fn progress_max(&self) -> Option<f64>;
fn meter_value(&self) -> Option<f64>;
fn meter_min(&self) -> Option<f64>;
fn meter_max(&self) -> Option<f64>;
fn meter_low(&self) -> Option<f64>;
fn meter_high(&self) -> Option<f64>;
fn meter_optimum(&self) -> Option<f64>;
fn form_elements(&self) -> Option<Vec<NodeId>>;
fn form_length(&self) -> Option<usize>;
}
pub type DomRect = crate::layout::LayoutRect;
pub trait TuiAccessorsMut<'a> {
fn set_value(&mut self, value: impl Into<String>) -> Result<()>;
fn set_checked(&mut self, value: bool) -> Result<()>;
fn set_indeterminate(&mut self, value: bool) -> Result<()>;
fn set_disabled(&mut self, value: bool) -> Result<()>;
fn set_read_only(&mut self, value: bool) -> Result<()>;
fn set_inert(&mut self, value: bool) -> Result<()>;
fn focus(&mut self);
fn blur(&mut self);
fn click(&mut self);
fn set_scroll_top(&mut self, value: i32) -> Result<()>;
fn set_scroll_left(&mut self, value: i32) -> Result<()>;
fn scroll_to(&mut self, x: i32, y: i32) -> Result<()>;
fn scroll_by(&mut self, dx: i32, dy: i32) -> Result<()>;
fn scroll_into_view(&mut self) -> Result<()>;
fn style_mut(&mut self) -> Option<crate::cssom::StyleDeclarationMut<'_>>;
fn set_details_open(&mut self, value: bool) -> Result<()>;
fn set_dialog_return_value(&mut self, value: impl Into<String>) -> Result<()>;
fn form_request_submit(&mut self, submitter: Option<NodeId>) -> Result<bool>;
}