pyface-7.4.0/ 0000755 0000765 0000024 00000000000 14176460551 013743 5 ustar cwebster staff 0000000 0000000 pyface-7.4.0/PKG-INFO 0000644 0000765 0000024 00000007254 14176460551 015050 0 ustar cwebster staff 0000000 0000000 Metadata-Version: 2.1
Name: pyface
Version: 7.4.0
Summary: traits-capable windowing framework
Home-page: http://docs.enthought.com/pyface
Author: David C. Morrill, et al.
Author-email: dmorrill@enthought.com
Maintainer: ETS Developers
Maintainer-email: enthought-dev@enthought.com
License: BSD
Download-URL: https://github.com/enthought/pyface
Description: ==========================================
Pyface: Traits-capable Windowing Framework
==========================================
The Pyface project contains a toolkit-independent GUI abstraction layer,
which is used to support the "visualization" features of the Traits package.
Thus, you can write code in terms of the Traits API (views, items, editors,
etc.), and let Pyface and your selected toolkit and back-end take care of
the details of displaying them.
The following GUI backends are supported:
- PySide2 (stable) and PySide6 (experimental)
- PyQt5 (stable) and PyQt6 (in development)
- wxPython 4 (experimental)
Installation
------------
GUI backends are marked as optional dependencies of Pyface. Some features
or infrastructures may also require additional dependencies.
To install with PySide2 dependencies::
$ pip install pyface[pyside2]
To install with PySide6 dependencies (experimental)::
$ pip install pyface[pyside6]
To install with PyQt5 dependencies::
$ pip install pyface[pyqt5]
To install with wxPython4 dependencies (experimental)::
$ pip install pyface[wx]
``pillow`` is an optional dependency for the PILImage class::
$ pip install pyface[pillow]
To install with additional test dependencies::
$ pip install pyface[test]
Documentation
-------------
* `Online Documentation `_.
* `API Documentation `_.
Prerequisites
-------------
Pyface depends on:
* `Traits `_
* a GUI toolkit as described above
* Pygments for syntax highlighting in the Qt code editor widget.
* some widgets may have additional optional dependencies such as NumPy or
Pillow.
Platform: Windows
Platform: Linux
Platform: Mac OS-X
Platform: Unix
Platform: Solaris
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
Provides-Extra: wx
Provides-Extra: pyqt
Provides-Extra: pyqt5
Provides-Extra: pyqt6
Provides-Extra: pyside2
Provides-Extra: pyside6
Provides-Extra: pillow
Provides-Extra: test
pyface-7.4.0/pyface/ 0000755 0000765 0000024 00000000000 14176460550 015211 5 ustar cwebster staff 0000000 0000000 pyface-7.4.0/pyface/tree/ 0000755 0000765 0000024 00000000000 14176460550 016150 5 ustar cwebster staff 0000000 0000000 pyface-7.4.0/pyface/tree/node_monitor.py 0000644 0000765 0000024 00000007520 14176222673 021224 0 ustar cwebster staff 0000000 0000000 # (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
""" A monitor for appearance and structural changes to a node. """
import logging
from traits.api import Any, Event, HasTraits
from .node_event import NodeEvent
# Create a logger for this module.
logger = logging.getLogger(__name__)
class NodeMonitor(HasTraits):
""" A monitor for appearance and structural changes to a node. """
# 'NodeMonitor' interface ---------------------------------------------#
# The node that we are monitoring.
node = Any()
# Events ----
# Fired when child nodes in the node that we are monitoring have changed in
# some way that affects their appearance but NOT their structure.
nodes_changed = Event(NodeEvent)
# Fired when child nodes have been inserted into the node that we are
# monitoring.
nodes_inserted = Event(NodeEvent)
# Fired when child nodes have been removed from the node that we are
# monitoring.
nodes_removed = Event(NodeEvent)
# Fired when child nodes have been replaced in the node that we are
# monitoring.
nodes_replaced = Event(NodeEvent)
# Fired when the structure of the node that we are monitoring has changed
# DRASTICALLY (i.e., we do not have enough information to make individual
# changes/inserts/removals).
structure_changed = Event(NodeEvent)
# ------------------------------------------------------------------------
# 'NodeMonitor' interface.
# ------------------------------------------------------------------------
# public methods -------------------------------------------------------
def start(self):
""" Start listening to changes to the node. """
if self.node.obj is not None:
self._setup_trait_change_handlers(self.node.obj)
def stop(self):
""" Stop listening to changes to the node. """
if self.node.obj is not None:
self._setup_trait_change_handlers(self.node.obj, remove=True)
def fire_nodes_changed(self, children=[]):
""" Fires the nodes changed event. """
self.nodes_changed = NodeEvent(node=self.node, children=children)
def fire_nodes_inserted(self, children, index=-1):
""" Fires the nodes inserted event.
If the index is -1 it means the nodes were appended.
fixme: The tree and model should probably have an 'appended' event.
"""
self.nodes_inserted = NodeEvent(
node=self.node, children=children, index=index
)
def fire_nodes_removed(self, children):
""" Fires the nodes removed event. """
self.nodes_removed = NodeEvent(node=self.node, children=children)
def fire_nodes_replaced(self, old_children, new_children):
""" Fires the nodes replaced event. """
self.nodes_replaced = NodeEvent(
node=self.node, old_children=old_children, children=new_children
)
def fire_structure_changed(self):
""" Fires the structure changed event. """
self.structure_changed = NodeEvent(node=self.node)
return
# protected methods ----------------------------------------------------
def _setup_trait_change_handlers(self, obj, remove=False):
""" Add or remove trait change handlers to/from a node. """
logger.debug(
"%s trait listeners on (%s) in NodeMonitor (%s)",
(remove and "Removing" or "Adding"),
obj,
self,
)
pass # derived classes should do something here!
return
pyface-7.4.0/pyface/tree/tree.py 0000644 0000765 0000024 00000001137 14176222673 017465 0 ustar cwebster staff 0000000 0000000 # (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
""" The implementation of a tree control with a model/ui architecture.
"""
# Import the toolkit specific version.
from pyface.toolkit import toolkit_object
Tree = toolkit_object("tree.tree:Tree")
pyface-7.4.0/pyface/tree/images/ 0000755 0000765 0000024 00000000000 14176460550 017415 5 ustar cwebster staff 0000000 0000000 pyface-7.4.0/pyface/tree/images/document.png 0000644 0000765 0000024 00000000515 14176222673 021744 0 ustar cwebster staff 0000000 0000000 PNG
IHDR a bKGD pHYs tIME8`&B