Commit Graph

1300 Commits

Author SHA1 Message Date
Robin Dunn
e4bd88b0d9 Merge pull request #1848 from jmoraleda/issue_1361
Update AuiManager when a dummy center pane is added. This fixes #1361
2020-11-18 13:41:23 -08:00
Jorge Moraleda
cb711169ed Update AuiManager when a dummy center pane is added. This fixes #1361 2020-11-17 17:47:43 -08:00
Michael Eager
566dd8f35f Merge branch 'master' into refactor-thumbnailctrl 2020-11-16 15:32:52 -08:00
eager
0a03c37a26 Fixes from code review. 2020-10-28 09:57:09 -07:00
eager
81c0461233 Refactor ThumbnailCtrl, create stand-alone ScrolledThumbnail widget
ThumbnailCtrl is more of a image browser demo application than a widget,
in that it reads files from a directory, selects which files to display,
deletes files, displays the source directory path in a text ctrl, etc.
This makes it unlikely that it could be used in any other application,
for example, to provide thumbnails of files with different file types
than the ones hard-coded in the class.

ThumbnailCtrl delegates most of its operations to ScrolledThumbnail
which actually implements a scrolled window of thumbnails, a Thumb class,
which contains information about a thumbnail, and an ImageHandler class,
which manipulates images.  There was poor isolation of functionality
between these classes, violating object-oriented design, with one class
making changes to the internal data of another class.  Additionally, there
was substantial non-functional code, as well as code which did not
function correctly.

This refactoring maintains the functionality and interfaces of
ThumbnailCtrl, except for those which were unused.  Existing uses of
the thumbnailctrl package should work without modification.  A new package,
scrolledthumbnail, contains the functionality for a scrolled window
containing thumbnails, an extendable Thumb class, and image manipulation
classes.  The scrolledthumbnail package can be used in other applications,
independent of the ThumbnailCtrl class, and without the functional
restrictions of that application.

Detailed changes:

ThumbnailCtrl.py (demo program):
 - Always import from wx.lib.agw
 - Optional code to use PIL instead of native image handling
 - Add setting for thumbnail width and height
 - Increase size of demo window

thumbnailctrl.py:
 - Move Thumb, ScrolledThumbnail, ImageHandler to scrolledthumbnail.py
 - Remove EVT_THUMBNAILS_CAPTION_CHANGED (unused)
 - Add EVT_THUMBNAILS_CHAR to respond to keystrokes
 - Remove image processing code
 - Add scrolling dialog for delete files
 - Move directory processing from ScrolledThumbnail
 - Move file delete processing from ScrolledThumbnail
 - List all files to be deleted in scrolling dialog
 - Remove unused or unimplemented methods and options

scrolledthumbnail.py:
 - Move Thumb, ScrolledThumbnail, ImageHander classes from thumbnailctrl.py
 - Add documentation for ScrolledThumbnail widget
 - Add example program which does not use ThumbnailCtrl
 - New EVT_THUMBNAILS_CHAR event for key press
 - Remove unused options and dead code
 - Add Rotate() to PILImageHandler and NativeImageHandler
 - Throw event EVT_THUMBNAILS_CHAR for keystroke on thumbnail
 - Fix failure to rotate images correctly
 - Redisplay window when thumb size changed
 - Simplify logic
 - Remove popup dialog when rotating images
2020-10-28 09:56:35 -07:00
Metallicow
8d4f8e733c Reduce flicker in throbber. Use BufferedPaintDC 2020-10-27 19:03:10 -05:00
Robin Dunn
1842b2bc9a Merge branch 'master' into webview-edge 2020-10-14 13:02:12 -07:00
Robin Dunn
9bef374ecf Give a warning about CheckListCtrlMixin's redundancy 2020-10-13 15:56:04 -07:00
Robin Dunn
bf34a1e276 Fix indentation issue 2020-10-13 14:18:03 -07:00
Robin Dunn
88dd4e2f30 Use key-up on MSW and key-down on others. Only skip for keys not handled by the event handler. 2020-10-12 12:46:15 -07:00
Metallicow
a2f316edcf fix small typo in mixin sample example 2020-10-12 12:45:08 -07:00
Metallicow
94ccec7aca Update and fixes per Robins REQz
Robins requested changes found here #1695
Also added current and pressed bitmaps to mixin.
2020-10-12 12:45:08 -07:00
Metallicow
81843a627f Add wx.lib.checkbox
Sphinx Formatting and other stuff per Robins REQz
2020-10-12 12:45:08 -07:00
Metallicow
c81865ddbb revert disabled flag in unchecked checkbox func
I believe this one looks right now
2020-10-12 12:45:08 -07:00
Metallicow
037dcb96f4 Add PurePython Checkbox
Mostly ported from the wxPyWiki impl and also is a mixin to get bitmaps if desired if hacking on other widgets.
2020-10-12 12:45:08 -07:00
Robin Dunn
8a04577f95 Pin cython version to aid in consistency across platforms 2020-10-09 10:04:13 -07:00
Robin Dunn
9db9d72ed4 Merge pull request #1806 from StefanBruens/more_test_fixes
More test fixes
2020-10-08 21:00:32 -07:00
Robin Dunn
f413ead0b2 Merge pull request #1759 from Metallicow/AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR
Add agw.aui.AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR theming
2020-10-08 20:59:36 -07:00
Stefan Brüns
62cda454f1 Do not specify invalid alignment in BoxSizer flags
Specyfing a horizontal alignment in a wxHORIZONTAL layed out BoxSizer
is pointless, and doing so throws an exception:

wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_RIGHT)"
failed at ./src/common/sizer.cpp(2133) in DoInsert():
Horizontal alignment flags are ignored in horizontal sizers
2020-10-02 17:56:43 +02:00
Robin Dunn
ed834e7640 Copy the new sip.h 2020-09-16 16:15:17 -07:00
Robin Dunn
05ae56ab2a Merge pull request #1792 from maddox32/master
avoid sizer assert agw/PyProgress
2020-09-10 13:36:45 -07:00
maddox32
cbe476df0b Remove superflous if 2020-09-10 19:35:54 +02:00
maddox32
1ee432bfab Avoid sizer flag assert 2020-09-10 19:35:05 +02:00
Gary Geng
5e98a91793 Remove deprecated style 'TB_3DBUTTONS' from ShortcutEditor 2020-09-07 10:47:21 -05:00
Robin Dunn
bfb335672e Merge pull request #1786 from wxWidgets/fix-issue1782
Ensure the watch list widget is updated after adding a new module
2020-08-31 16:31:35 -07:00
Robin Dunn
9b0f1e8aec Avoid assertions in DrawEllipticArc when height is zero 2020-08-31 14:47:46 -07:00
Robin Dunn
4b58bab661 Merge branch 'Fix-PieCtrl-and-Optimize' of https://github.com/Metallicow/Phoenix into Metallicow-Fix-PieCtrl-and-Optimize 2020-08-31 14:10:48 -07:00
Robin Dunn
ad616eea16 Merge pull request #1785 from ryannazaretian/master
Fix hypertreelist.py SetColumnWidth calls incorrect function for LIST_AUTOSIZE_CONTENT_OR_HEADER #1784
2020-08-31 13:48:24 -07:00
Metallicow
fa68af686d Fix per Robins REQz #1764
another way to do just 1
2020-08-31 15:42:40 -05:00
Robin Dunn
86734c2697 Ensure the watch list widget is updated after adding a new module 2020-08-31 13:38:15 -07:00
Robin Dunn
beb55bc88a Restore missing SetWindowVariant 2020-08-31 13:25:56 -07:00
Robin Dunn
fa620e6e43 Merge branch '1780-fix-eventwatcher-filter' of https://github.com/carandraug/Phoenix into carandraug-1780-fix-eventwatcher-filter 2020-08-31 13:21:43 -07:00
Robin Dunn
5cb3d97be7 Merge pull request #1779 from carandraug/1778-fix-eventwatcher-import
EventWatcher: fix __import__ usage by replacing it with importlib (cl…
2020-08-31 13:15:47 -07:00
Robin Dunn
732ff6752b Revert "Spelling fixes in wx.lib"
This reverts commit c00b8950da.
The spelling changes were a bit too aggressive.
2020-08-31 13:01:31 -07:00
Ryan Nazaretian
05fbbfb3b5 Fixed issue with SetColumnWidth() using LIST_AUTOSIZE_CONTENT_OR_HEADER
Without the change, SetColumnWidth(**col**, LIST_AUTOSIZE_CONTENT_OR_HEADER) would throw this:
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wx/lib/agw/hypertreelist.py", line 4645, in SetColumnWidth
    width2, dummy, dummy = dc.GetMultiLineTextExtent(self._header_win.GetColumnText(column))
ValueError: not enough values to unpack (expected 3, got 2)

I ended up using the function called when LIST_AUTOSIZE_CONTENT_OR_HEADER, but reducing the number of **dummy** variables. To be consistent, I did the same for LIST_AUTOSIZE_USEHEADER.
2020-08-28 11:41:54 -05:00
Ryan Nazaretian
597dc00d20 Update hypertreelist.py 2020-08-28 11:30:45 -05:00
Carnë Draug
2d295b29c3 eventwatcher.EventChooser: fix using wx.CheckListBox (closes #1780) 2020-08-27 19:09:44 +01:00
Carnë Draug
b7912f6754 EventWatcher: fix __import__ usage by replacing it with importlib (closes #1778) 2020-08-27 16:28:38 +01:00
Metallicow
038b3e39fe Optimize piectrl.py
OnPaint - Draw timeit results

PieCtrl Demo Colorwheel Benchmark
Before
TIMEIT 0.10100555419921875  Animated
TIMEIT 0.10600614547729492  Colorwheel
After
TIMEIT 0.08300471305847168  Animated
TIMEIT 0.08600497245788574  Colorwheel
2020-08-08 00:49:59 -05:00
Metallicow
cca15e4490 Fix wxassertionerror. Bitmap w or h should not be 0 2020-08-08 00:43:29 -05:00
Erki Suurjaak
148ffa08fc In the context of #1734:
- defined more properties for wx.lib.intctrl.IntCtrl: Limited, LongAllowed, Min, Max, NoneAllowed;
- defined more properties for wx.lib.agw.floatspin.FloatSpin: DefaultValue, Digits, Font, Format, Increment, Min, Max;
- added SetMin-SetMax to wx.lib.agw.floatspin.FloatSpin.
2020-08-08 00:06:25 +03:00
Metallicow
581d68383c Add AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR so it can be themed.
Hint window border color can be set now with AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR

Optimizations:
Optimized venetian blind loop and removed unnecessary wxPoint to tuple in Paint method wx.Rect
2020-08-04 16:01:20 -05:00
Robin Dunn
8b670176d2 Merge pull request #1754 from DKWoods/master
Address issue #1753, fix FloatCanvas GUIMode GUIZoomIn and GUIZoomOut…
2020-07-31 20:52:52 -07:00
DKWoods
b87a4d6ed8 Fixed Case issues with FloatCanvas.Zoom method 2020-07-29 22:28:47 -05:00
DKWoods
0e5cf66fe7 Address issue #1753, fix FloatCanvas GUIMode GUIZoomIn and GUIZoomOut behavior - Part 2 2020-07-27 17:07:15 -05:00
DKWoods
b615941ee1 Address issue #1753, fix FloatCanvas GUIMode GUIZoomIn and GUIZoomOut behavior 2020-07-27 16:16:20 -05:00
lmasini
4d34e6a4ba Added SetBackgroundColour to thumbnailctrl.py 2020-07-25 07:29:20 -07:00
Robin Dunn
5b248eb5f1 Merge pull request #1736 from Metallicow/Optomize-Colour-Brush-Pen
Optomize colour brush pen
2020-07-20 10:40:39 -07:00
Robin Dunn
d2a7b13075 Merge pull request #1735 from suurjaak/numberctrl_properties
Added Value-property for IntCtrl and FloatSpin
2020-07-20 10:40:20 -07:00
Metallicow
542a32c17d Optimize Colour Brush Pen
Use builtin Colours, Brushes, Pens where needed. They are faster.
2020-07-19 23:48:39 -05:00