Commit Graph

58877 Commits

Author SHA1 Message Date
Václav Slavík
bdf5ba03ed Fix IRichEditOleCallback compilation with MinGW.
MinGW headers declare the IRichEditOleCallback interface and the
corresponding IID, but the libraries don't contain the latter symbol.
Work around it by defining it ourselves.

Fixes #16340.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-25 18:01:56 +00:00
Vadim Zeitlin
202f62b4c4 Generate 64 bit configurations in MSVC 8/9 projects.
Update bakefile configuration to include x64 configurations into MSVS 2005 and
2008 projects (2003 doesn't support building in 64 bits, 2010 and later are
manually maintained and already have them) and rebake the projects.

Closes #13675.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 23:54:08 +00:00
Dimitri Schoolwerth
d201caad89 Clean up GetHBitmapForMenu.
Merge wxMenuItem::GetHBitmapForMenuCheckable and ::DoGetHBitmapForMenu
into wxMenuItem::GetHBitmapForMenu. Change its boolean parameter to an
enum specifying the kind of bitmap that is wanted (normal, checked, or
unchecked).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 18:54:05 +00:00
Dimitri Schoolwerth
dadc0ed341 Fixes for building wxMSW under Cygwin.
Replace a few __WXMSW__ tests with __WINDOWS__ as the former is not
defined any longer (since r73290) when compiling with wxUSE_GUI set to 0.

Tested changes with both wxGTK and wxMSW builds under Cygwin.

Closes #14382.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 02:47:13 +00:00
Dimitri Schoolwerth
75964c3afa Fix non-MSVS compilation of webview_ie.cpp.
Use wxCRT_StricmpW instead of the Visual C++ specific _wcsicmp.

See #14382.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 02:46:24 +00:00
Dimitri Schoolwerth
6b12639c49 Fix failing Win32 calls with checkable menu item.
Since r76202 InsertMenuItem is used when adding checkable menu items even
without a bitmap. The call fails because hbmpChecked and hbmpUnchecked are
set to HBMMENU_CALLBACK on pre-Vista, making the menu owner drawn
unnecessarily.

Fix by adding GetHBitmapForMenuCheckable which is used when assigning
values to hbmpChecked and hbmpUnchecked. GetHBitmapForMenu remains
unchanged (for possible porting reasons) and is used for hBmpItem only.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 20:05:30 +00:00
Dimitri Schoolwerth
1697a45b1f Make checkable menu item with bitmap owner drawn.
Since r44192 a checkable menu item with bitmap on pre-Vista assigns
HBMMENU_CALLBACK to hbmpChecked and hbmpUnchecked members of MENUITEMINFO.
However this value is only valid for hbmpItem and for other bitmaps
InsertMenuItem will fail (with "the parameter is incorrect") resulting in
making the menu owner drawn later.
Instead check earlier on in MSWMustUseOwnerDrawn if we're dealing with a
checkable menu item with a bitmap and if so make it owner drawn
explicitly.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 20:01:57 +00:00
Dimitri Schoolwerth
1c49a2e1ba Fix exception while reinserting menu item.
After removing an item from a menu that item's parent menu is set to NULL
and can't be used any longer to insert the item again. Fix by remembering
the parent menu before removing the item from it.

Regression since r76251 (this commit is a partial revert of that commit).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 20:00:42 +00:00
Dimitri Schoolwerth
bab52682bc Fix wxMenuItem::SetBitmap infinite recursion (Vista+).
Calling a menu item's SetBitmap can result in a stack overflow. This
occurs when setting a bitmap after the menu item has already been added to
the menu and while running under Vista (and later). Under those
circumstances [Do]SetBitmap will call GetHBitmapForMenu which itself calls
SetBitmap again.

Fix by adding a simple check for re-entry.

Regression since r76202.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 19:58:13 +00:00
Vadim Zeitlin
af77028fcf Add wxDictionaryStringSortAscending comparison function.
Add "dictionary sort" callbacks and document them and the already existing
wxStringSortAscending() and wxStringSortDescending().

See #16330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 12:02:09 +00:00
Vadim Zeitlin
ba1c305343 Avoid harmless warning about unused variables in wxOSX/Carbon.
Declare the variables only used when wxUSE_STATUSBAR==1 inside the check for
it.

Closes #16331.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:55 +00:00
Vadim Zeitlin
e2e79bd000 Allow specifying custom comparator for wxSortedArrayString.
Add a possibility to order wxSortedArrayString in some order different from
the default alphabetical one.

Closes #16330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:50 +00:00
Vadim Zeitlin
8161cf19e9 Change wxStringSort{As,De}cending() to use references, not pointers.
This is more convenient to use and makes more sense as the arguments are never
null.

See #16330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:44 +00:00
Vadim Zeitlin
a15a949c30 Handle wxSYS_COLOUR_LISTBOXTEXT in wxMotif wxSystemSettings.
At the very least, don't fail with an assert if this colour is requested.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:41 +00:00
Vadim Zeitlin
3c92ebb168 Force wxUSE_GRAPHICS_CONTEXT to 0 for wxMotif build.
wxGraphicsContext is not implemented in this port.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:38 +00:00
Vadim Zeitlin
8ef1f74818 Fix wxVector3f ctor in the propgrid sample.
Even if this code is not used, it was still wrong as it didn't initialize the
(shadowed) member variables, so fix it to actually do it.

Closes #16342.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:31 +00:00
Vadim Zeitlin
e6d11dc00a Use wxIntNN types in wxQuantize code instead of INTNN ones.
Rely on the already properly defined wx types instead of using INTNN which
could clash with the system headers (e.g. INT32 is already defined in some
Motif headers) and are not guaranteed to be always defined correctly (while
int is always 32 bit on all currently supported platforms, this is not
guaranteed to always remain the case).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-22 14:23:28 +00:00
Stefan Csomor
a993ff5255 fixes 64 bit to 32 warnings, see #16329
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-20 08:15:31 +00:00
Stefan Csomor
1a5b712103 using proper types for webkit variants, see #16329
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-20 08:14:46 +00:00
Dimitri Schoolwerth
1ab459b212 Fix finding menu items in wxMenuItem::DoSetBitmap.
FindChildItem gets passed the id of a menu item as returned by GetMSWId, however GetMSWId should be used in combination with Win32 API functions. Instead use GetId: this fixes finding menu items that have a negative id (as a result of using wxID_ANY as id) or have a sub menu.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-20 01:35:16 +00:00
Vadim Zeitlin
bec36bfdff Remove file with obsolete release announcement information.
This file was last (really) updated in 2003 and, unsurprisingly, information
in it is not relevant 10+ years later and most of URLs in it simply don't
exist any more (or exist but are no longer used, such as freshmeat.net, since
yesterday).

Any additional places to announce wxWidgets releases should be added to the
"Announcement" section of docs/contributing/how-to-release.md now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-19 22:35:38 +00:00
Vadim Zeitlin
f2ee54fec0 Correct the name of the "preferences" sample in configure.
Fix building (all) samples under Unix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-19 22:11:33 +00:00
Stefan Csomor
1733903bfc supporting 2x display on retina displays, fixes #15887
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-19 13:05:08 +00:00
Tim Kosse
3ff982aa7a wxBitmap::GetMask() asserts on invalid bitmap. Check for valid bitmap before calling GetMask().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-19 09:29:42 +00:00
Stefan Csomor
e7bf85055c removing 'old' cocoa port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 16:52:20 +00:00
Stefan Csomor
c9efa9f242 remove dependency from former cocoa port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 14:27:20 +00:00
Stefan Csomor
d5f39e6305 adapting const parameter convention
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 14:22:29 +00:00
Stefan Csomor
3f6eff1522 remove dependency from former cocoa port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 13:28:51 +00:00
Stefan Csomor
9689425a3e in reality there are only 2 different native toolbar sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 13:25:52 +00:00
Stefan Csomor
f2081f7949 remove dependency from former cocoa port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 13:13:18 +00:00
Stefan Csomor
13fc136d54 remove dependency from former cocoa port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 13:11:42 +00:00
Stefan Csomor
cd27126831 only flush a client dc if it was not inheriting the native CGContextRef from an outside paint context, fixes #16334
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 13:05:15 +00:00
Václav Slavík
bd650ec3d9 Use IRichEditOleCallback for wxTextCtrl's context menu.
In wxMSW, use IRichEditOleCallback::GetContextMenu() to provide our
default context menu for rich text controls, instead of using
EVT_CONTEXT_MENU.

The latter completely overrides native control's handling and in
particular breaks Windows 8's builtin spellchecking support.

Fall back to the previous non-OLE code for older richtext versions.

Also make the new MSWCreateContextMenu() method virtual so that the
context menu can be customized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 12:51:49 +00:00
Václav Slavík
2cf91e5c7c Add wxMenu::MSWDetachHMENU().
Make it possible to pass ownership of a wxMenu to win32.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 12:51:45 +00:00
Václav Slavík
3821abef51 Handle WM_*MENU* events in wxWindow.
Contrary to MSDN implications, at least some of these messages are not
actually sent to the TLW for popup menus, but to the owning window or
even its parent window (!).

Move the handling of these events from wxTLW to wxWindow.  Move menu
depth tracking to wxFrame, because it only makes sense for frame's
menus and move DoGiveHelp() from wxTLW to wxFrame.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 12:51:39 +00:00
Vadim Zeitlin
8847a9f499 Clarify wxEVT_SLIDER event handler argument type in the documentation.
Unlike all other events generated by wxSlider, this one receives a
wxCommandEvent and not a wxScrollEvent.

Unfortunately @beginEventEmissionTable doesn't handle the case of a class
producing events of different types, perhaps it shouldn't be used at all here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-17 15:05:56 +00:00
Vadim Zeitlin
46f44e1c0c Add a reminder to update the date on download page to release HOWTO.
This is probably useful as it was forgotten for 3.0.1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-17 14:39:30 +00:00
Tim Kosse
9280f836c2 Under certain conditions, selecting a menu item triggers an assert in toplevel.cpp:1539:
wxASSERT_MSG( m_menuDepth > 0, wxS("No open menus?") );

The conditions to reproduce:
- Windows 8.1
- An application manifest that indicates Windows 8.1 compatibility

In this case, wxGetWinVersion() used to return wxWinVersion_Unknown (Without a manifest indicating 8.1 support, wxWinVersion_8 is being returned). This in turn causes the version check against Windows98 in toplevel.cpp:450 to fail, ultimately leading to the mentioned assert.

See http://msdn.microsoft.com/en-us/library/windows/desktop/ms724439%28v=vs.85%29.aspx for details.

This patch on trunk adjusts adds the wxWinVersion_8_1 enum value and returns it on Windows 8.1 if the program is manifested as such.

In future, a different approach needs to be chosen that does not depend the deprecated GetVersion function.




git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-15 22:17:39 +00:00
Vadim Zeitlin
56b49d5bd3 Add a page containing the screenshots of all controls to the manual.
It can be helpful to see all the controls at a glance, especially if you don't
know which control is needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-15 15:14:27 +00:00
Vadim Zeitlin
1f35fbd13a Make picker controls description in the manual less useless.
It's not really clear what potential benefit could library users extract from
the knowledge that the picker controls behaviour is "highly
platform-dependent".

Try to be flighty more helpful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-15 15:14:23 +00:00
Vadim Zeitlin
35353e0ff0 Display wxString in more readable way in MSVS debug visualizer.
Use "sb" format specifier to avoid having L"..." around the string and then
add just the quotes back manually.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-15 12:58:12 +00:00
Vadim Zeitlin
c9220befc7 Remove the old release making instructions and scripts.
Using git-based scripts seems to work well and the old scripts are not
maintained any more and having several ways of making releases is just
confusing, so leave only one set of scripts, the one actually used since
2.9.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-15 01:33:33 +00:00
Vadim Zeitlin
30856fdcff Add MSVS visualizers for wxArrayString, wxVector, wxWindowList.
Make viewing the contents of the (most common) container types easier when
debugging in MSVS 2012 or later.

Provide std::{vector,list}-like visualizers for wxVector and wxWindowList and
a special visualizer allowing to see the contents of wxArrayString in a
relatively common case when it has just or two elements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-14 21:03:12 +00:00
Vadim Zeitlin
40e3379f54 Add a file with debug visualizers for MSVS 2013 and later.
For now this file contains just the visualizer for wxWindow which shows its
real (most derived) type as this is often the most useful thing you need to
know about the window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-14 21:03:06 +00:00
Tim Kosse
80d58a2268 Remove the unused anonymous function OffsetWindow to fix a compiler warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-14 20:23:22 +00:00
Tim Kosse
c8ea74cab0 Don't redefine _FORCENAMELESSUNION it if it is already defined. Fixes a warning when compiling with MinGW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-14 20:20:19 +00:00
Vadim Zeitlin
e5c0dea20c Compilation fix for wxFont in wxMotif.
Include wx/crt.h containing wxSscanf() declaration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-13 17:19:21 +00:00
Vadim Zeitlin
fea900aceb Allow using wxALIGN_CENTER in XRC for wxStaticText.
Only wxALIGN_CENTRE was allowed previously in the XRC, while both worked in
the code and also even in XRC but for wxSizer alignment.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-12 17:14:01 +00:00
Vadim Zeitlin
693c95fa93 Fix wxDynamicLibrary compilation under Solaris.
Add const_cast<> needed for the call to dladdr() to compile.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-12 17:13:58 +00:00
Vadim Zeitlin
da75760bbe Added a brief version of README in markdown for Github users.
Now that we have CONTRIBUTING.md there doesn't seem to be any reason for not
having README.md as well.

Perhaps this one will replace docs/readme.txt in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 21:31:57 +00:00