Commit Graph

5448 Commits

Author SHA1 Message Date
Vadim Zeitlin
28516f5643 Make wxAppProgressIndicator actually usable.
First of all, do define it under non-MSW platforms.

Second, don't crash in it when running under XP where wxTaskBarButton is not
available.

Also add IsAvailable() method to check for its availability explicitly and add
a demonstration of this class to the dialogs sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 23:58:26 +00:00
Vadim Zeitlin
4c1a2a51ef Don't crash under XP in the taskbar button sample.
Refuse to run if the taskbar button API is not available.

This wouldn't make much sense anyhow and is the simplest thing to do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 23:58:14 +00:00
Vadim Zeitlin
938f19b739 Update progress immediately in the taskbar button sample.
Handle all scroll events instead of just wxEVT_SCROLL_CHANGED which was
probably done accidentally.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 23:58:12 +00:00
Vadim Zeitlin
dc6830bded Allow selecting wxGraphicsRenderer to use in the drawing sample.
In particular, allow switching between GDI+ and Direct2D under Windows, which
is very convenient for comparing the rendering results.

This can also be useful when using Cairo.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 01:00:09 +00:00
Vadim Zeitlin
04fd25a730 Split screen selection in a separate menu in the drawing sample.
No real changes, just make the "File" menu (which was also renamed to
"Drawing" as it has nothing to do with files) less long by splitting off the
screen selection in a separate menu.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 01:00:00 +00:00
Vadim Zeitlin
6cea553fa3 Avoid creating wxGraphicsContext in the drawing sample unnecessarily.
This is not only wasteful, but creating a Direct2D surface associated with a
wxDC makes it impossible to paint on the DC using GDI functions, so this
completely broke the initial display in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 00:59:56 +00:00
Bryan Petty
872fd95693 Rebaked with new wxTaskBarButton and taskbarbutton sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:59:13 +00:00
Bryan Petty
95e8cf9dfb Intergrate wxAppProgressIndicator into wxGuage.
Update the progress bar of taskbar button if wxGuage has wxGA_PROGRESS style.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:56:29 +00:00
Bryan Petty
6b527d5eca Add parent pointer of the classes: item -> category -> jump list.
The parent of wxTaskBarJumpListItem is wxTaskBarJumpListCategory, the
parent of wxTaskBarJumpListCategory is wxTaskBarJumpList. After this change,
users do not need to call the update method of jump list manually.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:55:21 +00:00
Bryan Petty
e464ed176f Rename access method of custom categories.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:54:51 +00:00
Bryan Petty
2b8c76daff Rename wxJumpList to wxTaskBarJumpList etc.
Class name wxJumpList is overly generic.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:54:40 +00:00
Bryan Petty
30015f9cfe Implement jump list feature: adding custom categories.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:54:08 +00:00
Bryan Petty
dc51580b1a Implement getting recent and frequent category.
- New class wxJumpListCategory to represent a category in the jump list.
- Api for accessing recent and frequent category.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:53:57 +00:00
Bryan Petty
e903ebda55 Reset progress state to no progress when destructing.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:53:47 +00:00
Bryan Petty
d73285aeb3 Support adding a separator in the task list when setting jump list.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:53:28 +00:00
Bryan Petty
b8815e8ac3 Implement wxAppProgressIndicator.
An helper class used for updating the progress of taskbar button.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:53:17 +00:00
Bryan Petty
615773842c Redeclare the interfaces and support setting tasks of jump list roughly.
- Interfaces including: ITaskbarList3, IShellLink, ICustomDestinationList.
- New API for setting tasks of jump list: wxJumpList::SetTasks.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:53:05 +00:00
Bryan Petty
dd06fa3aa8 Add new api for appending a separator to the thumbnail toolbar.
Actually, when calling AppendSeparator we are appending a disable
ThumbBarButton without background, which can simulate the behavior
of appending a separator.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:52:55 +00:00
Bryan Petty
c13a06abb0 Move wxTaskBarButton into core library.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:51:51 +00:00
Bryan Petty
1580848eeb Work around the limitation of windows API when setting thumbnail toolbar buttons.
- New API: InsertThumbBarButton, AppendThumbBarButton, RemoveThumbBarButton.
- Though MSDN said that "Buttons cannot be added or deleted later, so this must
  be the full defined set. Buttons also cannot be reordered.", we can work
  around it by: when first time adding button, initialize all of the possible
  seven buttons and hide them, except the button adding. In the next time adding
  button, just show it, which can make it looks like it is added on the fly.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:51:29 +00:00
Bryan Petty
ffd2e750cd Revise progress releted API to be more usual.
- Add PulseProgress
- Add SetProgressRange, instead of hard coding 100.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:51:09 +00:00
Bryan Petty
2fdf84c7e7 APIs for adding a thumbnail toolbar with a specified set of buttons.
- AddThumbBarButton(wxThumbBarButton *button), ShowThumbnailToolbar().
- Add THBN_CLICKED message handler to top level window and generate a
  wxCommandEvent event.
- Sample.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:50:08 +00:00
Bryan Petty
5f54995d63 APIs to support setting overlay icon, tooltip, thumbnail clip, progress state.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:49:55 +00:00
Bryan Petty
7ecbd9bc18 API for change the visibility of button in the taskbar.
- ShowInTaskbar and HideInTaskbar
- Sample of usage.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:49:44 +00:00
Bryan Petty
076747aa81 Introduce skeleton of taskbar button feature.
- Add classes: wxTaskBarButton and wxTaskBarButtonImpl.
- New interface in wxTopLevelWindowMSW to get its wxTaskBarButton:
    MSWGetTaskBarButton.
- A simple sample and build files under msvc.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:49:33 +00:00
Chaobin, Zhang
23ce61c395 Reverting failed mering of SOC2014_TASKBAR.
Command: git svn dcommit is aborted, and the two branches is diverged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 11:57:58 +00:00
Chaobin, Zhang
c17570e8e2 Move wxTaskBarButton into core library.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 09:15:07 +00:00
Chaobin, Zhang
c27103f8e1 Work around the limitation of windows API when setting thumbnail toolbar buttons.
- New API: InsertThumbBarButton, AppendThumbBarButton, RemoveThumbBarButton.
- Though MSDN said that "Buttons cannot be added or deleted later, so this must
  be the full defined set. Buttons also cannot be reordered.", we can work
  around it by: when first time adding button, initialize all of the possible
  seven buttons and hide them, except the button adding. In the next time adding
  button, just show it, which can make it looks like it is added on the fly.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 09:09:29 +00:00
Chaobin, Zhang
2525b1988e Revise progress releted API to be more usual.
- Add PulseProgress
- Add SetProgressRange, instead of hard coding 100.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 09:03:53 +00:00
Chaobin, Zhang
844cdba9d9 APIs for adding a thumbnail toolbar with a specified set of buttons.
- AddThumbBarButton(wxThumbBarButton *button), ShowThumbnailToolbar().
- Add THBN_CLICKED message handler to top level window and generate a
  wxCommandEvent event.
- Sample.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 08:47:54 +00:00
Chaobin, Zhang
b8390123e6 APIs to support setting overlay icon, tooltip, thumbnail clip, progress state.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 08:43:38 +00:00
Chaobin, Zhang
3de2241fa7 API for change the visibility of button in the taskbar.
- ShowInTaskbar and HideInTaskbar
- Sample of usage.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 08:40:39 +00:00
Chaobin, Zhang
1fa04989f3 Introduce skeleton of taskbar button feature.
- Add classes: wxTaskBarButton and wxTaskBarButtonImpl.
- New interface in wxTopLevelWindowMSW to get its wxTaskBarButton:
    MSWGetTaskBarButton.
- A simple sample and build files under msvc.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 08:37:43 +00:00
Vadim Zeitlin
51d715e46d Add wxPowerResourceBlocker for power management.
Add functions to acquire/release power resources, preventing/allowing back the
system to go to sleep or turn off the screen and a class wrapping them in a
safe way.

This patch implements the functions for MSW and OSX, adds documentation and
updates the sample to demonstrate the new functionality.

Closes #16413.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:15 +00:00
Vadim Zeitlin
eaf46c3213 Fix wxFont construction from default wxFontInfo in wxMSW.
Don't use -1 as the real point size.

Also update the font sample to allow testing such font.

Closes #16468.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 12:55:02 +00:00
Vadim Zeitlin
018183a4d8 Add tests of gradients with stops to the drawing sample.
This shows inconsistency in handling of radial gradients with and without
stops in current wxMSW GDI+-based wxGraphicsContext implementation.

See #16443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:32:01 +00:00
Vadim Zeitlin
3bcec846a0 Provide wxApp::StoreCurrentException() implementation for C++11.
When using C++11 we can provide implementations of wxApp::StoreCurrentException()
and RethrowStoredException() ourselves and thus make catching exceptions outside
of the event loop work by default.

Do this and update the documentation and the sample to reflect it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:52 +00:00
Vadim Zeitlin
1cecee5bb7 Add wxApp::StoreCurrentException() and RethrowStoredException().
These methods can be used to ensure that the exceptions thrown from event
handlers are safely rethrown from the code dispatching the events once the
control flow gets back there.

This allows to work around the problem with not being able to propagate
exceptions through non-C++ code and can be used, for example, to catch
exceptions thrown by the handlers invoked from inside wxYield() by a try/catch
block around wxYield() -- something that didn't work before, update the except
sample to show that it does work now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:44 +00:00
Vadim Zeitlin
b133193aa3 Add a test of throwing an exception from wxYield() to except sample.
This demonstrates that under 64 bit Windows exceptions may not propagate
through the kernel code and throwing from inside wxYield() results in either
an immediate abort, even if the code calling wxYield() tries to handle the
exception, or, even more surprisingly, is just completely ignored.

See http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/
for more information.

Moreover, independently of Windows weirdness, throwing from wxYield() also
results in a difficult to debug crash when using wxGTK because C++ exceptions
can't propagate through C GTK+ code in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:33 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
86cf756ba9 Add wxRendererNative::DrawGauge() method.
Add the method with the native implementations for MSW and OS X and a generic
version fallback.

Closes #16406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 01:03:31 +00:00
Vadim Zeitlin
bc4261e3c7 Add a more complete example of different controls variants in XRC.
Add a dialog showing all the existing variants of a few common controls to
allow seeing at a glance how do they look.

See #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:56:20 +00:00
Vadim Zeitlin
bd0301b05b Show "hint" wxTextCtrl attribute in the xrc sample.
Rearrange the contents of the wxTextCtrl page in two columns to make space for
the new control.

This should have been part of r76629 but was forgotten.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:56:16 +00:00
Václav Slavík
964352934e Add window variant support to XRC.
Fixes #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:10:24 +00:00
Tim Kosse
116112bcf5 Fix a compile error with some compilers introduced in r76813.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-10 09:51:41 +00:00
Tim Kosse
b3be8e77be Fix compilation if configured with --disable-printarch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:43:33 +00:00
Vadim Zeitlin
fb99672f62 Hopefully finish removing the old wxCocoa port.
Get rid of the rest of __WXCOCOA__ tests in the sources.

Drop configure option for using it.

Also remove the documentation for this port.

This should have also been part of r76735.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 22:03:21 +00:00
Tim Kosse
def3b2c90f Items appended via the menu have no item data. Don't crash if right-clicking these items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 16:47:25 +00:00
Tim Kosse
9456ae3b91 Disabled bitmaps of toolbar tools are now rendered at the correct position if using GTK3. Extend toolbar sample to include a button with a custom disabled bitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 18:43:03 +00:00
Vadim Zeitlin
202f62b4c4 Generate 64 bit configurations in MSVC 8/9 projects.
Update bakefile configuration to include x64 configurations into MSVS 2005 and
2008 projects (2003 doesn't support building in 64 bits, 2010 and later are
manually maintained and already have them) and rebake the projects.

Closes #13675.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 23:54:08 +00:00