Commit Graph

55433 Commits

Author SHA1 Message Date
Vadim Zeitlin
3ceb10b162 Keep user-set wxFrame background color even if MSW system background changes.
Don't override wxFrame background colour when the system background colour
changes if it was explicitly set by the user.

Closes #14364.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:31 +00:00
Vadim Zeitlin
fb040ec186 Update old selections after clearing wxListBox in wxGTK.
Don't keep stale selected item indices in m_oldSelections after clearing the
listbox, call UpdateOldSelections() from DoClear() in wxGTK just as we do in
the other ports.

Closes #14359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:28 +00:00
Vadim Zeitlin
80a4659776 Use wxCLASSINFO() instead of deprecated CLASSINFO().
No real changes, just use the version of the macro with a "wx" prefix.

Closes #14356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:24 +00:00
Vadim Zeitlin
345c78ca5f Use wxDynamicCast() instead of IsKindOf() checks.
wxDynamicCast() is less verbose (due to the absence of "CLASSINFO") and more
compatible with the standard dynamic_cast<>, so prefer to use it when possible.

See #14356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:18 +00:00
Vadim Zeitlin
7e8a20edc8 Remove unneeded dynamic cast in wxPropertyGrid.
It's completely useless to check that an object is of its own statically
declared type as this is always true, simply don't do it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:12 +00:00
Vadim Zeitlin
31a33b67c0 Remove unnecessary dynamic cast in wxComboPopupWindow.
Objects of this type are either always of wxPopupTransientWindow type, in
which case just a static_cast<> is enough and we don't need a dynamic one, or
is never of its type in which case this code shouldn't be compiled and if it
is, then static_cast<> will correctly fail preventing it from compiling.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:09 +00:00
Vadim Zeitlin
0cafb0786e Don't reset previous window event handler in PopEventHandler().
This is harmless but also useless as the previous event handler of a wxWindow
is always NULL anyhow, so simply don't do this. This is consistent with
PushEventHandler() which doesn't call SetPreviousHandler() for the window
itself neither.

Closes #14353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:05 +00:00
Vadim Zeitlin
06d14de207 Fix wxMac preprocessor check in wxWebView code.
Fix typo in "__WXMAC__" in wxWebView under wxOSX/Carbon and also in
wxWebKitCtrl from where this code was copied.

Closes #14352.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:02 +00:00
Vadim Zeitlin
f00acdb8f4 No changes, just refactor wxGrid::Render() to simplify it.
Introduce a couple of new helpers to make the main Render() function smaller
and more clear.

Closes #14347.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:00:58 +00:00
Paul Cornett
4c5fc80a69 silence warning about converting NULL to wxUIntPtr
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-31 16:29:30 +00:00
Paul Cornett
6b66bb1e55 silence warning about __WXMSW__ not defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-31 16:28:42 +00:00
Robin Dunn
b8acf11e74 A patch adding wxHTMLDataObject which can be used for handling the standard platform formats for transfering HTML formatted text.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 19:21:42 +00:00
Stefan Csomor
f5f0774124 fixing build with wxUSE_PROTOCOL = 1 and wxUSE_SOCKETS = 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 04:20:59 +00:00
Robin Dunn
5ad24e6dbb Adjust the client area origin and the client size of the MSW wxStaticBox according to the guidelines on http://msdn.microsoft.com/en-us/library/aa511279.aspx. This is so widgets that are children of the static box will not overlap the label or box borders.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 03:13:35 +00:00
Robin Dunn
7d40f0a500 Interface fixes for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-30 03:13:27 +00:00
Stefan Csomor
09e7316547 adapting char event handling to msw / gtk, see #13415, see #14197
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-29 15:26:27 +00:00
Stefan Csomor
f0d3d77b97 clang compat.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-29 15:24:50 +00:00
Stefan Csomor
81f94bb54e clang compat.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-29 15:18:52 +00:00
Vadim Zeitlin
2060e34cd2 Improve wxDatePickerCtrlGeneric best size calculation.
Make the control just wide enough to fully show the contents of its text part.

This is still not ideal as we don't take into account wxComboCtrl internal
complications but better than before.

Closes #14342.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-28 19:38:02 +00:00
Vadim Zeitlin
5d8cdb5d1c Fix bug in wxAutomationObject introduced by r71574.
Check that we have any arguments, expression oleArgs[0] is invalid otherwise.

Closes #14343.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-28 12:52:03 +00:00
Vadim Zeitlin
779e28da63 Add wxGrid::Render() for drawing the grid to any wxDC.
In particular, this allows to print the grid contents easily.

Closes #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:19 +00:00
Vadim Zeitlin
b55d57aa24 Add wxGrid::DrawRangeGridLines().
This method draws only the grid lines for the cells in the specified range and
not for all of them.

It is not used yet but will be by the upcoming wxGrid::Render(), see #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:13 +00:00
Vadim Zeitlin
f31d3faf7a No changes, just refactor wxGrid::DrawAllGridLines().
Extract the actual drawing of the lines into a new DoDrawGridLines() method.

This will be used by the upcoming commits for drawing grid lines for a part of
the grid only, see #14294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:09 +00:00
Vadim Zeitlin
cf1a582ab9 Fix memory leaks in wxAutomationObject::Invoke().
Use wxVector<>, wxBasicString and wxOleVariantArg instead of raw arrays, BSTR
and VARIANT to ensure that different objects allocated by this function are
always freed when it exits.

Closes #14293.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-27 13:00:04 +00:00
Julian Smart
4ba36292f4 Added full scaling to wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 14:17:46 +00:00
Vadim Zeitlin
7ed9cd2891 Fix bug with unloading wxPluginLibrary objects in "wrong" order.
wxPluginLibrary objects had to be unloaded in exactly the reverse order to
which they were loaded in. This was not documented and was a serious
limitation for any realistic use of plugins anyhow, so fix it and allow
unloading them in any order now.

Instead of keeping a pointer to the last wxClassInfo not created by this
plugin, now keep a pointer to the first wxClassInfo that was created by it.
This makes the code slightly more complex but this pointer, unlike the old
one, remains valid even if another plugin was unloaded.

Closes #14261.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:54 +00:00
Vadim Zeitlin
f0d38b659f Refactor SAFEARRAY creation code in wxConvertStringFromOle().
No changes, just make the code simpler and more obviously correct by using a
helper class to create and fill the SAFEARRAY that we create.

Closes #14296.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:50 +00:00
Vadim Zeitlin
252255e852 Fix DrawChoice() behaviour in wxRendererXP.
The implementation of wxRendererXP::DrawChoice() inadvertently used
wxRendererMSW::DrawComboBoxDropButton() and so drew the button in the classic
and not themed style.

Fix this by defining DrawChoice() in the base wxRendererMSWBase class and
reusing it in wxRendererXP via inheritance and not composition.

Closes #14337.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:46 +00:00
Vadim Zeitlin
ffa7b75018 Remove private headers from files.bkl.
Private headers are not supposed to be installed because they are only use
when building wxWidgets itself, so don't list them in files.bkl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:44 +00:00
Vadim Zeitlin
fcb9299bda Move include/wx/osx/private/objcid.h to include/wx/osx/core.
This header is used by public headers and hence is not really private, move it
to a better place and add it to the list of OSX headers in the bakefile.

Closes #14339.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-26 12:29:39 +00:00
Vadim Zeitlin
5fb4b6cd65 Add wxDataViewListCtrl::GetItemCount().
This method is convenient and (almost, except for the return value) compatible
with wxListCtrl.

See #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:40 +00:00
Vadim Zeitlin
518cef0470 Add wxDataViewListCtrl::{Set,Get}ItemData() methods.
These methods are convenient when migrating the code that previously used
wxListCtrl to wxDataViewCtrl.

Closes #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:35 +00:00
Vadim Zeitlin
41abc29aa6 Use wxUIntPtr instead of wxClientData in wxDataViewListCtrl.
Do not delete the client data in wxDataViewListCtrl, this class mainly exists
for compatibility with wxListCtrl and as the latter doesn't delete its client
data, neither should the former.

See #11088.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 17:02:31 +00:00
Vadim Zeitlin
dbec0fc8d8 Remove redundant wxAuiNotebook methods already present in wxBookCtrlBase.
wxAuiNotebook already inherits perfectly workable AdvanceSelection() and
GetCurrentPage() methods from wxBookCtrlBase, no need to reimplement them in
it.

See #14309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:26 +00:00
Vadim Zeitlin
44f4f7dda0 Don't send a huge number of unneeded wxChildFocusEvents.
wxControlContainer::SetLastFocus() propagated wxChildFocusEvent explicitly to
its parent but this is not needed because wxChildFocusEvents propagate by
default, being derived from wxCommandEvent. And doing it again resulted in the
total number of events increasing exponentially with the depth of the window
hierarchy and real performance problems due to processing all of them.

Closes #14310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:22 +00:00
Vadim Zeitlin
005a8a4c77 Suppress warnings about gnome_print_dialog_get_range() return type.
This function seems to be declared incorrectly and while it actually does
return the values we compare its return value with, it's prototyped with a
wrong enum as return type, so explicitly cast it to int to avoid warnings
from recent g++ versions.

See http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/115782/focus=115955

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:20 +00:00
Vadim Zeitlin
0cd7db14f0 Fully implement wxStyledTextCtrl::PositionToXY().
Fill in the column parameter too now.

Closes #14332.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:16 +00:00
Vadim Zeitlin
6094165c4e Fix calculation of wxStyledTextCtrl selection size in GetSelectedText().
Do the same changes as were done in r71540 to GetSelectedTextRaw() in
GetSelectedText() itself by modifying the code in gen_iface.py that generates
it.

Closes #14331.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:12 +00:00
Vadim Zeitlin
fd5cfba711 Several fixes for wxAffineMatrix2D transformations.
Correct errors in TransformPoint() and TransformDistance().

Change Rotate() to interpret positive angles as rotating clockwise, for
consistency with wxGraphicsContext::Rotate().

Improve the unit test to verify that all the transformations work correctly.

Closes #14334.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-25 09:48:09 +00:00
Robin Dunn
016a3d4cee Changes to allow these build scripts to use python3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:26:34 +00:00
Robin Dunn
c9db153a51 Interface fixes for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:26:27 +00:00
Vadim Zeitlin
9a25f336cb Document that SetFocus() can't be called from EVT_KILL_FOCUS handler.
Also explain how to use wxIdleEvent for "delated action".

See #14335.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:21:19 +00:00
Vadim Zeitlin
b2b6da49e2 Fix wxBase compilation with UTF-8-based wxString under MSW.
Use wxString::t_str() instead of wx_str() in Windows API function calls.

Closes #14325.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:45 +00:00
Vadim Zeitlin
364f3b0700 Don't use wxCHECK_W32API_VERSION() in #if when it can be undefined.
wxCHECK_W32API_VERSION() is only defined when using MinGW, don't use it an #if
test which is always parsed but only in a separate test inside #ifdef __GNUG__
test which is parsed only when we do use MinGW.

This fixes harmless but annoying warning from MSVC 10.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:41 +00:00
Vadim Zeitlin
ff7dbb27d4 No real changes, just slightly simplify HasAppKit_10_6() function.
Remove redundant check for version == -1.

See #13831.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:38 +00:00
Vadim Zeitlin
da94537c64 Compilation fix for wxUSE_STL && !wxUSE_STL_BASED_WXSTRING build.
Don't rely on implicit wxString to "const char*" conversion in Replace().

Closes #14327.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:35 +00:00
Vadim Zeitlin
ee0fc51fe3 Document that wxClipboard::Flush() is not implemented in wxGTK.
See #10515.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:31 +00:00
Vadim Zeitlin
5ec18516f6 Document "raw control" use with accelerators.
Mention it in the places where the other accelerator prefixes are documented.

See #13496.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:28 +00:00
Vadim Zeitlin
1a692f0f22 Fix calculation of the wxStyledTextCtrl selection size.
Use SCI_GETSELTEXT to compute the size of the buffer instead of doing it
ourselves, especially as we do it incorrectly in case of rectangular
selection.

Closes #14331.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:24 +00:00
Vadim Zeitlin
0bcbf72bdc No real changes, just backwards propagate the changes to stc.cpp.
Apply the changes done directly to stc.cpp in r71428 and r71429 to the script
generating this code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-23 21:16:22 +00:00