Commit Graph

15283 Commits

Author SHA1 Message Date
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