Extract the bitmaps initialization in wxAuiDefaultDockArt::InitBitmaps() and
call it from SetColour() to ensure that the bitmaps are updated when the
colour scheme changes.
Closes#12532.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix the minor version determination for libtiff which was done wrongly by
r66259 and provide a properly formatted description for Scintilla version.
See #12690.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When getting an instance of an OLE automation object, it is often useful to
connect to the existing instance if any or start a new one otherwise. Make
GetInstance() behave like this by default while still allowing to use the
wxAutomationInstance_UseExistingOnly flag to reestablish the old behaviour.
Also improve the error reporting in wxAutomationObject.
See #12489.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
CLSID was used instead of ProgID in several places in the code and the
documentation but they are different things so clear up the confusion.
See #12489.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add simple wxVersionInfo class holding the version information.
Also add GetLibraryVersionInfo() static method to wx{JPEG,PNG,TIFF}Handler,
wxStyledTextCtrl and wxXmlDocument classes and wxGetZlibVersionInfo() and
wxGetLibraryVersionInfo() global functions using it.
Closes#12690.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxCMD_LINE_SWITCH_NEGATABLE which allows to use a dash after a command
line switch to inverse its meaning (i.e. use "/X-" form). Also add new
wxCmdLineParser::FoundSwitch() allowing to check for whether the switch was
specified in normal or negated form.
Closes#11643.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxUniv build was broken since the base class of wxStatusBar was changed from
wxWindow to wxControl in r66226 because it derived twice from wxInputConsumer
now.
Fix this by simply not inheriting wxStatusBarUniv from wxInputConsumer any
more, it already derives from it via wxControl now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is either unnecessary or doesn't work anyhow (they are always centered on
the parent window) and just results in debug error messages.
Simply don't do anything in wxMessageDialog::Centre() when using task dialog
implementation under MSW.
Closes#12699.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Setting sash size to non default value didn't work correctly and didn't make
much sense anyhow as the sash appearance is platform-dependent and current
code for drawing it doesn't work for arbitrary sizes.
Simply remove the possibility to set the sash size.
Closes#12412.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxControl-provided CreateControl() and MSWCreateControl() methods to
create the status bar instead of duplicating their code in its Create().
Also translate wx styles to MSW ones in overridden MSWGetStyle() now.
In addition to making the code smaller and more clear, this fixes the
non-respect of the styles specified at status bar creation (e.g. border),
see #12655.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxStatusBar is no less a control than wxToolBar and deriving it from wxControl
gives access to convenient native control creation functions under MSW (which
will be used by the next commit).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Attempting to load a resource that couldn't be loaded resulted in
wxXmlResource::Load() returning false for this and _all_the_subsequent_ calls
to it because each call to Load() reattempted to reload all resources,
including the one(s) that failed to load initially.
Instead, try to load just the resource(s) that we should load right now and
ignore all the other ones. Also, don't add entries for the one(s) that we fail
to load.
This fixes the unit test failures in the XRC test case which was affected by
the test checking that XRC couldn't be loaded from garbage that ran before it.
It also makes the code simpler by ensuring that wxXmlResourceDataRecords
elements always have a valid wxXmlDocument associated with them.
Also clean up the code: use wxScopedPtr instead of manually deleting pointers
and reorganize #if checks to be easier to follow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Store the titles of the menu bar menus in the menu objects themselves. This
makes wxMenu::GetTitle() return the expected result for them (which also fixes
the current unit test failures for wxMSW) and makes wxMenuBar code simpler.
This removes the wxMenuInfo class which existed for XTI purposes only but as
it was apparently unfinished and MSW-specific it shouldn't be a big loss.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMenu::GetTitle() returned a string in GTK+ format (i.e. using underscores
instead of ampersands) instead of the expected wx one.
This is, of course, the right thing to do and it also fixes
wxMenuBar::FindMenuItem() as a side effect.
Closes#12672.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mention in the setup.h comment that wxDynamicLibrary is used in a lot of
places internally and disabling it can result in a loss of a lot of important
functionality.
See #12664.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract code common to several wxImage methods creating new images based on an
existing one in a new MakeEmptyClone() method.
Closes#12682.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since the child pipe was made non-blocking in r65993, it became possible to
write to child process without deadlocking when the pipe became full. However
this still resulted in an error from wxFileOutputStream as it didn't handle
EAGAIN returned from write() any differently than any other error, even though
it is an expected situation in this particular case.
Change Unix wxExecute() to use wxPipeOutputStream which ignores EAGAIN unlike
wxFileOutputStream to fix this.
See #12636.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The column resizing code in wxGrid didn't take account of the fact that the
column positions and indices could be different. Correct it by inserting calls
to wxGrid::GetColAt() and GetColPos() in a new wxGridOperations::GetLineBefore()
method.
Closes#11984.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Deferred initialization code was not MT-safe and just wasn't that useful
anyhow because it is rare to create a wxCSConv object and not use it
afterwards.
Remove the deferred initialization logic and create the real conversion used
by wxCSConv immediately in its ctor.
Also improve the comments by clearly explaining the possible values of
wxCSConv::m_name and m_encoding.
Closes#12630.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Copy the mask pixmap properly in wxX11, otherwise copying masks resulted in
freeing the same pixmap twice and an X error.
This fixes the bitmap unit test for wxX11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check for Cairo in configure for wxX11 too.
Fix compilation of wxCairoContext for non-{GTK,MSW} platforms.
Also make wxUSE_CAIRO a "normal" option, i.e. add it to all wx/setup.h files
instead of defining it as 1 unconditionally for wxGTK and 0 for everything
else.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Recent replacement of size_t wxNotebook::m_selection with int
wxBookCtrlBase::m_selection resulted in appearance of many warnings in wxUniv
wxNotebook. Fix them by removing some now unnecessary casts between int and
size_t and adjusting the remaining ones.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes compilation problems with the minimal build of wxGTK and will make
removing palette support in the future simpler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class probably should not be compiled in at all in the minimal build but
in the meanwhile just add #if checks around its button-related parts.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method was defined in wxBitmapBase which is not used by wxMSW (and wxOS2)
so it wasn't available there. Move the definition of the method inline and
reuse it for all ports, making it part of either wxBitmapBase or wxBitmap as
appropriate.
This is clearly ugly but we still have no good solution for deriving wxBitmap
from wxBitmapBase in wxMSW as it already inherits from MSW-specific wxGDIImage
there.
Also document that ConvertToDisabled() is only available when wxUSE_IMAGE==1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define __WXOSX__ for non-GUI build under Darwin. Ensure that the rest of the
code compiles correctly when just __WXOSX__ is defined but neither of
__WXOSX_{CARBON,COCOA,IPHONE}__ is. This ensures that wxBase can actually be
built under Mac.
Move OS X symbols definitions in wx/platform.h after wx/setup.h inclusion as
they rely on __DARWIN__ and wxUSE_GUI values which are both define in that
file now. Still keep them before wx/chkconf.h inclusion which relies on
__WXOSX_XXX__ being defined. Yes, it's a mess and should be cleaned up more
permanently some day.
Also remove some redundancy from wx/osx/{carbon,cocoa}/private.h by factoring
out common parts into wx/osx/core/private.h. Also include this header itself
from wx/osx/private.h directly instead of including it thrice from different
sub-ports headers.
Closes#12660.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMSW wxNotebook implementation used to handle EVT_NOTEBOOK_PAGE_CHANGED event
to update the currently shown page which meant that page changing was broken
if the user code handled and didn't skip this event.
As the other ports don't require the user code to skip this event, don't do
this in wxMSW neither and always update the selected page unconditionally.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow to declare ranges of consecutive IDs in XRC by using the "id[n]" syntax.
Show this functionality in the xrc sample and test it in the new unit test.
Also show and test the "object reference" XRC functionality.
Closes#11431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function (and the related DoReportError()) doesn't need to modify its
"context" argument so take a const-pointer in it.
See #11431.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although the tooltip was initially correctly set for all windows associated
with it, it was only updated for the main one if its text changed later. This
resulted in leaving the old tooltip for the composite controls such as
wxComboBox or controls with sub-windows such as wxRadioBox.
Fix this by storing all windows associated with the tooltip (for space
efficiency, only allocate the array if necessary however as it will be empty
in the majority of cases) and apply SetTip() to all of them, not just the main
one.
Closes#12659.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function checks if the pane can be docked at any side. It is useful in
its own right but most importantly is needed to fix compilation broken in
r66005 which used it before it was added.
See #12648.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775