After removing wxDIB::m_hasAlpha in the previous commit, this method became
completely trivial so put it inline in the header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This field can't be set reliably as we don't know if LoadImage() Windows
function loaded an 0RGB or an RGB bitmap so remove it completely to avoid the
risk of using it wrongly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.
Closes#12163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes but refactor wxSizerXmlHandler to make it easier to derive
from it by adding virtual IsSizerNode() and DoCreateSizer() methods. To add
support for a custom sizer class you only need to override them in
wxSizerXmlHandler subclass now.
Also document wxSizerXmlHandler which was not documented at all previously.
Closes#11845.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This simple helper function doesn't use any wxXmlResourceHandler data as it's
just a trivial wrapper for wxXmlNode::GetAttribute().
Making it static allows, in particular, to call it from const member functions
of wxXmlResourceHandler-derived classes (making it "const" itself would
achieve this too, of course, but it just doesn't need to be non-static).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call OnXXX() from wxThread::Kill() and Delete() respectively to allow the
thread being terminated perform some cleanup.
Closes#9046.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to search the string just once, in BeforeXXX(), when both the
parts of the string before and after some character are needed instead of
having to do it twice in both BeforeXXX() and AfterXXX().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix compilation in !wxUSE_UNICODE_UTF8 case after r65857.
Modify the second declaration of wxString::iterator class which was not
updated by the previous commit in the same way, i.e. add declaration of
comparison operators taking const_iterator to iterator class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only comparisons between const_iterator and iterator worked before (because of
implicit conversion from the latter to the former), implement the ones in the
other direction explicitly now.
Closes#12594.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxSP_ARROW_KEYS conflicted with wxTE_AUTO_URL (which was probably not
important in practice as URLs don't appear in spin controls anyhow) and wxSPWR
conflicted with wxTE_NOHIDESEL (which could conceivably be a problem).
Change their values to reuse the bits of wxTE_CHARWRAP and wxTE_RICH2 neither
of which definitely makes sense for a spin control.
Closes#11461.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct the changes of r65827 to also compile with wxUSE_DRAG_AND_DROP==0
(especially important for the ports without dnd support such as wxX11 and
wxDFB).
Also do the changes in the correct files, i.e. src/stc/stc.{h,cpp}.in and not
in the generated files themselves to prevent them from being overwritten the
next time gen_iface.py is ran.
Finally keep backwards compatibility as SetDragAllowMove(bool) is a public
method so preserve its old semantics and add a new SetDragFlags() instead of
silently breaking the existing code using SetDragAllowMove().
See #11709.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In particular, create a valid GtkPrintOperation object instead of using an
uninitialized pointer to it in wxGtkPrintDialog::ShowModal(), resulting in
crashes or, at best, GTK errors.
Closes#12483.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Drag and drop in wxStyledTextCtrl was broken, apparently since upgrade to
Scintilla 2. Restore it by using the correct wxDrag_XXX constants instead of
boolean values in the code for wxEVT_STC_START_DRAG events generation.
Closes#11709.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This symbol is defined for the ports that support wxCHK_3STATE style. While
most of the ports do support it, a couple still do not and having this symbol
makes it more convenient to exclude 3-state-checkbox-specific code, like in
CheckBoxTestCase.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Detect when incompatible styles are used (this required changing the value of
wxCHK_2STATE to be non-null) and sanitize the styles (after asserting) in this
case.
Put the validation code in wxCheckBoxBase instead of having slightly different
versions of it in port-specific wxCheckBox implementations.
Add a unit test checking that the expected asserts are indeed generated.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using GetStyle() == wx{PEN,BRUSH}STYLE_TRANSPARENT doesn't work for
uninitialized pen or brush objects so add convenient helpers which do work for
them.
Use the new helper functions everywhere instead of explicitly checking for
style. This makes the code shorter and more clear and also fixes some bugs (at
least those in GTK printing code).
Notice that this patch removes the main reason for explicitly initializing
m_pen and m_brush in wxGTKDCImpl ctor but this initialization still can't be
removed, at least for the latter, as doing this somehow breaks GetPixel(). It
would be nice to understand why and do remove this initialization so that a
newly created DC doesn't have any non-default pen nor brush.
Closes#12522.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is more than a cosmetic change: adding "GTK" prefix in wxComboBox and not
doing it in wxChoice in r64436 broke the event generation for wxComboBox as it
didn't override wxChoice methods any longer but defined its own (useless) ones.
Using the same name for the methods in both classes notably fixes unexpected
event generation from wxComboBox::SetSelection().
Closes#12568.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Task dialogs are not always available under Vista and later Windows versions
because we might not be using the right (i.e. 6+) version of comctl32.dll.
Improve the check for task dialog availability and fall back to the classic
message box if we can't use it.
Closes#12553.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
so that objects can stream themselves; added a wxXmlDocument-based method
of writing XML, though this turned out to be much slower than writing directly
so the direct approach is retained and is the default (can be changed with wxRICHTEXT_USE_XMLDOCUMENT_OUTPUT).
Loading and saving new attributes implemented. Added custom properties to objects.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If the in-place text control was still alive when wxGenericListCtrl was
destroyed, it resulted in asserts from wxWindow dtor about child windows still
being alive, so explicitly destroy it from wxListMainWindow dtor.
As this required a slightly different behaviour from wxListTextCtrlWrapper::
EndEdit(), replace its bool argument with an enum one which can take more than
2 values. Not using bool values when calling it also made the code more clear.
Finally, added a unit test verifying that the in-place control is indeed
destroyed correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This helps improve the extremely poor performance of XML saving if
you have, for example, hex data that does not need conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
__thread keyword doesn't work correctly with at least some MinGW builds and in
particular TLS unit tests failed with the official 4.4 version.
Disable the use of __thread with MinGW entirely for now to be sure that the
generated code behaves correctly. In the future we should white list the known
good versions of MinGW and/or use run-time test for __thread support in
configure instead of compile-time one only.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to create wxFileTypeInfo objects in a more readable even if more
verbose way.
This should also incidentally fix the unit tests compilation with VC6 which
seems to have some existential troubles with the vararg ctor in debug DLL
build (only). Using the non-vararg ctor should hopefully make it happy and let
the unit tests pass with this compiler.
Also document wxFileTypeInfo class which wasn't documented at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not all ports define wxBitmapToggleButton class currently, so add a special
symbol which is defined only if this class is indeed available and test for it
in the unit test for this class.
This fixes the tests compilation under wxX11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The strings corresponding to %hs and %ls are always narrow/wide independently
of the build so using wxArgNormalizedString which is defined differently in
different builds doesn't make sense in wxPrintf().
Instead, simply expect the parameter of the appropriate matching type for
these conversion specifications. Any conversions to it, if necessary, had been
already done before by wxFormatString.
This fixes some VsnprintfTestCase::BigToSmallBuffer() unit test failures.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Count the number of asterisks before modifying the string we use to do this,
otherwise we were off by one for the format specifications containing two of
them.
This really fixes the handling of asterisks (used for width/precision) in
wxPrintf() format string, it wasn't done correctly by r60120 but now
VsnprintfTestCase::Asterisk() test does pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include or forward declares the classes used by the header to make it
self-contained. Do not include wx/wx.h from the source file to make compiling
it faster when not using PCH.
This fixes compilation under Unix after SOC2010_RTC_IMAGES branch merge.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These pragmas are not necessary and may actually be harmful, no idea why were
they added in the first place to a new file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added floating images and image property dialog to wxRichTextCtrl, by Mingquan
Yang as part of GSOC 2010. Also changed image block creation to use a memory
stream instead of creating a temporary file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775