Show new (a switch made by the shape) in place of the shape's current
nodes; compiled first if the window already runs.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ShapeNodes), | intent(inout) | :: | self | |||
| type(c_ptr), | intent(in) | :: | new |
a switch made by the shape (null: none) |
subroutine replace(self, new) class(ShapeNodes), intent(inout) :: self type(c_ptr), intent(in) :: new !! a switch made by the shape (null: none) if (.not. c_associated(self%contents)) then ! not shown yet if (c_associated(new)) call vkf_node_delete(new) return end if if (c_associated(self%shape)) then call check_status(vkf_node_remove_child(self%contents, self%shape), 'shapes') call vkf_node_delete(self%shape) end if self%shape = new if (.not. c_associated(new)) return if (self%shown) call check_status(vkf_compile_node(new), 'shapes') call check_status(vkf_node_add_child(self%contents, new), 'shapes') end subroutine replace