Commit Graph

16058 Commits

Author SHA1 Message Date
Vadim Zeitlin
eef9b03d24 Don't pass ID to wxWindow::LoadNativeDialog() by reference.
This is completely unnecessary and confusing.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:19 +00:00
Vadim Zeitlin
d2f125aa35 Pass non-primitive types by const reference instead of value.
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:08 +00:00
Vadim Zeitlin
322fc32b82 Fix alpha channel values when using wxGCDC with wxMemoryDC in wxMSW.
Ensure that 32bpp bitmaps selected in wxMemoryDC use DIB for their internal
representation as GDI+ functions don't seem to work correctly with DDBs with
alpha channel.

Closes #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:52 +00:00
Vadim Zeitlin
fb730c32b4 Override Do{Freeze,Thaw}() instead of {Freeze,Thaw}() in wxPropGrid code.
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.

Closes #15877.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 18:56:13 +00:00
Vadim Zeitlin
e484333926 wxBitmap with cleared alpha channel doesn't keep its alpha flag any more.
Explicitly reset wxBitmap alpha flag after clearing its alpha channel to
ensure that we don't treat it as having alpha after going to all the trouble
of ensuring that it doesn't/

See #14403.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:24:35 +00:00
Vadim Zeitlin
60a3e0cc54 Rename wxLANGUAGE_CAMBODIAN to wxLANGUAGE_KHMER.
Keep the old name for compatibility.

See https://github.com/wxWidgets/wxWidgets/pull/2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 02:52:17 +00:00
Vadim Zeitlin
4736f13d79 No real changes, just fix a typo in a comment.
z/preffered/preferred/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 02:52:13 +00:00
Vadim Zeitlin
91bd95beb7 Allow building wxGTK using GTK+3 under Windows too.
No real changes, just use the right libraries for GTK+3 port.

Closes #15871.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 14:18:54 +00:00
Vadim Zeitlin
1d444d684a Disable wxUSE_PREFERENCES_EDITOR in correct place in wxiOS.
wx/osx/setup0.h is auto-generated, so r74708 shouldn't have changed it as the
change was overwritten by r75568 which regenerated that file. Instead, disable
wxUSE_PREFERENCES_EDITOR in iPhone-specific file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-08 00:38:43 +00:00
Vadim Zeitlin
8b8dfdde4c Disable the use of compiler TLS by default under Windows.
While compiler TLS support is simpler to use and much faster than using our
own Win32 API-based TLS implementation, it results in difficult to debug
crashes when used inside a dynamically loaded DLL under Windows XP, so disable
it by default to be safe.

Closes #13116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:42 +00:00
Vadim Zeitlin
44f26d6f82 Fix handling of bitmaps with alpha channel in wxMSW wxImageList.
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.

The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.

Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().

See #11476.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:13:20 +00:00
Vadim Zeitlin
bd30752410 Just deprecate but don't schedule for removal wxNORMAL and friends.
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.

Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.

Finally, avoid the use of deprecated constants inside the library itself.

As a side effect, this closes #15814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-06 12:42:37 +00:00
Vadim Zeitlin
f5b1cc026d Actually implement default wxPasswordEntryDialog ctor.
This was added in r75404 but not implemented, do provide the trivial
definition of this function too.

Closes #15770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-06 12:42:23 +00:00
Vadim Zeitlin
353f1c5491 Deprecate wxPropertyGrid::DoubleToString().
Simply use wxNumberFormatter instead, this reduces code duplication and avoids
bugs due to formatting inconsistencies in DoubleToString().

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:58 +00:00
Vadim Zeitlin
cc8b733082 Remove unnecessary _mingw.h inclusion from wx/msw/missing.h.
This header is already included from wx/platform.h which is always included
before wx/msw/missing.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:56:09 +00:00
Vadim Zeitlin
35ae03b3b2 Move wxCHECK_MINGW32_VERSION() declaration to wx/msw/gccpriv.h.
Unfortunately we can't keep it in wx/compiler.h which is included too early,
before UNICODE macro is defined, and we can't define it before including
wx/setup.h which itself must be included after wx/compiler.h.

So move it to wx/msw/gccpriv.h which is not a great solution, as the best
would be to get rid of this gcc-specific file completely, but at least should
make everything build again and ensure that _mingw.h is included after UNICODE
definition.

Closes #15805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:56:04 +00:00
Vadim Zeitlin
ae31f96132 Revert "Move UNICODE section of wx/platform.h before wx/compiler.h inclusion."
Unfortunately this fix for MinGW broke compilation under Unix, see #15805.

This reverts r75520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:55:59 +00:00
Vadim Zeitlin
6870e04cef Revert "Hack wxMSW wxNotebook to show the text controls correctly initially."
This hack resulted in showing a black rectangle corresponding to the initial
size of the first notebook page when creating the notebook, as could be seen
in the notebook sample by pressing Alt+2,Alt+1 to recreate the notebook after
the startup.

If the bug that this hack was supposed to fix hasn't been fixed yet (and it
might have been by r73126, but it's hard to be sure as we don't have any test
case for that bug), we could reintroduce this call to Update() but only if
we're not inside a deferred resize (i.e. m_hDWP != 0) as it just can't work
correctly in this case.

This reverts r69793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:59 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Vadim Zeitlin
61728d5d54 Avoid asserts in wxGTK when wxMDIChildFrame::SetSize() is called.
SetSize() doesn't do anything for MDI children in wxGTK and other ports using
TDI version of MDI, but it shouldn't result in an assert from
wxTLW::DoMoveWindow() neither, so override DoMoveWindow() in wxTDIChildFrame
to avoid it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 14:40:08 +00:00
Vadim Zeitlin
2ff7b588ae Move UNICODE section of wx/platform.h before wx/compiler.h inclusion.
This fixes the build with some versions of MinGW which depend on UNICODE being
defined correctly in _mingw.h which is included from wx/compiler.h, so that
before this change the build was broken as inconsistent definitions of UNICODE
were used there and in windows.h included later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:18:47 +00:00
Vadim Zeitlin
29483c2e15 Define HAVE_VARIADIC_MACROS as 1, not nothing, in wx/cpp.h.
This avoids g++ warning about HAVE_VARIADIC_MACROS redefinition in setup.h if
wx/cpp.h happens to be included before it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:12:58 +00:00
Vadim Zeitlin
5cd81ca598 Allow initializing wxScopedArray more conveniently.
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.

Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:34 +00:00
Vadim Zeitlin
d75c0a8cc7 Add wxNumberEntryDialog default ctor and Create().
Allow creating wxNumberEntryDialog in 2 steps, as most of the other classes.

Closes #15769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 22:26:38 +00:00
Stefan Csomor
b0a5f5ac18 - one single method for sending char events from a NSString
- adding insertText override for multiline fields as char events went missing after r74945

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 14:59:50 +00:00
Vadim Zeitlin
b69da09293 Add wxPasswordEntryDialog default ctor and Create().
Allow creating wxPasswordEntryDialog in 2 steps, as most of the other classes.

Closes #15770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 12:23:59 +00:00
Stefan Csomor
947a8734ac reverting r74098, applying John's version, see #15008, #15765, #13841 will be backported if no regressions are discovered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-20 16:03:13 +00:00
Vadim Zeitlin
fba8b37345 Add wxHtmlWindow::SetDefaultHTMLCursor().
This allows to change the cursors used by any HTML windows, before creating
them.

Closes #15324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:43 +00:00
Vadim Zeitlin
8f305123db Add default ctor and Create() to wxContextHelpButton.
Allow two step creation of wxContextHelpButton.

Closes #14848.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:21 +00:00
Jouk Jansen
6b60a2575e Add OpenVMS to the systems that support the Bind-Event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 10:51:27 +00:00
Julian Smart
87ba46f05e Added scrollbar hysteresis detection to stop infinite looping when vertical scrollbar presence or absence affects the content height.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-10 15:24:35 +00:00
Václav Slavík
b5e7f21065 wxOSX Retina fixes: size wxStaticBitmap and wxBitmapButton properly.
The size is expressed in logical coordinates and needs to use bitmap's
scaled size, otherwise it would appear twice as large in both
dimensions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 14:33:07 +00:00
Vadim Zeitlin
50805a002a Work around wrong vsscanf() declaration under HP-UX.
Under this system vsscanf() is declared as taking a non-const char* as first
argument which prevented our code using it from compiling. Wrap it in
wxCRT_VsscanfA() adding the necessary const_cast<> to fix this.

Closes #15638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-03 13:38:35 +00:00
Václav Slavík
065deffd86 Implement wxTextEntry::SetHint() natively for GTK+3.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 17:46:27 +00:00
Vadim Zeitlin
fe731cbdee Use correct cell alignment in generic wxDataViewCtrl mouse handling code.
Don't fall back to wxALIGN_CENTRE, even if the renderer doesn't specify its
own alignment we still have to take the column alignment in consideration, so
use GetEffectiveAlignment() (which had to be made public for this).

This notably fixes (again) hit testing for wxDataViewToggleRenderer in the
generic version.

Closes #15731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 16:30:25 +00:00
Vadim Zeitlin
c749d9e638 Fix unwanted focus events when deleting a wxTreeCtrl item in wxMSW.
Disable setting focus in response to TVN_SELCHANGING when deleting an item in
a single selection control too -- this was already done in multi selection
case but not in this one, for some reason.

Also refactor the code to avoid duplicating TreeView_DeleteItem() calls.

Closes #15721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 12:43:17 +00:00
Vadim Zeitlin
9180e2b06f Round values in wxBitmap::CreateScaled() and GetScaledSize().
Do it for consistency with wxMSW and because rounding probably makes more
sense than truncation here.

Closes #15720.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 12:43:12 +00:00
Vadim Zeitlin
0cd24ec39a Fix wxCHECK_MINGW32_VERSION() definition.
Include _mingw.h before testing for __MINGW32_MAJOR_VERSION as it's only
defined in that header.

Closes #15696.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-27 16:12:44 +00:00
Stefan Csomor
16cc627332 making sure no pending deletes get executed while a modal loop is running, avoiding double deletes because the dialogs are mostly allocated on the stack.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-25 13:51:12 +00:00
Vadim Zeitlin
501bb4ad8e Correct the author of wxAuiToolBarXmlHandler.
See #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-25 12:31:26 +00:00
Vadim Zeitlin
f269f868d7 Add XRC handler for wxAuiToolBar.
Also add the demonstration of AUI handlers (this one and the existing one for
wxAuiNotebook) to the xrc sample.

See #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 00:34:55 +00:00
Vadim Zeitlin
4de86c0b26 Update version to 3.1.0.
And regenerate everything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:47:05 +00:00
Václav Slavík
429085a3e7 Override ClearColumns() in wxDataViewListCtrl.
Without this, the associated store's columns would be out of sync,
causing asserts next time a column is appended.

Fixes #14952.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:13:11 +00:00
Vadim Zeitlin
5a25d8d55a Don't allocate way too much memory in wxVector::reserve().
We multiplied the number of items by the size of each element twice, once in
wxVector::reserve() itself and once in Ops::Realloc() it called, so we
allocated much more memory than actually needed.

Fix this by passing the number of elements to Ops::Realloc().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-19 13:13:22 +00:00
Václav Slavík
ff7f9c2def Put Services submenu into the Apple menu on OS X.
Native applications have a Services submenu in the apple menu.  wx
applications didn't until now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 18:03:05 +00:00
Václav Slavík
6aa48db478 Add wxMenuBar::OSXGetAppleMenu().
Native OS X apps sometimes have certain app-wide comments in the
Apple/app menu ("Check for Updates" is a typical example).  Make it
possible to write well-behaved OS X apps by exposing this menu to user
code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 18:03:02 +00:00
Julian Smart
c6de30bf70 Removed GetId/GetId and changed span storage to be compatible with 3.0. Fixed border control style.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 12:43:58 +00:00
Vadim Zeitlin
d466d76701 Allow changing the colour of wxInfoBarGeneric text.
Override SetForegroundColour() to forward it to the text control.

See #15671.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 23:37:43 +00:00
Vadim Zeitlin
065d3c385c Define SIZEOF_LONG_LONG for Windows.
This is important not only for consistency with the other platforms but also
because without SIZEOF_LONG_LONG being defined, "%lu" format specifier can't
be used with size_t values under Win64, as Arg_Size_t is not defined correctly
there if SIZEOF_LONG_LONG is unknown.

Closes #15670.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 23:37:33 +00:00
Julian Smart
dc8678a4a9 Fixed clashing attribute values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-13 17:43:17 +00:00