Commit Graph

16253 Commits

Author SHA1 Message Date
Stefan Csomor
2ade9eb811 added missing impl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 14:56:30 +00:00
Stefan Csomor
74493e3f6b support for 64 bit ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:33:22 +00:00
Tim Kosse
705a1b547d Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:32:42 +00:00
Stefan Csomor
c78bca596e adding base virtuals
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 20:10:09 +00:00
Stefan Csomor
ec73c71d6a supporting NSString also in Carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 16:58:03 +00:00
Stefan Csomor
96ac247a9e adding 10.9 constants
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 10:35:10 +00:00
Vadim Zeitlin
fb99672f62 Hopefully finish removing the old wxCocoa port.
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
2014-07-03 22:03:21 +00:00
Vadim Zeitlin
1ca1d77e01 Remove the inclusions of wx/cocoa headers which don't exist any more.
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
2014-07-02 13:28:42 +00:00
Vadim Zeitlin
e1655f5394 Stop duplicating wxFrame dtor in all ports.
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
2014-07-02 13:28:29 +00:00
Dimitri Schoolwerth
0f84eca7c6 Fix wxMenuItem::SetBitmap infinite recursion differently.
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
2014-06-27 05:38:11 +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
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
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
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
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
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
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
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
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
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
895a58609b Fix misspellings of "occurred" and "occurrences".
See https://github.com/wxWidgets/wxWidgets/pull/9

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 15:25:33 +00:00
Vadim Zeitlin
2594929d9f Move include/wx/unix/execute.h to include/wx/unix/private.
This header is private and is not supposed to be used from the outside the
library.

See #16325.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 14:55:08 +00:00
Vadim Zeitlin
b6469b4369 Fix changing the label of a submenu in wxMSW.
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
2014-06-09 20:33:17 +00:00
Vadim Zeitlin
af692f090b Fix getting position of wxPopupWindow in wxMSW.
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
2014-06-09 20:33:11 +00:00
Vadim Zeitlin
82112b5de2 Fix changing wxWindow ID in wxMSW.
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
2014-06-09 00:54:12 +00:00
Vadim Zeitlin
5979baa0e2 Compilation fix for wxMSW 64 bit build with icc.
This compiler doesn't want to narrow INVALID_HANDLE_VALUE to int, so use
wxUIntPtr instead.

See #16233.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 18:14:22 +00:00
Vadim Zeitlin
649deb111a Explicitly convert int to HANDLE to fix 64 bit wxMSW build.
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
2014-06-02 13:15:19 +00:00
Vadim Zeitlin
35434eea52 Hide tooltip when its associated window is hidden in wxMSW.
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
2014-06-02 01:15:39 +00:00
Vadim Zeitlin
70bcb9ac46 Add a simple wrapper for Windows event handle object.
This will be used instead of raw events in wxMSW code in the upcoming commit.

See #16233.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:25 +00:00
Vadim Zeitlin
fb1c8d4fd8 Allow wxMSW AutoHANDLE helper to be used with more kinds of handles.
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
2014-06-02 01:15:20 +00:00
Vadim Zeitlin
40f2cf0a78 Allow access to the currently shown wxInfoBar buttons.
Add wxInfoBar::GetButtonCount(), GetButtonId() and HasButtonId() methods.

Closes #15110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:11 +00:00
Vadim Zeitlin
ceb39f4174 Allow viewing read-only long string wxPropertyGrid properties values.
When wxLongStringProperty is read-only, it should still be possible to view
its value by opening the dialog normally used for editing it, otherwise this
value cannot be seen (nor copied, which is also useful sometimes) at all.

Closes #14945.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-31 14:21:23 +00:00
Vadim Zeitlin
d2d7a07b7a Return wxWinVersion_[78] correctly from wxMSW wxGetWinVersion().
This is especially important because the workaround of r76152 for IFileDialog
bug under Windows Vista also applied under later Windows versions as they were
not detected correctly.

Closes #16286.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-22 20:35:50 +00:00
Václav Slavík
9194902451 Fix warning in wxSimplebook::UpdateSelectedPage().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-21 07:41:15 +00:00
Stefan Csomor
cea11b591e in order to get all focus set events, store field in editor and catch becomeFirstResponder there, see #14269
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-18 16:33:57 +00:00
Stefan Csomor
e65104f198 refactoring to common code for updating selections, using common focus code, see #14269
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-18 10:46:12 +00:00
Stefan Csomor
2b99f92872 refactoring to common code for focus set and lost events, so that changes can be made a single place, see #14269
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-18 10:44:24 +00:00
Dimitri Schoolwerth
0141cbe551 Add 3 missing declarations for wxPoint2DInt non-member operator functions.
Three duplicate declarations were removed in r70493 instead of replacing them with the missing declarations.

Closes #10946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 21:31:25 +00:00
Dimitri Schoolwerth
7f26fff6b4 Cast arguments passed to wxPoint2DInt constructor.
Cast them to wxInt32 (instead of int) as that is the type of the wxPoint2DInt members m_x and m_y.

See #10946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 21:29:49 +00:00
Dimitri Schoolwerth
987814bb7c Fix wxPoint2DInt::operator*= and wxPoint2DInt::operator/= .
These operator functions are respectively adding and subtracting their arguments. Instead let the functions multiply and divide their arguments (like their wxPoint2DDouble counterparts were doing already).

See #10946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 21:26:42 +00:00
Stefan Csomor
91f25e0bbd using the base class wxHAS_NATIVE_ENABLED_MANAGEMENT in cocoa disabling/enabling child windows, fixes #16232, fixes #15495
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 19:14:21 +00:00
Vadim Zeitlin
ebc6161c59 Compilation fixes to wxPropertyGrid after r76558.
We can't use _() in the static wxChar* arrays: first, because this doesn't
compile and second because if it did compile, it still wouldn't work as no
message catalogs are loaded yet when the static arrays are initialized.

Use wxTRANSLATE() instead and arrange for the strings to be translated when
they are really used. This is rather ugly and perhaps it would be better to
avoid passing untranslated labels array to the property classes but at least
the code compiles again now.

See #16266.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 13:41:27 +00:00
Vadim Zeitlin
a380c1e46f Add public wxDegToRad() and wxRadToDeg() functions.
Define these functions just once in wx/math.h instead of duplicating them in a
dozen of places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:15 +00:00
Dimitri Schoolwerth
aeef5a4c29 Compilation fix for --disable-precomp-headers in combination with --disable-all-features .
Fix an error for compile step of "Linux i386 wxGTK trunk no features" buildbot by forward declaring wxWindow class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 11:25:54 +00:00
Vadim Zeitlin
e9f4d80887 Remove checks for ancient gcc/MinGW versions.
Don't test for wxUSE_NORLANDER_HEADERS, this is always true since many, many
years.

Remove tests for gcc version < 3.3, notably 2.95: the minimal supported gcc
version is 3.4.

Closes #15727.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:35 +00:00
Vadim Zeitlin
8c7d31e615 Remove obsolete MSVC version tests.
Don't compare __VISUALC__ with versions 1200 (VC6) and earlier, such tests are
always true or always false now that we don't support VC6 any more, so just
remove them simplifying the code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:29 +00:00