Commit Graph

15419 Commits

Author SHA1 Message Date
Stefan Csomor
f31c06b39e native hook for supported datatypes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 15:46:26 +00:00
Stefan Csomor
5ce7b0b55c adding native hook for drop target
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 15:45:15 +00:00
Vadim Zeitlin
005b12d8be Make wxBookCtrlBase::GetPage() virtual to fix it for wxAuiNotebook.
wxAuiNotebook doesn't store its page in the base class m_pages array, so
calling GetPage() on it via a wxBookCtrl pointer resulted in a crash.

Make GetPage() virtual to allow overriding it at wxAuiNotebook level.

Closes #13768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:27 +00:00
Vadim Zeitlin
c17eafaaf1 Added internal wxHatchStyle enum.
It's annoying that the same code for hatched pens and brushes can't be reused
without relying on deprecated wxXXX_HATCH constants, so add new,
non-deprecated, wxHatchStyle enum that can be used in such code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:15 +00:00
Robin Dunn
ba8540022f Move a couple standard virtuals to protected sections so they can be overridden in derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:59:46 +00:00
Paul Cornett
9dc44eff02 support for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:39:06 +00:00
Vadim Zeitlin
26cdd42d2c Define wxEntry() with WinMain-compatible signature for all Windows ports.
Make wxEntry(HINSTANCE, ...) available in wxGTK under Windows too.

Refactor the headers to allow this and extract Windows-specific wxEntry()
declarations in wx/msw/init.h from wx/msw/app.h for consistency with the
normal wxEntry(int, char**) declared in wx/init.h.

Closes #14423.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:28 +00:00
Vadim Zeitlin
327972e7b6 Use bitmaps from resources by default in wxGTK under Windows.
Use wxBITMAP_TYPE_{BMP,CUR,ICON}_RESOURCE by default under Windows, even for
non-wxMSW ports.

Also allow loading wxImage from resources in all ports under MSW as a side
effect of this change.

Closes #14425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:23 +00:00
Vadim Zeitlin
c21b99e0e2 Add wxRibbonBar::DeletePage() and ClearPages() methods.
Also add a trivial GetPageCount() helper.

Closes #14437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:18 +00:00
Vadim Zeitlin
0199dae316 Fix off by 1 error in wxHTML font size from points calculation.
m_FontSize is in 1..7 range, not 0..6, so add 1 to it when setting it from the
index into m_FontsSizes array.

Also update the comment explaining the valid range of m_FontsSize.

Closes #14442.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-28 11:58:55 +00:00
Robin Dunn
34c92eeeb7 Don't hide the m_mm_to_pix_x and m_mm_to_pix_y in the base class by redefining them in a derived class. Fixes #14399.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-26 18:25:29 +00:00
Paul Cornett
8f71e657f3 update size hints when decoration size becomes known, and preserve size hint increments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-24 16:18:28 +00:00
Vadim Zeitlin
fa3f11806e Use wx/msw/winundef.h for wxGTK under Windows too.
Avoid clashes due to <windows.h> definitions in wxGTK too.

Closes #14427.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:53 +00:00
Vadim Zeitlin
9597d39a2e Use C, not C++, comments in wx/gtk/chkconf.h.
Remove C++ comments added in r71796.

See #14412.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-20 17:54:38 +00:00
Vadim Zeitlin
acbed1149e Fixes for building wxGTK under Cygwin.
Test for __WXMSW__ instead of __CYGWIN__ to not affect building non-MSW ports
such as wxGTK under Cygwin.

See #14382.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-17 21:35:14 +00:00
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
Vadim Zeitlin
ef5fe20c79 Fix harmless warning from g++ 4.8 in C11 mode.
g++ 4.8 recognizes "cpu" in WX_CC_MANIFEST expansion as a user-defined literal
suffix, add spaces around it to prevent this from happening.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 12:30:47 +00:00
Julian Smart
32423dd824 Added pixel size capability to wxTextAttr and wxRichTextCtrl.
Fixed composite object positioning in centred and right-aligned
paragraphs.
Added field example to sample, and enabled pixel font size selection.
Added custom text and dimension scaling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-20 12:25:22 +00:00
Stefan Csomor
a9946c4e6b removing unnecessary - and incorrect - override, fixes #14319
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-19 14:24:13 +00:00
Stefan Csomor
114441d107 fixes #14318
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-19 06:33:28 +00:00
Stefan Csomor
9ff00b8f57 fixing c++11 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-18 11:09:07 +00:00
Stefan Csomor
29a1e53086 fixing c++11 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-18 10:35:08 +00:00
Stefan Csomor
9ce18df82e fixing c++11 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-18 10:34:32 +00:00
Paul Cornett
3b7067a05d Remove use of "size-request" signal for wxWindow sizing.
This signal has been removed from GTK3. Instead have wxPizza keep track of child
size, and use gtk_widget_set_size_request() for wxWindows in native containers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 15:29:50 +00:00
Julian Smart
d87098c062 The object size page now has full position attribute editing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-16 10:59:30 +00:00
Vadim Zeitlin
96c9640205 Enable variadic macros for VC9 and later.
VC9 and 10 support variadic macros so define HAVE_VARIADIC_MACROS for them
too. This currently only affects wxLog{Debug,Trace} definitions in wx/log.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:04:01 +00:00
Vadim Zeitlin
28e42e023c Fix keyboard navigation in wx{List,Choice,Tree,Tool}book controls.
Inherit from wxNavigationEnabled<wxBookCtrlBase> instead of just
wxBookCtrlBase to ensure that the keyboard navigation works correctly for
these controls.

The toolbar in wxToolbook still doesn't accept focus from keyboard but at
least the pages can be TAB-bed too and from. And the rest of the controls
are now fully accessible using only the keyboard.

Closes #14303.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:03:57 +00:00
Vadim Zeitlin
ae8079a210 Don't return a dangling pointer from wxDateTime::ParseXXX(wxCStrData).
We don't have any sufficiently long-lived pointer to return from this
overload, so don't return anything from it -- it's better to break the
compilation of the existing code rather than make it crash during run-time.

Closes #14214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:25 +00:00
Vadim Zeitlin
2ed48ef81e No changes, just simplify the code using wx2stc() a little.
Assign wx2stc() return value to a suitably const variable instead of using
ugly casts to get rid of constness.

Also use wxCharBuffer/char* explicitly inside explicit wxUSE_UNICODE checks,
using wxWX2MBbuf here doesn't gain us anything and just confuses the reader of
this code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:23 +00:00
Vadim Zeitlin
d7b468788e Fix wxStyledTextCtrl compilation in non-Unicode build.
The value returned by wx2stc() in non-Unicode build is a simple "char*" and we
can't call length() method on it, add a helper wx2stclen() function to get the
length from the original wxString itself in this case.

Closes #14013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:18 +00:00
Vadim Zeitlin
458f68d0a7 Remove wxDECLARE_APP() from wxIMPLEMENT_APP_NO_MAIN().
There is no need for a separate declaration inside wxIMPLEMENT_APP() as
wxGetApp() is defined by it and redeclaring it immediately after definition
results in a warning with some compilers/environments (Eclipse CDT).

The move of wxGetApp() to the beginning of the macro is only to ensure that a
semicolon is still required after wxIMPLEMENT_APP_NO_MAIN() and the other
macros terminating with it, such as wxIMPLEMENT_APP() itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 13:17:22 +00:00
Robin Dunn
8b180bded6 Enable access to the native bitmap object wrapped by wxGraphicsBitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-11 22:06:50 +00:00
Julian Smart
1aca9fcdfc Added wxRichTextXMLHandler::RegisterNodeName so custom content classes can be added without
breaking XML loading


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 11:59:59 +00:00
Vadim Zeitlin
1e20681c9e Implement constrained best size calculation in wxMSW wxListCtrl.
This fixes wxListbook controller size to avoid spurious scrollbars.

Closes #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:47 +00:00
Vadim Zeitlin
d119983947 Add wxWindow::GetBest{Height,Width}().
These functions will be used when it is necessary to determine the best size
of the control if one of its size components is fixed. Currently none of the
classes implements DoGetBestClient{Height,Width}() yet but wxListCtrl will do
it soon, see #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:37 +00:00
Vadim Zeitlin
ae4375b878 Fix wxStaticBitmap best size calculation in wxMSW.
Take the control borders into account by overriding DoGetBestClientSize()
instead of DoGetBestSize().

Also invalidate the default best size computed before we have any valid image
when setting the initial image in Create().

Closes #4099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:23:57 +00:00
Julian Smart
7c9fdebe5f Added field implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 11:06:04 +00:00
Vadim Zeitlin
814028444d Create a wrapper file for X11/XKBlib.h header.
We need some hacks for the older systems before including this header, extract
them from src/x11/utilsx.cpp into a new private header to be able to reuse it
from wxGTK in the next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-07 13:12:20 +00:00
Vadim Zeitlin
8e8d910979 Update the field widths on demand in wxStatusBarGeneric.
This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.

Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.

Closes #14268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-05 11:22:09 +00:00
Vadim Zeitlin
5804d539be Derive wxGenericFileCtrl from wxControl.
wxFileCtrl -- which can be #define'd as wxGenericFileCtrl -- is documented to
inherit from wxControl and does derive from it in the native GTK version, so
do it for the generic version too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 22:20:55 +00:00
Vadim Zeitlin
7d2295a0ca Allow using non-MSW toolkit in MSVC-specific auto-linking header.
This makes it possible to auto-link wxGTK library when using MSVC too.

Closes #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:41 +00:00
Vadim Zeitlin
47eab2f2e5 Define wxCONCATn() macro up to n=9 from n=5 previously.
We'll need it for n=6 for the next commit, so increase the max value of n a
bit more.

See #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:37 +00:00
Vadim Zeitlin
c9f6f0a8cd Add wxDir::GetNameWithSep() and use it to avoid consecutive slashes.
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:31 +00:00
Robin Dunn
7bb22bd68d Add wxDropSource::SetIcon for wxGTK to mimic SetCursor on the other ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 23:30:40 +00:00
Stefan Csomor
4b0a48dbac make WakeUp variant explicit, too many errors using heuristics, like #14176
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 19:30:11 +00:00
Dimitri Schoolwerth
ae580de376 Fixed parts of toolbar background not being drawn with older comctl32.dll.
When using comctl32.dll versions older than 6.0 toolbar icons would not have their background drawn. Fix this in a rough way by always completely erasing the background like was done before. Regression since r62971.

Closes #13512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 14:44:45 +00:00
Václav Slavík
840fc4d170 wxDataViewCtrl: always update the header when col best width changes.
Have an explicit per-column dirty flag and use that to determine whether
we need to call wxHeaderCtrl::UpdateColumn(). Previously, the lack of
computed best width was used as an indicator, but this didn't work
correctly if some code called GetWidth() after invalidation but before
wxDataViewCtrl::UpdateColWidths() was called at idle time. This resulted
in header's column widths getting out of sync with the control itself.

Fixes #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-30 09:33:30 +00:00
Vadim Zeitlin
c04be1a29f Added wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.

Currently this is only implemented in the generic version.

Closes #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:25 +00:00
Vadim Zeitlin
7e7ba0dfc5 Add missing "flags" argument to wxNotificationMessage ctor in wxMSW.
It was impossible to specify the flags when creating wxNotificationMessage in
wxMSW, cotrary to the other ports and the documentation.

Fix this by adding the missing argument to the ctor and simply passing it to
the base class one, we don't have to do anything else as the existing code
already calls GetFlags() later so it should respect these flags without any
more changes.

Closes #14245.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:23 +00:00
Vadim Zeitlin
586bed9446 Make it possible to forward declare wx{Choice,Tool,Tree}bookEvent again.
Don't use typedef for these classes as it makes it impossible to
forward-declare them, just use #define instead as we already do for
wxListbookEvent and wxNotebookEvent. This allows forward declaration and is
also more consistent.

Closes #12242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:15 +00:00
Vadim Zeitlin
49b489e80f Fix erasing wxHtmlWindow background in wxUniv.
Prevent the default wxWindow-level wxEVT_ERASE_BACKGROUND handler from being
used in wxUniv for wxHtmlWindow. This is unnecessary as it has its own handler
anyhow and also doesn't work for some reason as erasing wxMemoryDC by drawing
a solid rectangle over it seems to be broken in at least wxX11.

Work around this problem by erasing the background in wxHtmlWindow itself if
no user-defined (as opposed to any, including one defined in wxWindow itself)
handler for this event exists.

Closes #13880.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:43 +00:00
Julian Smart
23698b123b Fixed floating image layout when typing in subsequent paragraph
Now makes use of max size for images and keeps the image size reasonable
Added original image size so can usually avoid reloading image when recomputing
cached bitmap size
Takes into account bottom of the last floating image so scrollbars are
set correctly
Original image size is shown in disabled size controls


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-25 11:42:31 +00:00
Julian Smart
c6182d489c Added custom properties to style definitions and style sheets
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-24 11:22:18 +00:00
Julian Smart
e059e1bb33 Added flags to SetStyle with specific object
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-23 16:54:52 +00:00
Paul Cornett
1104248bb5 silence warning about wxOSX_USE_COCOA not being defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 15:34:24 +00:00
Robin Dunn
70175534bf Make wxTaskBarIcon's ctor have the same API on all platforms even though setting the icon type can only be done on wxOSX-cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 05:41:54 +00:00
Vadim Zeitlin
badf8578b2 Add default ctor to wxMSW private WindowHDC helper class.
Allow to use objects of this class without any valid HWND, this is useful for
the derived classes which may, or may not, need the corresponding HDC.

See #14194.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 14:29:59 +00:00
Vadim Zeitlin
b7775a521f Add wxFSInputStream providing stream interface to wxFileSystem.
This class allows using virtual wxFSFiles with any wx functions taking
streams. E.g. it makes it possible to load images and animations from
wxFileSystem.

Closes #14185.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 13:53:49 +00:00
Vadim Zeitlin
f5ef4d69b7 Added wxWrapperInputStream class.
This stream allows to wrap another stream. This is a useful base class for
adapter classes providing stream interface on top of something else, like the
upcoming wxFSInputStream.

See #14185.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 13:53:45 +00:00
Vadim Zeitlin
11527fc9f0 Added support for page tooltips to wxAuiNotebook.
Allow setting tooltips for the tabs of the individual pages of wxAuiNotebook.

Closes #14216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:26 +00:00
Vadim Zeitlin
86f5e64bb1 Added wxAcceleratorEntry::ToRawString().
This function can be used to obtain language/locale-independent representation
of an accelerator. This is particularly useful for storing it in configuration
files.

Closes #14228.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:19 +00:00
Vadim Zeitlin
6f3320bf3d No real changes, just some typo fixes for previous commits.
Fix wxCOMPtr comment and don't use "s_" for non-static variable.

Closes #14227.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-16 12:12:15 +00:00
Vadim Zeitlin
580ffdf4c0 Use new style directory selection dialog under Vista and later.
Use IFileDialog in wxDirDialog implementation if possible, it shows a much
more user-friendly dialog than the one used by SHBrowseForFolder().

Closes #11401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-15 23:18:12 +00:00
Vadim Zeitlin
09278fdb79 Added wxCOMPtr<> helper class.
This allows to avoid error-prone manual AddRef() and Release() calls when
writing COM code in wxMSW.

See #11401.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-15 23:18:08 +00:00
Robin Dunn
575821fad8 Add missing interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-12 05:33:29 +00:00
Vadim Zeitlin
c282e47d8f Always use UTF-8 for file names passed to GTK+ functions under MSW.
When building wxGTK under MSW, always use UTF-8 as file name encoding because
GTK+ doesn't use G_FILENAME_ENCODING there.

Add a helper wxGTK_CONV_FN() macro to hide the difference between the
platforms.

Closes #14035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-08 18:10:29 +00:00
Vadim Zeitlin
527f168b34 No real changes, just add extra brackets to wxGTK_CONV() macro.
These brackets are probably not really necessary but add them just in case
they can help with parsing some strange expressions and for consistency with
the other wxGTK_CONV_XXX() macros.

See #14035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-08 18:10:21 +00:00
Robin Dunn
895c1bc001 Add a ctor that is compatible with the documented wxHelpController API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-07 04:18:11 +00:00
Vadim Zeitlin
79ebe32ef1 Remove special setup_gccxml.h for GCCXML.
This file doesn't seem to be needed and the open() declaration in it actually
results in errors when using the latest gccxml from cvs under Windows, so just
get rid of it entirely.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-06 19:51:20 +00:00
Vadim Zeitlin
e911dd0a5a Hide combobox popup when it is hidden itself in wxMSW.
It was possible to hide the main part of a combobox control but keep its popup
shown and this notably happened in wxGrid when TAB was pressed while a
wxChoice cell editor was dropped down.

Avoid this Cheshire combobox syndrome by explicitly dismissing the popup when
a combobox is hidden.

Closes #3113.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 18:40:20 +00:00
Vadim Zeitlin
a24fb9f847 Refactor: move wxComboBox::MSWDoPopupOrDismiss() down to wxChoice.
No real changes, just make this method available in wxChoice for the next
commit needs.

See #3113.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 18:40:15 +00:00
Vadim Zeitlin
2415cf6725 Remove support for MetroWerks CodeWarrior compiler.
This compiler doesn't exist any more and was probably unsupported even in 2.8,
let alone 2.9, so remove all the __MWERKS__ tests to simplify things.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 18:40:11 +00:00
Vadim Zeitlin
88ec47bb12 No real changes, just remove wxIsDebuggerRunning() stub from wxOSX.
There is no need to have a stub here when we already have in wx/debug.h, just
remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 18:39:57 +00:00
Vadim Zeitlin
f7dd07f64d No real changes, just use clearer names for wxMSW wxToolTip methods.
Rename wxToolTip::DoAddOtherWindow() to DoAddHWND() as it should be used for
adding any window associated with the tooltip, either the main or an auxiliary
one. And rename wxToolTip::Add() to AddOtherWindow() because it shouldn't be
used for the main window.

See #14184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-05 13:55:51 +00:00
Vadim Zeitlin
0408c49fb9 Remove obsolete header used only with CodeWarrior MetroWerks compiler.
This compiler doesn't exist for modern OS X systems, no need to have the
headers used only with it as they just clatter the include directory and
confuse various tools parsing wx headers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-04 22:16:24 +00:00
Vadim Zeitlin
771563baee Added wxGraphicsContext::CreateMatrix(wxAffineMatrix2D) overload.
Make it easy to convert generic wxAffineMatrix2D to native wxGraphicsMatrix.

Closes #13188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-03 11:50:19 +00:00
Vadim Zeitlin
c52f18dfc8 Override DoThaw() in wxAuiNotebook correctly.
Don't "override" Thaw() in wxAuiNotebook as it's not virtual any more.
Override DoThaw() instead.

Also use wxBookCtrlBase instead of wxControl as the base class.

Closes #14179.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-02 18:26:03 +00:00
Vadim Zeitlin
33208b4ecb Remove nonsensical custom comparison code from wxDataViewIndexListModel.
This model was comparing its items by their positions in the list instead of
their values for some reason. This broke sorting in wxDataViewListCtrl using
this model and simply didn't make any sense.

Just remove the comparison code from wxDataViewIndexListModel entirely, the
base class version works just fine for it.

Closes #14116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-29 23:43:46 +00:00
Vadim Zeitlin
22930be86c Fix focus handling logic in generic wxListCtrl.
Don't override SetFocus() to set the focus to the main window, this isn't
enough as we can be given the focus by the underlying toolkit itself, without
our SetFocus() being called -- this happened in wxGTK when focus was changed
from the keyboard using TAB and in this case it didn't get to the main window
but remaining on the wxListCtrl itself meaning that keyboard input wasn't
processed at all.

Use wxNavigationEnabled<> now to ensure that OnSetFocus() and related methods
do the right thing instead now.

Also get rid of OnSetFocus() in wxListHeaderWindow, it's better to override
AcceptsFocus() to return false to avoid getting focus in the first place.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-29 00:10:53 +00:00
Steve Lamerton
34326da778 Minor changes, just trim trailing spaces in webview code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-28 18:00:30 +00:00
Vadim Zeitlin
90761420ee Set wxTextAreaBase::m_filename in the methods of this class itself.
m_filename member was declared in wxTextAreaBase but set only in the
overridden wxTextCtrlBase methods. This meant that it wasn't updated correctly
in wxStyledTextCtrl which also derives from wxTextAreaBase and so saving
SaveFile() with empty file name didn't work there even when the control had
been originally loaded from a file.

Move the code updating m_filename to wxTextAreaBase itself to fix this. This
also simplifies the code as it's now not necessary to override
Do{Load,Save}File() in wxTextCtrlBase at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:09 +00:00
Vadim Zeitlin
dace99a4ef Use IsDescendant() in wxTopLevelWindow::IsActive() implementation.
Avoid wxGetTopLevelParent() which doesn't work for the strange TLWs which
override IsTopLevel() to return false, as wxMDIChildFrame does in wxMSW.
Using IsDescendant() works in any case and also is arguably more clear.

Closes #3063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:05 +00:00
Vadim Zeitlin
8b2f64c6c1 Added wxWindow::IsDescendant() helper.
This function checks if another window is a direct or indirect child of this
one, which can be needed in a number of situations.

See #3063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:02 +00:00
Paul Cornett
6b1f115551 remove unneeded includes and forward declaration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:34:42 +00:00
Paul Cornett
54195d23c2 replace wxBitmap::SetPixbuf() with wxBitmap ctor taking pixbuf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:33:18 +00:00
Vadim Zeitlin
c0795ce8ea Added wxTimePickerCtrl::GetTime() and SetTime().
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.

Document the problem with the old functions and use the new ones in the
sample.

See #14137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:17:01 +00:00
Paul Cornett
25d7cf54f0 build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 19:15:54 +00:00
Vadim Zeitlin
069358b7cc Implement native tab art for wxAUI in wxGTK.
Use native wxAuiTabArt implementation in wxGTK, it better conforms to the
system style.

Closes #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:56:04 +00:00
Vadim Zeitlin
4758baf5eb Refactor wxAUI: extract wxAuiTabArt in a separate file.
No real changes, just extract wxAuiTabArt into its own file. Also rename
wxAuiDefaultTabArt to wxAuiSimpleTabArt in preparation for having other tab
art classes as the default one.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:59 +00:00
Vadim Zeitlin
740dd154a5 Add a private GetNotebookWidget() accessor to wxGTK.
This is similar to the other existing functions and allows to access
GtkNotebook-specific style.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:49 +00:00
Vadim Zeitlin
5c26126c14 Export wxGTK private widget creation functions from core library.
This is necessary to allow using them from other libraries, e.g. wxAUI that
will do it in the upcoming commits.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:45 +00:00
Vadim Zeitlin
2970f22a89 Include <wx/textctrl.h> from <wx/combobox.h> for compatibility.
The wxComboBox header itself doesn't need <wx/textctrl.h> but there exists
code using wxComboBox with wxTextCtrl styles and events that doesn't include
<wx/textctrl.h> explicitly because it wasn't necessary in 2.8. So include it
from wx/combobox.h to avoid breaking this code after an upgrade to 2.9.

Closes #14132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:42 +00:00
Vadim Zeitlin
f17ac57417 Return valid pointers from wxDateTime::ParseXXX() with non-wxString strings.
The pointer returned by wxDateTime::ParseXXX() methods could point into a
buffer of a temporary wxString created to wrap a char* or wchar_t* argument so
dereferencing it was illegal.

Fix this by defining separate overloads for char*/wchar_t* arguments returning
pointers into the original string.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 16:45:53 +00:00
Vadim Zeitlin
52dc2108ae Add helper wxString::IterOffsetInMBStr() method.
This method can be used to recover the pointer in char* buffer containing
multi-byte string representation corresponding to the given iterator which is
useful for implementing backwards-compatible functions that must be able to
return such pointers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 16:45:50 +00:00
Vadim Zeitlin
42e86f64b7 Don't cache incorrect length in wxString::DoUngetWriteBuf().
The length here is the size of the buffer in bytes and is not necessarily the
string length in code points (notably not for non-ASCII strings in UTF-8
build).

Closes #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 15:13:16 +00:00
Vadim Zeitlin
556a836e0f Don't cache incorrect length in wxString::assign(char*, size_t).
The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.

Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.

See #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 15:13:13 +00:00
Vadim Zeitlin
bd42a07c7a Fix caching wrong length in wxString(str, len) ctor in UTF-8 build.
A length greater than that of the source string could be passed to this ctor.
This worked correctly, i.e. created a string which was a copy of the source
one but cached a wrong length for it.

Avoid this by explicitly checking the length before caching it in
wxString::assign(str, len).

See #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 15:13:08 +00:00
Vadim Zeitlin
b9e52a19e6 Implement horizontal mouse wheel events support for wxMSW.
Handle WM_MOUSEHWHEEL messages and translate them to the corresponding
wxMouseEvents.

Closes #14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:27:02 +00:00
Vadim Zeitlin
41469c9e5e Use enum for wxMouseEvent::m_wheelAxis instead of int.
This variable can take only 2 values, use symbolic names for them instead of
difficult to understand 0 and 1.

See ##14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:26:59 +00:00
Vadim Zeitlin
8d241dea5c Fix display of "const" methods in wxGTK assert dialog.
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.

Just show everything in one column to avoid the problem and also simplify the
code.

Closes #14104.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-21 00:11:12 +00:00
Vadim Zeitlin
996de8322b Remove empty and unnecessary wxFontDialogBase destructor.
This fixes build with wxUSE_FONTMAP==0 as this dtor was only defined inside
"#if wxUSE_FONTMAP" section. Instead of fixing this, just get rid of this dtor
entirely as it was unnecessary anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-20 23:31:25 +00:00