Commit Graph

477 Commits

Author SHA1 Message Date
David Foster
2117602aea demo: ShortcutEditor: Fix broken call GetMenuBar() 2023-05-20 08:01:05 -04:00
Robin Dunn
4f5ee98256 Merge pull request #2279 from pchemguy/demo-AUI_DockingWindowMgr
Fixes method typo in AUI_DockingWindowMgr
2022-10-18 17:28:27 -07:00
Robin Dunn
fae30156df Merge pull request #2276 from pchemguy/demo-treemixin-treelistctrl
Reenabled TreeListCtrl demo in TreeMixin
2022-10-18 17:26:29 -07:00
Robin Dunn
b978de2962 Merge pull request #2266 from pchemguy/demo-joystick.py
Added explicit "to int" type casting in dc.DrawXXX calls
2022-10-18 17:20:50 -07:00
Robin Dunn
6b7885b0c5 Merge pull request #2260 from pchemguy/demo-OwnerDrawnComboBox-fix
Missing required explicit float->int type casting
2022-10-18 17:18:20 -07:00
PChemGuy
8449df773f Method typo in AUI_DockingWindowMgr 2022-09-11 11:08:28 +03:00
PChemGuy
a2f17dcea8 Reenabled TreeListCtrl demo in TreeMixin
Replaced a TreeListCtrl to wx.gizmos, and updated and uncommented the associated code (also changed AppendColumn to AddColumn).
Note, this code does not work as is with wx.dataview.TreeListCtrl.
2022-09-10 12:41:02 +03:00
PChemGuy
089a2c1245 Added explicit "to int" type casting in dc.DrawXXX calls 2022-09-04 16:08:44 +03:00
PChemGuy
3b2c4140cf Missing required explicit float->int type casting
Fixes missing type casting in the OwnerDrawnComboBox.py demo module.
2022-09-04 11:07:47 +03:00
PChemGuy
5368d963f1 Missing required explicit float->int type casting
Fixes missing type casting in the OwnerDrawnComboBox.py demo module.
2022-09-04 08:01:24 +03:00
PChemGuy
83dba91a2b Missing required explicit float->int type casting
"therange" variable, used to adjust range of the KnobCtrl, must be an integer.
2022-09-03 16:31:12 +03:00
Robin Dunn
0295297913 Use images on the Notebook tabs on Mac too, and clean up some other old hacks 2022-06-07 19:28:24 -07:00
Scott Talbert
58682ecaf4 Update demos to work wxWidgets 3.1.6 2022-05-02 22:36:44 -04:00
Robin Dunn
66ec80bd21 Merge branch 'master' into update-wx 2021-12-15 18:59:03 -08:00
Robin Dunn
a843ed14f2 Merge pull request #2014 from arjones6/master
Add wxDC.DrawLinesFromBuffer to draw directly from numpy array memory using the Buffer protocol
2021-12-15 18:55:41 -08:00
Robin Dunn
e53b09aea7 Revert "New button type: ShowHideToggleButton." 2021-12-15 18:10:12 -08:00
Robin Dunn
1432d933a5 Merge pull request #1980 from TEParsons/showHideToggleButton
New button type: ShowHideToggleButton.
2021-12-15 18:07:04 -08:00
arjones6
efbea6a275 dc.DrawLinesFromBuffer demo and test to intc data type. Updated documentation. 2021-12-15 11:07:18 -05:00
arjones6
232542ba3e dc.DrawLinesFromBuffer test and demo added 2021-12-14 12:47:55 -05:00
Todd
2e753e6775 Add demo for show/hide toggle button 2021-12-14 15:33:39 +00:00
Robin Dunn
9627bb8035 Merge branch 'master' into update-wx 2021-12-13 21:40:18 -08:00
Robin Dunn
d9725119d7 Merge pull request #2039 from swt2c/pygauge_py3.10
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
2021-12-13 20:54:44 -08:00
Robin Dunn
272990b131 Merge pull request #1997 from cclauss/codespell
Fix typos discovered by codespell
2021-12-13 20:16:39 -08:00
Scott Talbert
173d079681 Fix a bunch of Python 3.10 issues with pure-Python classes and demos
In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision.  This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets.  There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.

Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.

This is an example of the relevant exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
    r.width = w
TypeError: 'float' object cannot be interpreted as an integer

Fixes #2038.

[1] https://bugs.python.org/issue37999
2021-12-01 14:19:00 -05:00
Scott Talbert
f42bea0927 Merge pull request #2005 from gwhitney/setscrollbar_types
fix: Correct types of arguments to ScrolledWindow.SetScrollbars
2021-11-29 21:20:30 -05:00
Robin Dunn
f95f3187ad Merge branch 'master' into update-wx 2021-11-23 17:00:06 -08:00
Robin Dunn
1eef4d9390 Add InitLocale method 2021-10-26 12:35:04 -07:00
Glen Whitney
3eb9eb32dc fix: Correct types of arguments to ScrolledWindow.SetScrollbars 2021-08-31 11:06:27 -07:00
Christian Clauss
25ba122168 Fix typos discovered by codespell 2021-08-07 18:55:49 +02:00
Robin Dunn
dcf5ba7888 Switch overview text to plain text 2021-07-24 15:17:33 -07:00
Mat Kelly
274a12ded0 Fix parameters for 'More Grid Features' constructor 2021-04-23 16:08:07 -04:00
Robin Dunn
442b50ad78 Ensure the the timers are all stopped when the Timer sample is shutdown 2021-01-20 13:35:31 -08:00
Robin Dunn
13cc5db688 I think this wx.Locale() may be unnecessary now that InitLocal has been rewritten... 2021-01-18 15:38:44 -08:00
cbeytas
7b02c88a28 Merge branch 'master' into treefixes 2021-01-10 03:04:29 +00:00
Robin Dunn
4ab028d7c3 Use a global wx.DataFormat 2021-01-07 14:52:34 -08:00
Robin Dunn
bb20ee8809 Fix sizer flags for joystick demo 2021-01-05 16:15:10 -08:00
Robin Dunn
12db41dad1 Ensure SIP knows about the item container pure virtuals. 2020-12-29 18:11:05 -08:00
Robin Dunn
3d1134708e wxGridCellRenderer::Draw has an implementation despite being pure virtual 2020-12-29 14:59:17 -08:00
Michael Eager
566dd8f35f Merge branch 'master' into refactor-thumbnailctrl 2020-11-16 15:32:52 -08:00
eagerm
846a4f4e4a Remove unused sizer, add spacing to controls. 2020-11-16 12:31:00 -08:00
eagerm
4bef428bce Add documentation to demo programs. 2020-11-16 12:07:45 -08:00
Robin Dunn
b27e492898 Also show wx.adv.DatePickerCtrlGeneric in the demo 2020-11-13 09:39:37 -08:00
eagerm
4c6b725479 Create ThumbDemoConfig.py from class in ScrolledThumbnail & ThumbnailCtrl
Add import statements to ScrolledThumbnail and ThumbnailCtrl.
Remove unneeded imports.
2020-11-12 09:40:00 -08:00
eagerm
d6727e5ce7 Create ThumbDemoConfig class
class ThumbDemoConfig contains the user interface and controls used
by both ScrolledThumbnail and ThumbnailCtrl.

Functions which are different between the two demos are overwridden
by each demo.
2020-11-11 12:38:54 -08:00
eagerm
6fa88e361f Reduce differences between demo/ScrolledThumbnail and demo/ThumbnailCtrl 2020-11-10 20:20:34 -08:00
eagerm
e73d5f49db Minor cleanup and fixes from code review
demo/agw/ScrolledThumbnail.py:
  Set frame size to (850, 800).
  Decrease left side of splitter.
  Use default font.
  Remove SetAutoLayout()
  Fix THUMB_OUTLINE_NONE, etc. not found.
demo/agw/Thumbnailctrl.py:
  Set frame size to (850, 800).
  Make scroll instance variable, not local.
  Replace self.TC with self.scroll.
  Decrease left side of splitter.
  Use default font.
  Remove SetAutoLayout().
2020-11-10 20:12:54 -08:00
Robin Dunn
c0341cb2b6 Merge pull request #1826 from Metallicow/Reduce-flicker-svg-demos
Reduce flicker in svg demos
2020-11-05 13:44:57 -08:00
eagerm
f511c293cc Add ScrolledThumbnail demo
New:  demo/agw/ScrolledThumbnail.py
2020-10-28 09:57:14 -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
Robin Dunn
be94264761 The Bitmap mask bug on OSX has been fixed, switch back to using the bitmap to get the shape 2020-10-22 15:36:06 -07:00