Add a new wxSafeArray<> class wrapping SAFEARRAY.
Also add support for converting VARIANTs containing other, previously
unsupported, standard types.
Closes#14637.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call wxMDIChildFrame::Activate() instead of redoing the same thing. This also
ensures that iconized MDI children are restored before being activated (see
previous commit).
See #13946.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Without doing this activating an iconized frame doesn't do anything at all,
i.e. doesn't present it to the user as presumably intended.
Closes#13946.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As wxCheckBox can now have borders (see previous commit), we must override
DoGetBestClientSize() and not DoGetBestSize() in it to take account of them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Take into account the window styles that translate to extended Windows styles
at MSW level.
Also override MSWGetStyle() in these classes, just as in most (all?) other
ones, for consistency instead of doing wx-to-MSW styles translation directly
in Create().
Notice that as a side effect of this change, border styles now work for
wxCheckBox which wasn't the case before. It's not clear if this is really
wanted but OTOH there doesn't seem to be any real reason to forbid them
neither.
Closes#14674.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code in wxWrapSizer::CalcMin() ensured that the sizer never requested more
space than what it had been already given which, while clearly done
intentionally, seems to be wrong because it can never end up with enough space
for all its rows/columns unless it is set to up to expand in the containing
sizer.
In other words, the old code could return the size which was not enough to
show the sizer contents fully which is against CalcMin() contract.
Change this by simply removing the check for the new minimal size being less
than the old one. This allows the wrap sizer demo in the layout sample to work
correctly whereas before the sizer contents was completely invisible initially.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow adding checkboxes to and removing them from the wrap sizer to
demonstrate how it adjusts to its contents dynamically.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A valid RECT pointer must be passed to DoVerb(OLEIVERB_INPLACEACTIVATE) but
r72027 (see #14209) broke this and passed it NULL resulting in an instant
crash.
Revert this part of the change and do pass out window client area.
Closes#14682.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The values of m_ourFirst and m_ourLast were inversed in wxPluginLibrary ctor.
Fix this and explain in a comment that "first" and "last" here refer to the
order in the linked list and not the chronological order.
Closes#14483.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The previous commit was accidental and contained an initial version of the
patch which didn't test for NPTL abi::__forced_unwind correctly and just
tested whether cxxabi.h header was available.
Tighten the check to work on the other systems and check for __forced_unwind
existence itself.
Also check for cxxabi.h before testing for __cxa_demangle as there is no need
to try to compile another test program if we already know that this entire
header is unavailable anyhow.
See #14626.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It can be useful to explicitly make a check box owner drawn, so make the
private MakeOwnerDrawn() public and add "MSW" prefix to it to allow doing this
from the user code.
Closes#14679.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add the possibility to retrieve the client data associated with a button and
not only set it (which wasn't very useful on its own).
Also allow having both typed (owned) and untyped (not owned) client data, as
in the other wxWidgets controls.
To avoid confusion between two different kinds of data, remove "client_data"
argument from the functions adding buttons and provide separate methods with
distinct names for setting and getting client data.
Closes#14630.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When using raw bitmap data access classes such as wxAlphaPixelData we must
destroy them to ensure that the changes done via them are committed to the
bitmap before drawing the bitmap.
Just add an extra block (the diff should be viewed ignoring white space to see
the only significant change) to ensure that wxAlphaPixelData is destroyed
before DrawBitmap() is called.
Closes#14680.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As wxStaticBox can now contain child windows, derive it from
wxNavigationEnabled<> to allow TAB-navigating among them. Without this, it was
impossible to switch focus from keyboard to any of the controls inside
wxStaticBox.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions also change the rectangle right/bottom position, unlike
Set{Right,Bottom}() that change its width/height respectively. This is not
very logical but impossible to change for compatibility reasons, so at least
document it clearly.
Closes#14678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method was only added to the generated include/wx/stc/stc.h but not to
src/stc/stc.h.in from which it is created in r72490, do update the latter file
too now.
See #12960.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The "sneaky obj array trickery" wasn't very sneaky but was just plain wrong
and misused object array of pages in a way that was invalid and didn't crash
just because of sheer luck.
Rewrite this code to use a temporary wxVector of pages that can be sorted
independently of the main m_pages array. This is 100% safe and also more
clear.
Closes#14625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changes from Marcin Wojdyr fixing issues for different RPM-using systems:
- added all necessary BuildRequires fields
- for openSuse wxGTK-gl package is named libwx_gtk*_gl... (it's
enforced that package with one shared lib has name matching the
library name)
- added missing '%dir's - on some distros rpms didn't built without it
- Fedora, Suse and Mandriva have all different set of known Groups,
I've changed group from 'X11/Libraries' to 'System/Libraries' -- it's
defined at least in Suse and Mandriva. (in recent distro releases
Group can be skipped, so it's becoming irrelevant).
- removed 'Packager' field and dots ending Summary field - AFAIR these
were errors on Opensuse
- added '= %{version}' to Provides
- for Redhat5 use GCC4.4 (build crashed with default 4.2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The best [virtual] size of the window is usually determined by its children
but it's also possible to have a min size constraint set on the window sizer
so set the window to its best size in Fit() independently of whether it has
children or not.
Closes#14668.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added svn:eol-style (set to native) and svn:keywords (set to Id) for .cpp and .h files that were added since r72218.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix the problem introduced in r72491 which resulted in wxGrid rows/columns
being shown after auto-sizing even if they had been hidden.
Closes#14133.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is an aborted attempt to make wxWidgets code compile without warnings
when using MSVC 11 /analyze option, as it was supposed to have become much
better. Unfortunately it still produces way too many false positives to be
really useful, in particular NULL pointer detection is completely broken as
even the code such as (from object.cpp):
wxClassInfo *info = sm_first;
while (info)
{
if ( info->m_next == this )
...
}
provokes tons of warnings about "info" being NULL inside the loop which is
clearly impossible.
So this commit just fixes a few obvious warnings, mostly about variable
shadowing but also a couple about possibly passing NULL to memcpy().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Optionally show standard "Help" question mark button in the ribbon top right
corner and generate the appropriate event for it.
Closes#14576.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Text origin was calculated incorrectly for the rotated text and the bounding
box was wrong even in non-rotated case.
Fix this by using correct definition of the text anchor according to the SVG
specification and add a test to the svg sample demonstrating this.
Closes#14489.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775