示例#1
0
"""
The implementation of a simple 'About' dialog.
"""

# -------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
# -------------------------------------------------------------------------------

# -------------------------------------------------------------------------------
#  Imports:
# -------------------------------------------------------------------------------

from toolkit import toolkit_object

# -------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
# -------------------------------------------------------------------------------

AboutDialog = toolkit_object("about_dialog:AboutDialog")

# -- EOF ------------------------------------------------------------------------
示例#2
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of access to system metrics (screen width and height
etc).
"""


# Import the toolkit specific version.
from toolkit import toolkit_object
SystemMetrics = toolkit_object('system_metrics:SystemMetrics')

#### EOF ######################################################################
示例#3
0
"""
The implementation of a shared resource manager.
"""

# -------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
# -------------------------------------------------------------------------------

# -------------------------------------------------------------------------------
#  Imports:
# -------------------------------------------------------------------------------

from facets.lib.resource.api import ResourceManager

from toolkit import toolkit_object

# -------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
# -------------------------------------------------------------------------------

PyfaceResourceFactory = toolkit_object("resource_manager:PyfaceResourceFactory")

# Define a shared instance:
resource_manager = ResourceManager(resource_factory=PyfaceResourceFactory())

# -- EOF ------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a top-level application window. """


# Import the toolkit specific version.
from toolkit import toolkit_object
ApplicationWindow = toolkit_object('application_window:ApplicationWindow')

#### EOF ######################################################################
示例#5
0
"""
The implementation of a splash screen.
"""

# -------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
# -------------------------------------------------------------------------------

# -------------------------------------------------------------------------------
#  Imports:
# -------------------------------------------------------------------------------

from toolkit import toolkit_object

# -------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
# -------------------------------------------------------------------------------

SplashScreen = toolkit_object("splash_screen:SplashScreen")

# -- EOF ------------------------------------------------------------------------
示例#6
0
#------------------------------------------------------------------------------
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Evan Patterson
# Date: 06/26/09
#------------------------------------------------------------------------------

""" The interface for manipulating the toolkit clipboard.
"""

# Import the toolkit specific version
from toolkit import toolkit_object
Clipboard = toolkit_object('clipboard:Clipboard')

# Create a singleton clipboard object for convenience
clipboard = Clipboard()
示例#7
0
#------------------------------------------------------------------------------
# Copyright (c) 2011, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought enable package component>
#------------------------------------------------------------------------------


# Import the toolkit specific version.
from toolkit import toolkit_object
font_metrics_provider = toolkit_object('font_metrics_provider')

#### EOF ######################################################################
示例#8
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a splash screen. """


# Import the toolkit specific version.
from toolkit import toolkit_object
SplashScreen = toolkit_object('splash_screen:SplashScreen')

#### EOF ######################################################################
示例#9
0
#------------------------------------------------------------------------------
# Copyright (c) 2011, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought enable package component>
#------------------------------------------------------------------------------


# Import the toolkit specific version.
from toolkit import toolkit_object
CompiledPath = toolkit_object('CompiledPath')

#### EOF ######################################################################
示例#10
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a dialog that allows the user to open/save files etc.
"""

# Import the toolkit specific version.
from toolkit import toolkit_object
FileDialog = toolkit_object('file_dialog:FileDialog')

#### EOF ######################################################################
示例#11
0
#------------------------------------------------------------------------------
""" The implementation of a dialog that prompts the user for confirmation. """


# Local imports.
from constant import NO


def confirm(parent, message, title=None, cancel=False, default=NO):
    """ Convenience function to show a confirmation dialog. """

    if title is None:
        title = "Confirmation"

    dialog = ConfirmationDialog(
        parent  = parent,
        message = message,
        cancel  = cancel,
        default = default,
        title   = title
    )

    return dialog.open()


# Import the toolkit specific version.
from toolkit import toolkit_object
ConfirmationDialog = toolkit_object('confirmation_dialog:ConfirmationDialog')

#### EOF ######################################################################
示例#12
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought enable package component>
#------------------------------------------------------------------------------


# Import the toolkit specific version.
from toolkit import toolkit_object
NativeScrollBar = toolkit_object('NativeScrollBar')

#### EOF ######################################################################
示例#13
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a pyface GUI. """


# Import the toolkit specific version.
from toolkit import toolkit_object
GUI = toolkit_object('gui:GUI')

#### EOF ######################################################################
示例#14
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" Heading text. """


# Import the toolkit specific version.
from toolkit import toolkit_object
HeadingText = toolkit_object('heading_text:HeadingText')

#### EOF ######################################################################
示例#15
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" A simple progress dialog window which allows itself to be updated
"""


# Import the toolkit specific version.
from toolkit import toolkit_object
ProgressDialog = toolkit_object('progress_dialog:ProgressDialog')

#### EOF ######################################################################
示例#16
0
"""
The implementation of an interactive Python shell.
"""

#-------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Imports:
#-------------------------------------------------------------------------------

from toolkit \
    import toolkit_object

#-------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
#-------------------------------------------------------------------------------

PythonShell = toolkit_object( 'python_shell:PythonShell' )

#-- EOF ------------------------------------------------------------------------
示例#17
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of an interactive Python shell. """


# Import the toolkit specific version.
from toolkit import toolkit_object
PythonShell = toolkit_object('python_shell:PythonShell')

#### EOF ######################################################################
示例#18
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a dialog that allows the user to browse for a
directory.
"""


# Import the toolkit specific version.
from toolkit import toolkit_object
DirectoryDialog = toolkit_object('directory_dialog:DirectoryDialog')

#### EOF ######################################################################
示例#19
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" Mix-in class for split widgets. """


# Import the toolkit specific version.
from toolkit import toolkit_object
SplitWidget = toolkit_object('split_widget:SplitWidget')

#### EOF ######################################################################
示例#20
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of an image resource. """

# Import the toolkit specific version.
from toolkit import toolkit_object
ImageResource = toolkit_object('image_resource:ImageResource')

#### EOF ######################################################################
示例#21
0
"""
A widget for editing Python code.
"""

#-------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Imports:
#-------------------------------------------------------------------------------

from toolkit \
    import toolkit_object

#-------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
#-------------------------------------------------------------------------------

PythonEditor = toolkit_object( 'python_editor:PythonEditor' )

#-- EOF ------------------------------------------------------------------------
示例#22
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of an image cache. """


# Import the toolkit specific version.
from toolkit import toolkit_object
ImageCache = toolkit_object('image_cache:ImageCache')

#### EOF ######################################################################
示例#23
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" A widget for editing Python code. """

# Import the toolkit specific version.
from toolkit import toolkit_object
PythonEditor = toolkit_object('python_editor:PythonEditor')

#### EOF ######################################################################
示例#24
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" Heading text. """


# Import the toolkit specific version.
from toolkit import toolkit_object
HeadingText = toolkit_object('heading_text:HeadingText')

#### EOF ######################################################################
示例#25
0
#------------------------------------------------------------------------------
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of an IPython shell. """

# Import the toolkit specific version.
try:
    import IPython.frontend
except ImportError:
    raise ImportError, '''
________________________________________________________________________________
Could not load the Wx frontend for ipython. 
You need to have ipython >= 0.9 installed to use the ipython widget.'''

from toolkit import toolkit_object
IPythonWidget = toolkit_object('ipython_widget:IPythonWidget')

#### EOF ######################################################################
示例#26
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a pyface GUI. """

# Import the toolkit specific version.
from toolkit import toolkit_object
GUI = toolkit_object('gui:GUI')

#### EOF ######################################################################
示例#27
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" Mix-in class for split widgets. """

# Import the toolkit specific version.
from toolkit import toolkit_object
SplitWidget = toolkit_object('split_widget:SplitWidget')

#### EOF ######################################################################
示例#28
0
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
# ------------------------------------------------------------------------------
""" The implementation of an IPython shell. """


# Import the toolkit specific version.
try:
    import IPython.frontend
except ImportError:
    raise ImportError, """
________________________________________________________________________________
Could not load the Wx frontend for ipython. 
You need to have ipython >= 0.9 installed to use the ipython widget."""


from toolkit import toolkit_object

IPythonWidget = toolkit_object("ipython_widget:IPythonWidget")

#### EOF ######################################################################
示例#29
0
文件: widget.py 项目: jdmarch/pyface
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The base implementation of all pyface widgets. """

# Import the toolkit specific version.
from toolkit import toolkit_object
Widget = toolkit_object('widget:Widget')

#### EOF ######################################################################
示例#30
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a simple 'About' dialog. """

# Import the toolkit specific version.
from toolkit import toolkit_object
AboutDialog = toolkit_object('about_dialog:AboutDialog')

### EOF #######################################################################
示例#31
0
文件: dialog.py 项目: jdmarch/pyface
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The abstract implementation of all pyface dialogs. """

# Import the toolkit specific version.
from toolkit import toolkit_object
Dialog = toolkit_object('dialog:Dialog')

#### EOF ######################################################################
示例#32
0
# Copyright 2012 Philip Chimento
"""Sound the system bell."""

# Import the toolkit-specific version
from toolkit import toolkit_object
beep = toolkit_object('beep:beep')
示例#33
0
文件: window.py 项目: GaZ3ll3/enable
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought enable package component>
#------------------------------------------------------------------------------


# Import the toolkit specific version.
from toolkit import toolkit_object
Window = toolkit_object('Window')

#### EOF ######################################################################
示例#34
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a dialog that allows the user to browse for a
directory.
"""

# Import the toolkit specific version.
from toolkit import toolkit_object
DirectoryDialog = toolkit_object('directory_dialog:DirectoryDialog')

#### EOF ######################################################################
示例#35
0
文件: window.py 项目: jdmarch/pyface
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The abstract implementation of all pyface top-level windows. """

# Import the toolkit specific version.
from toolkit import toolkit_object

Window = toolkit_object('window:Window')

#### EOF ######################################################################
示例#36
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a shared resource manager. """

# Enthought library imports.
from enthought.resource.api import ResourceManager

# Import the toolkit specific version.
from toolkit import toolkit_object
PyfaceResourceFactory = toolkit_object(
    'resource_manager:PyfaceResourceFactory')

# A shared instance.
resource_manager = ResourceManager(resource_factory=PyfaceResourceFactory())

#### EOF ######################################################################
示例#37
0
def warning ( parent, message, title = 'Warning' ):
    """ Convenience function to show a warning message dialog.
    """
    MessageDialog(
        parent   = parent and parent(),
        message  = message,
        title    = title,
        severity = 'warning'
    ).open()


def error ( parent, message, title = 'Error' ):
    """ Convenience function to show an error message dialog.
    """
    MessageDialog(
        parent   = parent and parent(),
        message  = message,
        title    = title,
        severity = 'error'
    ).open()

#-------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
#-------------------------------------------------------------------------------

from toolkit \
    import toolkit_object

MessageDialog = toolkit_object( 'message_dialog:MessageDialog' )

#-- EOF ------------------------------------------------------------------------
示例#38
0
def warning(parent, message, title='Warning'):
    """ Convenience function to show a warning message dialog. """

    dialog = MessageDialog(parent=parent,
                           message=message,
                           title=title,
                           severity='warning')
    dialog.open()

    return


def error(parent, message, title='Error'):
    """ Convenience function to show an error message dialog. """

    dialog = MessageDialog(parent=parent,
                           message=message,
                           title=title,
                           severity='error')
    dialog.open()

    return


# Import the toolkit specific version.
from toolkit import toolkit_object
MessageDialog = toolkit_object('message_dialog:MessageDialog')

#### EOF ######################################################################
示例#39
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a simple 'About' dialog. """


# Import the toolkit specific version.
from toolkit import toolkit_object
AboutDialog = toolkit_object('about_dialog:AboutDialog')

### EOF #######################################################################
示例#40
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of an image resource. """


# Import the toolkit specific version.
from toolkit import toolkit_object
ImageResource = toolkit_object('image_resource:ImageResource')

#### EOF ######################################################################
示例#41
0
The implementation of an IPython shell.
"""

#-------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Imports:
#-------------------------------------------------------------------------------

# Import the toolkit specific version:
try:
    import IPython.frontend
except ImportError:
    raise ImportError, '''
________________________________________________________________________________
Could not load the Wx frontend for ipython.
You need to have ipython >= 0.9 installed to use the ipython widget.'''


from toolkit \
    import toolkit_object

#-------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
#-------------------------------------------------------------------------------

IPythonWidget = toolkit_object( 'ipython_widget:IPythonWidget' )

#-- EOF ------------------------------------------------------------------------
示例#42
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of an image cache. """

# Import the toolkit specific version.
from toolkit import toolkit_object

ImageCache = toolkit_object('image_cache:ImageCache')

#### EOF ######################################################################
示例#43
0
#------------------------------------------------------------------------------
# Copyright (c) 2011, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought enable package component>
#------------------------------------------------------------------------------


# Import the toolkit specific version.
from toolkit import toolkit_object
GraphicsContext = toolkit_object('GraphicsContext')

#### EOF ######################################################################
示例#44
0
    dialog = MessageDialog(parent=parent, message=message, title=title, severity="information")
    dialog.open()

    return


def warning(parent, message, title="Warning"):
    """ Convenience function to show a warning message dialog. """

    dialog = MessageDialog(parent=parent, message=message, title=title, severity="warning")
    dialog.open()

    return


def error(parent, message, title="Error"):
    """ Convenience function to show an error message dialog. """

    dialog = MessageDialog(parent=parent, message=message, title=title, severity="error")
    dialog.open()

    return


# Import the toolkit specific version.
from toolkit import toolkit_object

MessageDialog = toolkit_object("message_dialog:MessageDialog")

#### EOF ######################################################################
示例#45
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of access to system metrics (screen width and height
etc).
"""

# Import the toolkit specific version.
from toolkit import toolkit_object
SystemMetrics = toolkit_object('system_metrics:SystemMetrics')

#### EOF ######################################################################
示例#46
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a top-level application window. """

# Import the toolkit specific version.
from toolkit import toolkit_object
ApplicationWindow = toolkit_object('application_window:ApplicationWindow')

#### EOF ######################################################################
示例#47
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The base implementation of all pyface widgets. """


# Import the toolkit specific version.
from toolkit import toolkit_object
Widget = toolkit_object('widget:Widget')

#### EOF ######################################################################
示例#48
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The abstract implementation of all pyface dialogs. """


# Import the toolkit specific version.
from toolkit import toolkit_object
Dialog = toolkit_object('dialog:Dialog')

#### EOF ######################################################################
示例#49
0
#------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
# 
# This software is provided without warranty under the terms of the BSD
# license included in enthought/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!
# 
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" A simple progress dialog window which allows itself to be updated
"""


# Import the toolkit specific version.
from toolkit import toolkit_object
ProgressDialog = toolkit_object('progress_dialog:ProgressDialog')

#### EOF ######################################################################
示例#50
0
"""
The implementation of a dialog that allows the user to open/save files etc.
"""

#-------------------------------------------------------------------------------
#  License: See sections (A) and (B) of the .../facets/LICENSE.txt file.
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Imports:
#-------------------------------------------------------------------------------

from toolkit \
    import toolkit_object

#-------------------------------------------------------------------------------
#  Define the GUI toolkit specific implementation:
#-------------------------------------------------------------------------------

FileDialog = toolkit_object( 'file_dialog:FileDialog' )

#-- EOF ------------------------------------------------------------------------
示例#51
0
#
# Author: Enthought, Inc.
# Description: <Enthought pyface package component>
#------------------------------------------------------------------------------
""" The implementation of a dialog that prompts the user for confirmation. """

# Local imports.
from constant import NO


def confirm(parent, message, title=None, cancel=False, default=NO):
    """ Convenience function to show a confirmation dialog. """

    if title is None:
        title = "Confirmation"

    dialog = ConfirmationDialog(parent=parent,
                                message=message,
                                cancel=cancel,
                                default=default,
                                title=title)

    return dialog.open()


# Import the toolkit specific version.
from toolkit import toolkit_object
ConfirmationDialog = toolkit_object('confirmation_dialog:ConfirmationDialog')

#### EOF ######################################################################