.. $Id$  -*- rst -*-
.. pyformex reference manual --- viewport
.. CREATED WITH py2rst.py: DO NOT EDIT

.. include:: ../defines.inc
.. include:: ../links.inc

.. _sec:ref-viewport:

:mod:`viewport` --- Interactive OpenGL Canvas embedded in a Qt4 widget.
=======================================================================

.. automodule:: viewport
   :synopsis: Interactive OpenGL Canvas embedded in a Qt4 widget.



   .. autoclass:: CursorShapeHandler


      CursorShapeHandler objects have the following methods:

      .. automethod:: setCursorShape(shape)
      .. automethod:: setCursorShapeFromFunc(func)

   .. autoclass:: CanvasMouseHandler


      CanvasMouseHandler objects have the following methods:

      .. automethod:: setMouse(button,func,mod=NONE)
      .. automethod:: resetMouse(button,mod=NONE)
      .. automethod:: getMouseFunc()

   .. autoclass:: QtCanvas


      QtCanvas objects have the following methods:

      .. automethod:: resetOptions()
      .. automethod:: setOptions(d)
      .. automethod:: setCursorShape(shape)
      .. automethod:: setCursorShapeFromFunc(func)
      .. automethod:: setMouse(button,func,mod=NONE)
      .. automethod:: resetMouse(button,mod=NONE)
      .. automethod:: getMouseFunc()
      .. automethod:: start_rectangle_zoom()
      .. automethod:: finish_rectangle_zoom()
      .. automethod:: mouse_rectangle_zoom(x,y,action)
      .. automethod:: start_selection(mode,filtr)
      .. automethod:: wait_selection()
      .. automethod:: finish_selection()
      .. automethod:: accept_selection(clear=False)
      .. automethod:: cancel_selection()
      .. automethod:: pick(mode='actor',single=False,func=None,filter=None)
      .. automethod:: pickNumbers(None)
      .. automethod:: start_drawing(mode)
      .. automethod:: wait_drawing()
      .. automethod:: finish_drawing()
      .. automethod:: accept_drawing(clear=False)
      .. automethod:: cancel_drawing()
      .. automethod:: edit_drawing(mode)
      .. automethod:: drawLinesInter(mode='line',single=False,func=None)
      .. automethod:: initializeGL()
      .. automethod:: resizeGL(w,h)
      .. automethod:: paintGL()
      .. automethod:: getSize()
      .. automethod:: dynarot(x,y,action)
      .. automethod:: dynapan(x,y,action)
      .. automethod:: dynazoom(x,y,action)
      .. automethod:: wheel_zoom(delta)
      .. automethod:: emit_done(x,y,action)
      .. automethod:: emit_cancel(x,y,action)
      .. automethod:: draw_state_rect(x,y)
      .. automethod:: mouse_pick(x,y,action)
      .. automethod:: pick_actors(store_closest=False)
      .. automethod:: pick_parts(obj_type,max_objects,store_closest=False)
      .. automethod:: pick_elements()
      .. automethod:: pick_points()
      .. automethod:: pick_edges()
      .. automethod:: pick_numbers()
      .. automethod:: draw_state_line(x,y)
      .. automethod:: mouse_draw(x,y,action)
      .. automethod:: has_modifier(clas,e,mod)
      .. automethod:: mousePressEvent(e)
      .. automethod:: mouseMoveEvent(e)
      .. automethod:: mouseReleaseEvent(e)
      .. automethod:: wheelEvent(e)
      .. automethod:: keyPressEvent(e)

   .. autoclass:: FramedGridLayout


      FramedGridLayout objects have the following methods:

      .. automethod:: addWidget()
      .. automethod:: removeWidget(w)

   .. autoclass:: MultiCanvas


      MultiCanvas objects have the following methods:

      .. automethod:: setDefaults(dict)
      .. automethod:: newView(shared=None)
      .. automethod:: addView()
      .. automethod:: setCurrent(canv)
      .. automethod:: currentView()
      .. automethod:: showWidget(w)
      .. automethod:: removeView()
      .. automethod:: updateAll()
      .. automethod:: removeAll()
      .. automethod:: addActor(actor)
      .. automethod:: printSettings()
      .. automethod:: changeLayout(nvps=None,ncols=None,nrows=None)
      .. automethod:: link(vp,to)

**Functions defined in the module viewport**

   .. autofunction:: dotpr(v,w)
   .. autofunction:: length(v)
   .. autofunction:: projection(v,w)
   .. autofunction:: modifierName(mod)
   .. autofunction:: setOpenGLFormat()
   .. autofunction:: getOpenGLContext()
   .. autofunction:: OpenGLFormat(fmt=None)
   .. autofunction:: printOpenGLContext(ctxt)

   
.. moduleauthor:: pyFormex project (http://pyformex.org)

.. End

