autocommit 2022-04-23 00:55:20 CEST
This commit is contained in:
parent
436f383cd6
commit
e3b3d848c3
32 changed files with 1773 additions and 2451 deletions
17
src/tree/containing.rs
Normal file
17
src/tree/containing.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use {
|
||||
crate::tree::{Node, ToplevelNode},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
pub trait ContainingNode: Node {
|
||||
fn cnode_as_node(&self) -> &dyn Node;
|
||||
fn cnode_into_node(self: Rc<Self>) -> Rc<dyn Node>;
|
||||
fn cnode_into_dyn(self: Rc<Self>) -> Rc<dyn ContainingNode>;
|
||||
|
||||
fn cnode_replace_child(self: Rc<Self>, old: &dyn Node, new: Rc<dyn ToplevelNode>);
|
||||
fn cnode_remove_child(self: Rc<Self>, child: &dyn Node) {
|
||||
self.cnode_remove_child2(child, false);
|
||||
}
|
||||
fn cnode_remove_child2(self: Rc<Self>, child: &dyn Node, preserve_focus: bool);
|
||||
fn cnode_accepts_child(&self, node: &dyn Node) -> bool;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue