Commit Graph

432 Commits

Author SHA1 Message Date
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
Metallicow
efec3bcca5 Reduce flicker in svg demos 2020-10-19 03:32:58 -05:00
Robin Dunn
c5c28fd811 Add wx.Image.ConvertToRegion allowing to construct a region from an image without needing to make a bitmap first. 2020-10-14 18:17:54 -07:00
Robin Dunn
1842b2bc9a Merge branch 'master' into webview-edge 2020-10-14 13:02:12 -07:00
Robin Dunn
cafa02a2f2 Remove old todo file 2020-10-13 15:57:02 -07:00
Robin Dunn
e8f394bc2c Switch the CheckListCtrlMixin demo to just use the new built-in checkbox functionality 2020-10-13 15:40:17 -07:00
Robin Dunn
84b9af5c22 Add code to test which backends are available, and show which one was selected. 2020-10-13 14:17:34 -07:00
Robin Dunn
15b5f94e3b minor demo tweaks 2020-10-13 13:22:31 -07:00
Metallicow
24877a11b1 Add wx.lib.checkbox GenericCheckBox Demo 2020-10-12 12:45:08 -07:00
Metallicow
6306a56540 Fix MessageDialog typo and apply Robins REQz 2020-10-09 09:58:45 -05:00
Metallicow
a811f20cda Fix GLCanvas Demo
Add a bit more example to the cube and the cone. Made note to DO NOT USE glut. It is old.
Folks seem to always have hard time figuring out how to load images. Added image texturing example.
Also changed cone to meshmode.
2020-10-01 00:15:01 -05:00
Jorge Moraleda
e7b86c546f Remove inconsistent layout flags that prevent XLSGrid demo from running 2020-07-21 18:00:40 -07:00
Metallicow
5ceaff1874 Convert all line endings to Unix(LF) 2020-07-19 23:56:16 -05:00
Metallicow
0bdbfd532d revert richtooltip bork 2020-07-19 23:54:21 -05: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
Robin Dunn
75f1081f84 Merge branch 'spelling-fixes' 2020-07-16 20:13:31 -07:00
Robin Dunn
d265d13f6c Spelling fixes in the demo 2020-07-14 12:00:55 -07:00
Scott Talbert
3a7748db47 PG Demo: OR the "help as tooltips" flag instead of setting
This fixes an issue on GTK3 platforms with HiDPI screens.  When using
SetExtraStyle(), all of the existing flags, including native double buffering,
were being cleared.  GTK3 currently has issues when native double buffering is
disabled, so this ensures that the existing default flags aren't overwritten.
2020-07-14 10:06:53 -04:00
Robin Dunn
c568beefe0 Merge pull request #1658 from swt2c/fix_propgrid
Fix some issues with PropertyGrid demo
2020-06-17 09:12:45 -07:00
Scott Talbert
b2cce38d12 Fix some wxPy 4.1 issues with the PropertyGrid demo
This addresses some issues reported in #1636.
2020-06-04 10:44:54 -04:00
Scott Talbert
c38e5297bf Fix event.Checked() calls in demo
Fixes #1652
2020-05-28 17:34:34 -04:00
Robin Dunn
e49398b59b wx.Clipboard.Flush now asserts on OSX instead of just returning False 2020-05-20 14:49:27 -07:00
Robin Dunn
5c0df63e28 Merge pull request #1643 from Metallicow/fix-STC-StartStyling-demo
Fix STC StartStyling Demo
2020-05-20 14:29:04 -07:00
Robin Dunn
433d013ad9 Merge pull request #1608 from jmoraleda/dvc_sample_remove_gtk_exception
Remove GTK exceptional handling in DVC Custom Renderer sample
2020-05-20 13:12:54 -07:00
Metallicow
a04e2927a9 Fix STC StartStyling Demo
Update indicator stuff to work with wxPy4.0 and 4.1 with scintilla version change
2020-05-19 02:38:08 -05:00
Robin Dunn
88ff7b1697 Remove demo/version.py, it's a generated file. 2020-05-15 12:56:54 -07:00
Robin Dunn
c84aa19c55 Update sample to to show DataViewModel.HasValue usage 2020-05-14 16:49:19 -07:00
Robin Dunn
9d3d2d3f43 Log the wx.DragResult names rather than just the integer value 2020-05-14 16:33:24 -07:00
Robin Dunn
2d241d0fb7 Make some columns editable 2020-05-14 16:33:08 -07:00
Jorge Moraleda
863e3f61da Remove exception ind DVC Custom Renderer sample that implies that columns with custom renderers cannot be correctly edited under GTK since this is no longer the case. 2020-04-23 16:34:19 -07:00
Robin Dunn
aa8430ad39 Fix error with symlinks when building the wheel on Linux 2020-04-23 15:14:41 -07:00
Robin Dunn
260d08e32d wxGRIDTABLE_REQUEST_VIEW_GET_VALUES and wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES have been removed from wxWidgets 2020-04-17 20:18:58 -07:00
Robin Dunn
7a4612d6a4 tweak comments 2020-04-09 13:54:00 -07:00
Robin Dunn
5be2356b2c SASH_STATUS_OUT_OF_RANGE is in wx.adv 2020-04-07 19:14:32 -07:00
Robin Dunn
2baac81cee Merge pull request #1579 from wxWidgets/fix-1567-AnimationDecoder
Use generic animation classes on all platforms
2020-04-06 20:16:51 -07:00
Robin Dunn
550cf16034 Rename the module in the demo to match the actual class name 2020-04-06 15:12:55 -07:00
Robin Dunn
bd6af90b41 Add CreateCompatibleAnimation 2020-04-06 14:55:45 -07:00
Robin Dunn
6037779151 Try different usages of creating the animation and control 2020-04-06 12:52:43 -07:00
Robin Dunn
0d6f2d211e Changes needed to ensure both the native and generic controls can be used in the wxGTK build. 2020-04-06 12:02:04 -07:00