Inserts a new view into the specified workspace under a given parent view. # Parameters: - `parent_view_id`: The ID of the parent view under which the new view will be added. - `index`: Optional. If provided, the new view will be inserted at the specified position among the parent view's children. If `None`, the new view will be added at the end of the children list. # Behavior: - When `index` i
(&mut self, view: View, index: Option<u32>, uid: i64)
| 1138 | /// When a view is inserted, its id is the[`Collab`] object id. |
| 1139 | /// |
| 1140 | pub fn insert_view(&mut self, view: View, index: Option<u32>, uid: i64) { |
| 1141 | let mut txn = self.collab.transact_mut(); |
| 1142 | self.body.views.insert(&mut txn, view, index, uid); |
| 1143 | } |
| 1144 | |
| 1145 | /// Insert a list of views at the end of its parent view |
| 1146 | pub fn insert_views(&mut self, views: Vec<View>, uid: i64) { |