'**Arguments:**
*parent*        (QGraphicsWidget) Optional parent widget
*border*        (QPen) Do draw a border around the view, give any
single argument accepted by :func:`mkPen <pyqtgraph.mkPen>`
*lockAspect*    (False or float) The aspect ratio to lock the view
coorinates to. (or False to allow the ratio to change)
*enableMouse*   (bool) Whether mouse can be used to scale/pan the view
*invertY*       (bool) See :func:`invertY <pyqtgraph.ViewBox.invertY>`
*invertX*       (bool) See :func:`invertX <pyqtgraph.ViewBox.invertX>`
*enableMenu*    (bool) Whether to display a context menu when
right-clicking on the ViewBox background.
*name*          (str) Used to register this ViewBox so that it appears
in the "Link axis" dropdown inside other ViewBox
context menus. This allows the user to manually link
the axes of any other view to this one.'

def __init__(self, parent=None, border=None, lockAspect=False, enableMouse=True, invertY=False, enableMenu=True, name=None, invertX=False):

    GraphicsWidget.__init__(self, parent)
    self.name = None
    self.linksBlocked = False
    self.addedItems = []
    self._matrixNeedsUpdate = True
    self._autoRangeNeedsUpdate = True
    self._lastScene = None
    self.state = {'targetRange': [[0, 1], [0, 1]], 'viewRange': [[0, 1], [0, 1]], 'yInverted': invertY, 'xInverted': invertX, 'aspectLocked': False, 'autoRange': [True, True], 'autoPan': [False, False], 'autoVisibleOnly': [False, False], 'linkedViews': [None, None], 'mouseEnabled': [enableMouse, enableMouse], 'mouseMode': (ViewBox.PanMode if getConfigOption('leftButtonPan') else ViewBox.RectMode), 'enableMenu': enableMenu, 'wheelScaleFactor': ((-1.0) / 8.0), 'background': None, 'limits': {'xLimits': [None, None], 'yLimits': [None, None], 'xRange': [None, None], 'yRange': [None, None]}}
    self._updatingRange = False
    self._itemBoundsCache = weakref.WeakKeyDictionary()
    self.locateGroup = None
    self.setFlag(self.ItemClipsChildrenToShape)
    self.setFlag(self.ItemIsFocusable, True)
    self.childGroup = ChildGroup(self)
    self.childGroup.itemsChangedListeners.append(self)
    self.background = QtGui.QGraphicsRectItem(self.rect())
    self.background.setParentItem(self)
    self.background.setZValue((-1000000.0))
    self.background.setPen(fn.mkPen(None))
    self.updateBackground()
    self.rbScaleBox = QtGui.QGraphicsRectItem(0, 0, 1, 1)
    self.rbScaleBox.setPen(fn.mkPen((255, 255, 100), width=1))
    self.rbScaleBox.setBrush(fn.mkBrush(255, 255, 0, 100))
    self.rbScaleBox.setZValue(1000000000.0)
    self.rbScaleBox.hide()
    self.addItem(self.rbScaleBox, ignoreBounds=True)
    self.target = QtGui.QGraphicsRectItem(0, 0, 1, 1)
    self.target.setPen(fn.mkPen('r'))
    self.target.setParentItem(self)
    self.target.hide()
    self.axHistory = []
    self.axHistoryPointer = (-1)
    self.setZValue((-100))
    self.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding))
    self.setAspectLocked(lockAspect)
    self.border = fn.mkPen(border)
    self.menu = ViewBoxMenu(self)
    self.register(name)
    if (name is None):
        self.updateViewLists()
