Commit Graph

16396 Commits

Author SHA1 Message Date
Vadim Zeitlin
26ce3d6361 wxListBox in wxUniv need to overwrite DoListHistTest function, otherwise Listbox::HitTest will call DoListHitTest in wx/listbox.h, which will always return wxNOT_FOUND
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:36 +00:00
Vadim Zeitlin
a4e72041fb Add GetBitmap support to wxButton in wxUniv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:22 +00:00
Vadim Zeitlin
58730bc356 Add wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS event to wxX11
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:44 +00:00
Vadim Zeitlin
b413eeedea GetLabel should return the original label that with mnemonics, the original label stored in wxControlBase m_labelOrig, get it by wxControlBase::GetLabel()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:38 +00:00
Vadim Zeitlin
d1d874dd15 wxUniv focus on wx11 port, so modified unv/theme.h, make GTK theme as the default theme
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:06 +00:00
Vadim Zeitlin
8e238e367e wxX11 wxFont miss the wxFont (const wxString &nativeInfoString) ctor, it will cause build tests failed. Added and fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:51 +00:00
Vadim Zeitlin
43c99ef613 Refactor: create src/univ/anybutton.cpp.
Extract and pull the common functions from wxButton and wxToggleButton to
wxAnyButton in wxUniv too.

Also make wxToggleButton inherit from wxToggleButtonBase correctly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:38:47 +00:00
Vadim Zeitlin
7172fdc01b Fix wxCompositeWindow compilation after the latest change.
SetSize() doesn't have any dependent parameters so call it via an explicit
"this->" to make it work with standard conforming compilers (and not MSVC).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 11:51:10 +00:00
Vadim Zeitlin
f24d204984 Update layout of wxCompositeWindow on layout direction change.
The children layout will almost always depend on the layout direction, so redo
it when the latter changes.

In particular, this fixes changing the layout of wxSpinCtrlDouble under MSW.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:27 +00:00
Vadim Zeitlin
81ec161949 Fix setting layout direction for wxSpinCtrl in wxMSW.
Position the spin control components (the button and the text) correctly for
the current layout.

Also update the layout of the text explicitly.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:22 +00:00
Vadim Zeitlin
e5755015e7 Fix setting layout direction for wxComboBox in wxMSW.
The EDIT control used by the native combobox is different from normal EDIT
controls and has to be handled specially.

We also need to explicitly forward WS_EX_LAYOUTRTL to the dropdown window as
it doesn't inherit it from the combobox itself automatically.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-21 01:41:17 +00:00
Vadim Zeitlin
c5ee5b8ea7 Don't use wxMSW wxAppProgressIndicator if wxUSE_TASKBARBUTTON==0.
This class requires wxTaskBarButton to be really implemented, so there is no
need to even define the MSW-specific version of it if wxUSE_TASKBARBUTTON is 0
anyhow.

This fixes a compilation problem with wxUSE_TASKBARBUTTON==0 but, more
importantly, just makes more sense.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:37 +00:00
Vadim Zeitlin
4944c44676 Show the message of unexpected message boxes in wxTestingModalHook.
This is more informative than showing just the title and we can do it for the
message boxes and it's worth handling them specially just because they are so
common.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:34 +00:00
Vadim Zeitlin
66640e67d6 Allow customizing unexpected dialogs description in wxTestingModalHook.
Extract creation of the message describing an unexpected dialog in a separate
virtual method in order to allow customizing it, notably in order to add more
useful description of custom application dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:31 +00:00
Vadim Zeitlin
6cf30c433c Mention the title of the unexpected dialog in wxTestingModalHook.
It's not very helpful to just say that an unexpected dialog was shown, using
its title provides at least some hint as to what dialog it was.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:29 +00:00
Vadim Zeitlin
c39f3db6a6 Return the caption from wxMessageDialog::GetTitle().
It was unexpected that wxMessageDialog::GetTitle() returned empty string even
when non-empty caption, which is just another word for title, was specified.

Implement GetTitle() as synonym for GetCaption() and also provide SetTitle()
for consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-20 22:07:26 +00:00
Peter Most
12e989bdf3 Re-added wxQtPointer smart pointer for easier memory management.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-16 12:50:57 +00:00
Vadim Zeitlin
cde3018236 Don't define wxUSE_GRAPHICS_GDIPLUS as 1 by default.
Define it and wxUSE_GRAPHICS_DIRECT2D, when it's supposed to be enabled, as
wxUSE_GRAPHICS_CONTEXT instead. This ensures they are set to 0 if the use of
wxGraphicsContext is entirely disabled, as is the case when using MinGW under
MSW by default for example.

Closes #16558.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-15 17:27:50 +00:00
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
03e245091f Use factory function for wxTaskBarButton creation.
This allows to encapsulate checking for errors, which should be handled when
using this class as task bar buttons API is not available under Windows XP.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 23:58:22 +00:00
Vadim Zeitlin
79fb4e2250 Fixes to wxFont strike-through support in wxOSX.
Don't create strike-through fonts by default.

Also add support for strike-through in wxCarbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 11:17:54 +00:00
Vadim Zeitlin
c2e18d75e5 Fix wxCALL_FOR_EACH() to work with more than 2 arguments with MSVC.
Due to a bug in MSVC handling of __VA_ARGS__ (see
https://connect.microsoft.com/VisualStudio/feedback/details/380090/variadic-macro-replacement)
wxCALL_FOR_EACH() didn't work correctly as long as more than two arguments
were used with it.

Work around the bug by protecting __VA_ARGS__ from being incorrectly passed as
a single token to the macro being called on every step: this was already done
for wxCALL_FOR_EACH itself with wxCALL_FOR_EACH_, but we need to do it for all
the helper macros too.

Also add a test checking that this does, actually, work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 00:59:53 +00:00
Vadim Zeitlin
9ecf317092 Implement strike-through support in wxFont in wxOSX.
Implement support for this attribute in wxOSX too.

Closes #16547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-11 17:05:33 +00:00
Vadim Zeitlin
56d51c311a Fix wxUSE_GRAPHICS_DIRECT2D definition in setup.h files.
Define it in wx/msw/setup_inc.h and not in wx/msw/setup0.h itself to ensure
that it survives the regeneration of this file using build/update-setup-h.

Also only set wxUSE_GRAPHICS_DIRECT2D to 1 for VC10+ and not VC9 as the latter
lacks Direct2D header in its default SDK version.

Finally also update comments to explain the various settings more clearly and
remove outdated information (wxGraphicsContext is not experimental any more).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:28 +00:00
Vadim Zeitlin
91b7aab4c2 Fix build with g++ 3.4 with -pedantic[-errors] option.
The use of variadic macros results in a warning/error if -pedantic[-errors]
is used when compiling C++98 code as they are only formally part of C99 (or
C++11). With g++ 4 and later, this can be avoided by using -Wno-variadic-macros
option, but it doesn't exist in g++ 3, so a nasty workaround in the header
itself is required: mark it as system header in order to fix compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:08 +00:00
Vadim Zeitlin
1addaeaa75 Add wxUIActionSimulator::Select().
Add a helper to select an item in a wxChoice, wxComboBox, wxListBox or similar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:01 +00:00
Vadim Zeitlin
0e722a20e7 Set layout direction for all wxCompositeWindow parts.
Forward SetLayoutDirection() to both the base class and all the children, just
as we already do for the other setters.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:51 +00:00
Vadim Zeitlin
dfb9976cc3 Simplify and make more flexible wxCompositeWindow::SetForAllParts().
Allow calling any function compatible with the argument type instead of
requiring "bool" return type and the exact match of the parameter type, which
forced us to define a separate DoSetForAllParts() helper.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:46 +00:00
Vadim Zeitlin
060cf2666d Fix setting RTL direction for wxTextCtrl without wxTE_RICH in wxMSW.
Plain EDIT text controls don't support WS_EX_LAYOUTRTL, use WS_EX_RTLREADING
for them instead.

See #11583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:42 +00:00
Vadim Zeitlin
c5f557cd3a Add a generic wxExpectAny helper class for GUI testing.
This is similar to the existing wxExpectModal<wxMessageDialog>, but can be
used to dismiss any dialog for which it's just enough to press some button,
not just wxMessageDialog.

It's convenient to use it as

	wxTEST_DIALOG(wxYield(), wxExpectAny(wxID_OK));

if some custom dialog which can be safely dismissed is expected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:30 +00:00
Vadim Zeitlin
9a377ec117 Implement wxListBox::EnsureVisible() for wxMSW.
Manually check whether the item is currently visible and scroll the listbox
just enough if it isn't.

Closes #3224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:17 +00:00
Vadim Zeitlin
dc65fa8d5a Allow recursive calls to wxEventLoop::Yield().
There doesn't seem to be any reason to forbid them and this change allows
wxExecute() without wxEXEC_NOEVENTS to work without assertion failures when
called from inside wxYield().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:06 +00:00
Bryan Petty
e63b4ccca0 Add wxUSE_TASKBARBUTTON under MSW port.
Taskbar button features are only available under MSW port.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 15:59:26 +00:00
Bryan Petty
124129a45f Rename appprog.{h,cpp} to appprogress.{h.cpp}.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:58:55 +00:00
Bryan Petty
eb6ed7e74c wxUSE_TASKBARBUTTON should be disabled on wince.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:58:39 +00:00
Bryan Petty
db13dbc1f6 Move wxAppProgressIndicator into its own header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:58:12 +00:00
Bryan Petty
49ed30caae Use the usual WXHWND instead of wxWidget.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:57:50 +00:00
Bryan Petty
163a78c76c Fix too many friends of wxTaskBarButtonImpl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:57:38 +00:00
Bryan Petty
3caf0f6889 Fix mingw warning of using anonymous type in wxTaskBarButtonImpl fields.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:57:30 +00:00
Bryan Petty
0c6b03c392 Fix coding nits.
- enums shouldn't be DLL-exported,
- Placement of "{"
- Always have dtor of wxGuage and wxFrame.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:57:20 +00:00
Bryan Petty
cf5b3021c6 Don't link shlwapi directly.
For MSVC use #pragma comment to link shlwapi, and for MinGW use dynamic
loading of this library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:57:06 +00:00
Bryan Petty
eb4cdf4a3d Fix Wreorder of m_maxValue in the wxAppProgressIndicator.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:56:54 +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
04039e01ad Suppress warning: type uses the anonymous namespace.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:56:15 +00:00
Bryan Petty
6609b57dd7 Fix mingw warning: passing NULL to non-pointer argument.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:56:05 +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
1ef98f2533 Support setting AppUserModelID of wxTaskBarJumpList.
Specifies a unique Application User Model ID (AppUserModelID) for the
application whose taskbar button will hold the custom Jump List built
through the methods of this class. This parameter is optional.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:55:01 +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
de7b819cdc Move implementation of jump list to class wxJumpListImpl.
Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 14:54:30 +00:00