""" 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 ------------------------------------------------------------------------
#------------------------------------------------------------------------------ # 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 ######################################################################
""" 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 ######################################################################
""" 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 ------------------------------------------------------------------------
#------------------------------------------------------------------------------ # 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()
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ """ 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
""" 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 ------------------------------------------------------------------------
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
""" 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 ------------------------------------------------------------------------
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
# 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 #######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
# Copyright 2012 Philip Chimento """Sound the system bell.""" # Import the toolkit-specific version from toolkit import toolkit_object beep = toolkit_object('beep:beep')
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
#------------------------------------------------------------------------------ # 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 ######################################################################
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 ------------------------------------------------------------------------
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 ######################################################################
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 ------------------------------------------------------------------------
#------------------------------------------------------------------------------ # 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 ######################################################################
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 ######################################################################
""" 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 ------------------------------------------------------------------------
# # 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 ######################################################################