replace Subroutine

private subroutine replace(self, new)

Show new (a switch made by the shape) in place of the shape's current nodes; compiled first if the window already runs.

Type Bound

ShapeNodes

Arguments

Type IntentOptional Attributes Name
class(ShapeNodes), intent(inout) :: self
type(c_ptr), intent(in) :: new

a switch made by the shape (null: none)


Calls

proc~~replace~~CallsGraph proc~replace ShapeNodes%replace interface~vkf_compile_node vkf_compile_node proc~replace->interface~vkf_compile_node interface~vkf_node_add_child vkf_node_add_child proc~replace->interface~vkf_node_add_child interface~vkf_node_delete vkf_node_delete proc~replace->interface~vkf_node_delete interface~vkf_node_remove_child vkf_node_remove_child proc~replace->interface~vkf_node_remove_child proc~check_status check_status proc~replace->proc~check_status

Called by

proc~~replace~~CalledByGraph proc~replace ShapeNodes%replace proc~make_axes make_axes proc~make_axes->proc~replace proc~make_cone make_cone proc~make_cone->proc~replace proc~make_grid make_grid proc~make_grid->proc~replace proc~make_plane make_plane proc~make_plane->proc~replace proc~make_polyhedron make_polyhedron proc~make_polyhedron->proc~replace proc~axes_build_contents CoordinateAxes%axes_build_contents proc~axes_build_contents->proc~make_axes proc~axes_set_color CoordinateAxes%axes_set_color proc~axes_set_color->proc~make_axes proc~cone_build_contents PolyhedralCone%cone_build_contents proc~cone_build_contents->proc~make_cone proc~cone_set_line_color PolyhedralCone%cone_set_line_color proc~cone_set_line_color->proc~make_cone proc~elliptic_set_primary_angles EllipticCone%elliptic_set_primary_angles proc~elliptic_set_primary_angles->proc~make_cone proc~grid_build_contents LatLonGrid%grid_build_contents proc~grid_build_contents->proc~make_grid proc~grid_set_color LatLonGrid%grid_set_color proc~grid_set_color->proc~make_grid proc~grid_set_parameters LatLonGrid%grid_set_parameters proc~grid_set_parameters->proc~make_grid proc~plane_build_contents RadialPlane%plane_build_contents proc~plane_build_contents->proc~make_plane proc~plane_set_line_color RadialPlane%plane_set_line_color proc~plane_set_line_color->proc~make_plane proc~plane_set_parameters RadialPlane%plane_set_parameters proc~plane_set_parameters->proc~make_plane proc~poly_build_contents Polyhedron%poly_build_contents proc~poly_build_contents->proc~make_polyhedron proc~poly_set_draw_mode Polyhedron%poly_set_draw_mode proc~poly_set_draw_mode->proc~make_polyhedron proc~poly_set_line_color Polyhedron%poly_set_line_color proc~poly_set_line_color->proc~make_polyhedron proc~poly_set_line_width Polyhedron%poly_set_line_width proc~poly_set_line_width->proc~make_polyhedron proc~poly_set_opacity Polyhedron%poly_set_opacity proc~poly_set_opacity->proc~make_polyhedron proc~rect_set_primary_angles RectangularCone%rect_set_primary_angles proc~rect_set_primary_angles->proc~make_cone proc~remove_vertex_colors Polyhedron%remove_vertex_colors proc~remove_vertex_colors->proc~make_polyhedron proc~set_axis_length CoordinateAxes%set_axis_length proc~set_axis_length->proc~make_axes proc~set_axis_width CoordinateAxes%set_axis_width proc~set_axis_width->proc~make_axes proc~set_cone_color PolyhedralCone%set_cone_color proc~set_cone_color->proc~make_cone proc~set_cone_length PolyhedralCone%set_cone_length proc~set_cone_length->proc~make_cone proc~set_draw_axes CoordinateAxes%set_draw_axes proc~set_draw_axes->proc~make_axes proc~set_draw_mode PolyhedralCone%set_draw_mode proc~set_draw_mode->proc~make_cone proc~set_edges Polyhedron%set_edges proc~set_edges->proc~make_polyhedron proc~set_face_color Polyhedron%set_face_color proc~set_face_color->proc~make_polyhedron proc~set_faces Polyhedron%set_faces proc~set_faces->proc~make_polyhedron proc~set_grid Polyhedron%set_grid proc~set_grid->proc~make_polyhedron proc~set_line_widths LatLonGrid%set_line_widths proc~set_line_widths->proc~make_grid proc~set_lit Polyhedron%set_lit proc~set_lit->proc~make_polyhedron proc~set_plane_color RadialPlane%set_plane_color proc~set_plane_color->proc~make_plane proc~set_point_color Polyhedron%set_point_color proc~set_point_color->proc~make_polyhedron proc~set_point_size Polyhedron%set_point_size proc~set_point_size->proc~make_polyhedron proc~set_smooth Polyhedron%set_smooth proc~set_smooth->proc~make_polyhedron proc~set_tick_image CoordinateAxes%set_tick_image proc~set_tick_image->proc~make_axes proc~set_tick_shape CoordinateAxes%set_tick_shape proc~set_tick_shape->proc~make_axes proc~set_tick_size CoordinateAxes%set_tick_size proc~set_tick_size->proc~make_axes proc~set_tick_spacing CoordinateAxes%set_tick_spacing proc~set_tick_spacing->proc~make_axes proc~set_triangles Polyhedron%set_triangles proc~set_triangles->proc~make_polyhedron proc~set_two_sided Polyhedron%set_two_sided proc~set_two_sided->proc~make_polyhedron proc~set_vertex_angles PolyhedralCone%set_vertex_angles proc~set_vertex_angles->proc~make_cone proc~set_vertex_colors Polyhedron%set_vertex_colors proc~set_vertex_colors->proc~make_polyhedron proc~set_vertices Polyhedron%set_vertices proc~set_vertices->proc~make_polyhedron

Source Code

    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