This avoids conflicts with GetMainWindow() defined in other wxWindow-derived
classes (such as wxDataViewCtrl and potentially user-defined classes as well).
Closes#11818.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
fd_set used by this header is supposed to be defined in sys/select.h and not
including this header resulted in compilation problems under QNX. And
including sys/time.h shouldn't hurt and is needed by select() under many
systems anyhow.
See #11817.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGraphicsRenderer::GetDefaultRenderer() was only defined for wxGTK for some
reason but it needs to be defined in terms of GetCairoRenderer() for all ports
without native renderer implementation, i.e. everything but wxMSW and wxMac.
See #11817.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The splitterX variable in wxPropertyGrid::HandleMouseMove() was defined twice
with the same value, remove the second definition to avoid warnings about
shadowing the variable in outer scope from some compilers.
See #11817.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Doing it during globals initialization time didn't work and could even result
in a crash due to dereferencing a NULL wxTheApp pointer.
Closes#11806.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The caller expects the function to return -1 if the child process exited with
-1 error code and not 255 that was returned before. The function is also
documented as returning -1 if the execution fails which wasn't true neither.
Fix this by explicitly handling the exit code as signed.
Closes#11824.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Setting wxChoice height to its default value didn't change the height even if
the current height was different from the default. This resulted in problems
when a wxChoice was used inside a wxAuiToolBar because AUI temporarily reduces
the toolbar size to (1, 1) when docking it (thus ensuring that the height of
wxChoice is changed too) and generally didn't make sense.
Fix this by resetting the height to the default value if the value passed to
wxChoice::SetSize() is what it considers to be its default height.
Add a unit test for this bug and also add a wxChoice to AUI sample to allow
testing for wxChoice behaviour inside a wxAuiToolBar being [un]docked.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The temporary workaround due to wxBoxSizer changes in 2.9.0 is not needed any
more, revert r59889 and use wxBoxSizer instead of custom
wxAuiProportionalBoxSizer again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The new version of the algorithm tries to distribute the entire space
allocated to the sizer among its children, just as the version in 2.8 did,
while still respecting minimal children sizes first and foremost. This means
that the space allocated to the item will always be at least its minimal size
if the total space is at least equal to the sum of minimal sizes of the
children but that if there is enough space, the proportions will be respected
too.
Extended the unit test to check that laying out various combinations of three
elements results in the expected results.
Closes#11311.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to the previous commit but for the transversal direction of a
box sizer: we could give an item size larger than the size of the sizer itself
making only part of its window visible (and thus potentially making the window
unusable e.g. because the scrollbar wasn't visible at all).
Fix this by always restricting the item size in the minor direction to the
total size available and add a unit test which failed previously and passes
now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After fixing the problem with "growing items by negative proportion" in r56010
(which still was the correct thing to do as it fixed such indefensibly broken
behaviour as shrinking items with larger proportion by more than "smaller"
items when there was not enough space) the items in a box sizer could become
larger than the total space allocated to the sizer resulting in only parts of
them being visible.
Fix this by truncating the items to the (remaining) total size even if this
means making them less than their minimal sizes -- because there is nothing
else we can do when the total space is smaller than the sum of minimal sizes
anyhow.
Closes#10008.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cursor used black circles only making it perfectly invisible on black
background. Add a white outline as well to ensure that it can be seen in this
case too, similarly to how it's done for magnifying glass cursor and the same
bulls eye cursor in GTK+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes the styles used in the native wxGTK version after changes in
r63654: we must initialize base class m_pickerStyle now and the code didn't do
this before resulting in various asserts and incorrect behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also reformat the code to follow wx style and explicitly use UTF-8 for the
test strings encoding instead of assuming the encoding of the current locale
was UTF-8 (which is never the case under Windows).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMessageBox() functions uses wxICON_QUESTION or wxICON_INFORMATION
automatically if no other icon style (including wxICON_NONE) is specified but
wxMessageDialog under MSW didn't do this, unlike under e.g. wxGTK.
Fix this by also determining the appropriate icon automatically in
wxMessageDialog itself in wxMSW.
Ideally we'd do this in all ports wxMessageDialog implementations and remove
the code doing it from wxMessageBox() but right now it's still needed for the
platforms other than wxMSW and wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample allowed to test the behaviour with all wxICON_XXX including
wxICON_NONE but not without any icon styles at all. Do allow it now.
Also use symbolic names for the radiobox indices for clarity.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should fix VC6 build broken by addition of this sample as VC6 doesn't
support Bind(). Luckily, there is no need to use it here anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Recognize QNX and define __QNX__ under it.
Don't use -lpthreads as the thread functions are in libc under QNX.
Use wxX11 by default.
See #11790.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The call to SetItemMinSize() shouldn't be needed and the latest OS X version
does work correctly without it. Apparently the real bug was fixed somewhere
else in the meanwhile.
Closes#11309.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We wrongly asked wxDataObject for the formats it could provide on output
instead of those it accepted as input in wxClipboard::GetData() in wxGTK.
This could result in clipboard not working for "asymmetrical" data objects.
See #11811.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add comments to explain in more details what the function does and in particular the valid ranges of all internal variables; fix in that regard both the code of both wxELLIPSIZE_START, wxELLIPSIZE_MIDDLE and wxELLIPSIZE_END.
Add more asserts to check the valid ranges and turn a couple of time-expensive checks in level-2 asserts.
Add a test unit for the wxControl::Ellipsize function.
Fix minor details in the docs of wxControl::Ellipsize.
Closes#11567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- add postfix "Px" to all variables containing numbers of pixels
- add postfix "ToRemove" to initialChar and nChars vars to make it clear what they are for
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The picker styles don't make sense for the button so we don't use them when
creating the button but we do need to somehow use the style the picker was
created with to create an appropriate dialog when it's clicked.
Fix the problem by simply storing the style in a member variable and using it
instead of wxWindow::m_windowStyle.
Closes#11635.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Win32 API doesn't provide pthreads-like destructors, so we need to
emulate them to free per-thread allocated memory.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document that wxOS_UNIX, wxOS_MAC and wxOS_WINDOWS enum values are combinations of other values (unfortunately doxygen does not show the definition of those symbols in the HTML docs so we need to explicitely state that).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775