Commit Graph

58643 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
8182c219e4 Update the README after recent changes.
Update the platform list after dropping Win9x and OS/2 support.

Use new URLs after web site redesign and Trac upgrade.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 21:31:54 +00:00
Vadim Zeitlin
e96b28181c Convert contributors documentation to markdown.
The conversion is very superficial and there are probably many problems in the
Markdown rendering, but this is the first step towards making these documents
more readable when viewing them online.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 21:14:09 +00:00
Vadim Zeitlin
4ce8a5ed00 Rename tech notes to files with reasonable names.
Keep the old files to avoid breaking existing links to them, but just point to
the files in the new contributing subdirectory with more meaningful names now.

Also remove a couple of long obsolete tech notes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 21:14:02 +00:00
Vadim Zeitlin
ff38c9ebdc Add brief contribution instructions for Github users.
This should show up when opening Github pull requests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 20:01:04 +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
92c94beb08 Portuguese translations update from Manuella Silva.
Update to use new (1990) spelling.

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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 15:25:29 +00:00
Vadim Zeitlin
c29b6dfaf3 Avoid g++ warning about using possibly uninitialized PangoContext.
Initialize it to NULL as it could indeed be left uninitialized in some build
configurations before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 14:55:14 +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
9df9bc0f09 Show the shaped frame with start shape initially in the sample.
It's not clear that setting the window shape actually works if the initial
shape is not set.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-10 00:38:42 +00:00
Vadim Zeitlin
a8d5d7cdba Don't assert in wxOSX if a shaped window doesn't define a valid shape.
A window with wxFRAME_SHAPED style can still not defined any valid shape
actually, in which case wxFRAME_SHAPED should be just ignored.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-10 00:38:38 +00:00
Vadim Zeitlin
8aabad5e4c Fix wxMSW build without PCH after recent wxListBox font fix.
This should have been part of r76673.

See #3577.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-09 21:31:34 +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
b15f361171 Fix wxMSW wxCheckListBox appearance when using larger than normal fonts.
Update the height of the items when changing the font to ensure that there is
enough space to show the item text when using fonts larger than normal.

Closes #3577.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-09 00:54:17 +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
be35fb7a15 Compilation fix for wxMSW with wxUSE_TOOLTIPS==0.
This is another fix after the changes of r76657, see #16265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-05 11:29:34 +00:00
Vadim Zeitlin
d8933b2b8d Fix spurious assert when creating multiline wxTextCtrl from XRC.
Don't try to set the hint unconditionally, this doesn't work with multiline
text controls and so resulted in an assert when trying to create one from XRC
since the changes of r76629.

Closes #16317.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-05 00:28:46 +00:00
Vadim Zeitlin
f81a758d4e Stop Scintilla timer when the control doesn't have focus.
This avoids excessive CPU load due to generating completely unnecessary timer
notifications for every wxSTC control in a program.

Closes #14938.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-05 00:26:27 +00:00
Vadim Zeitlin
1d160160b7 Add cast to wxWindow to fix wxUniv/MSW compilation.
wxWindowMSW is different from (base class of) wxWindow in wxUniv and needs to
be converted to it explicitly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-04 22:47:28 +00:00
Vadim Zeitlin
b60e0e085e Including missing header for wxUniv/MSW build.
Compilation fix after the changes of r76657, see #16265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-04 22:47:23 +00:00
Vadim Zeitlin
fb55843f32 Compilation fix to wxMSW tooltip code when not using PCH.
Include the required header when not using PCH.

See #16265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-04 21:34:17 +00:00
Vadim Zeitlin
37f5da5192 Polish translations update from Mariusz Drozdowski.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-04 21:15:29 +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
8f39cd1301 Fix bug with removing items from menus with radio buttons in wxMSW.
Update the indices of the radio groups after removing an item from the menu.

See #14213.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:34 +00:00
Vadim Zeitlin
0ae3d1d22a Use wxWinAPI::Event wrapper class instead of raw Windows event handles.
This makes the code slightly shorter and, more importantly, more readable and
safer.

Closes #16233.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:30 +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
793b8d519e Ensure that wxPreviewCanvas always gets idle event.
Use wxWS_EX_PROCESS_IDLE flag to ensure that the print preview receives idle
events even when wxIDLE_PROCESS_SPECIFIED global idle mode is used.

Closes #15104.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:16 +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
1467e6c5df Revert "Correctly detect cancelled drag-and-drop operations in wxGTK."
This reverts r75745 (and r75749 fixing a minor problem in it) as this change
broke the reporting of the result of the drag and drop operation instead of
fixing it.

See #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 00:16:13 +00:00
Vadim Zeitlin
cc85c02fa5 Document that wxCANCEL_DEFAULT doesn't work in wxOSX/Cocoa.
See #16268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:46:12 +00:00
Vadim Zeitlin
24b2e3b720 Don't check for model in wxDataViewCtrl::InsertColumn() in wxOSX.
This isn't done in neither generic nor the GTK versions and prevents from
inserting the columns into the control before associating a model with it.

Closes #16257.

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