Commit Graph

14925 Commits

Author SHA1 Message Date
Vadim Zeitlin
3ac17397c5 Perform wxAuiToolBar idle updates from UpdateWindowUI(), not OnIdle().
No real changes, just optimize the idle updates by doing it from (less often
called) UpdateWindowUI() instead of EVT_IDLE handler.

Closes #10075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 16:51:10 +00:00
Vadim Zeitlin
9a29fe70bc Change variables naming convention in wxAUI code.
Use the standard wxWidgets camelCase convention instead of the
old_one_using_underscores for all the private variables.

Closes #13476.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 14:20:03 +00:00
Vadim Zeitlin
74e0e33a85 Remove apparently unnecessary wxAuiMDIClientWindow dtor.
This dtor doesn't seem to do anything useful as the base class dtor already
destroys all window children anyhow and removing it is reported to fix some
crashes in wxAUI (which is surprising and probably hides some other bug...).

Closes #13547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 14:19:55 +00:00
Vadim Zeitlin
911219b2ab Allow customization of the locations where persistent settings are stored.
Make it possible to set a non-default wxPersistenceManager to use and allow
overriding of GetConfig() and GetKey() methods by making them virtual and
documenting them.

This can be notably used to allow porting of the existing code to use
wxPersistenceManager while keeping compatibility with the old settings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 10:08:18 +00:00
Vadim Zeitlin
eacfac2d5e Fix return value of wxPersistentSplitter::RestoreValue().
It used to always return false which didn't allow the code using to decide
whether the default splitter position should be used or not.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 10:08:14 +00:00
Robin Dunn
c78f085763 resolve multiple inheritance ambiguity
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-29 04:50:04 +00:00
Vadim Zeitlin
038809c2f6 Make BOM-detection code in wxConvAuto public.
Export GetBOM() and DetectBOM() functions.

Also rename BOMType enum elements to use "wx" prefix now that they're public.

Closes #13599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 22:48:54 +00:00
Vadim Zeitlin
e4c8592e9c Add _PTR WX_DECLARE_HASH_SET variants to fix warnings about operator->().
Macros from WX_DECLARE_HASH_SET family could declare an operator->() which
could never be called because it returned a pointer to a non-object (e.g. a
pointer or a primitive type).

Fix this in the same way as for WX_DECLARE_ARRAY macros by adding (badly but
consistently) named _PTR variants of the macros to allow defining the versions
without operator->().

This fixes tons of warnings when building wx with Sun CC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 22:26:10 +00:00
Vadim Zeitlin
c155b9b519 Use WX_XXX_ARRAY_PTR macro variants for arrays of pointers.
Arrays of pointers must not overload operator->() as it is not used with them
and is, in fact, unusable, provoking a warning from Sun CC every time such
array is declared. Use the special _PTR-suffixed versions to avoid this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:51 +00:00
Vadim Zeitlin
449cc35153 Don't make wxQsort() extern "C" nor use any special convention for it.
It doesn't make sense to require passing C functions to wxQsort() that we
define in a C++ library. We also don't need any special calling convention
here.

Notice that the only existing uses of wxQsort() inside wxWidgets itself were
not actually extern "C" and one of them didn't even use the correct calling
convention.

Also avoid using non-wx-prefixed CMPFUNCDATA identifier in a public header,
rename it to wxSortCallback instead.

Finally make wxQsort() documentation slightly more useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:48 +00:00
Vadim Zeitlin
1da8e6e400 Make GTK callbacks passed to GTKConnectWidget() extern "C".
This fixes (harmless but annoying) warnings about mixing C++ and C linkage
function pointers from Sun compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:45 +00:00
Vadim Zeitlin
2f6b64a90b No real changes, just remove trailing commas from enums.
These commas are not allowed by standard C++ and Sun CC warns about them (and
some other compilers, e.g. HP aCC, even give errors for them).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-27 21:10:30 +00:00
Robin Dunn
e94d46a67c Work around a multiple inheritance ambiguity
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-26 05:39:18 +00:00
Stefan Csomor
ad71431be3 deactivate wxUSE_TIMEPICKCTRL for iphone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-25 19:29:12 +00:00
Paul Cornett
3ec3c160bc fix wxMDIChildFrame after r69390 and r69468, TLW realization code should not be called, fixes #13593
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-25 16:56:57 +00:00
Stefan Csomor
c2ba305910 fixing iPhone build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-25 11:51:08 +00:00
Julian Smart
75936ec600 Applied patch #13534: wxRichTextCtrl: Make it easier to use TextEffects flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-22 13:19:40 +00:00
Václav Slavík
fb57a95e70 Move wxDataViewCustomRendererBase::ActivateCell() to datavcmn.cpp.
It triggered deprecation warnings in user code when it was inline.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-21 16:34:32 +00:00
Vadim Zeitlin
d0da5061ce Dirty hack to allow generic wxDatePickerCtrl to compile under MSW.
Don't make wxDateTimePickerCtrl methods pure virtual in its MSW-specific
version as the generic wx{Date,Time}PickerCtrl implementations not using these
methods also inherit from it currently. This is wrong and would need to be
fixed properly later but for now this hack at least allows the generic classes
to compile and, apparently, work under MSW again.

Remove the equally dirty hack used in the generic wxTimePickerCtrl to allow it
to compile which is not needed any more because this one replaces it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-20 16:45:48 +00:00
Vadim Zeitlin
26d863e2b2 Fix wxRichToolTip compilation under MSW without PCH and recent SDK headers.
Include the headers normally included from wx/wxprec.h.

Also define the stuff missing from the headers of some compilers (notably
MinGW but probably also VC6) ourselves.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-20 16:20:19 +00:00
Robin Dunn
6e6f074b45 Delegate wxGraphicsBitmap::ConvertToImage to the renderer so we do not end up with more than one definition of the method when building with both the GDI+ GC and the Cairo GC enabled at the same time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-20 04:49:12 +00:00
Vadim Zeitlin
c9b7d15bbb Fix PCH-less compilation of wx/richtooltip.h too.
We need to include the full wxColour declaration instead of just forward
declaring it as we use its ctor for a default value of a parameter.

Also include wx/defs.h to ensure that wxUSE_RICHTOOLTIP is defined before
testing it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 21:53:10 +00:00
Václav Slavík
dc73d7f5d4 Cleanup of wxDataViewCtrl cell activation code.
Fix confusion of what cell activation is and inconsistence with native
handling in GTK+. Document the distinction between activating (~
editing) a cell and activating (double-clicking) the whole item.

Deprecate wxDataViewCustomRenderer::LeftClick() and Activate() methods,
replace them with single ActivateCell() that is called for both kinds of
activation.

Fix implementations so that ActivateCell() is not called on
double-click, when it shouldn't, and vice versa: don't send
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED for cell activation.

Partially reverts r67099 -- restores old 2.9 signatures of compatibility
LeftClick() and Activate() methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:17 +00:00
Václav Slavík
4a99d59750 Move InitMouseEvent<T>() to wx/gtk/private/event.h.
It is needed in wxDataViewCtrl now too, in addition to wxWindow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:10 +00:00
Václav Slavík
1d3a930e82 Use wxDatePickerCtrl in wxDataViewDateRenderer.
Inline editor is more in line with the behavior of other editors,
requiring double click to edit values was unexpected.

Also merge the two almost-but-not-quite identical implementations in
generic and GTK+ versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:06 +00:00
Václav Slavík
31af22fa2d Allow using wxCompositeWindow<T> as wxDataViewCtrl inline editor.
wxDVC inline editing code attaches some event handlers to the editor
control; most importantly, it watches for Enter key and for focus
changes. If the editor control is a composite window, these events occur
in a sub control and never reach wxDVC code.

Fix this by forwarding events to the main window of the composite
control. Only events required by wxDVC are implemented for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 16:20:01 +00:00
Vadim Zeitlin
83ed867e70 More fixes for PCH-less compilation.
Include declarations for or forward declare more classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-19 10:58:59 +00:00
Vadim Zeitlin
e520c3f75c Added wxRichToolTip class.
It can be used to show more customizable tooltips than the native wxToolTip
but at the price of using generic implementation in some cases (actually
almost always now, with the exceptions of text control tooltips under MSW).

Extra features include:
 - The balloon-like tooltip form.
 - Possibility to show an icon.
 - Title display in a different form.

More customization could be added later. It should be also possible to fully
implement this class natively under MSW.

Update the dialogs sample to show the rich tooltips in action.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:57:02 +00:00
Vadim Zeitlin
46ea442ca2 Added wxNonOwnedWindow::SetShape(wxGraphicsPath).
TODO: Document.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:56:52 +00:00
Vadim Zeitlin
265dd23241 Don't create a valid wxRegion when using default ctor in wxOSX.
Default constructing a wxRegion created an object that unexpectedly passed
IsOk() test in wxOSX. This was completely unexpected so don't do this and
leave default constructed wxRegion invalid, as in the other ports.

Update DoCombine() to be able to deal with the case of an invalid source
region in a way consistent with the other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:56:40 +00:00
Vadim Zeitlin
63415ba9f5 Don't interpret '&' specially in wxTextWrapper.
wxTextWrapper is used for the multiline text for which it doesn't make sense
to use mnemonics so don't interpret '&' specially in the text used with it.

Doing this also allows to remove the hack used in wxDialog::CreateTextSizer()
to deal with it that was used so far.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:56:36 +00:00
Vadim Zeitlin
b9ca72aa7b No changes, just fix typo in a comment following an #endif.
The closing comment used wrong symbol.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:56:29 +00:00
Vadim Zeitlin
e33cedf4c6 Explicitly use _stati64() with MinGW-W64.
Although this compiler provides underscore-less versions of all POSIX
functions, this one only exists in a version with underscore, so use it to fix
compilation with it in ANSI build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-17 22:26:13 +00:00
Vadim Zeitlin
164db177a2 Don't use wxMSW version of wxNonOwnedWindow at all under WinCE.
This class becomes completely trivial under WinCE as its functionality
(setting the window shape) can't be implemented under this platform, so just
don't compile it at all there.

This both (slightly) reduces the amount of #if checks and should make the code
(slightly) smaller.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-15 00:20:56 +00:00
Vadim Zeitlin
a82afab363 Implement SetShape() for wxPopupWindow in wxGTK.
Move SetShape() implementation from wxTopLevelWindow to wxNonOwnedWindow so
that wxPopupWindow, which also inherits from the latter, could use it as well.

This makes it possible to have popup windows with irregular shapes in wxGTK as
well as in wxMSW and wxOSX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-13 12:45:56 +00:00
Vadim Zeitlin
612515aff1 Added wxWindow::GTKHandleRealized() virtual method to wxGTK.
This allows to easily do something in the derived classes when the widget is
realized, without having to deal with GTK+ signals. In particular, get rid of
another "realize" signal handler in wxTopLevelWindow and simply override this
virtual method there.

It also incidentally makes the callback code simpler as the window doesn't
need to be constantly dereferenced.

This shouldn't result in any changes to behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 16:22:14 +00:00
Vadim Zeitlin
f854ecb5a8 Move wxUSE_GUI definition from chkconf.h to the top of platform.h.
This avoids warnings about wxUSE_GUI not being defined in Mac tests in
wx/platform.h which are now (since r69387) done before wx/chkconf.h inclusion.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 11:20:15 +00:00
Stefan Csomor
4b21235820 moving defines in front of the setup.h to make webkit definitions in setup.h work for Xcode builds as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-12 08:57:40 +00:00
Vadim Zeitlin
a378977021 Added missing WXDLLIMPEXP_CORE to wxNonOwnedWindowBase declaration.
This fixes (harmless) MSVC warning C4275 about inheriting DLL-exported class
from a non-DLL-exported base class.

Closes #13554.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-11 17:56:57 +00:00
Vadim Zeitlin
bbcf2821a1 Move SetBackgroundBitmap() from wxPanel to new wxCustomBackgroundWindow.
wxCustomBackgroundWindow is a new class allowing to set a custom bitmap for
the background of any window. The relevant code was mostly moved from wxPanel
to which it was added only recently (before 2.9.2) making it unnecessary to
preserve compatibility.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-11 17:07:43 +00:00
Vadim Zeitlin
7652eada41 Fix warnings about wxOSX_USE_CARBON being undefined when using g++.
Test for __WXMAC__ before testing wxOSX_USE_CARBON to avoid -Wundef warnings
from g++ in non-Mac builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-10 17:12:42 +00:00
Vadim Zeitlin
5bd0ee9966 Move wxTopLevelWindow::SetShape() down to wxNonOwnedWindow.
Also add wxNonOwnedWindow for wxMSW (which previously simply typedef'd it to
wxWindow) and document this class now that it provides some user-visible
functionality.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-10 10:53:23 +00:00
Vadim Zeitlin
fa378d369f Allow creating wxGraphicsFont without using wxFont.
This is mostly important to allow using wxImage-based wxGraphicsContext
without requiring X server connection under Unix: as wxFont can't be used
without X server, we needed another way to create wxGraphicsFont in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:07:29 +00:00
Vadim Zeitlin
0a470e5ea5 Allow creating wxGraphicsBitmap and wxGraphicsContext from wxImage.
Provide a way to use wxGraphicsContext to draw on wxImage.

This is implemented internally by drawing on wxGraphicsBitmap which can be now
also created from wxImage.

Add a test of the new functionality to the image sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:07:22 +00:00
Vadim Zeitlin
08b2d55fdf Added wxGraphicsBitmap::ConvertToImage().
Allow to convert wxGraphicsBitmap directly to wxImage, without passing by
wxBitmap.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:07:07 +00:00
Vadim Zeitlin
0419fee9c3 Implement EVT_MOUSE_CAPTURE_LOST handling for wxPopupTransientWindow.
Handle mouse capture lost events instead of polling for the mouse status in
EVT_IDLE handler. This is not only more efficient but also catches the cases
when the capture was lost before OnIdle() could be executed which could result
in assertion failures and, before the previous commit, even crashes.

The idle-time code is still used for wxOSX/Carbon because it doesn't seem to
generate mouse capture loss events currently -- but should be removed as soon
as support for these events is added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:02:05 +00:00
Vadim Zeitlin
f9e19204bf Implement delayed destruction for wxPopupTransientWindow.
Windows of this class can be destroyed at any moment, even while some events
are still being processed, so delay the real destruction until we can be sure
that it's safe to delete the window.

This fixes problems (crashes due to dangling pointers) when the object is
deleted from the overridden OnDismiss(), for example.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:02:02 +00:00
Vadim Zeitlin
4506b42ce9 Fix inheriting parent background colour in wxPanel in wxMSW.
wxPanel didn't inherit the background colour set for its parent any more in
wxMSW because its HasTransparentBackground() didn't return true unless the
panel was a child of wxNotebook. This was wrong because not only themed
notebook background should be inherited but also any solid background
explicitly set for a panel parent.

Fix this by returning true from MSWHasInheritableBackground(), which is used
by wxPanel::HasTransparentBackground() under MSW, if the window has an
explicitly set and inheritable background colour.

Closes #13487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 22:01:57 +00:00
Steve Lamerton
a1a1790666 Reuse existing MinGW defines for all compilers that are missing them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-09 10:45:16 +00:00
Steve Lamerton
8acbf08b2a Fix various GCC warnings in wxWebView.
Closes #13532

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-06 17:55:43 +00:00