Using a clone of event (with PG id) instead of replacing id in the currently processed event coming from wxPGTextCtrlEditor seems to be less intrusive and safer action.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Even though this is typically the case, some strings in Windows registry are
not NUL-terminated, deal with them correctly by using the explicit length.
Closes#16719.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Reverts r78136 (see #15727) because the multi-string values in Windows
registry are actually not "name=value" pairs at all but just NUL-separated
strings and the API provided for reading them was inappropriate.
Also see #16719.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().
Closes#16705.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As submenu items don't have a valid ID, we need to address them by their
position when calling EnableMenuItem() -- and for simplicity do it for all the
items.
Closes#16747.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When in wxPropertyGridManager::ReconnectEventHandlers() new window ID is the same as old window ID then there is no need to do anything with handlers. An assertion warning is displayed in this case to notify about this unusual (and maybe unintended) situation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
First, don't add any events at all to it unless it's empty. Second, post new
events with low priority instead of high one, we really don't care about them
getting processed, other, real, events should take priority.
Closes#14256.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't prevent people from using hints in wxMSW and wxGTK2, where they work
with multiline text controls too, even though they do not work with wxGTK3 nor
wxOSX.
Closes#14456.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.
Closes#16551.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Now the type of the value returned by Red, Green, Blue and Alpha methods are consistent with wxGTK and wxMSW.
This could fix ticket #16713 (symbols exported)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
m_qtWindow should be used instead of m_qtMessageBox (removed). If not, PostCreation() cannot call wxMessageDialog::GetHandle() as it is virtual (and it is called from the ctor), so it fails to set the base window pointer, raising a SIGSEGV in wxWindow::DoSetSize (for more info, see architecture in docs)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove wxDesigner which is not offered any more and add wxCrafter.
Also use more neutral "form designer" term to avoid giving the impression that
these tools can only be used for the dialogs.
Closes#16744.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes formatting of the Doxygen-generated docs (maybe we should just
switch to the civilized spelling of "eg" and "ie" instead?).
See #16744.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using Apple key here under Mac was unexpected, we should use Cmd which
corresponds to Ctrl used under the other platforms and which is already mapped
to it by wxKeyboardState::ControlDown().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check the type in one place only, before calling MacRender() instead of doing
it in each and every implementation of it.
Also replace wxFAIL_MSG() with wxLogDebug() as the former resulted in a crash
due to assert reentrancy, as usual when asserting inside a wxEVT_PAINT handler
which is constantly called all the time, and so wasn't particularly useful.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make wxGTK consistent with the generic version and, generally speaking, more
reasonable by allowing to leave any cell empty by just not filling in the
wxVariant in the model GetValue() for it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The type mismatch between the value returned from the model and the one
returned by the control cannot be due to any user action, so it is quite
useless to show it to the user, it is only relevant for the developers.
Use wxLogDebug() and not wxASSERT() because asserting in a wxEVT_PAINT
callback would result in a crash due assert reentrancies.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was already the case in the native GTK (possibly unintentionally) and OS
X (because vertical alignment is not supported at all there) versions, but in
the generic version using the default wxALIGN_NOT alignment when calling
wxDataViewCtrl::AppendXXXColumn() methods resulted in top-aligned text which
looked ugly (this could be seen on the second page of the dataview sample for
example).
Fix this by handling wxALIGN_NOT as wxDVR_DEFAULT_ALIGNMENT in these functions
to do the right thing by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make the code more maintainable by using helper functions instead of
duplicating the same logic a dozen times for each of appending and prepending.
This is just a refactoring, no changes in behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes it possible to refer to the associated wxVariant types without hard
coding the string constants, i.e. instead of writing "string" (error prone as
typos are not detected) it is now possible to write wxDataViewTextRenderer::
GetDefaultType().
This will also make it simpler to write generic (in C++ templates sense) code
using renderers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Increasing it to 10000000 in r77905 brought both the native GTK (see #16741)
and OSX (see #16740) wxDataViewCtrl implementation to their knees, so don't do
this.
This is, of course, just hiding the real bug, but still better than not
allowing people to run the sample at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The entire event handler should arguably be removed entirely if it's unused,
but for now just avoid the warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMOD_ALTGR is wxMOD_ALT + wxMOD_CONTROL and so is, actually, supported as
simulating it involves only simulating both Alt and Control being pressed, at
least under MSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Forcefully closing a modified document misbehaved in several ways: first, the
question about whether the document should be saved was asked twice if the
first message box was cancelled. Second, DeleteAllViews() didn't actually
delete the views if the second message box was cancelled as well -- so the
views could be left alive while their associated document was destroyed,
resulting in more or less guaranteed crash (e.g. during the next event
handling as wxDocChildFrameAnyBase::TryProcessEvent() assumes that
m_childDocument is still alive if m_childView is).
Fix both problems by really forcing the document to close by pretending that
it is not modified.
We still ask the user once though, as it could be useful to be able to save
the document even when it will be closed. Ideally, the message box shown in
this case shouldn't have a "Cancel" button at all, but this is left for the
future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make sure to reset the "to be deleted" flag we set on the tool when removing
it from the toolbar to avoid layout problems if the tool is added back later.
Closes#16735.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that wxRendererGeneric::DrawGauge() is actually usable as
otherwise calling it always resulted in an assertion failure because it used
DrawTextCtrl() which was not implemented in wxRendererGeneric. So this fixes
using DrawGauge() in non-MSW ports which was added by r77023 (see #16406) but
apparently never worked.
Also remove wxRendererMSW::DrawGauge() as it's exactly the same as the version
inherited from wxRendererGeneric.
Closes#16725.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This didn't do (almost) anything, so just remove it, using MFC and wxWidgets
together works just fine without it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Take into account the possibility of using C++11 compiler with non-C++11
standard library as this may happen when targeting OS X < 10.7, in which case
C++11 libc++ can't be used.
Closes#16730.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775