Commit Graph

15992 Commits

Author SHA1 Message Date
Vadim Zeitlin
dcbf35f87c Use RIAA wrapper for wxSpinCtrl event disabling in wxGTK.
The use of wxSpinCtrlEventDisabler class ensures that we never forget to
reenable the events after disabling them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:10 +00:00
Vadim Zeitlin
b736d59eb5 Don't generate any events from wxSpinCtrl and wxSpinCtrlDouble methods.
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but
this was still the case for the generic version (and hence for
wxSpinCtrlDouble under MSW too) and wasn't documented.

Fix all versions to avoid sending events for programmatic actions, add unit
tests checking this behaviour and document it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:00 +00:00
Vadim Zeitlin
33d953e748 Add wxPropertyGridPageState::GetColumnFullWidth().
This method allows to get the full width needed by wxPropertyGrid and is
useful for determining the space to allocate for it, e.g. when creating a
popup showing the property grid, as shown by the changes to the sample.

Closes #15368.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 13:05:42 +00:00
Julian Smart
d4d83a46a9 Comment-only update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-04 07:58:47 +00:00
Paul Cornett
cbabf356ce remove ancient defines left over from GTK1
and some minor cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-03 04:48:46 +00:00
Paul Cornett
59f76658d3 remove obsolete check for GTK 2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-03 04:39:45 +00:00
Paul Cornett
4ae5ada038 defer calling SetCanFocus() on wxGTK until after creation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-31 16:03:51 +00:00
Stefan Csomor
f7105c8fe2 adapting to new event version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-28 14:52:47 +00:00
Stefan Csomor
0e4a6d339a using Run of base class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-28 14:32:35 +00:00
Vadim Zeitlin
f54debbae5 Work around missing mode_t definition with ICC.
Just handle it in the same way as MSVC.

Closes #15361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-28 13:08:23 +00:00
Stefan Csomor
cf126cf22b using Run of base class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 20:22:40 +00:00
Václav Slavík
5d9b5db01e Make wxComboCtrlBase::Set*groundColour() methods public.
SetForegroundColour() and SetBackgroundColour() were -- presumably
accidentally -- protected in wxComboCtrlBase, even though they are
documented public virtual methods of wxWindow. This prevented their
use from user code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 19:39:37 +00:00
Stefan Csomor
33c07ec774 bracketing for correct builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 19:15:38 +00:00
Stefan Csomor
a8123c1359 OSX adaptions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 19:00:25 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
6535170f3d Allow using custom method names in wxHTTP.
Add wxHTTP::SetMethod().

Also simplify the code by determining the method to use in Connect() instead
of doing it in BuildRequest() itself.

Get rid of the now unused wxHTTP_Req enum.

Closes #15354.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-25 21:55:13 +00:00
Vadim Zeitlin
7e81e3a796 Fix build with wxUSE_FFILE=0.
Add the missing "#if wxUSE_FFILE" checks and add fallbacks to wxFile if it's
available.

Closes #15353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-25 21:55:06 +00:00
Vadim Zeitlin
11bf9fea53 Define wxLongLong_t for Intel compiler.
It supports the same __int64 type and printf() format specifier for it as
MSVC does under Windows.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-25 21:54:58 +00:00
Stefan Csomor
b8f0ac88a5 adding OnLaunched
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 17:57:05 +00:00
Vadim Zeitlin
1b7c3d909a Compilation fix for PCH-less build after r74586.
Don't use wxWindow methods in wx/container.h, move AcceptsFocus()
implementation to containr.cpp.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 13:18:30 +00:00
Vadim Zeitlin
bd6ca54f63 Fix tab navigation bug with radio boxes without enabled items.
There was a bug similar to the one in the preceding commit with radio boxes
under wxMSW too: if all radio box buttons were disabled (or hidden, although
this should be much more rare in practice, unlike the disabled case which was
deemed to be rare in r74583 commit message but turned out to actually happen),
the radio box still pretended to accept focus but didn't really do it.

Fix this by allowing to override wxWindow::CanBeFocused() and do it in
wxRadioBox to check whether we have any enabled visible items.

Also add a check for CanBeFocused() to wxControlContainer code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 12:44:33 +00:00
Vadim Zeitlin
dee22e3198 Fix tab navigation bug with static boxes without enabled children.
wxControlContainer::AcceptsFocusFromKeyboard() returned true even if the
control didn't have any currently enabled -- and hence accepting focus --
children. This resulted in strange wxEVT_NAVIGATION_KEY propagation as it
unexpectedly wasn't handled in the control which pretended to accept focus and
instead bubbled up back into the parent, resulting in the focus returning to
the first child of the parent instead of skipping the static box with disabled
children and going to the next enabled child.

Fix this by checking that we have children that can be focused right now and
not only children that are focusable. Notice that this doesn't take care of
calling wxWindow::SetCanFocus() correctly when the children enabled/disabled
state changes so there might still be other problems, notably under wxGTK
where SetCanFocus() does something non-trivial, but it at least improves
things under wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 12:44:29 +00:00
Vadim Zeitlin
043ad13ffe Fix tab navigation into radio boxes in wxMSW.
Radio boxes refused to take focus from keyboard as their
wxControlContainer::AcceptsFocusFromKeyboard() always returned false because
the base wxStaticBox class disabled setting the focus to the control itself
and wxRadioBox doesn't have any children at wx level in wxMSW.

Fix this by reenabling "self focus" in wxRadioBox to make it possible to
accept focus from keyboard. This is not ideal as it doesn't take into account
e.g. radio boxes without any items or with all items disabled or hidden, but
this should be rare and would require virtualizing all children access at
wxControlContainer level, i.e. would be quite non-trivial so don't do this for
now as this, at least, fixes the navigation in common/normal case.

Also remove the unnecessary AcceptsFocus() override from wxRadioBox as this is
now done at wxControlContainer level.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 00:43:33 +00:00
Vadim Zeitlin
2c750daecd No real changes, just refactor wxControlContainer code a little.
Extract the call to wxWindow::SetCanFocus() into a separate
UpdateParentCanFocus() function as it can be necessary to do it from places
other than UpdateCanFocusChildren() too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 00:43:29 +00:00
Vadim Zeitlin
da6239561d Rearrange Windows checks in wx/platform.h to be more logical.
Use __WINDOWS__ symbol as the primary symbol indicating Windows instead of
using all of _WIN32, __WIN32__ and __WINDOWS__.

Also automatically define __WINDOWS__ if __WXMSW__ is defined as this port
only can be used under Windows and doing it like this fixes compilation in the
case when the platform ends up being not defined at all, closes #15342.

Finally, don't assume Windows by default but give an error if we can't detect
the platform. This shouldn't happen in practice but seems a safer thing to do
if it ever does happen.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-22 23:37:24 +00:00
Stefan Csomor
15160da216 further routing into wxApp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-22 18:33:01 +00:00
Stefan Csomor
038c99477c wiring osx native notification during launch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-22 16:17:27 +00:00
Václav Slavík
cbc8576a9b Add functor-taking overload of CallAfter().
This is a generalization of the existing method-calling overloads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-21 10:05:03 +00:00
Vadim Zeitlin
4c8acbdfd5 Just forward Stricmp() in wx/string.h to wxCRT_StricmpA().
Don't redo the tests already done in wx/wxcrtbase.h in wx/string.h too,
especially as they were not done correctly there (they didn't take into
account the case of MinGW in strict ANSI mode). Just call wxCRT_StricmpA().

This also allows us to get rid of HAVE_STRCASECMP_IN_STRING[S]_H tests in
configure.

Closes #15349.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 17:27:20 +00:00
Vadim Zeitlin
e24c4e1238 Set mouse cursor correctly over image map links in wxHTML.
The cursor didn't change to a link one when the mouse was over link areas in
an image map.

Fix this by generalizing wxHtmlCell::GetMouseCursor() into GetMouseCursorAt().

Closes #15350.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 17:27:14 +00:00
Vadim Zeitlin
150dcda942 Allow unsetting wxMenuItem as start of radio group too.
This must be called if another radio item is inserted before the current
starting one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:35 +00:00
Vadim Zeitlin
924c9b4591 No changes, just fix some comments in wxOSX wxMenu header.
Mostly clarify DoInsertOrAppend() comment, the "is"/"if" typo made it rather
unclear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:32 +00:00
Vadim Zeitlin
3b28ca6503 Get rid of wxMenu::m_startRadioGroup in wxOSX.
This code was probably copied from wxUniv but was wrong as we can't rely on
the items being always inserted in order. This commit on its own fixes
removing the first radio group menu item but it also makes possible to
properly implement the insertion of new items in the middle of an existing
radio group which couldn't be done with m_startRadioGroup approach at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:26 +00:00
Vadim Zeitlin
e3f4ca2e1e Add wxMenuItem::IsCheck() and IsRadio() accessors.
The latter will be convenient to use in the upcoming changes to wxOSX radio
items management code and add the former for the symmetry.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:20 +00:00
Vadim Zeitlin
b545d7ab09 Really fix wxUSE_PREFERENCES_EDITOR requirements check.
The changes of r74532 were incomplete/wrong and the fix of r74536 didn't
entirely fix the logic here, so try to do it again, hopefully correctly this
time.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 22:37:52 +00:00
Robin Dunn
6a4480ec29 Only disable wxUSE_PREFERENCES_EDITOR if wxUSE_NOTEBOOK is False, not if it's True.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 18:04:43 +00:00
Vadim Zeitlin
92e839baa4 Move HAVE_WCSXXX from wx/osx/config_xcode.h to wx/osx/chkconf.h.
The latter file is also used when building from the command line while the
former is only used in Xcode build, as its name indicates (which didn't help
me to notice it, however).

Also restore the test for wcsftime() in configure as it is available even on
older systems but do not test for strnlen() -- as it is not.

These changes amend those of r74523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 16:42:10 +00:00
Vadim Zeitlin
a94529575a Add wxUSE_PREFERENCES_EDITOR and the corresponding configure option.
This was somehow forgotten when wxPreferencesEditor was added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:59 +00:00
Vadim Zeitlin
ccf8bf20ca Fix new wxExecute() code compilation with wxUSE_CONSOLE_EVENTLOOP==0.
Nothing is going to work without the console apps/base traits support for the
event loop but at least make it compile.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:53 +00:00
Vadim Zeitlin
45c103404c Avoid including pipe stream headers when streams are disabled.
Fixes compilation with wxUSE_STREAMS==0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:46 +00:00
Vadim Zeitlin
166988aa35 Don't test for wide character functions in configure under OS X.
The tests for these functions may succeed on the system we're running under
but the functions may not be actually available on the system the application
is going to run under (if it's < 10.7).

So use our own replacements for these functions unless 10.7 was explicitly
chosen as the minimal possible version.

An alternative solution could have been to use weak linking but this is more
difficult and there is no real gain (performance would need to be measured
first).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:31:51 +00:00
Vadim Zeitlin
ad653fa230 Disable wxUSE_ENH_METAFILE for wxGTK builds.
This can happen to be defined in wxGTK builds under Windows.

Closes #15332.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 17:12:48 +00:00
Vadim Zeitlin
1f0edb5af0 Don't use wxCriticalSection in wxWakeUpPipeMT if wxUSE_THREADS==0.
In fact, don't define wxWakeUpPipeMT class at all when not using threads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 11:34:27 +00:00
Stefan Csomor
44c8e75ba9 support for @2x notation for wxBITMAP_TYPE_PNG (non-resource) on retina displays
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 11:16:32 +00:00
Vadim Zeitlin
4de55d6f31 Restore embedding manifest when using MinGW.
The changes of r73483 broke inclusion of the manifest in the programs built
using MinGW because wxUSE_RC_MANIFEST was never defined. Somehow nobody
complained about it but this resulted in using comctl32.dll 5.80 instead of
6.0 and e.g. problems with toolbar appearance (see #13512).

Do use the manifest by default with MinGW and, in fact, all the other
compilers if any other ones still work, as only MSVC is known to embed the
manifest automatically and we take care of it separately.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 23:23:27 +00:00
Vadim Zeitlin
e87d78bb36 Move wx/msw/gccpriv.h inclusion back to wx/platform.h from wx/compiler.h.
Do keep compiler-specific wxCHECK_MINGW32_VERSION() in wx/compiler.h as it's
needed by wx/cpp.h which includes wx/compiler.h only. But put the rest of the
stuff in gccpriv.h in its old place as including it before wx/setup.h didn't
work correctly and was unnecessary anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 23:23:14 +00:00
Vadim Zeitlin
20125017a4 Extract compiler-specific macro definitions in a new wx/compiler.h.
This solves the problem with wx/defs.h -> wx/platform.h -> wx/setup.h which
resolves to msvc/wx/setup.h -> wx/version.h -> wx/cpp.h include path which
resulted in __VISUALC__ not being defined in wx/cpp.h.

This problem was not new but went unnoticed for a long time and was only
discovered when wxCHECK_VISUALC_VERSION() started being used in wx/cpp.h too
as now the compiler started warning about wrong #if syntax due to it being
undefined.

Putting the compiler-specific definitions in a separate file allows this file
to be included from wx/cpp.h to ensure that these symbols are always defined
in it and also makes things a little better organized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 02:30:21 +00:00
Vadim Zeitlin
9fe7a9ad57 Make destructors of COM interface classes virtual.
This is needed to at least silence g++ warnings but may actually even fix a
real problem as these classes can be inherited from and are deleted via a
pointer (to "this" itself, in Release() implementation).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-12 14:12:35 +00:00
Vadim Zeitlin
2aa54d47d6 Fix warnings about implicit float or double to int conversions in wxMSW.
Make the conversions explicit as these warnings are harmless.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-12 14:12:31 +00:00
Vadim Zeitlin
168d1f65c1 Reconcile HAVE_VARIADIC_MACROS and wxHAS_VARIADIC_MACROS definitions.
The main user-visible effect of this change is that giving configure
--disable-vararg-macros argument now really disables the use of variadic
macros whereas it didn't disable them in wx/cpp.h before.

It is, of course, also less confusing to not have two very similar but
different symbols.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 22:40:47 +00:00
Václav Slavík
19c453d0ac Use int instead of wxWindowID in wxNewId() and friends.
The functions are available in wxBase builds too, but wx/windowid.h
isn't. Rather than always including that header, just use int, for which
wxWindowID is a typedef. This keeps the functions available in wxBase
for compatibility and is consistent with how IDs are handled in other
parts of wxBase, particularly wxEvent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 07:53:35 +00:00
Václav Slavík
1c6a98048b Use wxWindowID in wxNewId() and related functions.
wxNewId(), wxRegisterId() and wxGetCurrentId() functions all work with
window IDs, so they should use the dedicated type. Previously, they
worked with long, which is not even the same type (wxWindowID is int),
causing implicit type conversion warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 06:58:35 +00:00
Vadim Zeitlin
72c5855f5c Recognize VC12 (a.k.a. MSVS 2013) and define __VISUALC12__ for it.
Closes #15320.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:29:48 +00:00
Vadim Zeitlin
aad2997b67 Add default ctors and Create() to wxDirDialog and wxFileDialog in wxOSX.
Allow two-step creation of these classes.

Closes #15316.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:12:07 +00:00
Václav Slavík
17473a770a Fix lots of warnings reported by Clang.
Mostly potentially lossy implicit conversions in headers (long->int). Also dangling else warnings. Struct/class mismatches.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 16:41:34 +00:00
Václav Slavík
8778519200 Only return -1,0,1 from wxXmlResource::CompareVersion().
In other words, do as the comment says.  Also fixes an implicit
conversion warning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 16:38:19 +00:00
Vadim Zeitlin
1e5b533ec0 Fix restoring the status bar help message after closing MSW menu from keyboard.
Add a hack to ignore WM_MENUSELECT messages we get for the top level menu
items: we must not clear the status bar help message when we get those because
it had just been restored to the original message that was there before the
menu was opened from the base class wxEVT_MENU_CLOSE handler, but this message
comes after it when keyboard is used to close the menu.

Closes #15315.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 12:28:06 +00:00
Václav Slavík
50d2908480 Fix VC++ warnings about __has_include().
The compiler warns about content after defined(__has_included), so avoid
the issue by putting these Clang tests inside one big #ifdef
__has_included block.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 17:29:02 +00:00
Václav Slavík
d459632844 Compilation fix for r74457.
Remove stray #endif from incorrectly merged changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 16:12:05 +00:00
Václav Slavík
3a07232f32 Fix OS X compilation in C++11 mode with libc++.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 15:47:13 +00:00
Václav Slavík
f256de1125 Work around wxFinite() definition conflict with <cmath>.
Using the GNU libstdc++ or Clang's libc++ implementations of the
standard library, <cmath> inclusion undefines the isfinite macro,
resulting in compilation errors when wxFinite() is used.  <cmath> can be
included unintentionally, e.g.  wx/hashmap.h may result in its inclusion
when using STD containers.

Work around this mess by checking if one of these <cmath>
implementations were already included and using std::isfinite() in that
case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 15:44:01 +00:00
Václav Slavík
f8c2c6f24d Use wxConvAuto in wxFile::Write().
For consistency with wxFFile.

No real change, as wxConvAuto will default to UTF-8 when writing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 11:46:53 +00:00
Vadim Zeitlin
38aae140ac Forbid creation of wxStandardPaths object directly.
This happens to work under MSW and Unix where there is only one
wxStandardPaths class for both the console and the GUI applications but
doesn't return the correct result under OS X where the Core Foundation
version, returned by wxStandardPaths::Get(), has to be used for the GUI
programs. And historically this confused a lot of people, so just ensure that
they can't accidentally create an object of the wrong type any more.

Closes #13537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 23:14:21 +00:00
Paul Cornett
633e19307c avoid GTK+ prefixes for our tree entry code, it is not part of GTK+, should have been part of r74420
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 17:27:53 +00:00
Paul Cornett
11f1e38e26 avoid GTK+ prefixes for our tree entry code, it is not part of GTK+
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 16:35:40 +00:00
Paul Cornett
92d00a3615 remove symbol exports, this code is private to the library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 16:04:28 +00:00
Paul Cornett
3540b72b5f remove empty GtkTreeEntryClass
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 15:58:42 +00:00
Paul Cornett
79bca169e5 move treeentry_gtk.h to include/wx/gtk/private/
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 15:44:21 +00:00
Vadim Zeitlin
5ac5e40e41 Prevent duplicate menu event processing in MDI windows.
Record the object propagating the given event upwards in the event object
itself and use it in wxMDIParentFrame to determine whether the event being
handled is already coming from wxMDIChildFrame and avoid sending it back for
processing it there again in this case.

This is ugly and makes wx event processing even more complex but this is the
only way I could find to ensure that

(a) Both the child and the parent frames get the events from the toolbar
    (even though the toolbar parent is the parent frame and hence normally
    the child wouldn't get notified about them at all and so the forwarding
    at wxMDIParentFrame level is required to make this work).

(b) The child gets the event only once, whether it comes from a toolbar (and
    hence indirectly via the parent frame) or from the child menu (and hence
    directly to the child, at least in wxMSW).

This commit fixes the event propagation unit test case, at least under MSW and
GTK.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 22:18:42 +00:00
Vadim Zeitlin
821d856a61 Rewrite wxExecute() implementation under Unix.
This commit changes wxExecute() to handle SIGCHLD to be notified about the
child process termination instead of detecting when the file descriptor
corresponding to the other end of a pipe opened in the parent process was
closed in the child as this was not reliable and could (and did) result in not
detecting the termination of the child processes that closed all their file
descriptors before exiting.

This commit also removes a lot of platform-specific code duplicating the
generic event loop sources support and reuses it for wxExecute() purposes too.

Final big change is that wxEndProcessData was merged into wxExecuteData and we
don't have two similar but quite different classes any more but just one,
which is used both to pass the information from wxExecute() to wxAppTraits
methods and to store this information until the child termination.

Closes #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:32:16 +00:00
Vadim Zeitlin
76015a6bb7 Add a helper wxApp::GetValidTraits() method.
This method always returns some valid traits, even if we don't have wxTheApp
(which is possible in the console applications) or if its GetTraits() was
overridden to return NULL (which shouldn't be, but still guard against this).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:31:49 +00:00
Vadim Zeitlin
d5ab427f23 Make Unix wxAppConsole signal handling more flexible.
Instead of hardcoding the call to WakeUpIdle() in the signal handler itself,
just wake up the event loop when we catch a signal. This will still result in
WakeUpIdle() being called, before the next event loop iteration, but it will
also allow us to do other things on wakeup from signal as it will be done in
the upcoming wxExecute() changes to support wxEXEC_NOEVENTS in console
applications.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:31:03 +00:00
Vadim Zeitlin
39bc0168c3 Change wxWakeUpPipe to be a wxEventLoopSourceHandler.
No real changes but use wxEventLoopSource::AddSourceForFD() instead of
wxFDIODispatcher::RegisterFD() for this pipe because this is the preferred way
and because it will allow reusing this class for wxExecute() purposes later.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:30:39 +00:00
Vadim Zeitlin
64b4a35954 Include wx/evtloop.h from wx/evtloopsrc.h.
This is necessary to ensure that wxUSE_EVENTLOOP_SOURCE which wraps the entire
contents of this header is defined if it's included directly and not after
already including wx/evtloop.h.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:30:16 +00:00
Vadim Zeitlin
cd794127ff Include <fcntl.h> from a header using fcntl().
No real changes, just make the header self-containing instead of relying on
the file including it to include <fcntl.h> itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:53 +00:00
Vadim Zeitlin
cda5c26a48 Add wxStreamTempInputBuffer::ReadAll() helper.
This just reads everything remaining in the stream in a blocking way and will
be used to get the data remaining in the stream buffers after the child
process had been already closed (and hence can't write any more to it and
there is no risk of deadlock).

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:29 +00:00
Vadim Zeitlin
a25b76f5f9 Use CFSocket instead of CFFileDescriptor in wxCFEventLoopSource.
Use OS X socket APIs for monitoring file descriptors. They are more flexible
than CFFileDescriptor functions and can be used with any descriptors, not
necessarily the socket ones.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:05 +00:00
Vadim Zeitlin
71e9885be0 Make wxEventLoop::AddSourceForFD() static.
Any event sources should be registered with all the event loops, including the
ones that will be started in the future, and not only the current (and
potentially not even existing yet) one. So make AddSourceForFD() method static.

To still allow it to do different things in console and GUI applications, as
it must, virtualize it via the new wxEventLoopSourcesManager class which has
different implementations in the two cases, returned via wxAppTraits as usual.

Notice that this required moving the implementation of this method from
src/osx/core/evtloop_cf.cpp to src/osx/core/utilsexc_cf.cpp as the former file
is base-only and didn't have access to wxGUIAppTraits.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:28:42 +00:00
Vadim Zeitlin
5e38246378 Extract wxFDIOEventLoopSourceHandler in its own header.
No real changes, this is just in preparation for the further refactoring.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:28:16 +00:00
Vadim Zeitlin
bd7cea0ea6 Split wxWakeUpPipe class in MT-unsafe and MT-safe parts.
This class can also be useful when it's used in the main thread only, so
leave the lock-less part of the code in wxWakeUpPipe and derive a separate
wxWakeUpPipeMT from it for the use in wxConsoleEventLoop where it can be used
by multiple threads.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:27:53 +00:00
Vadim Zeitlin
2ccfebab09 Extract PipeIOHandler class into a header and rename to wxWakeUpPipe.
No real changes to the class, just make it possible to reuse it outside of
Unix wxEventLoop code.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:27:28 +00:00
Vadim Zeitlin
9b70925d3e No changes, move wxStreamTempInputBuffer to a header file.
Get rid of the surprising src/common/execcmn.cpp which had a .cpp extension
but was supposed to be used as an included file only and move its contents to
a new private header to make using wxStreamTempInputBuffer class simpler.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:27:02 +00:00
Vadim Zeitlin
bfabc7f47c Extract wxPipeInputStream and wxPipeOutputStream in a header.
No real changes, just put these classes in a private header. They're still not
part of the public API but at least it will be easier to reuse them inside the
library itself in the upcoming commits.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:26:38 +00:00
Vadim Zeitlin
d3ad22bdb3 Add wxEventLoop::ScheduleExit().
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:26:13 +00:00
Vadim Zeitlin
c738d187e9 Add wxEventLoopBase::DoRun().
Call it from public Run() after setting the loop as active and resetting
m_shouldExit flag.

No real changes, just cut down on the code duplication among the ports and
make it easier to implement the upcoming changes. see #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:25:23 +00:00
Vadim Zeitlin
a1fe5f9048 Move wxEventLoopManual::m_shouldExit to wxEventLoopBase.
No real changes, just make this flag available to the other event loop
implementations as they will need it soon.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:24:58 +00:00
Vadim Zeitlin
8d40c05f41 Add "OSX" prefix to wxCFEventLoop::DoRun() and DoStop() methods.
Just rename these methods to avoid clashes with DoRun() that will be added to
the base class soon, no real changes.

This is done in preparation for improving nested event loops support, see #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:24:34 +00:00
Vadim Zeitlin
7c60222510 Add wxTimer::StartOnce().
This is a simple wrapper for wxTimer::Start(timeout, wxTIMER_ONE_SHOT) but is
often more readable and is definitely better than Start(timeout, true) which
many people still use in spite of wxTIMER_ONE_SHOT existence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:24:10 +00:00
Paul Cornett
e59127de8b remove unused function GTKSetItem()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-02 16:35:43 +00:00
Paul Cornett
8e125ff114 Use gtk_list_store_insert_with_values() to set entry at same time item is inserted.
This should ensure that the entry is always valid, removing the need for r74315.
Also simplify DoInsertItems() by using DoInsertItemsInLoop().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 05:10:22 +00:00
Vadim Zeitlin
6f65a5e1aa Forward events to active child in wxMDIParentFrameBase, not only wxMSW.
Menu, toolbar and update UI events should be forwarded to the active child
under all platforms in MDI applications and not only MSW, so move TryBefore()
overload from wxMSW wxMDIParentFrame to wxMDIParentFrameBase.

This should make things more consistent in general and notably fixes the lack
of toolbar events in wxDocChildFrame since the changes of r73928.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:53:44 +00:00
Vadim Zeitlin
0280c08726 Use wxListColumnFormat for wxListCtrl::AppendColumn() format argument.
This is safer than using just an untyped int.

Closes #15265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:52:11 +00:00
Vadim Zeitlin
b712cc040f Fix wxIMAGE_QUALITY_HIGH definition.
Embarrassingly, wxIMAGE_QUALITY_HIGH was never used as it had the same value
as wxIMAGE_QUALITY_BILINEAR due to the changes to these constants in r67203.

After fixing its value in the enum, also change the switch on this enum
elements to avoid g++ warnings about unhandled enum values.

See #12845, #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:51:47 +00:00
Vadim Zeitlin
88343ddae9 Allow resetting background colour of wxHtmlContainerCell.
Don't use m_UseBkColour flag which remained always set once
SetBackgroundColour() had been called, but just rely on m_BkColour itself
being valid to determine whether we should use it. This allows to reset the
background colour after setting it.

Closes #15287.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:50:37 +00:00
Stefan Csomor
bc7a3ceeba support getting device resolution on all osx ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-28 13:24:27 +00:00
Stefan Csomor
9c4672b0f8 new method for contentScaleFactor on main screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 12:48:46 +00:00
Stefan Csomor
c944835aaa native bitmap scaling codes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 07:24:15 +00:00
Stefan Csomor
cf0a184480 adding impls to wxBitmap on msw as this doesn't inherit from base - Thanks Vaclav!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 17:37:17 +00:00
Stefan Csomor
7f74897f7f adding default for Create with dc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 17:15:10 +00:00
Stefan Csomor
b5ec0c78b5 incomplete paste error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 16:28:25 +00:00
Stefan Csomor
a066916baa adding default impl for CreateScaled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 16:25:32 +00:00
Stefan Csomor
cfcab929d4 virtual method hiding in GTK, so add direct implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:41:23 +00:00
Julian Smart
8a28cd66a6 Applied colspan corrections, #15274 and #15275 (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:30:55 +00:00
Stefan Csomor
f8bfebfcb8 native scaling support for bitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 14:02:11 +00:00
Stefan Csomor
a85ccd79fd fixing naming to GetScaleFactor, adding default Create with a dc parameter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 13:54:15 +00:00
Stefan Csomor
9afa58e3b9 default implementation for scaled bitmaps properties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 13:21:20 +00:00
Stefan Csomor
538a2cfaf2 adding ContentScaleFactor support to dc - defaulting to 1.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 12:24:34 +00:00
Vadim Zeitlin
4f9ccec517 Add wxBookCtrlBase::DoSetSelectionAfterRemoval() and use it in wxSimplebook.
This fixes the wrong handling of the selection in wxSimplebook when the
currently selected page was deleted.

Also extend the unit tests to check for this bug.

Closes #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:39:39 +00:00
Vadim Zeitlin
dcb16c298b Undo "Forward events to active child at MSW, not wx, level in wxMDIParentFrame."
Unfortunately, forwarding MSW messages only takes care of the menu events but
not the toolbar ones -- which should be handled in the same way but were not.

So restore the old behaviour, the problem with menu items disabled in the
parent frame but enabled in the child one will be fixed differently.

This reverts r73927.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 13:07:55 +00:00
Vadim Zeitlin
540dacb643 Add WX_ATTRIBUTE_UNUSED and use it for typedefs to avoid g++ 4.8 warnings.
g++ 4.8 warns about unused typedef's in local scope resulting in hundreds of
warnings when building wx, suppress them by using WX_ATTRIBUTE_UNUSED for
these typedefs.

Closes #15137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 00:53:15 +00:00
Stefan Csomor
f082dcd598 using common GetContentScaleFactor throughout part 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-19 20:28:01 +00:00
Stefan Csomor
f86190702b adding magnification API into the wxWindow classes for best retina support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-17 17:41:34 +00:00
Vadim Zeitlin
0ec98fd6c9 Improve wxGrid cell wrapping in wxGridCellAutoWrapStringRenderer.
Wrap the words too long to be shown on one line on several lines.

Also take the line breaks and TABs into account.

Closes #15249.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-16 10:50:54 +00:00
Stefan Csomor
68d5ce9099 adding new constructor for best dc-compatibility of bitmaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-15 16:29:04 +00:00
Stefan Csomor
e535481318 reusing existing API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 14:04:41 +00:00
Vadim Zeitlin
56d85ddeec Remove the unused code instead of commenting it out.
Just clean up the fixes of r74197.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 13:58:15 +00:00
Vadim Zeitlin
1c25a4c2ae Use two step creation of wxListHeaderWindow to avoid reentrancy under OSX.
This improves the solution of the problem already solved in r74197 by
separating setting of m_headerWin variable from the window creation instead of
using an explicit recursion check.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 13:57:28 +00:00
Stefan Csomor
053f5a55da supporting max len event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 22:04:38 +00:00
Stefan Csomor
0afeb753e0 guarding open combo box against AppDefined NSEvents issued by wxEventLoop::WakeUp, fixes 15115
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 21:18:52 +00:00
Stefan Csomor
13167e72d6 exposing useful typedefs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 20:41:04 +00:00
Stefan Csomor
d4e5c5b98a adding hook, but unfortunately no solution yet for wxComboBox::SetEditable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 06:51:24 +00:00
Stefan Csomor
fde8374482 cocoa needs a special implementation for read-only combo box
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 05:45:35 +00:00
Stefan Csomor
12bb29f543 missing commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 23:14:20 +00:00
Stefan Csomor
d60957aac5 better support for ui action simulation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 17:54:07 +00:00
Václav Slavík
31f125ed00 Use correct extensions in wxDynamicLibrary::CanonicalizeName() on OS X.
Contrary to the documentation, this function incorrectly appended the
.bundle extension on OS X for libraries as well as modules.

Fixed to use .dylib for libraries (wxDL_LIBRARY) and continue to use
.bundle for loadable modules (wxDL_MODULE). Change GetDllExt() to take optional wxDynamicLibearyCategory argument.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 16:46:49 +00:00
Vadim Zeitlin
5833988cb7 Add wxMouseEvent::GetColumnsPerAction().
This is similar to the existing GetLinesPerAction() but is for, surprise,
columns.

Also change the documentation to say that the value returned by both of these
methods is 3 under "most platforms" as some wxOSX currently uses 1 and not 3.

Closes #15239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-10 15:53:29 +00:00
Robin Dunn
3174a8a92a More docs cleanup and fixes for richtextbuffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-08 23:24:04 +00:00
Vadim Zeitlin
c1818df912 Remove duplicate WXMAKINGDLL_RIBBON-related code.
For some reason both the definition of and test for WXMAKINGDLL_RIBBON was
duplicated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-08 02:23:55 +00:00
Stefan Csomor
ba0cf6af6d exposing wxOSXGetViewFromResponder
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-04 07:06:19 +00:00
Stefan Csomor
09ffaca3a6 adding a more extensive version to arrive at the impl when given a native control, taking into account eg the composited controls of a scrollview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-04 06:54:50 +00:00
Stefan Csomor
19736e6452 make sure we don't execute pending deletes either when in runModel, otherwise reentrancy problems occur
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 14:57:56 +00:00
Stefan Csomor
04a123c642 using ordinary Show for popup windows as on MSW which activates it as well, I'll rewire ShowWithoutActivating for the other use case, fixes #15008
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 13:21:10 +00:00
Stefan Csomor
cf83b0cfb6 refactoring SizeEvent sending
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 12:58:29 +00:00
Stefan Csomor
a002ae4e50 forgot to commit ...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 11:47:53 +00:00
Stefan Csomor
60d66be369 attempt to get the 'new focus' window parameter of a focus kill event set correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 10:37:01 +00:00
Stefan Csomor
c34cd96a33 deal with Cocoa as we do with Carbon, see #15008
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 09:40:50 +00:00
Vadim Zeitlin
4e1e8dc51b Change wxMSW wxTreeCtrl::DoFreeze() to not hide the tree any more.
Hiding the tree when it's frozen, as done in r72665, results in its own
problems, e.g. loss of focus. So don't do this but resize the control to a
very small size when freezing it and restore it to its old size afterwards.

Closes #15166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:36 +00:00
Vadim Zeitlin
926df8a162 Add wxFileDialog::GetCurrentlySelectedFilename().
Also send wxEVT_UPDATE_UI events for the extra controls in wxFileDialog.

The combination of these changes allows extra controls to update their state
depending on the current selection in the dialog. Show a simple example of
doing it in the dialogs sample.

Closes #15235.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:27 +00:00
Vadim Zeitlin
1054bcb21f Fix wxStyledTextCtrl::SetInsertionPointEnd().
This relied on SetInsertionPoint(-1) working like in wxTextCtrl but it didn't.
Add an explicit check to it for consistency with the other classes and to make
SetInsertionPointEnd() work.

Closes #15234.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:16 +00:00
Vadim Zeitlin
0a72cae73d Improve horizontal scrolling in wxRibbonControl.
Scroll by entire "sections", i.e. panes of the ribbon, instead of scrolling by
a fixed number of pixels as it's much more useful and user-friendly to uncover
the next section entirely instead of asking the user to press on the arrow
several times before being able to use it.

Closes #15232.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:11 +00:00
Vadim Zeitlin
1a986642f5 Add wxWindow::BeginRepositioningChildren() and EndRepositioningChildren().
This is just a refactoring of wxMSW code to make it possible to use deferred
window positioning from other places in subsequent commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:03 +00:00
Vadim Zeitlin
4300317631 Make wxSharedPtr::Release() really MT-safe.
Using wxAtomicDec() is not enough, its result also must be checked as it will
return 0 only in one of the threads if multiple threads call it in parallel,
while the old test for m_count==0 could pass for more than one thread,
resulting in deleting the same pointer more than once.

Closes #15227.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:20:58 +00:00
Julian Smart
4c86168d9a Applied patch for #15189 - avoid crash when deleting focused cell (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 15:32:12 +00:00
Robin Dunn
3fc2ee048d Add wxRTTI for the wxFileSystemWatcherEvent class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 16:05:33 +00:00
Vadim Zeitlin
4a8e979925 Add ctor and assign() taking an iterator range to wxVector<>.
Do it for consistency with wxArray and std::vector<>, even if the current
implementation is suboptimal.

See #15216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 14:13:26 +00:00
Vadim Zeitlin
41da7d974a Add ctor from two input iterators to wxArray in STL build too.
This ctor already existed in non-STL build but was omitted from the STL
version.

Closes #15216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 14:13:22 +00:00
Vadim Zeitlin
268331f0db Fix regression in wxGTK wxFilePickerCtrl due to wxFileDialog changes.
Revert the changes of r72979 and fix wxFileDialog::GetDirectory() return
value bug (see #14786) differently to avoid breaking wxFilePickerCtrl which
relies on getting wxEVT_BUTTON event when the associated dialog is dismissed.

Closes #15218.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 13:36:14 +00:00
Vadim Zeitlin
691745ab41 Add a public wxModalDialogHook class for intercepting modal dialogs.
Extract wxModalDialogHook from wx/testing.h into its own wx/modalhook.h,
extend it to allow to be notified not only about showing modal dialogs but
also about dismissing them and document it and show its use in the dialogs
sample.

Also replace all the WX_TESTING_SHOW_MODAL_HOOK macros occurrences with
WX_HOOK_MODAL_DIALOG.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:41 +00:00
Vadim Zeitlin
9bc3af3e64 Fix return value of wxCountingOutputStream::LastWrite().
Don't reuse m_lastcount in wxCountingOutputStream to store the stream length,
this doesn't make any sense and results in LastWrite() returning completely
wrong results as it expects m_lastcount to be the number of bytes written by
the last operation.

Add m_lastPos member to store the stream length instead.

Also correct wxCountingOutputStream documentation.

Closes #15215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:26 +00:00
Vadim Zeitlin
cc437b9654 Add wxInputStream::ReadAll() and wxOutputStream::WriteAll().
Unlike Read() and Write(), these functions always transfer exactly the
specified number of bytes or fail.

See #12056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:16 +00:00
Vadim Zeitlin
0553426814 Delete the associated dialog in wxGTK wx{File,Dir}Button.
The code seemed to rely on Destroy() being called for deleting the dialog, but
it's actually not used for child windows, so do it in dtor instead.

Closes #15156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:18 +00:00
Vadim Zeitlin
622bc15f11 Add conversions to/from long long to wxUniChar.
Allow conversions to/from long long and unsigned long long values in wxUniChar
for consistency with the other integral types.

Also make the code shorter by using helper wxDO_FOR_INT_TYPES() and
wxDO_FOR_CHAR_INT_TYPES() macros to avoid duplicating the same code for all of
the integral types and having to handle wchar_t (and wxLongLong_t now)
specially because sometimes we may need to overload on it and sometimes not.

Finally, add more tests to check that all the wxUniChar methods compile and
work with all the different types.

Closes #15206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:12 +00:00
Steve Lamerton
938506b1f7 Use wxCOMPtr throughout the wxWebViewIE Find code.
As well as making the code a bit neater this seems to fix some memory issues.

See #15207.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-18 14:07:58 +00:00
Vadim Zeitlin
e1bf9a5776 Make wxPreferencesEditor dtor virtual.
Mainly just to suppress g++ warnings about a class with virtual functions but
non-virtual dtor, this class isn't really supposed to be used polymorphically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-17 11:53:43 +00:00
Vadim Zeitlin
8e912ebf47 Initialize wxXmlResourceHandler members in its ctor.
Not sure if this results in any real problems but at the very least memory
checking tools give errors about reading uninitialized memory in
wxXmlResourceHandlerImpl::CreateResource() if we leave them uninitialized, so
do initialize all the pointers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:43:13 +00:00
Vadim Zeitlin
615f9ff096 Allow wxPreferencesEditor::Dismiss() to work when using modal dialogs too.
The modal dialog case is not really different, the dialog may still need to be
dismissed if the associated object doesn't exist any longer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:43:09 +00:00
Vadim Zeitlin
b5c9627778 Add wxPreferencesEditor::ShownModally().
While this is not necessary to use wxPreferencesEditor in normal scenario, it
can be useful if the program needs to handle modal dialogs in some special way.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:43:06 +00:00
Vadim Zeitlin
eaa6958861 Make wxPreferencesEditor::Show() virtual.
This allows derived classes to override it to do something before/after
showing the dialog, which can be useful on the platforms where modal dialogs
are used for wxPreferencesEditor implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:43:02 +00:00
Vadim Zeitlin
654c4b7b14 Allow to specify the title used by wxPreferencesEditor window.
Customize the title is useful for "Settings"-style windows which are used for
editing the properties of the given object, that should be identified in the
window title, as opposed to the global program preferences.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:42:56 +00:00
Vadim Zeitlin
4d623b67ee Add wxEVT_DIRCTRL_FILEACTIVATED wxDirCtrl event.
Allow processing double clicks on the files in the directory control.

Closes #15208.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:33:07 +00:00
Vadim Zeitlin
40c7c7f473 Rename wxEVT_DIRCTRL_CHANGED to wxEVT_DIRCTRL_SELECTIONCHANGED.
This is more consistent with the existing wxEVT_FILECTRL_SELECTIONCHANGED.

Closes #15209.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:33:01 +00:00
Vadim Zeitlin
c6dae1699e Allow associating a validator with wxGridCellTextEditor.
Add wxGridCellTextEditor::SetValidator() for finer control over text input in
wxGrid.

Closes #15176.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:32:55 +00:00
Jouk Jansen
a60b469fa5 m_useExtendedPrecision is only used if the macro wxUSE_APPLE_IEEE is defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 06:18:54 +00:00
Vadim Zeitlin
0b3e395a5c Fix memory leak in wxXmlNode::operator=().
We must delete all children and attributes in the node being overwritten and
not just the first one of each.

Add a unit test exercising this code to be able to check that valgrind doesn't
report memory leak any more after the fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 20:01:58 +00:00
Vadim Zeitlin
bed4928779 Allow shrinking the array with wxArray::resize().
This method did nothing if its argument was less than the current array size,
as it was just a synonym for SetSize() which was documented to behave like
this, but this was inconsistent with std::vector and wxVector resize() which
does shrink the array, so change wxArray version to shrink it too.

Closes #15195.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 13:05:40 +00:00
Václav Slavík
a68c185d22 Move wxTransform2D methods' bodies to geometry.cpp.
They are all virtual and so cannot be inlined anyway and having them in
the header like this confuses the g++ linker into always pulling some of
the methods in merely because geometry.h was included.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-14 16:58:20 +00:00
Vadim Zeitlin
dc8cd788c0 Fix harmless Clang warning about unreachable code.
Unfortunately Clang intelligent flow analysis prevents us from using different
asserts for invalid parameter value and unhandled one, which could happen if
more elements are added to wxMouseButton enum in the future.

Closes #15201.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 23:04:08 +00:00
Stefan Csomor
d9307d006e applying editor part of patch, see #15003
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 18:31:51 +00:00
Vadim Zeitlin
0ba28d4196 Fix wrong wxUSE_ACCEL around wxUSE_HOTKEY-related code in wxMSW.
Closes #15193.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 11:21:37 +00:00
Vadim Zeitlin
f7ef20685f Add wxVector<>::const_reverse_iterator.
Provide this type too for compatibility with std::vector<>.

Closes #15192.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 11:21:32 +00:00
Julian Smart
31be840031 Applied patches for #15184 (wxRichTextAction fix for when the command identifier is wxRICHTEXT_CHANGE_OBJECT) and #15185 (Make adding/deleting wxRichTextTable rows and columns undoable)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 13:39:01 +00:00
Vadim Zeitlin
789ab84044 Add IEEE 754 single/double precision support to wxDataStream classes.
Allow to optionally raed/write float/double values in IEEE 754 single/double
precision formats, respectively, instead of always using the extended
precision format for both of them.

This makes the code more flexible, allowing for better interoperability with
the other programs, and also allows to implement floating point functions in
these classes even when wxUSE_APPLE_IEEE is turned off (as can be the case
because of the licencing concerns for the code in extended.c).

Closes #10625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 00:31:03 +00:00
Vadim Zeitlin
337bbb7a06 No real changes, just rename double variables to "d".
Don't use "i" or "f" for double variable names, this is confusing, especially
when we do it inconsistently.

See #10625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 00:30:49 +00:00
Vadim Zeitlin
61eb6bb673 Extract common parts of wxData{In,Out}putStream in a common base class.
No real changes, just put BigEndianOrdered() and SetConv() methods and the
corresponding fields in a common wxDataStreamBase class instead of duplicating
them in wxDataInputStream and wxDataOutputStream.

This will make it simpler to add more features common to both classes in the
future, see #10625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 00:30:42 +00:00
Vadim Zeitlin
a7c0de8a98 Fix event handling order in doc/view framework.
Ensure that the events are always (provided there is an open document)
processed in the following order:

1. wxDocument
2. wxView
3. wxDocManager
4. wxDocChildFrame
5. wxDocParentFrame
6. wxApp

Do this by forwarding the events from wxDocParentFrame to wxDocChildFrame
first and forward them from there to wxDocManager which -- and this part
remains unchanged -- in turn forwards them to the active wxView which finally
forwards them to wxDocument. This requires another condition in the event
handling code as we still must forward from wxDocParentFrame to wxDocManager
itself if there are no active children at all, but this is the only way to
have the same event order in all cases, whether the event is originally
received by wxDocChildFrame or wxDocParentFrame.

Document this and add a unit test verifying that things indeed work like this.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 23:59:56 +00:00
Vadim Zeitlin
80dcb89812 Forward events to active child at MSW, not wx, level in wxMDIParentFrame.
We want to handle menu (and toolbar) events in the active MDI child before
handling them in the parent frame itself and the existing code achieved this
by forwarding wxEVT_MENU events at wx event processing level to the active
child. However this was not enough as the underlying MSW WM_COMMAND message
was still sent to the parent frame only and this could result in wx event not
being generated at all if the parent frame had a disabled menu item with the
same ID as (an enabled) item in the child frame, see #14314.

So forward WM_COMMAND directly to ensure that the correct window gets the
event in the first place. And this makes wxEVT_MENU forwarding in TryBefore()
unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 23:59:51 +00:00
Vadim Zeitlin
de28042337 Add public wxDocManager::GetAnyUsableView().
This method tries to find the current view harder than GetCurrentView() and
always returns a non-NULL view if there are any open documents at all.

This is used by wxDocManager internally to find the view to apply the user
commands to and will also be needed in the upcoming changes outside of
wxDocManager, so just make this method public, as it seems that it could be
useful in user code too, especially if we could use some better fallback than
the first opened document (e.g. the last document the user interacted with
would be better).

This also clarifies the confusion between GetCurrentView() and GetActiveView(),
see #13296.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 23:59:43 +00:00
Vadim Zeitlin
3bad8c3926 Fix menu event handlers calling order.
Pass the menu event to the window associated with the menu first, before
falling back on wxApp.

This required adding yet another flag to keep state in wxEvent but it seems to
be unavoidable as wxMenuBase::SendEvent() calls ProcessEvent() twice and we
must have some way to distinguish the first call from the second one.

Added a test case verifying that the menu events are indeed processed in the
expected order.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 23:59:29 +00:00
Vadim Zeitlin
4322906f97 Copy max width of wxGridCellTextEditor when cloning it.
Previously the max number of characters that could be entered into the editor
was lost when it was cloned, making it impossible to really limit the user
entry.

Closes #15175.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-01 20:53:26 +00:00
Vadim Zeitlin
951b385ad8 Remove the apparently unneeded wxPGPropArgCls default ctor.
This ctor didn't initialize the flags correctly and could result in a crash
when a default constructed object was destroyed.

Closes #15174.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-01 20:53:17 +00:00
Robin Dunn
48afbebbf7 export wxRichTextObjectPtrArrayArray since it is used in the public API.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 20:23:39 +00:00
Vadim Zeitlin
b960795ea8 Add wxFontInfo class to allow using named parameters for wxFont creation.
This helper class allows to create wxFonts using shorter and more readable
code, e.g.

	wxFont font(12, wxFONTFLAG_DEFAULT,
		    wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
		    "DejaVu Sans");

can now be written simply as

	wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());

Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.

	wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)

didn't compile any more but it does compile again now.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 10:27:38 +00:00
Vadim Zeitlin
67315c8bf9 Add support for wxICON_AUTH_NEEDED to wxMessageDialog.
Allow showing the standard "Authentication needed" dialog in the message boxes
under MSW.

Closes #15121.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-29 12:54:08 +00:00
Vadim Zeitlin
add6e9193d Really fix the problem with caret in wxGrid text editor under MSW.
The problem (see #11681) was due to not allowing the native control handle the
focus loss event. This, in turn, was due to the changes of r58969 which tried
to work around a crash which happened if the grid was destroyed from the code
of one of the user-defined event handlers called during the editor dismissal.

Fix both problems at once by calling event.Skip() in OnKillFocus() to let the
native handler have the event too and postponing the editor dismissal a little
by calling DisableCellEditControl() indirectly from a posted event handler
instead of immediately.

As this reverts the now unnecessary changes of r64646, it closes #15162.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-28 18:25:42 +00:00
Vadim Zeitlin
5959d184d0 No real changes, just make wxGridCellEditor accessors const.
IsCreated(), GetControl() and GetCellAttr() should both be const, so make them
so.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-28 18:25:39 +00:00
Vadim Zeitlin
3bc1418b81 Fix wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK event type name.
Fix incorrect conflict resolution between the changes of r73823 and r73850:
the first renamed wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED to
wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK while the latter renamed it
to wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED. The proper new name is
wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, use it instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 11:56:55 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
3f7564f229 Small fixes after wxHtmlTagHandler::GetParser() addition.
Amend the changes of r73839:

- Don't use covariant return type for wxHtmlWinTagHandler::GetParser() as
  VC6, which we still support, doesn't like it. Besides, this seems
  unnecessary.

- Don't make GetParser() virtual at all as this doesn't appear to be necessary
  neither.

- Add "@since 2.9.5" to the documentation of the new method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 09:35:38 +00:00
Robin Dunn
047ea2e26a Add GetParser methods for the tag handlers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-24 02:40:02 +00:00
Vadim Zeitlin
0623b0f001 Add wxSocketBase::GetSocket().
Provide direct access to the underlying socket descriptor.

Closes #8829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-22 10:45:30 +00:00
Vadim Zeitlin
732a176cf3 Reset sorting column in generic wxDataViewCtrl properly.
We could keep using the column previously used for sorting even after
UnsetAsSortKey() was called on it. Ensure that this doesn't happen by
resetting the owner wxDataViewCtrl sort column index too.

Closes #15160.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-21 17:18:44 +00:00
Vadim Zeitlin
62a58fbef5 Add wxTextEntryDialog::SetMaxLength().
Allow restricting the maximal number of characters that can be entered in
wxTextEntryDialog.

Closes #15158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-20 22:13:33 +00:00
Vadim Zeitlin
f6b826564e Remove "ED" suffix from EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED.
The naming of this macro was inconsistent with other similar macros in
wxListCtrl and wxTreeCtrl and even EVT_DATAVIEW_COLUMN_HEADER_CLICK in
wxDataViewCtrl itself. Moreover, it was even documented under the wrong name
without "ED".

Clear this mess by removing the "ED" suffix while still keeping the old macro
name for compatibility.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-17 11:45:07 +00:00
Vadim Zeitlin
2d3636405a Added chainable wxWizardPageSimple::Chain() overload.
Add the simplest and most fool proof of chaining the pages in static wizards:
just chain several calls to the new, non-static, wxWizardPageSimple::Chain()
overload.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-10 12:12:57 +00:00
Vadim Zeitlin
7d8741ed2d Use API_VERSION_NUMBER for debug help API version check.
This symbol is not documented but seems to be defined in all the existing
versions of imagehlp.h, so use it instead of relying on a hack with checkng
whether DBHLPAPI symbol is defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-08 14:15:35 +00:00
Vadim Zeitlin
252e3b2c29 Support Unicode module names in wxDynamicLibrary::MSWGetModuleHandle().
The module names are not necessarily ASCII strings, so use wxString instead of
"char*" and W-version of GetModuleHandle() if appropriate.

See #15138.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-08 14:15:31 +00:00
Vadim Zeitlin
6f58f3d7e0 Allow to customize wxGrid column auto-sizing.
By default the columns are auto-sized to fit just their label, which is fast
but not very user-friendly. Allow customizing this behaviour by handling the
(new) wxEVT_GRID_COL_AUTO_SIZE event.

Closes #15077.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-05 21:11:59 +00:00
Vadim Zeitlin
42fe16e58b Fix wxTextEntryDialog::GetValue() when using SetTextValidator().
Associating a validator with the text control in wxTextEntryDialog resulted in
GetValue() always returning an empty string which was completely unexpected.

Fix this by setting the value string manually to avoid interfering with any
possibly used validators.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-04 00:11:00 +00:00
Vadim Zeitlin
f75b1bd31c Make wxToolBar styles consistent and add wxTB_DEFAULT_STYLE.
Don't include wxBORDER_NONE in neither wxToolBar ctor and Create() nor
wxFrame::CreateToolBar() flags parameter, override GetDefaultBorder() in
wxToolBar itself instead to use the border style appropriate for the current
platform by default. This has the same effect -- the default border style is
used unless another one is explicitly specified -- but is more clear and
consistent.

Also add wxTB_DEFAULT_STYLE for consistency with the other classes.

Closes #15037.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:27 +00:00
Vadim Zeitlin
00a399c062 Remove wxTextCtrl::OnEnabled() hack from wxGTK.
Don't change the background colour when the control is being enabled or
disabled, it doesn't seem necessary and it's unclear why was this added by
r10179 in the first place. It does result in problems however as it could
somehow make the selection of wxTextCtrl invisible when it lost focus and so
fixes a serious usability problem which happened to all wxTextCtrls for which
a wxEVT_UPDATE_UI handler using wxUpdateUIEvent::Enable() was defined.

Closes #14898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:21 +00:00