.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.mixins.inspection

.. highlight:: python



.. _wx.lib.mixins.inspection.InspectionMixin:

==========================================================================================================================================
|phoenix_title|  **wx.lib.mixins.inspection.InspectionMixin**
==========================================================================================================================================

This class is intended to be used as a mix-in with the :class:`App`.
When used it will add the ability to popup a
:class:`~lib.inspection.InspectionFrame` window
where the widget under the mouse cursor will be selected in the tree and
loaded into the shell's namespace as 'obj'.  The default key sequence to
activate the inspector is Ctrl-Alt-I (or Cmd-Alt-I on Mac) but this can be
changed via parameters to the `Init` method, or the application can call
:meth:`~lib.mixins.inspection.InspectionMixin.ShowInspectionTool` from other
event handlers if desired.

To use this class simply derive a class from :class:`App` and
:class:`InspectionMixin` and then call the
:meth:`InspectionMixin.Init` method from the app's
:meth:`AppConsole.OnInit` method.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>InspectionMixin</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.mixins.inspection.InspectionMixin_inheritance.png" alt="Inheritance diagram of InspectionMixin" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.mixins.inspection.InspectionMixin.html" title="wx.lib.mixins.inspection.InspectionMixin" alt="" coords="5,5,275,35"/> </map> 
   </p>

|


|sub_classes| Known Subclasses
==============================

:class:`wx.lib.mixins.inspection.InspectableApp`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.mixins.inspection.InspectionMixin.InitInspection`                 Make the event binding that will activate the InspectionFrame window.
:meth:`~wx.lib.mixins.inspection.InspectionMixin.ShowInspectionTool`             Show the Inspection tool, creating it if neccesary, setting it
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: InspectionMixin(object)

   This class is intended to be used as a mix-in with the :class:`App`.
   When used it will add the ability to popup a
   :class:`~lib.inspection.InspectionFrame` window
   where the widget under the mouse cursor will be selected in the tree and
   loaded into the shell's namespace as 'obj'.  The default key sequence to
   activate the inspector is Ctrl-Alt-I (or Cmd-Alt-I on Mac) but this can be
   changed via parameters to the `Init` method, or the application can call
   :meth:`~lib.mixins.inspection.InspectionMixin.ShowInspectionTool` from other
   event handlers if desired.
   
   To use this class simply derive a class from :class:`App` and
   :class:`InspectionMixin` and then call the
   :meth:`InspectionMixin.Init` method from the app's
   :meth:`AppConsole.OnInit` method.

   .. method:: InitInspection(self, pos=wx.DefaultPosition, size=wx.Size(850,700), config=None, locals=None, alt=True, cmd=True, shift=False, keyCode=ord('I'))

      Make the event binding that will activate the InspectionFrame window.
      
      :param `pos`: the control position. A value of (-1, -1) indicates a default position,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `size`: the control size. A value of (-1, -1) indicates a default size,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `config`: A :class:`Config` object to be used to store layout
          and other info to when the inspection frame is closed.
          This info will be restored the next time the inspection
          frame is used.
      :param `locals`: A dictionary of names to be added to the PyCrust
          namespace.
      :param boolean `alt`: use alt in the short cut sequence
      :param boolean `cmd`: use ctrl/cmd in the short cut sequence
      :param boolean `shift`: use shift in the short cut sequence
      :param string `keyCode`: the key code for the short cut sequence


   .. method:: ShowInspectionTool(self)

      Show the Inspection tool, creating it if neccesary, setting it
      to display the widget under the cursor.


