It was just added as a private function to implement %V format specifier
support, just extract and document it as it could possibly be useful in its
own right.
See #11857.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The native control doesn't redraw itself, so force it to do it from the
overridden DoMSWControlColor() which is called every time the background
colour might have changed.
See #12271.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In wxPropertyGridPage class derived from wxPropertyGridPageState and wxPropertyGridInterface, function GetPropertyByLabel is inherited from both base classes.
To resolve this ambiguity, function defined in wxPGInterface is introduced in wxPGPage through 'using-declaration'.
(This is a temporary fix and finally GetPropertyByLabel function should be removed from wxPropertyGridPageState.)
See #15251.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do the insertion/addition before deallocating the old memory to allow things
like array.Add(array[0]) to work correctly.
Closes#2290.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently in wxPG there are used fixed "magic" ID values to identify sub-controls and this can lead to side effects if these values overlap with ID values assigned to another controls in the application (like e.g. menu items).
Closes#13634.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Property grid is refreshed to reflect the new state of the property.
Small refactoring of wxPropertyGridInterface class: SetPropertyReadOnly() function body moved from header file to source file.
Closes#16306.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Get rid of the rest of __WXCOCOA__ tests in the sources.
Drop configure option for using it.
Also remove the documentation for this port.
This should have also been part of r76735.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should have been part of r76735: in addition to removing the old Cocoa
port headers, also remove the references to them from the common include
files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGTK1, wxGTK, wxMSW and wxOSX all did the same thing in their wxFrame dtor,
so just do it in wxFrameBase instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't call SetBitmap from GetHBitmapForMenu but instead handle possibly
needed bitmap modifications earlier on during SetBitmap. Allows for
GetHBitmapForMenu to be const and gets rid of the clumsy re-entry check
introduced in r76754.
Also check the bitmap for alpha presence instead of needlessly converting
the bitmap to an image and checking the latter for alpha.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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
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
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
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
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
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
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.
Closes#16246.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't offset the returned values by the parent window origin unnecessarily: as
popup windows are created as children of the desktop window in wxMSW, their
coordinates are already expressed in screen coordinate system (which is
exactly the same as display window coordinate system) and we must not try to
translate them to it once again, this is completely wrong and was probably a
left over from earlier wxPopupWindow implementation in which it wasn't created
as a child of desktop.
Closes#4440.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This must be done both at wxWidgets and MSW level, otherwise changing the ID
results in window not recognizing itself as the recipient of the messages sent
to it by Windows.
Closes#3697.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes g++ compilation problem in 64 bit mode after the changes of r76653,
it complained about comparing pointer (HANDLE) with an integer. It might also
fix compilation with icc.
See #16233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't leave the tooltip shown on screen if the window it was shown for was
hidden or iconized (without moving the mouse, as that would have dismissed the
tooltip as well).
Closes#16265.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make AutoHANDLE a template to allow specifying the invalid handle value, which
is inconsistent across Win32 API and is INVALID_HANDLE_VALUE for most kinds of
handles but 0 for some others, e.g. event object handles.
See #16233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775