Commit Graph

55450 Commits

Author SHA1 Message Date
Paul Cornett
401c8bc231 Fix layout of wxStaticText, and possibly other controls.
GtkLabel perversely does not use its actual size to do layout, but will use its
size request. So restore calling gtk_widget_set_size_request() for all widgets,
which was removed in r71465. See #14374


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-04 17:36:51 +00:00
Julian Smart
340ef5c5ab Corrected collection of common attributes, for clashing font size units.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-04 09:13:13 +00:00
Vadim Zeitlin
0a7ee6e0f4 Implement support for wxRIBBON_PANEL_EXT_BUTTON wxRibbonPanel style.
Show the "extension button" in the ribbon panel if this style is specified.

Also generate a specific event if this button is clicked.

Closes #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:09 +00:00
Vadim Zeitlin
07c7226468 Add wxRibbonControl::GetAncestorRibbonBar() helper.
New method allowing to find the ribbon bar containing the given window.

See #14283.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:17:03 +00:00
Vadim Zeitlin
017dc06b50 Use wxString::t_str() in calls to Windows API functions in wxMSW.
Use t_str() instead of wx_str() to make the code work correctly in UTF-8 build
in which wx_str() returns a pointer to UTF-8 buffer while we need a wchar_t
pointer for Windows.

Closes #14371.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 19:16:59 +00:00
Steve Lamerton
f40f8e1722 Use wxCOMPtr throughout wxWebViewIE to simplify the code and reduce the chance of memory leaks. Also mark PPV_ARGS_CHECK as inline so it can be used from multiple libraries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-03 17:41:32 +00:00
Vadim Zeitlin
41087dc90a Add support for MSVC 11 (a.k.a. MSVS 2012) to MSVC-specific setup.h.
Use vc110 prefix for VC11.

Closes #14366.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 22:34:21 +00:00
Vadim Zeitlin
0c9dd3b69b Clear old selection when wxListBox becomes empty.
When UpdateOldSelections() is called from wxListBox::DoClear(), it must clear
the old selections array even for single selection list boxes, but it didn't
do this under non-MSW platforms.

Specifically check for the case of an empty listbox now and just forget the
old selections then. This fixes the problem of keeping stale old selections
and is also more efficient as we avoid the unnecessary GetSelections() call.

Really closes #14359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 22:34:17 +00:00
Vadim Zeitlin
125afca0c0 Add wxMSW_CONV_LPCTSTR() and related macros and use them in wxBase.
Add macros hiding the ugly casts needed to pass wxStrings to Windows API
functions and use them in a couple of places in wxBase to simplify the code.

Closes #14338.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 22:34:13 +00:00
Vadim Zeitlin
784130d290 Disable wxUIActionSimulator wxGrid tests using mouse under wxGTK.
Something is seriously wrong with simulated mouse events and wxGrid under
wxGTK, they seem to simply disappear sometimes. This results in unit tests
suite failure, so disable these tests for the next release as I just don't
understand how to fix them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 16:21:08 +00:00
Vadim Zeitlin
f1287154cd Add IsAutomaticTest() function to the unit tests.
This allows to easily test if we're running on a buildbot slave and disable
some difficult to debug test failures there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 16:21:06 +00:00
Vadim Zeitlin
e84d989930 Use printf() instead of wxPrintf() in cppunit details listener.
Wide char output from wxPrintf() didn't appear at all under Linux because
stdout was switched into narrow stream mode by GNU libc due to initial use of
cout in the test.

Use printf() instead of wxPrintf() as we are only printing ASCII strings
anyhow. Of course, this is not a real fix but at least we can see the tests
results like this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 16:21:03 +00:00
Vadim Zeitlin
7d35d3ed3c Compilation fix to wxWebView under wxOSX/Carbon after r71620.
wxWindow::m_peer is private, use GetPeer() to access it.

See #14352.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 15:25:28 +00:00
Vadim Zeitlin
3e1db65507 Fix wxWebKitCtrl::RunScript() return value.
Replace comparisons of the type name of the returned value with isKindOfClass:
checks which are more reliable.

Closes #14358.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 15:25:25 +00:00
Vadim Zeitlin
2253f18176 Add support for CP1258 (Vietnamese) and CP1361 (Korean Johab) encodings.
Recognize these encodings names and translate them to/from the corresponding
charset constants in wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:46 +00:00
Vadim Zeitlin
0980e7b323 Use "GBK" as alternative name for CP936 encoding.
This is the official name of this encoding, so recognize it as synonym.

See #14360.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:37 +00:00
Vadim Zeitlin
4e116788a2 Use float instead of double division in wxHashMap code.
We don't need double precision for determining the hash table fill rate and
using double constant also results in float-to-double promotion warnings from
gcc 4.7.

See #14362.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 11:01:34 +00:00
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