Commit Graph

55201 Commits

Author SHA1 Message Date
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
Stefan Csomor
0601befc27 fixing c++11 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-18 09:56:33 +00:00
Stefan Csomor
5f35207b7d fixing c++11 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-18 09:56:06 +00:00
Vadim Zeitlin
3d65f6463b Improve wxDir::Traverse() documentation.
It didn't describe wxDIR_FILES correctly and didn't mention OnOpenError().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 16:10:22 +00:00
Vadim Zeitlin
3ecb4c01f2 Fix wrong format specifiers in the samples.
Use "%ld" instead of "%d" to format long values, using "%d" results in an
assert failure under LP64 systems as int and long have different sizes there.

Closes #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 16:10:19 +00:00
Paul Cornett
f2c757c5cc mark virtual overrides as virtual
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 15:46:26 +00:00
Paul Cornett
f069ac4801 remove some unnecessary c_str() calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 15:46:08 +00:00
Paul Cornett
e2cb99c856 eliminate unused variable warning with wxUSE_LOG_DEBUG==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 15:45:50 +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
Robin Dunn
e447683693 Interface fixes for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 02:47:34 +00:00
Vadim Zeitlin
f919ae3477 Make variable containing port number an ushort in the sockets sample.
A port number is an unsigned short, not long, so don't make it long just
because wxCmdLineParser doesn't provide a convenient way to get the value of
an unsigned short option (it would be nice if it did...).

This fixes the problem with using "%d" format specifier with a long variable
as this resulted in an assert under LP64 systems.

See #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-16 15:10:05 +00:00
Vadim Zeitlin
c4239f1920 Fix wxWakeUpIdle() in Unix console application broken by r71089.
Initialize m_pipeIsEmpty to true as we don't have anything in the pipe
initially and if this variable was false, nothing was ever written to the wake
up pipe and it was never set to true as nothing was read from it neither.

Closes #14166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-16 15:10:01 +00:00
Vadim Zeitlin
a0b13884b4 Don't use printf() with non-literal string as format.
Replace calls to printf() with puts() in the typetest sample.

See #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-16 13:24:49 +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
5e4bbd0f45 Fix pasting large amounts of text in wxGTK.
We need to process GDK_PROPERTY_NOTIFY events when yielding for
wxEVT_CATEGORY_CLIPBOARD, otherwise we never receive large selections.

As GDK_PROPERTY_NOTIFY can be also used for non-clipboard stuff, exceptionally
assign 2 categories to it and process it in either case.

Closes #14284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:04:11 +00:00
Vadim Zeitlin
4d769703f6 Correct the documentation of wxSpinCtrl initial and value arguments.
It does make sense to specify "initial" if "value" is empty.

See #13589.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:04:07 +00:00
Vadim Zeitlin
82c372a7e2 Add support for wxArrayString to wxVariant-to-OLE conversion.
This allows to call COM methods taking arrays of strings easily.

Also remove support for the old and non-existent any more "stringlist" variant
type.

And add more error checking.

Closes #14296.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:04:03 +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
c833f0cdb0 Use iterators instead of indices in wxStripMenuCodes().
Make the function more efficient when using UTF-8 wxStrings by using iterators
instead of indices in the loop searching for "&".

Closes #14307.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-15 10:03:53 +00:00
Julian Smart
3ef12fd203 Clear styles popup if there is no style sheet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-14 17:23:56 +00:00
Vadim Zeitlin
34c5aaa769 Simplify wxEventLoopManual pending events processing logic.
Don't try to process any remaining pending events in ProcessEvents() itself as
this was inconsistent: we only processed low-level toolkit pending events in
the main event loop itself if the loop was exited from a normal event handler
but only processed the wxApp-level pending events if it was exited from a
pending event handler. It also required more code than the new version that
simply processes all the remaining pending events, of both kinds, after the
main event loop termination.

This corrects changes of r71304 and replaces those of r71329.

Closes #14250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 22:13:43 +00:00
Vadim Zeitlin
d44dc1bede Fix wxDateTime unit test after the changes of r71430.
Don't test the return value of ParseFormat(wxCStrData) any more as this
function is void now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 22:05: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
530a50ecf0 Don't assert if no icon is specified for a wxDataViewCtrl item.
An item in a column using wxDataViewIconTextRenderer might not have any valid
icon associated with it, don't assert in case it doesn't in the native GTK
version.

Notice that the generic wxDataViewCtrl implementation already supports this
but not perfectly: no space is reserved for the icon in the images without
one, so giving the image to only some of them looks ugly. The GTK version
aligns both the items with and without icon properly and simply leaves the
image part blank and it would be better to modify the generic version to do
the same thing in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:16 +00:00
Vadim Zeitlin
ed4caec714 Minor change to wxString pretty-printer for gdb.
Calling string() explicitly isn't necessary, at least not with gdb 7.2, and is
actually harmful when using Python 2.5 (which doesn't support UTF-32) with
wide strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:13 +00:00
Vadim Zeitlin
f3027fae17 Don't handle branches specially when sorting items in wxDataViewCtrl.
The generic version of wxDataViewCtrl tried to put all branches before the
leaves when sorting. This had a couple of problems: first, it didn't do it
correctly and actually placed the branches after the leaves which didn't make
any sense. Second, this was only done in the generic version and not the
native GTK one making the behaviour inconsistent between platforms. Finally,
this behaviour just doesn't make sense in general (i.e. when items don't
necessarily represent anything in the file system and maybe even sometimes
when they do) and there doesn't seem any good reason to do it by default.

So stop doing it, partially reverting the changes of r47562.

Closes #14100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 21:37:10 +00:00
Vadim Zeitlin
bf0f2c4b33 Disable the use of UTF-8 by default in Unix builds.
Add up-to-date description of UTF-8 support to the Unicode overview.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-13 13:17:25 +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
Julian Smart
d157d142f6 Fixed layout and hit-testing problem particularly with centred lines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-11 22:15:39 +00:00
Vadim Zeitlin
5e4027e5ad Document that wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED is OSX-specific.
This even is not generated by neither generic nor GTK version right now.

See #14297.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-11 22:10:28 +00:00
Vadim Zeitlin
0b61390646 Fix extra event sent by wxTextEntry::ChangeValue() since r71308.
The changes of r71308 sent the event unconditionally in case the text didn't
really change but no events should be sent if the flags don't include
SetValue_SendEvent, add a check for it.

Re-closes #13936.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-11 22:10:25 +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
Robin Dunn
caf1a3aa68 Ensure a 32-bit cairo surface is created if it is needed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-11 22:06:37 +00:00
Stefan Csomor
8e19598f7f fixes SetFirstItem, Thanks to David Wright
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-11 06:28:54 +00:00
Robin Dunn
92de61e429 More interface fixes for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:38:14 +00:00
Robin Dunn
c921d597cf Add wxFormatInvalid, and tweak the docs for wxDataObject::GetDataHere and SetData
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:34:46 +00:00
Robin Dunn
137c1e7f86 Add doc for wxCliboard::Get
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 22:34:39 +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
1e58c8b944 Set LF EOL style for setup.h.in file.
This file is only used under Unix so should have Unix EOLs, e.g. to allow
building Unix ports from the sources checked out under Windows.

Closes #14266.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-10 11:53:45 +00:00
Vadim Zeitlin
136aafe540 Add missing wx/scopeguard.h include to fix the build.
Closes #14285.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 17:16:26 +00:00
Vadim Zeitlin
902b679a45 Fix wxGenericListCtrl best size calculation in report view.
Just let the base class do it instead of using hard coded default value in
wxGenericListCtrl::DoGetBestClientSize().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:54 +00:00
Vadim Zeitlin
f797518e8f Unconditionally define IID_IShellItem in wxMSW sources.
This GUID may not be defined in uuid.lib even when
__IShellItem_INTERFACE_DEFINED__ is defined in the headers, so just define it
always to avoid any problems.

Closes #14244.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:51 +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
402dae7b46 Improve wxBookCtrlBase controller size calculations.
Use GetBest{Height,Width}() in wxBookCtrlBase to compute the controller
control size height/width from its known (from wxBookCtrlBase size itself)
width/height. This will allow to correctly compute the size of wxListCtrl used
by wxListbook once it provides the necessary support for width-from-height and
height-from-width calculations.

See #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:44 +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
386279c3f2 Improve wxWindow best size documentation, mention DoGetBestClientSize().
Custom classes should typically override DoGetBestClientSize() instead of
DoGetBestSize() to avoid having to deal with the borders.

Also don't reference the deprecated SetInitialBestSize() unnecessarily and
document its non-deprecated replacement.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:34 +00:00
Vadim Zeitlin
d5d037c362 Mention wxFoobookEvent change from classes to #defines in the change log.
These classes can't be forward-declared any more as they're not really classes
any longer but just compatibility #defines and can't be made classes again as
this would break the existing code using wxBookCtrlEvent in 2.9.

See #14242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-09 14:24:30 +00:00