class_docstr: Viewer implementation compatible with Vue 2 Trame Applications.
class_docstr_tok: ["Viewer","implementation","compatible","with","Vue","2","Trame","Applications","."]
docstr: Create a VRow for the UI controls.
  
  Parameters
  ----------
  mode : str, default: 'trame'
      The UI view mode. Options are:
  
      * ``'trame'``: Uses a view that can switch between client and server
        rendering modes.
      * ``'server'``: Uses a view that is purely server rendering.
      * ``'client'``: Uses a view that is purely client rendering (generally
        safe without a virtual frame buffer)
  
  default_server_rendering : bool, default: True
      Whether to use server-side or client-side rendering on-start when
        using the ``'trame'`` mode.
  
  v_show : bool, optional
      Conditionally show the viewer controls.
docstr_tok: ["Create","a","VRow","for","the","UI","controls",".","Parameters","--","--","--","--","--","mode",":","str",",","default",":","'trame'","The","UI","view","mode",".","Options","are",":","*","``","'trame","'","``",":","Uses","a","view","that","can","switch","between","client","and","server","rendering","modes",".","*","``","'server","'","``",":","Uses","a","view","that","is","purely","server","rendering",".","*","``","'client","'","``",":","Uses","a","view","that","is","purely","client","rendering","(","generally","safe","without","a","virtual","frame","buffer",")","default_server_rendering",":","bool",",","default",":","True","Whether","to","use","server-side","or","client-side","rendering","on-start","when","using","the","``","'trame","'","``","mode",".","v_show",":","bool",",","optional","Conditionally","show","the","viewer","controls","."]
code: def ui_controls(
      self, mode=None, default_server_rendering=True, v_show=None
  ):
      """Create a VRow for the UI controls.
  
      Parameters
      ----------
      mode : str, default: 'trame'
          The UI view mode. Options are:
  
          * ``'trame'``: Uses a view that can switch between client and server
            rendering modes.
          * ``'server'``: Uses a view that is purely server rendering.
          * ``'client'``: Uses a view that is purely client rendering (generally
            safe without a virtual frame buffer)
  
      default_server_rendering : bool, default: True
          Whether to use server-side or client-side rendering on-start when
            using the ``'trame'`` mode.
  
      v_show : bool, optional
          Conditionally show the viewer controls.
  
      """
      with vuetify.VRow(
          v_show=v_show,
          classes="pa-0 ma-0 align-center",
      ) as row:
          server = row.server
          # Listen to state changes
          server.state.change(self.EDGES)(self.on_edge_visiblity_change)
          server.state.change(self.GRID)(self.on_grid_visiblity_change)
          server.state.change(self.OUTLINE)(
              self.on_outline_visiblity_change
          )
          server.state.change(self.AXIS)(self.on_axis_visiblity_change)
          server.state.change(self.SERVER_RENDERING)(
              self.on_rendering_mode_change
          )
          vuetify.VDivider(vertical=True, classes="mr-1")
          button(
              click=self.reset_camera,
              icon="mdi-arrow-expand-all",
              tooltip="Reset Camera",
          )
          vuetify.VDivider(vertical=True, classes="mx-1")
          button(
              click=self.view_isometric,
              icon="mdi-axis-arrow",
              tooltip="Perspective view",
          )
          button(
              click=self.view_yz,
              icon="mdi-axis-x-arrow",
              tooltip="Reset Camera X",
          )
          button(
              click=self.view_xz,
              icon="mdi-axis-y-arrow",
              tooltip="Reset Camera Y",
          )
          button(
              click=self.view_xy,
              icon="mdi-axis-z-arrow",
              tooltip="Reset Camera Z",
          )
          vuetify.VDivider(vertical=True, classes="mx-1")
          checkbox(
              model=(self.EDGES, False),
              icons=("mdi-grid", "mdi-grid-off"),
              tooltip=f"Toggle edge visibility ({{{{ {self.EDGES} ? 'on' : 'off' }}}})",
          )
          checkbox(
              model=(self.OUTLINE, False),
              icons=("mdi-cube", "mdi-cube-off"),
              tooltip=f"Toggle bounding box ({{{{ {self.OUTLINE} ? 'on' : 'off' }}}})",
          )
          checkbox(
              model=(self.GRID, False),
              icons=("mdi-ruler-square", "mdi-ruler-square"),
              tooltip=f"Toggle ruler ({{{{ {self.GRID} ? 'on' : 'off' }}}})",
          )
          checkbox(
              model=(self.AXIS, False),
              icons=("mdi-axis-arrow-info", "mdi-axis-arrow-info"),
              tooltip=f"Toggle axis ({{{{ {self.AXIS} ? 'on' : 'off' }}}})",
          )
          # Server rendering options
          if mode == "trame":
              vuetify.VDivider(vertical=True, classes="mx-1")
              checkbox(
                  model=(
                      self.SERVER_RENDERING,
                      default_server_rendering,
                  ),
                  icons=("mdi-dns", "mdi-open-in-app"),
                  tooltip=f"Toggle rendering mode ({{{{ {self.SERVER_RENDERING} ? 'remote' : 'local' }}}})",
              )
          with vuetify.VRow(
              v_show=(self.SERVER_RENDERING, default_server_rendering),
              classes="pa-0 ma-0 align-center",
          ):
  
              def attach_screenshot():
                  return server.protocol.addAttachment(
                      self.screenshot()
                  )
  
              button(
                  # Must use single-quote string for JS here
                  click=f"utils.download('screenshot.png', trigger('{server.trigger_name(attach_screenshot)}'), 'image/png')",
                  icon="mdi-file-png-box",
                  tooltip="Save screenshot",
              )
  
          def attach_export():
              return server.protocol.addAttachment(self.export())
  
          button(
              # Must use single-quote string for JS here
              click=f"utils.download('scene-export.html', trigger('{server.trigger_name(attach_export)}'), 'application/octet-stream')",
              icon="mdi-download",
              tooltip="Export scene as HTML",
          )
  
file_path: pyvista/pyvista/trame/ui/vuetify2.py
imports: from trame.ui.vuetify2 import VAppLayout
  from trame.widgets import html, vuetify
  from trame_client.ui.core import AbstractLayout
  from pyvista.trame.views import PyVistaLocalView, PyVistaRemoteLocalView, PyVistaRemoteView
  from .base_viewer import BaseViewer
label_desc: Use image node_id 3 for calling the Viewer obj's underlying member method code with example usage: obj.ui_controls(mode, default_server_rendering, v_show) and returns: server, server