pax_global_header00006660000000000000000000000064146263247730014530gustar00rootroot0000000000000052 comment=fcb9c1d1645c27aa38918c4ff96c976cd81fac78 wxglade-1.1.0a3+repack/000077500000000000000000000000001462632477300146475ustar00rootroot00000000000000wxglade-1.1.0a3+repack/.gitignore000066400000000000000000000010261462632477300166360ustar00rootroot00000000000000# Files to be ignored by git **.pyc **.pyo **~ # build related directories bdist build dist /wxGlade.egg-info # build related files logdict*.log warnwxglade.txt MANIFEST # wxGlade log file wxglade.log # IDE project files .idea .ropeproject *.wpr # automatically generated version file /tests/generated/* sphinx/images/*.* docs/doctrees/*.* docs/html/_sources/*.* /tests/test_bugs_new_38-64.py /tests/test_gui_new_38-64.py *.xpm *.xcf /tests/test_bugs_new_310-64.py /tests/test_cli_27.py /tests/test_gui_new_310-64.py /python/* wxglade-1.1.0a3+repack/.hgeol000066400000000000000000000001371462632477300157470ustar00rootroot00000000000000[eol] only-consistent = False [patterns] Makefile = LF ** = native **.bat = CRLF **.html = LF wxglade-1.1.0a3+repack/.hgignore000066400000000000000000000010231462632477300164460ustar00rootroot00000000000000# Files to be ignored by mercurial syntax: glob **.pyc **.pyo **~ \#*\# **/\#*\# # automcatically generated source code documentation docs/apidocs # build related directories bdist build dist # build related files logdict*.log warnwxglade.txt MANIFEST # wxGlade log file wxglade.log # PyCharm / IntellyJ IDEA IDE .idea .ropeproject # automatically generated version file version.py wxgladeDS.py tests/generated/*.* sphinx/images/*.* tests/generated/PythonSubclass/PythonSubclass.py docs/doctrees/*.* docs/html/_sources/*.* wxglade-1.1.0a3+repack/CONTRIBUTING.txt000066400000000000000000000022761462632477300173260ustar00rootroot00000000000000Contributing to wxGlade ======================= You are, of course, free to make any changes / additions you want to wxGlade, in whatever way you like. If you decide to contribute them back, however, here are some simple rules to follow: note that these are only general indications, if you think they don't fit somewhere, feel free to ignore them. Coding convensions ------------------ - Class names are usually CamelCase - variables, functions and method names are lower_case_with_unserscores - Constants are ``UPPER_CASE`` - Source lines are at most 120 characters long - Class bodies are usually ended by a ``# end of class ClassName`` comment - Source files use Unix EOL conventions (LF) if possible. In any case, please don't mix Unix and Windows EOLs - Put your copyright info whenever appropriate Testing ------- Please write tests for significant changes and run the test suite before commiting changes. Commit Messages --------------- - Use the present tense ("Add feature" not "Added feature") - Use the imperative mood ("Move cursor to..." not "Moves cursor to...") - Limit the first line to 72 characters or less - Reference issues and pull requests liberally Thanks, the wxGlade developers wxglade-1.1.0a3+repack/CREDITS.txt000066400000000000000000000044161462632477300165120ustar00rootroot00000000000000 Main Developer: --------------------------------------------------------------------------- - Dietmar Schwertberger Other Developers: --------------------------------------------------------------------------- - none Former Developers: --------------------------------------------------------------------------- - Alberto Griggio - Carsten Grohmann (project lead) - Marcello Semboli - Guy Rutenberg - D.H. (Perl code generation) - Georges Khaznadar (debian package maintainer) - Marco Barisione - Kevin Walzer (OSX app bundle maintainer) Contributors: --------------------------------------------------------------------------- - Peter Bradley: editorial work on the new documentation - Johan Vromans - Richard Lawson - Alex Thuering : general virtual sizers support and porting of the SplitterWindow to this new model - Brendan Oakley : editor of the new user's manual - Jack Thomasson : assist with port to wx namespace - Roel van Os : for some patches integrated from his Elentirmo repository - Franco Bugnano : Contribute CheckListBox, GenericCalendarCtrl and PropertyGridManager Many thanks to: --------------------------------------------------------------------------- - Guido van Rossum and all the people at PSF for the excellent language - Robin Dunn, Julian Smart, Vadim Zeitlin, Robert Roebling and the wxWidgets team for their great libary - Glade developers for the inspiration they gave me and for the icons - Boa-constructor developers for some of the icons - Vaclav Slavik for the suggestions about XRC - Michael Gilfix for his wxPyColorChooser, used in the color dialog - ... and, of course, all the people who provided feedback, comments, critics and support (John Dubery in particular for his huge amount of bug reports). (We apologize with all the people that should be mentioned here but in fact aren't: if you think you are one of them, tell us and your name will be added ASAP) wxglade-1.1.0a3+repack/LICENSE.txt000066400000000000000000000022751462632477300165000ustar00rootroot00000000000000Copyright (c) 2002-2007 Alberto Griggio Copyright (c) 2011-2016 Carsten Grohmann Copyright (c) 2017-2024 Dietmar Schwertberger Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. wxglade-1.1.0a3+repack/NEWS.txt000066400000000000000000000470031462632477300161700ustar00rootroot00000000000000Version 1.1 General: - un-do / re-do implemented (Ctrl-Z, Ctrl-Y, Menu, Toolbar) Widgets: - support TimePickerCtrl where available Generated Code: - Python: bind events to object instead of frame (Issue #507) Version 1.0 General: - sizers only required where wx requires them; not required e.g. for Frame->Panel (used to be Frame->Sizer->Panel) - better handling of display updates when properties are edited - accessibility and usability improvements - Dialog example - documentation update Internal: - internal structures refactored - add shell window and Tree Printer Widgets: - all: separate class related properties into Class / Base Classes / Instance Class - Dialog: add StdDialogButtonSizer and standard buttons (stock items); support SetAffirmativeId, SetEscapeId - Button: support for image direction - MenuBar: support lambda event handlers - ToolBar: easy selection of standard icons - GridBagSizer: better icons; indicate overlapped slots in the Tree view Generated Code: - no separation into __set_properties/__do_layout any more - support for instantiation classes Version 0.9 General: - new user interface; use Alt-1,-2,-3, the menu or the toolbar to switch between layouts - many new keyboard shortcuts Widgets: - WrapSizer - SearchCtrl - SpinCtrlDouble - Splitter: ask user whether to add panels; add support for SashGravity - StaticText: support for Wrap property - Button, ToggleButton, BitmapButton: support more bitmap properties (e.g. BitmapCurrent) - Notebook: context menu items to add a page Generated Code: - option to remove all the BEGIN/END wxGlade comments in the generated code (only with overwrite True) - Python: unicode strings not escaped if the selected encoding does not require it Version 0.8.0 General: - support for wxPython Phoenix and Python 3 - full visualization of sizer slots; full editing capability in Tree window (structure, names, labels) - support for GridBagSizer - Repeat feature (Ctrl-R and Ctrl-Y) to apply property change(s) to multiple widgets - new Menu and Toolbar editors; you don't have to create IDs manually any more - better visualization for gauge, list ctrl, property grid in Design window Internal: - very major refactoring of property handling, code generation and sizers - many bug fixes - reformatted code and comments to be more compact - always use DestroyLater to avoid crashes - less redundant calls to widget.Show() to reduce display errors - better handling of size changes due to fonts - Disable autosave functionality permanently after saving has failed - Redesigned palette window Generated Code: - bind menu handlers without the need for user-defined IDs - default file encoding is now UTF-8 Documentation: - new tutorial Testing: - refactored testing Version 0.7.3 - 2016-06-XX: General: - Disable autosave functionality permanently after saving has failed - Redesign the palette window (Thanks to Dietmar Schwertberger) - ... Generated Code: - Remove the outdated version from the Perl "use Wx" statement - Use dynamic lookups to call event handler in Perl - ... Known issues: - Missing dependencies with wxToolBox widgets (sf bug #188) Workaround: enter dependencies manually in th extra code field Bugs: - Fix missing icons in release packages - Fix PyDeadObject errors and crashes during cut and paste - Fix preview failure for Perl class names with "::" (sf bug #183) - System colour constants named incorrectly in Perl (sf bug #184, Thanks to Sue D. Nymme) - Rework querying home path to prevent unexpanded variables (sf bug #185) - Fix C++ code issue with Ids assigned to variables (sf bug #186) - Fix typo in default type of the toolbar C++ constructor - Fix AttributeError during code generation of toplevel menubars - Don't wrap up IOError in XmlParsingError (sf bug #189) - Catch all errors raised during faulthandler initiasisation (sf bug #193) - Fix wrong CheckListBox C++ statement if styles are selected - Add excludes for wxCheckListBox mutual styles - Fix 'Store as attribute' does not work for sizers in C++ (sf bug #192) - LB_EXTENDED for ListBox never show up in generated code (sf bug #194) - Assert isinstance(geometry, (wx.Point, wx.Rect)) (sf bug #196) - ... Documentation: - ... Note: - See CHANGES.txt for a full list of changes Version 0.7.2 - 2016-03-05: General: - Remove usage of KDE file dialog - Improve reporting of early error messages on Windows Generated Code: - Inline wxStaticBox statement into wxStaticBoxSizer statement - Use wxWindowID instead of int for widget identifiers in C++ - Add support for wxArtProvider to XRC code generator - Don't set the default value for redirection in wx.PySimpleApp() Bugs: - Fix wrong orientation of wxStaticLine widgets - Fix NameError exception during inserting a sizer slot - Fix ZeroDevisionError during adding a new column to a wxFlexGridSizer with only one row - Fix WindowsError is the backup file already exists (Thanks to Graeme Glenn) - Fix black window bug on Windows - Fix PyDeadObjectError during closing wxGlade - Fix usage of wx.NullIcon for Perl and Python - Fix main file is generated without custom extensions (sf bug #179) - Fix wrong CreateStatusBar statement if styles are selected - Add missing wxStatusBar style wxST_SIZEGRIP - Fix generated code for wxDatePickerCtrl - Add workaround for missing wxDefaultDateTime in wxPerl Deprecation - In place modifications for generated source files will be removed in one of the next releases Documentation: - Reorganise and update the documentation Note: - See CHANGES.txt for a full list of changes Version 0.7.1 - 2015-12-26: General: - Open wxGlade windows in the upper left corner if wxGlade is starting the first time - Change internal string handling to Unicode - Show logged exceptions in wxGlade bug dialog - Store generated source files in the selected encoding - Add support for 3-state checkboxes - Remove obsolete calls of wx.InitAllImageHandlers() - Catch and show early exceptions on Windows (Thanks to Tor Sjøwall) - Rework handling of event types for C++ - Add support for events that are only supported by a specific wx version - Add styles to wxToggleButton - Don't rewrite unchanged files - Rework creation of wxBitmap code used by several widgets - New widgets CheckListBox, GenericCalendarCtrl and PropertyGridManager contributed by Franco Bugnano - Use defaults for missing application attributes in wxg files Generated Code: - Remove obsolete wx.InitAllImageHandlers() calls from Python codegen - Add missing event types for event handling in C++ - Event handler in C++ aren't virtual anymore - Add support for empty bitmaps and wxArtProvider Bugs: - Fix Unicode error during saving wxg files - Create non-existing config directory during initialisation (sf bug #164) - Fix incorrect handling of styles only supported by a specific wx version - Fix error during preview of classed with custom names (sf bug #165) - Don't ignore disabled gettext support (Thanks to Udi Fuchs) - Fix UnicodeDecodeError when saving project using non ASCII characters in menu items (sf bug #166) - Unicode error during update of an existing source file (sf bug #167) - Fix unicode error during copying widgets to the clipboard - Fix Designer not displaying buttons two lines correctly (sf bug #169) - Fix generated code for wxListBox - Fix broken color selection dialog - Fix a string formatting error during creating the second instances of the same widget - Always show new widgets in the design window - Fix generated code for CustomWidget constructor (Thanks to Udi Fuchs) - Fix a infinite loop within sizing a widget (sf bug #170) - Fix binding of menu event in Perl - Fix root widget loses layout attributes during copy and paste - Load wxg files even if application attributes are missing Deprecation - In place modifications for generated source files will be removed in one of the next releases Documentation: - Adapt and extend the documentation Note: - See CHANGES.txt for a full list of changes Version 0.7.0 - 2014-10-26: General: - Remove support for old Python import style generally - Add missing styles for wxNotebook (Thanks to Udi Fuchs) - Use Python logging facility instead of print statements - Rework quoting and escaping of special character sequences - Rework internal path handling - Write always an error log file - Improve widget import to be able to import widgets from ZIP files - Change configuration default to remember the position and geometry of the three main windows. This change effects fresh installations only. - adapt GUI to run with wxPython 2.8 till 3.0 - remove support for wxPython 2.6 - Disable Lisp for wx 3.0 - Improve the internal error dialog - Unify the code generation of widget specific code This change causes some minor changes in the generated code. - Add Lisp and Perl support for wxDatePickerCtrl - Add support for wxSplitterWindow.SetMinimumPaneSize() Generated Code: - Use SetToolTip() instead of SetToolTipString() for wxPython 3 und wxPerl 3 - Use configurable indents instead of hard coded tabs in wxFrame code for Perl Bugs: - Fix escape sequences in Unicode strings were escaped twice Perl and Python - Wrong Lisp statement in wxHyperlinkCtrl and wxFrame - Prevent code generation from a template file by commandline invocation - Fix bug in generation of valid hash keys for Perl - Fix various issues during transformation from XRC into wxGlade - Fix wrong conditions to generate application start code (sf bug #161) - Don't convert first char of a XRC extraproperty to upper case (sf bug #163) - Fix incomplete Unicode escaping Deprecation - In place modifications for generated source files will be removed in one of the next releases Documentation: - Adapt and extend the documentation API (for custom widgets): - Simplify signature of quote_str(), use quote_path() to quote / escape filenames or paths Note: - See CHANGES.txt for a full list of changes Version 0.6.8 - 2013-07-13: General: - Add comfortable exception handler for more detailed bug reports Bugs: - Wrong SetSizeHint() call in Perl (Thanks to Eric McKeeth) - Fix XRC code generation for notebooks with panes - Fix too strict sanity checks for class attributes - Fix "Overwrite existing sources" for new projects - Fix an uninitialised variable in saving a project file (sf bug # 157) - Fix handling of unicode characters in strings for Perl and Python - Fix handling of style-less dialogs and frames (sf bug #145) Documentation: - ... API (for custom widgets): - ... Note: - See CHANGES.txt for a full list of changes Version 0.6.7 - 2013-04-07: General: - Add a config option to suppress the code generation success message - Improve usability of some dialogs Bugs: - Remove empty line between shebang and encoding statement in Python files - Regression in generated Python code for bindung events Documentation: - no changes API (for custom widgets): - no changes Note: - See CHANGES.txt for a full list of changes Version 0.6.6 - 2013-03-29: General: - Add i18n support to C++ code generator - Add more test cases - Add more tooltips to gui - Add new widget HyperlinkCtrl - Add Perl support to CalendarCtrl - Add simple application start code to C++ code generator - Add "Store as attribute" for sizers - Change default widget ID from -1 to wxID_ANY and adapt codegen - Change some default settings and reorg internal handling - Fix exceptions during widget preview triggered by keyboard shortcut - Improve error handling - Improve message logging - Internal rework of code generator parts, this causes minor changes in the generated code - Join code templates for application startup code in class variables and unify the code generation of this piece - Minor GUI improvements - Rework and unify code generators, all code generators support extracode and extraproperties now - Set "Overwrite existing sources" for new projects - Show existing tooltips at all elements of a property - When pasting: only search current top-level window for duplicate names - Write isolation directives at beginning in C++ header files Bugs: - Don't add unsupported widgets to a sizer - Encoding detection for Mac OS X - Prevent caching effects in Lisp code generator - Prevent deleting last notebook tab (sf bug #3126974) - Same default names for multiple notebooks (sf bug #2000566) - Setting invalid windows names hasn't blocked fully (sf bug #154) - String formatting issue for event handlers in Lisp code generator - UnicodeEncodeError in xml.sax.expatreader (sf bug #149) Documentation: - Update wxGlade user manual API (for custom widgets): - Add support for widget builder that don't support all wx versions supported by wxGlade Note: - See CHANGES.txt for a full list of changes Version 0.6.5 - 2012-01-08: General: - remove support for Python 2.2 - remove support for wxPython < 2.6 - add a small test suite - add tooltip for CheckBoxProperty (Davorin Kunstelj) - add column sizes parameter to GridProperty init parameters (Davorin Kunstelj) - Improve searching and executeing of wxglade.py in shell script wxglade - some minor changes / improvements Bugs: - Various bugs in Lisp code generators - Typo in Perl code generators - Allow saving of generated code to filenames without directory part - Solve issue "C++ CalendarControl issues in 0.6.3" (sf bug #2782306) Documentation: - Update usage message and manpage API (for custom widgets): - no changes Note: - See CHANGES.txt for a full list of changes Version 0.6.4 till version 0.5: No summary of changes available - see CHANGES.txt for a full list of changes Version 0.5 - 2007-04-02: - with some improvements - code ported to the "new" wx namespace - wxWidgets 2.8 support - and more... Version 0.4.1 - 2006-03-02: - Note that this file isn't very much up to date anymore... Version 0.4 - 2005-10-10: - edit_sizers/edit_sizers.py: updated layout() to work with wx2.6 - widgets/frame/frame.py: fixed a segfault when deleting a frame with a statusbar on wx2.6 - widgets/notebook/notebook.py: updated notebook virtual sizer to fix broken layout on wx2.6 - edit_windows.py: fixed property_panel layout which was broken on wx2.6 - tree.py: - added wxBegin/EndBusyCursor() calls when showing a toplevel widget - called fit_parent at the end of show_widget for toplevel widgets without a specific size - added event handlers support (not for perl at the moment) - better sizers layout - many bugs fixed - updated copyright information - ... Version 0.3.5.1 - 2004-11-08: - released, due to a bug in version 0.3.5 (size property not updating correctly) Version 0.3.5 - 2004-11-04: - kdefiledialog.py: support for native file and dir dialogs on KDE - debian/: support for Debian package (by Georges Khaznadar) - common.py, config.py, configUI.py, main.py, res/preferences.wxg: auto save support (i.e. now wxg files can be saved automatically periodically) - edit_sizers/sizers_codegen.py, edit_sizers/perl_sizers_codegen.py, codegen/*.py: fixed issue with wxStaticBoxSizer code generation - edit_sizers/edit_sizers.py, edit_windows.py: fixed segfault on wxGTK2 when removing a widget from the popup menu - *.py: updated copyright information Version 0.3.4.1 - 2004-09-04: - introduce of a workaround for a bug in wxPython 2.5.2.8 (about wxGrid and its default size...) Version 0.3.4 - 2004-09-01: - common.py: minor UI tweak - edit_windows.py, config.py, configUI.py: added `show "handles" of sizers' option added `allow duplicate widget names' option - widgets/menubar/codegen.py: changed python code generator to be smarter about menu items with a user defined name - edit_windows.py, widget_properties.py: fixed a couple of wxMac issues - widgets/frame/codegen.py: added xrc code generator for wxStatusBar - widgets/choice/choice.py, widgets/combo_box/combo_box.py, widgets/list_box/list_box.py: removed default entry in Choices property - widgets/combo_box/codegen.py, widgets/spin_ctrl/codegen.py: applied patch #944642 - widgets/list_ctrl/list_ctrl.py: added a couple of extra styles - widgets/button/*: added wxButton styles - widgets/panel/panel.py: fixed (hopefully) bug #880674 - clipboard.py, main.py: added Drag&Drop of wxg files for opening them (thanks to Chris Liechti) - main.py, docs/index.html, docs/html/*: new manual added - config.py: config path is now under APPDATA ok windows - widgets/bitmap_button/*, widgets/toolbar/*, widgets/static_bitmap/*: added "code:" tag - xrc2wxg.py: added wxSplitterWindow support - tree.py: partially fixed bug #798041 (renaming of cut widgets) - widgets/panel/panel.py: added ability to paste a sizer inside a panel, notebook page and splitter pane - codegen/py_codegen.py, widgets/*/codegen.py, edit_sizers/sizers_codegen.py: changes to the python code generator to support new wx namespace Version 0.3.1 - 2003-08-30: - we found an annoying bug on pl_codegen.py right after releasing 0.3 :-( Version 0.3 - 2003-08-29: - codegen/pl_codegen.py, toolbar/perl_codegen.py, menubar/perl_codegen.py: brought Perl code generator up to date: - multiple files support - ``keep contents'' support - automatic ids generation (ID_FOO=?) support everything is still *experimental* and NEEDS EXTENSIVE TESTING - widgets/toolbar/codegen.py, widgets/bitmap_button/codegen.py, widgets/static_bitmap/codegen.py: added (limited) support to xpm data (not on files). I.e. if the bitmap property is something like var:variable_name, variable_name is taken to be a variable that holds xpm data - codegen/xrc_codegen.py, xml_parse.py, docs/turorial.html: added subclass support to XRC output - application.py, tree.py, xml_parse.py, codegen/py_codegen.py, codegen/cpp_codegen.py: added "overwrite" property to Application, to allow re-generation of (C++ and python) code from scratch (as opposed to updating wxGlade blocks). - docs/tutorial.html: updated notes - codegen/py_codegen.py, codegen/cpp_codegen.py: enhanced generate_code_id, to recognize ID_SOMETHING=? and generate a "unique" id automatically - codegen/cpp_codegen.py: fixed ids code generation when the output file already exists - widgets/toolbar.py: fixed xrc code generation - common.py: updated version number to 0.3pre1 - edit_windows.py, application.py: added validation code for `name' and `class' properties (fixed bug #764186) - credits.txt: updated developer names - codegen/py_codegen.py, codegen/cpp_codegen.py: fixed bug in quote_str - tree.py, widgets/panel/*: added scrolled window support (this required a small change in Tree.Node.write in tree.py) - perl generation support added - nearly all around: fixed various Unicode-related bugs - misc.py added functions, streq and wxstr, to fix some Unicode issues - edit_windows.py, edit_sizers/edit_sizers.py, xml_parse.py: added cut&paste support for toplevel sizers - common.py, main.py: added ToggleButtonBox to separate the "core" components from the "custom" ones (similar to Glade and QT-Designer) - common.py, config.py: added local widgets path support See VCS revision history for change details of older version. Check especially revisions of CHANGES.txt earlier then December 2011 wxglade-1.1.0a3+repack/README.rst000066400000000000000000000061651462632477300163460ustar00rootroot00000000000000============================================= wxGlade: A GUI builder for wxPython/wxWidgets ============================================= .. image:: docs/html/_images/wxglade_large.png :align: center Version: 1.1.0a2 License: MIT (see LICENSE.txt) THIS PROGRAM COMES WITH NO WARRANTY Introduction ------------ wxGlade is a GUI builder for wxWidgets/wxPython. It can create Python, C++, Perl, Lisp and XRC output. Requirements ------------ * Python (http://www.python.org) 2.7, 3.4 or later * wxPython (http://www.wxpython.org) >= 2.8 (wxPython Phoenix, i.e. release >=4.0.0, is supported) If you have a choice, you should prefer wxPython *Phoenix* running on Python 3.x. See https://wxpython.org/pages/downloads/ for download and installation instructions. On Windows and macOS it can be installed with ``python -mpip install wxPython``. Installation ------------ Download the latest released version as zip archive from https://sourceforge.net/projects/wxglade/ Unpack the archive to a **known** location and maybe add it to the path. If you are familiar with git, you may instead just clone the repository from https://github.com/wxGlade/wxGlade.git The master branch should be stable enough for your work and I appreciate bug reports. Running wxGlade --------------- To start the program, change directory to the installation directory you unzipped to and enter ``python3 wxglade.py`` or ``python wxglade.py`` in your shell or use whatever is required to start a python application on your platform. You may want to add a desktop shortcut to run the ``wxGlade.py`` file (or the ``wxGlade.pyw`` file). If you want to build a GUI for wxPython Classic or Phoenix: Start wxGlade in your target version - if it runs under Phoenix, it will create Phoenix code. The .wxg file format is not affected by this. So you may use a single .wxg file to generate code for both Classic and Phoenix. The generated code should always run under both Python 2.7 and Python 3. Documentation and Tutorial -------------------------- The documentation is at docs/html/index.html and includes a tutorial. You can view it from the help menu as well. The target audience includes people who have not yet been using wxPython or wxWidgets before. A snapshot of the documentation including tutorial can be found here: http://wxglade.sourceforge.net/docs/index.html This one is not always up to date, though. Issues / Bugs ------------- For any kind of question, there's a mailing list: https://lists.sourceforge.net/lists/listinfo/wxglade-general If you observe a bug, please check the bug tracker for current open bugs: https://github.com/wxGlade/wxGlade/issues For new bugs, please open a bug report in the tracker. You have to register and log in at GitHub to file a bug report. Alternatively you can send the bug report to the wxGlade mailing list. Keep in mind that you need a subscription for sending emails to this mailing list. Please include the following information: * What did you? May you want to include a screenshot. * What do you want to happen? * What actually happened? * Provide a short example to reproduce the issue. Have fun! Dietmar Schwertberger wxglade-1.1.0a3+repack/README.txt000066400000000000000000000057251462632477300163560ustar00rootroot00000000000000wxGlade: A GUI builder for wxPython/wxWidgets ============================================= Version: 1.1.0a2 License: MIT (see LICENSE.txt) THIS PROGRAM COMES WITH NO WARRANTY Introduction ------------ wxGlade is a GUI builder for wxWidgets/wxPython. It can create Python, C++, Perl, Lisp and XRC output. Requirements ------------ - Python (http://www.python.org) 2.7, 3.4 or later - wxPython (http://www.wxpython.org) >= 2.8 (wxPython Phoenix, i.e. release >=4.0.0, is supported) If you have a choice, you should prefer wxPython Phoenix running on Python 3.x. See https://wxpython.org/pages/downloads/ for download and installation instructions. On Windows and macOS it can be installed with ``python -mpip install wxPython``. Installation ------------ Download the latest released version as zip archive from https://sourceforge.net/projects/wxglade/ Unpack the archive to a known location and maybe add it to the path. If you are familiar with git, you may instead just clone the repository from https://github.com/wxGlade/wxGlade.git The master branch should be stable enough for your work and I appreciate bug reports. Running wxGlade --------------- To start the program, change directory to the installation directory you unzipped to and enter 'python3 wxglade.py' or 'python wxglade.py' in your shell or use whatever is required to start a python application on your platform. You may want to add a desktop shortcut to run the 'wxGlade.py' file (or the 'wxGlade.pyw' file). If you want to build a GUI for wxPython Classic or Phoenix: Start wxGlade in your target version - if it runs under Phoenix, it will create Phoenix code. The .wxg file format is not affected by this. So you may use a single .wxg file to generate code for both Classic and Phoenix. The generated code should always run under both Python 2.7 and Python 3. Documentation and Tutorial -------------------------- The documentation is at docs\html\index.html and includes a tutorial. You can view it from the help menu as well. The target audience includes people who have not yet been using wxPython or wxWidgets before. A snapshot of the documentation including tutorial can be found here: http://wxglade.sourceforge.net/docs/index.html This one is not always up to date, though. Issues / Bugs ------------- For any kind of question, there's a mailing list: https://lists.sourceforge.net/lists/listinfo/wxglade-general If you observe a bug, please check the bug tracker for current open bugs: https://github.com/wxGlade/wxGlade/issues For new bugs, please open a bug report in the tracker. You have to register and log in at GitHub to file a bug report. Alternatively you can send the bug report to the wxGlade mailing list. Keep in mind that you need a subscription for sending emails to this mailing list. Please include the following information: - What did you? May you want to include a screenshot. - What do you want to happen? - What actually happened? - Provide a short example to reproduce the issue. wxglade-1.1.0a3+repack/__init__.py000066400000000000000000000003761462632477300167660ustar00rootroot00000000000000# __init__.py: to turn wxGlade into a package # $Id: __init__.py,v 1.4 2007/03/27 07:02:07 agriggio Exp $ # # Copyright (c) 2002-2007 Alberto Griggio # License: MIT (see LICENSE.txt) # THIS PROGRAM COMES WITH NO WARRANTY wxglade-1.1.0a3+repack/_dialogs.py000066400000000000000000000135211462632477300170040ustar00rootroot00000000000000# -*- coding: UTF-8 -*- # # generated by wxGlade 1.1.0pre on Sun Nov 19 18:54:37 2023 # import wx # begin wxGlade: dependencies # end wxGlade # begin wxGlade: extracode import compat # end wxGlade class MakeRowColGrowableDlg(wx.Dialog): def __init__(self, *args, **kwds): # begin wxGlade: MakeRowColGrowableDlg.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.SetTitle("Make row and/or column growable") sizer_1 = wx.BoxSizer(wx.VERTICAL) static_text_1 = wx.StaticText(self, wx.ID_ANY, "You have set a widget's layout to EXPAND.\n\nThe containing row and column are not growable.\nSo EXPAND does not have an effect.") sizer_1.Add(static_text_1, 0, wx.ALL | wx.EXPAND, 8) sizer_2 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, "Make growable"), wx.VERTICAL) sizer_1.Add(sizer_2, 1, wx.ALL | wx.EXPAND, 6) self.cb_row_growable = wx.CheckBox(self, wx.ID_ANY, "Row") sizer_2.Add(self.cb_row_growable, 0, wx.ALL, 4) self.cb_col_growable = wx.CheckBox(self, wx.ID_ANY, "Column") sizer_2.Add(self.cb_col_growable, 0, wx.ALL, 4) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 2) self.cb_dont_show_again = wx.CheckBox(self, wx.ID_ANY, "Don't show this dialog again") sizer_3.Add(self.cb_dont_show_again, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5) sizer_3.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) self.button_OK = wx.Button(self, wx.ID_OK, "") sizer_3.Add(self.button_OK, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5) self.SetSizer(sizer_1) sizer_1.Fit(self) self.Layout() # end wxGlade # end of class MakeRowColGrowableDlg class SelectArtDialog(wx.Dialog): def __init__(self, *args, **kwds): # begin wxGlade: SelectArtDialog.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER wx.Dialog.__init__(self, *args, **kwds) self.SetSize((300, 600)) self.SetTitle("ART selector") sizer_1 = wx.BoxSizer(wx.VERTICAL) label_1 = wx.StaticText(self, wx.ID_ANY, "Select row and hit OK or Enter:") sizer_1.Add(label_1, 0, wx.ALL, 8) self.art_names = ["NEW", "FILE_OPEN", "FILE_SAVE", "FILE_SAVE_AS", "NEW_DIR", "FOLDER_OPEN", "CUT", "COPY", "PASTE", "UNDO", "REDO", "PLUS", "MINUS", "CLOSE", "QUIT", "PRINT", "DELETE", "HELP", "EDIT", "FIND", "FIND_AND_REPLACE", "ADD_BOOKMARK", "DEL_BOOKMARK", "GO_FORWARD", "GO_BACK", "GO_UP", "GO_DOWN", "GO_HOME", "GOTO_FIRST", "GOTO_LAST", "GO_TO_PARENT", "GO_DIR_UP", "LIST_VIEW", "REPORT_VIEW", "FULL_SCREEN", "NORMAL_FILE", "EXECUTABLE_FILE", "FOLDER", "HELP_BOOK", "HELP_FOLDER", "HELP_PAGE", "HELP_SIDE_PANEL", "HELP_SETTINGS", "TICK_MARK", "CROSS_MARK", "MISSING_IMAGE", "HARDDISK", "FLOPPY", "CDROM", "REMOVABLE", "ERROR", "QUESTION", "WARNING", "INFORMATION", "TIP"] # not for 2.8: "GOTO_FIRST", "GOTO_LAST", "PLUS", "MINUS", "EDIT", "FULL_SCREEN", "REMOVABLE" self.art_list = wx.ImageList(16, 16) self.listctrl = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES) self.listctrl.AppendColumn("Image", format=wx.LIST_FORMAT_LEFT, width=50) self.listctrl.AppendColumn("Name", format=wx.LIST_FORMAT_LEFT, width=200) for i, name in enumerate(self.art_names): art_id = getattr(wx, "ART_%s"%name, wx.ART_MISSING_IMAGE) bmp = wx.ArtProvider.GetBitmap(art_id, wx.ART_TOOLBAR, (16,16)) self.art_list.Add(bmp) self.listctrl.SetImageList(self.art_list, wx.IMAGE_LIST_SMALL) for i, name in enumerate(self.art_names): compat.ListCtrl_InsertImageItem(self.listctrl, i,i) # i is index into ImageList compat.ListCtrl_SetStringItem(self.listctrl, i, 1, name) #index = self.list.InsertItem(self.list.GetItemCount(), data[0], self.idx1) sizer_1.Add(self.listctrl, 1, wx.ALL | wx.EXPAND, 4) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 4) label_2 = wx.StaticText(self, wx.ID_ANY, "Width") sizer_3.Add(label_2, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 4) self.spin_width = wx.SpinCtrl(self, wx.ID_ANY, "24", min=1, max=100) sizer_3.Add(self.spin_width, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 3) label_3 = wx.StaticText(self, wx.ID_ANY, "Height") sizer_3.Add(label_3, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 6) self.spin_height = wx.SpinCtrl(self, wx.ID_ANY, "24", min=1, max=100) sizer_3.Add(self.spin_height, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 3) label_4 = wx.StaticText(self, wx.ID_ANY, "pixels") sizer_3.Add(label_4, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 6) static_line_1 = wx.StaticLine(self, wx.ID_ANY) sizer_1.Add(static_line_1, 0, wx.EXPAND, 0) sizer_2 = wx.StdDialogButtonSizer() sizer_1.Add(sizer_2, 0, wx.ALIGN_RIGHT | wx.ALL, 8) self.button_OK = wx.Button(self, wx.ID_OK, "") self.button_OK.SetDefault() sizer_2.AddButton(self.button_OK) self.button_CANCEL = wx.Button(self, wx.ID_CANCEL, "") sizer_2.AddButton(self.button_CANCEL) sizer_2.Realize() self.SetSizer(sizer_1) self.SetAffirmativeId(self.button_OK.GetId()) self.SetEscapeId(self.button_CANCEL.GetId()) self.Layout() if compat.version[0]==2: sizer_3.GetItem(self.spin_width).SetMinSize((60,-1)) sizer_3.GetItem(self.spin_height).SetMinSize((60,-1)) self.listctrl.Bind(wx.EVT_LIST_ITEM_ACTIVATED, lambda evt: self.EndModal(wx.ID_OK)) # end wxGlade # end of class SelectArtDialog wxglade-1.1.0a3+repack/_dialogs28.py000066400000000000000000000135271462632477300171640ustar00rootroot00000000000000# -*- coding: UTF-8 -*- # # generated by wxGlade 1.1.0pre on Sun Nov 19 18:54:48 2023 # import wx # begin wxGlade: dependencies # end wxGlade # begin wxGlade: extracode import compat # end wxGlade class MakeRowColGrowableDlg(wx.Dialog): def __init__(self, *args, **kwds): # begin wxGlade: MakeRowColGrowableDlg.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE wx.Dialog.__init__(self, *args, **kwds) self.SetTitle("Make row and/or column growable") sizer_1 = wx.BoxSizer(wx.VERTICAL) static_text_1 = wx.StaticText(self, wx.ID_ANY, "You have set a widget's layout to EXPAND.\n\nThe containing row and column are not growable.\nSo EXPAND does not have an effect.") sizer_1.Add(static_text_1, 0, wx.ALL | wx.EXPAND, 8) sizer_2 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, "Make growable"), wx.VERTICAL) sizer_1.Add(sizer_2, 1, wx.ALL | wx.EXPAND, 6) self.cb_row_growable = wx.CheckBox(self, wx.ID_ANY, "Row") sizer_2.Add(self.cb_row_growable, 0, wx.ALL, 4) self.cb_col_growable = wx.CheckBox(self, wx.ID_ANY, "Column") sizer_2.Add(self.cb_col_growable, 0, wx.ALL, 4) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 2) self.cb_dont_show_again = wx.CheckBox(self, wx.ID_ANY, "Don't show this dialog again") sizer_3.Add(self.cb_dont_show_again, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5) sizer_3.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0) self.button_OK = wx.Button(self, wx.ID_OK, "") sizer_3.Add(self.button_OK, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5) self.SetSizer(sizer_1) sizer_1.Fit(self) self.Layout() # end wxGlade # end of class MakeRowColGrowableDlg class SelectArtDialog(wx.Dialog): def __init__(self, *args, **kwds): # begin wxGlade: SelectArtDialog.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER wx.Dialog.__init__(self, *args, **kwds) self.SetSize((300, 600)) self.SetTitle("ART selector") sizer_1 = wx.BoxSizer(wx.VERTICAL) label_1 = wx.StaticText(self, wx.ID_ANY, "Select row and hit OK or Enter:") sizer_1.Add(label_1, 0, wx.ALL, 8) self.art_names = ["NEW", "FILE_OPEN", "FILE_SAVE", "FILE_SAVE_AS", "NEW_DIR", "FOLDER_OPEN", "CUT", "COPY", "PASTE", "UNDO", "REDO", "PLUS", "MINUS", "CLOSE", "QUIT", "PRINT", "DELETE", "HELP", "EDIT", "FIND", "FIND_AND_REPLACE", "ADD_BOOKMARK", "DEL_BOOKMARK", "GO_FORWARD", "GO_BACK", "GO_UP", "GO_DOWN", "GO_HOME", "GOTO_FIRST", "GOTO_LAST", "GO_TO_PARENT", "GO_DIR_UP", "LIST_VIEW", "REPORT_VIEW", "FULL_SCREEN", "NORMAL_FILE", "EXECUTABLE_FILE", "FOLDER", "HELP_BOOK", "HELP_FOLDER", "HELP_PAGE", "HELP_SIDE_PANEL", "HELP_SETTINGS", "TICK_MARK", "CROSS_MARK", "MISSING_IMAGE", "HARDDISK", "FLOPPY", "CDROM", "REMOVABLE", "ERROR", "QUESTION", "WARNING", "INFORMATION", "TIP"] # not for 2.8: "GOTO_FIRST", "GOTO_LAST", "PLUS", "MINUS", "EDIT", "FULL_SCREEN", "REMOVABLE" self.art_list = wx.ImageList(16, 16) self.listctrl = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES) self.listctrl.InsertColumn(0, "Image", format=wx.LIST_FORMAT_LEFT, width=50) self.listctrl.InsertColumn(1, "Name", format=wx.LIST_FORMAT_LEFT, width=200) for i, name in enumerate(self.art_names): art_id = getattr(wx, "ART_%s"%name, wx.ART_MISSING_IMAGE) bmp = wx.ArtProvider.GetBitmap(art_id, wx.ART_TOOLBAR, (16,16)) self.art_list.Add(bmp) self.listctrl.SetImageList(self.art_list, wx.IMAGE_LIST_SMALL) for i, name in enumerate(self.art_names): compat.ListCtrl_InsertImageItem(self.listctrl, i,i) # i is index into ImageList compat.ListCtrl_SetStringItem(self.listctrl, i, 1, name) #index = self.list.InsertItem(self.list.GetItemCount(), data[0], self.idx1) sizer_1.Add(self.listctrl, 1, wx.ALL | wx.EXPAND, 4) sizer_3 = wx.BoxSizer(wx.HORIZONTAL) sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 4) label_2 = wx.StaticText(self, wx.ID_ANY, "Width") sizer_3.Add(label_2, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 4) self.spin_width = wx.SpinCtrl(self, wx.ID_ANY, "24", min=1, max=100) sizer_3.Add(self.spin_width, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 3) label_3 = wx.StaticText(self, wx.ID_ANY, "Height") sizer_3.Add(label_3, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 6) self.spin_height = wx.SpinCtrl(self, wx.ID_ANY, "24", min=1, max=100) sizer_3.Add(self.spin_height, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 3) label_4 = wx.StaticText(self, wx.ID_ANY, "pixels") sizer_3.Add(label_4, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 6) static_line_1 = wx.StaticLine(self, wx.ID_ANY) sizer_1.Add(static_line_1, 0, wx.EXPAND, 0) sizer_2 = wx.StdDialogButtonSizer() sizer_1.Add(sizer_2, 0, wx.ALIGN_RIGHT | wx.ALL, 8) self.button_OK = wx.Button(self, wx.ID_OK, "") self.button_OK.SetDefault() sizer_2.AddButton(self.button_OK) self.button_CANCEL = wx.Button(self, wx.ID_CANCEL, "") sizer_2.AddButton(self.button_CANCEL) sizer_2.Realize() self.SetSizer(sizer_1) self.SetAffirmativeId(self.button_OK.GetId()) self.SetEscapeId(self.button_CANCEL.GetId()) self.Layout() if compat.version[0]==2: sizer_3.GetItem(self.spin_width).SetMinSize((60,-1)) sizer_3.GetItem(self.spin_height).SetMinSize((60,-1)) self.listctrl.Bind(wx.EVT_LIST_ITEM_ACTIVATED, lambda evt: self.EndModal(wx.ID_OK)) # end wxGlade # end of class SelectArtDialog wxglade-1.1.0a3+repack/about.py000066400000000000000000000112151462632477300163330ustar00rootroot00000000000000""" About box with general info @copyright: 2002-2007 Alberto Griggio @copyright: 2014-2016 Carsten Grohmann @copyright: 2017 Dietmar Schwertberger @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import bugdialog import codecs import wx import wx.html import wx.lib.wxpTag import config import misc import os.path class wxGladeAboutBox(wx.Dialog): text = '''
Version %s on Python %s and wxPython %s

License: MIT (see LICENSE.txt)

Home page: http://wxglade.sourceforge.net

For credits, see CREDITS.txt.

''' def __init__(self, parent=None): wx.Dialog.__init__(self, parent, -1, _('About wxGlade')) html = wx.html.HtmlWindow(self, -1, size=(480, 250)) html.Bind(wx.html.EVT_HTML_LINK_CLICKED, self.OnLinkClicked) # it's recommended at least for GTK2 based wxPython if "gtk2" in wx.PlatformInfo: html.SetStandardFonts() bgcolor = misc.color_to_string(self.GetBackgroundColour()) icon_path = os.path.join(config.icons_path, 'wxglade_small.png') html.SetPage( self.text % (bgcolor, icon_path, config.version, config.py_version, config.wx_version) ) ir = html.GetInternalRepresentation() ir.SetIndent(0, wx.html.HTML_INDENT_ALL) html.SetSize((ir.GetWidth(), ir.GetHeight())) szr = wx.BoxSizer(wx.VERTICAL) szr.Add(html, 0, wx.TOP|wx.ALIGN_CENTER, 10) szr.Add(wx.StaticLine(self, -1), 0, wx.LEFT|wx.RIGHT|wx.EXPAND, 20) szr2 = wx.BoxSizer(wx.HORIZONTAL) btn = wx.Button(self, wx.ID_OK, _("OK")) btn.SetDefault() szr2.Add(btn) if wx.Platform == '__WXGTK__': extra_border = 5 # border around a default button else: extra_border = 0 szr.Add(szr2, 0, wx.ALL|wx.ALIGN_RIGHT, 20 + extra_border) self.SetAutoLayout(True) self.SetSizer(szr) szr.Fit(self) self.Layout() if parent: self.CenterOnParent() else: self.CenterOnScreen() def OnLinkClicked(self, event): href = event.GetLinkInfo().GetHref() if href == 'show_license': if config.license_file: from wx.lib.dialogs import ScrolledMessageDialog try: license_file = codecs.open(config.license_file, encoding='UTF-8') dlg = ScrolledMessageDialog( self, license_file.read(), "wxGlade - License" ) license_file.close() dlg.ShowModal() dlg.Destroy() except EnvironmentError as inst: bugdialog.ShowEnvironmentError( _('''Can't read the file "LICENSE.txt".\n\nYou can get a license copy at\n''' '''http://www.opensource.org/licenses/mit-license.php'''), inst) else: wx.MessageBox(_('File "LICENSE.txt" not found!\nYou can get a license copy at\n' 'http://www.opensource.org/licenses/mit-license.php'), _('Error'), wx.OK | wx.CENTRE | wx.ICON_EXCLAMATION) elif href == 'show_credits': if config.credits_file: from wx.lib.dialogs import ScrolledMessageDialog try: credits_file = codecs.open( config.credits_file, encoding='UTF-8' ) dlg = ScrolledMessageDialog( self, credits_file.read(), _("wxGlade - Credits") ) credits_file.close() dlg.ShowModal() dlg.Destroy() except EnvironmentError as inst: bugdialog.ShowEnvironmentError(_('''Can't read the file "CREDITS.txt"'''), inst) else: wx.MessageBox(_('File "CREDITS.txt" not found!'), _('Error'), wx.OK | wx.CENTRE | wx.ICON_EXCLAMATION) else: import webbrowser webbrowser.open(href, new=True) wxglade-1.1.0a3+repack/appdata.xml000066400000000000000000000035521462632477300170100ustar00rootroot00000000000000 wxGlade.desktop CC0-1.0 MIT wxGlade A GUI designer written in Python with the popular GUI toolkit wxPython

wxGlade allows to create graphical user interfaces using wxWidgets. The designer can arrange different widgets using a drag and drop WYSIWYG editor. This simplifies the creation of a graphical user interface in comparison with manual coded graphical user interfaces.

wxGlade is able to generate source code for Python, Perl, Lisp, C++ and XRC based on the designed GUI.

With wxGlade you can:

  • Design the whole GUI of your application inclusive simple or complex dialogs as well as menu bars, different kinds of buttons and text widgets, bitmaps, ...
  • Use the graphical editor for editing, cutting and pasting widgets
  • Convert your design in source code of your favorite language
  • Run wxGlade on a wide variety of operation systems since it's written in Python
http://wxglade.sourceforge.net/img/wxglade_session.png http://wxglade.sourceforge.net/ wxglade-general_at_lists.sourceforge.net
wxglade-1.1.0a3+repack/application.py000066400000000000000000001114341462632477300175300ustar00rootroot00000000000000""" Application class to store properties of the application being created @copyright: 2002-2007 Alberto Griggio @copyright: 2012-2016 Carsten Grohmann @copyright: 2016-2021 Dietmar Schwertberger @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import os, sys, random, re, logging, time import wx import common, config, misc, compat, clipboard import bugdialog import new_properties as np class FileDirDialog(object): """Custom class which displays a FileDialog or a DirDialog, according to the value of the Application.multiple_files of its parent (instance of Application). default_extension: The default extension will be added to all file names without extension. file_message: Message to show on the file dialog dir_message: Message to show on the directory dialog file_style: Style for the file dialog dir_style: Style for the directory dialog value: Value returned by file or directory dialog on success parent: Parent instance of Application prev_dir: Previous directory""" def __init__(self, parent, wildcard=_("All files|*"), file_message=_("Choose a file"),dir_message=None,file_style=0): self.prev_dir = config.preferences.codegen_path or "" self.wildcard = wildcard self.file_message = file_message self.dir_message = dir_message self.file_style = file_style self.dir_style = wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON self.parent = parent self.value = None self.default_extension = None def ShowModal(self): """Show a FileDialog or a DirDialog as a modal dialog. The selected file or directory is stored in self.value on success. Returns ID_OK or ID_CANCEL.""" if self.parent.multiple_files == 0: self.value = wx.FileSelector( self.file_message, self.prev_dir, wildcard=self.wildcard, flags=self.file_style ) # check for file extension and add default extension if missing if self.value and self.default_extension: ext = os.path.splitext(self.value)[1].lower() if not ext: self.value = "%s%s" % (self.value, self.default_extension) else: self.value = wx.DirSelector( self.dir_message, self.prev_dir, style=self.dir_style ) if self.value: self.prev_dir = self.value if not os.path.isdir(self.prev_dir): self.prev_dir = os.path.dirname(self.prev_dir) return wx.ID_OK return wx.ID_CANCEL def get_value(self): "Return the dialog value returned during the last ShowModal() call." return self.value class EditRoot(np.PropertyOwner): IS_ROOT = True parent = None # XXX move this to EditBase def get_all_children(self): return self.children def _get_child_pos(self, child): return self.children.index(child) def has_ancestor(self, node): return False def get_path(self): return self.name def add_item(self, child, index=None): # XXX index is always None at the moment if index is None: self.children.append(child) elif len(self.children)<=index: self.children += [None]*(index - len(self.children) + 1) self.children[index] = child else: if self.children[index] is not None: self.children.insert(index, child) if child.IS_TOPLEVEL_WINDOW: self.add_top_window(child.name) def remove_item(self, child, level=0, dummy=False): if child.IS_TOPLEVEL_WINDOW: self.remove_top_window(child.name) self.children.remove(child) def write(self, output, tabs=0): """Writes the xml equivalent of this tree to the given output file. This function writes unicode to the outfile.""" # XXX move this to application.Application timestring = time.asctime() if not config.testing else 'XXX XXX NN NN:NN:NN NNNN' output.append( u'\n' u'\n\n' % (config.version, timestring) ) attrs = ["name","class","language","top_window","encoding","use_gettext", "overwrite", "mark_blocks", "for_version","is_template","indent_amount"] props = [self.properties[attr] for attr in attrs] attrs = dict( (attr,prop.get_string_value()) for attr,prop in zip(attrs,props) if not prop.deactivated ) top_window_p = self.properties["top_window"] if top_window_p.deactivated and top_window_p.value: attrs["top_window"] = top_window_p.value attrs["option"] = self.properties["multiple_files"].get_string_value() attrs["indent_symbol"] = self.properties["indent_mode"].get_string_value() attrs["path"] = self.properties["output_path"].get_string_value() attrs['use_new_namespace'] = 1 # add a . to the file extensions attrs["source_extension"] = '.' + self.properties["source_extension"].get_string_value() attrs["header_extension"] = '.' + self.properties["header_extension"].get_string_value() inner_xml = [] if self.is_template and getattr(self, 'template_data', None): self.template_data.write(inner_xml, tabs+1) for c in self.children: c.write(inner_xml, tabs+1) output.extend( common.format_xml_tag( u'application', inner_xml, is_xml=True, **attrs ) ) def find_widget_from_path(self, path): path = path.split("/") index = 1 # skip 'app' w = self for index in range(1, len(path)): if path[index].startswith("SLOT "): pos = int(path[index].split(" ")[1]) if pos