Commit Graph

16169 Commits

Author SHA1 Message Date
Vadim Zeitlin
2e8988c3d6 Add wxGridCellRenderer::GetBest{Height,Width}() and use them in wxGrid.
Allow the renderer to specify the best height at the given width (or vice
versa) instead of the best size in both direction which is not defined for
e.g. wxGridCellAutoWrapStringRenderer.

Closes #15943.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:42 +00:00
Vadim Zeitlin
02f5b809bd Document restrictions on icon names in the resources in wxMSW.
Make it more clear that application icon must precede "wx" in alphabetical
order.

Closes #3529.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:36 +00:00
Paul Cornett
1be1f56be1 vswscanf is needed regardless of wxUSE_UNICODE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-03 16:44:14 +00:00
Julian Smart
5b8e5e81b6 Implemented keyboard selection and better cell navigation for tables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-03 13:07:16 +00:00
Paul Cornett
8b93b050cf avoid referencing xml and html libs when they are not enabled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-30 17:08:50 +00:00
Vadim Zeitlin
59e5a48141 Recognize Intel compiler as MSVC one under Windows in the build options.
The two compilers are binary compatible and by pretending that Intel compiler
is the same as MSVC, we allow using ICC to build applications using DLLs built
with MSVC.

Closes #9437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-29 10:59:59 +00:00
Vadim Zeitlin
ccaebf6520 Add wxThread::MSWGetHandle().
Under MSW a thread has both an ID, returned by wxThread::GetId(), and a
handle, which couldn't be retrieved so far. Add an accessor to do it.

Closes #16170.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:41:50 +00:00
Vadim Zeitlin
2e079a988d Make wxMSW wxTextCtrl::AdjustSpaceLimit() safe to call in all cases.
Allow calling this function not only from inside DoWriteText(): first, because
the existing code could be doing this (although this is only a concern in 3.0
branch as it was made private in the trunk) and second because it could
actually happen if the text limit was exceeded by user typing in the control.

See #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:39:54 +00:00
Vadim Zeitlin
934ce46464 Don't call AdjustSpaceLimit() explicitly in wxMSW wxTextCtrl any more.
There is no need to do it as this is done by DoWriteText() and
AdjustSpaceLimit() doesn't work correctly if called from outside of it now.
Because of this, also make it private to prevent other accidental calls to it.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:39:49 +00:00
Vadim Zeitlin
755c525767 Suppress warnings about using _set_se_translator() for MSVC 12 too.
We did it up to MSVC 11 but this still seems to work just fine without /EHa
with MSVC 12 too, so relax the version check to allow it to pass.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:39:40 +00:00
Julian Smart
90143c254c Added wxRichTextCtrl::DoLayoutBuffer so an application can perform custom tasks before or after layout.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-22 16:27:29 +00:00
Vadim Zeitlin
7ab7ff693b Add wxGraphicsRenderer::GetName() and GetVersion() methods.
Allow the code to determine which underlying technology is used for
implementing wxGraphics API. This is needed by the unit tests to account for
the known differences between platforms and may be useful in other cases.

Closes #16154.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-20 12:45:10 +00:00
Vadim Zeitlin
25a8a7e745 Handle wxLANGUAGE_CAMBODIAN correctly in the generation script.
Fix wxLANGUAGE_CAMBODIAN definition in autogenerated code, this was already
done manually in r76368 but these changes would have been lost after the next
generation, so update the script itself to generate them.

Closes #16183.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-20 12:44:57 +00:00
Stefan Neis
54490523d9 Fixed wxLANGUAGE_USER_DEFINED, which is supposed to be the last element of
the enum, but as such must still be given, before messing with the automatic
internal counter of enum by defining synonyms. Fixes #16183.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-18 22:40:10 +00:00
Paul Cornett
5a6d62d823 allow using wxEventLoopGuarantor when wxUSE_GUI==1
fixes wxOSX-Cocoa build when wxUSE_CONSOLE_EVENTLOOP==0
closes #14980


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-17 16:15:28 +00:00
Robin Dunn
c5a12778e6 Avoid possible infinite recursion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-14 03:36:27 +00:00
Vadim Zeitlin
5276dfa416 Don't use timer inside wxSound in wxOSX/Cocoa.
The timer is only used by Carbon code, there is no need for it in Cocoa, so
don't complicate things by starting it unnecessarily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:56:17 +00:00
Paul Cornett
047b18bd65 make validator pointer const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 15:42:32 +00:00
Vadim Zeitlin
72aad0d6ea Use the same wxWeakRef implementation for complete and incomplete classes.
This fixes an ODR violation which could arise if wxWeakRef<T> was seen both
when T was an incomplete (e.g. just forward-defined) class and when it was
complete. As different implementations, with different binary layouts, were
used in these two cases, this resulted in fatal run-time problems.

Fix this by always using the slightly less efficient (because storing an extra
pointer) but simpler and safe "dynamic" wxWeakRef implementation.

Also get rid of checks for the ancient compilers such as VC6 and g++ < 3.3,
they are not supported any longer.

Closes #15884.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 00:10:54 +00:00
Paul Cornett
0ed46e37fa build fix for wxUSE_VALIDATORS==0 when NULL is defined to be nullptr
casting nullptr is not allowed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 16:04:36 +00:00
Paul Cornett
c6f8d54324 build fix for wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 15:53:41 +00:00
Paul Cornett
3dcb256bea build fix for wxUSE_DRAG_AND_DROP==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:37 +00:00
Paul Cornett
c1d1a5ad5e build fix for wxUSE_THREADS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:12 +00:00
Paul Cornett
06469c8dec update comment for wxBG_STYLE_TRANSPARENT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 17:16:44 +00:00
Paul Cornett
8b3e3e594b avoid double-to-float conversion warnings in headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 17:13:46 +00:00
Vadim Zeitlin
4c76ae6707 Add more precise wxRibbonBar::ShowPanels() overload.
The existing overload taking bool didn't allow to specify whether the panel
should be just expanded or expanded and pinned, add a new one supporting this.

Also fix a bug with not updating the ribbon state in the old method.

Closes #16133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:28:51 +00:00
Stefan Csomor
096a7abda6 extra semicolon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 18:28:36 +00:00
Stefan Csomor
bdb7453c7b adding wxFALLTHROUGH to indicate intended fall through in switch statements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 15:28:55 +00:00
Stefan Csomor
3668385238 make sure platform constants exist by using defs.h instead of setup.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 11:23:46 +00:00
Stefan Csomor
1b32b97966 adding minimal ios support for webview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 07:55:36 +00:00
Stefan Csomor
82d191e352 removing extra semicola
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 07:08:06 +00:00
Stefan Csomor
0fdc7e6f89 removing superfluous semicolon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 11:47:40 +00:00
Stefan Csomor
ba0337764d adding empty base class implementation for OnNextIteration, call from OSXDoRun, allowing console event loop to override
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 11:46:59 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Julian Smart
9b09ca16a6 Allow derivation from wxRichTextBufferDataObject
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-27 12:46:37 +00:00
Vadim Zeitlin
da319a87cd Make wxMSW owner drawn menu item code more clear and correct.
The user-visible effect of this change is that removing the item from the menu
and adding it back doesn't lose its icon any more.

At the code level, wxMenuItem::SetBitmaps() and related methods are
implemented outside of "#if wxUSE_OWNER_DRAWN" which allows to use them even
in minimalistic library builds. And IsOwnerDrawn() is not used any more to
determine whether the item has bitmaps, just only if it's really owner drawn,
making the code more clear and fixing at least the bug above and possible more.

Closes #13878.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-27 00:02:28 +00:00
Vadim Zeitlin
d94b858bc9 Rename wxMenuItem::MustUseOwnerDrawn() to MSWMustUseOwnerDrawn().
No real changes, just make it clear that this method is MSW-specific and is
about using owner drawn items at MSW level and not wx one.

See #13878.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-27 00:02:22 +00:00
Vadim Zeitlin
a3da62503f Fix setting menu item bitmaps after appending them in wxMSW.
Update the bitmap used by Windows when using non-owner-drawn items with
bitmaps.

Closes #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 15:18:37 +00:00
Vadim Zeitlin
67b128e186 Refactor wxMSW: move some code from wxMenu to wxMenuItem.
This will allow reusing it for other wxMenuItem bitmap-related operations.

See #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 15:18:31 +00:00
Vadim Zeitlin
de22d0def4 Fix wxFileSystemWatcher::RemoveAll() to actually work.
We need to call DoRemove() on all watcher objects to really remove them, just
removing our record of them was not enough and e.g. resulted in errors if we
tried to re-add a previously watched path again.

Closes #15531.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:09 +00:00
Vadim Zeitlin
5b43c1858d Fix handling deletion of watched directory in MSW wxFileSystemWatcher.
Don't log an incomprehensible error when the watched directory itself is
deleted, but generate wxFSW_EVENT_DELETE for it. This is consistent with the
behaviour under Unix and generally more useful.

Closes #13294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:03 +00:00
Vadim Zeitlin
305e766f0f Small refactoring in wxFileSystemWatcher MSW implementation.
Make wxIOCPService::GetStatus() smarter about its return value, it makes sense
to encapsulate the convention used to indicate the thread exit condition
inside wxIOCPService class itself instead of sharing it between it
wxIOCPThread itself.

It will also make it easier to detect more detailed error conditions in this
code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:00 +00:00
Vadim Zeitlin
62efdabbb8 Disable the use of "override" keyword for MSVC < 11.
While the keyword is indeed supported since MSVC 8, it's only since MSVC 11
that using it doesn't generate C4481 compiler warning ("nonstandard extension
used"), so avoid using it with the earlier versions.

See #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:56:55 +00:00
Vadim Zeitlin
8d808db43f Put a __cplusplus guard around C++-specific tests in wx/defs.h.
This avoids the warning about __cplusplus being undefined in the recently
added wxOVERRIDE logic and make the existing wx_xxx_cast<>s definitions
simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 19:52:45 +00:00
Vadim Zeitlin
78de4fe291 Remove configure test for override keyword.
Detect its support in the code by testing __cplusplus value and using specific
checks for MSVC and Clang as configure detects it as being available when
using recent g++ versions in non-C++11 mode, which do support this keyword but
warn when it is used without -std={gnu,c}++11 option, which makes actually
using it a bad idea in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 15:49:07 +00:00
Vadim Zeitlin
33ad33d447 Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.

Closes #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:28 +00:00
Vadim Zeitlin
8c4b1dcbd0 Add wxInt64 support to wxText{Input,Output}Stream.
Add explicit Read64[S]() and Write64() methods.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 22:57:44 +00:00
Vadim Zeitlin
89bf39314f Use "virtual" keyword with overridden methods.
No real changes, just make the code more clear by explicitly using "virtual".

Closes #16097.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 18:06:29 +00:00
Vadim Zeitlin
7e049a9692 Remove redundant forward declaration of wxCursor from wx/window.h.
We include wx/cursor.h from wx/window.h anyhow (and can't avoid it as we have
a member of wxCursor type in wxWindowBase).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 20:10:11 +00:00
Vadim Zeitlin
1eb17f24f0 Include the individual headers that we really need instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:28:50 +00:00