Commit Graph

15304 Commits

Author SHA1 Message Date
Vadim Zeitlin
954fd05108 Disable creation of wxDIB from wxBitmap in non-wxMSW ports.
wxDIB can now be used with wxGTK under Windows, i.e. when not using wxMSW
version of wxBitmap but it can't be created from wxBitmap then as it doesn't
have a corresponding HBITMAP.

Simply disable this functionality when not using wxMSW.

Closes #14414.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:10 +00:00
Vadim Zeitlin
598fe99d56 Move wxBell() from base to core library.
This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.

Closes #14406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:06 +00:00
Vadim Zeitlin
54f59b007e Disable options that don't work with wxGTK in wx/chkconf.h.
When building wxGTK under Windows, some MSW-specific options can be defined
but can't be implemented when using GTK, forcefully disable them.

Also a few others that could be implemented but that don't work currently.

Finally, forcefully enable Cairo support as wxGTK always needs it.

Closes #14412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:01 +00:00
Vadim Zeitlin
1383c34c91 Define wxGTK GTK version symbols in GTK-specific setup.h.
When not using configure __WXGTKxxx__ symbols should still be defined, assume
we use a recent GTK 2.x version and define all of them.

Closes #14411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:34:57 +00:00
Vadim Zeitlin
b33e9f4031 Add wxUSE_COMPILER_TLS to allow disabling compiler TLS support.
Compiler TLS support is broken under Win32/MSVC when used for a code which is
part of a dynamically loaded DLL, so allow disabling it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:34:47 +00:00
Stefan Csomor
c657294b52 better naming wxCFEventLoopPauseIdleEvents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-15 16:24:09 +00:00
Stefan Csomor
4c4cbded1f offer suppression of idle processing (delayed destruction happened too early eg when showing native message boxes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-15 00:03:51 +00:00
Stefan Csomor
d20028be9a clang analyzer support specific for OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 22:02:06 +00:00
Stefan Csomor
a2c3d6b820 FixedWith support through CoreText
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 21:55:28 +00:00
Stefan Csomor
721ba9cbdc using CoreText under iOS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 21:53:06 +00:00
Stefan Csomor
2b760b6bc1 removing attribute, as assert is not guaranteed not to return, but may just go on
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-14 15:07:14 +00:00
Stefan Csomor
b625fff509 using WX_ATTRIBUTE_NORETURN for asserts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 23:33:52 +00:00
Stefan Csomor
9deded7972 adding WX_ATTRIBUTE_NORETURN support (for functions like assert, exit etc. that may not return)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 23:33:00 +00:00
Stefan Csomor
78f212178e exposing mainWindow for C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 22:32:07 +00:00
Stefan Csomor
6ca7f2f6c4 indicating the memory ownership of our c-method for the clang analyzer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 18:43:37 +00:00
Stefan Csomor
cc510e1364 supporting clang memory management annotations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 18:42:51 +00:00
Vadim Zeitlin
d44d80da5b Add wx/setup.h header for wxGTK build under MSW.
This is identical to wx/msw/setup0.h but will be used by wxGTK builds using
MSVC when this is supported.

Closes #14395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-12 21:41:59 +00:00
Vadim Zeitlin
1c0a0736a3 Don't use generic wxListCtrl style for wxListMainWindow.
This resulted in double border around wxListCtrl contents in wxOSX and almost
certainly other ports except wxGTK for which we already had an explicit
preprocessor check in the generic list control code. Remove it and simply
don't use any wxListCtrl-specific styles, including borders, for its main
window as it doesn't make any sense.

Closes #3701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-12 21:41:50 +00:00
Robin Dunn
0681e07a14 Keep track of the area intended to be buffered, and use that in UnMask instead of defaulting to the buffer size. Only clip to the DC size if wxBUFFER_VIRTUAL_AREA is not set. This fixes the issue where buffering the full virtual area in a wxScrolledWindow would only draw an area the physical size of the window. Fixes #11612.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 19:26:19 +00:00
Vadim Zeitlin
9bd5c5fcda Use wxString::Clone() instead of c_str() in wxThreadEvent copy ctor.
Creating a new wxString from c_str() of the old one resulted in dropping all
string data after the first embedded NUL. Fix this by using Clone() method
that exists specifically for this purpose. It also makes the code more clear.

Closes #14380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-08 18:44:14 +00:00
Robin Dunn
e1b8b76fcf Add export macro for wxTreeListEvent so the non-inline class info and things can be found where they're exepcted
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-07 04:43:15 +00:00
Paul Cornett
12a5cf1324 Workaround for Ubuntu 12.04 run time warning
"LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent."
Avoid calling gtk_widget_destroy() on a wxMenuBar attached to a frame
Fixes #14292


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-05 16:49:28 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
d92f48bd43 Use wxObjCID instead of "struct objc_object*" to fix clang build.
Clang doesn't accept "struct objc_object*" as synonym for "id" in Objective-C
code, so use the real "id" for it while still using the struct pointer for C++
code where "id" is not defined.

Closes #13565.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 20:29:50 +00:00
Vadim Zeitlin
abf99aad2d Implement wxStackWalker for wxOSX.
Use atos(1) to map address to their symbolic names.

Closes #10067.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 20:29:22 +00:00
Vadim Zeitlin
a2c3fc7c75 Fix crash on destruction of wxDataViewCtrl in wxOSX.
The control remained associated to the model so a dangling pointer could be
used if the model was destroyed after the control.

Fix this by removing the control from the model list of notifiers when it is
destroyed.

Closes #14124.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 20:29:09 +00:00