Since there is a dedicated function to check the type of variant then there is not necessary to call wxVariant::GetType() function and perform explicit comparisons of returned strings.
Don't give errors in the default configuration for MinGW makefile builds in
which wxUSE_GRAPHICS_CONTEXT is disabled, but wxUSE_ACTIVITYINDICATOR is
enabled.
Instead, disable wxUSE_ACTIVITYINDICATOR implicitly for them, this is not
ideal but better than broken build.
wxActivityIndicatorImpl requires wxGraphicsContext to compile successfully (it
is used to implement anti-aliased drawing of the control).
Add a check to enforce this.
Closes#16921
The only attribute for this control is a boolean "running" which can be set to
start the indicator on load.
Update the schema, documentation and the XRC sample.
This is a simple animated control indicating some program activity.
Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.
Update the sample and the documentation.
This method allows to scale a pixel value by a DPI-dependent factor to the
value used by the underlying toolkit only if necessary, i.e. when not using
GTK+ 3 or OS X which already do this internally.
New element can be added to the list not only by clicking "New item" button but also by clicking under the last element of the list and we need to determine its index in both cases because it is used later on in wxPGArrayEditorDialog::OnEndLabelEdit event handler.
Closes#16905.
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).
Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
Use both the contents and the header width when wxLIST_AUTOSIZE_USEHEADER is
given instead of just the latter.
Also make both wxLIST_AUTOSIZE_USEHEADER and the previously implemented
wxLIST_AUTOSIZE work efficiently for the virtual list controls by reusing
wxMaxWidthCalculatorBase already used in the generic wxDataViewCtrl.
Closes#10326.
When launching child processes it can be convenient to be able to switch to
them later, provide a method in wxProcess to do it.
Currently this is only implemented in wxMSW but could almost certainly be done
for wxOSX too (it can be done using Apple Script, so presumably there is a way
to do it programmatically as well) and could be also made to work at least
under some Unix systems by emulating what wmctrl does (or just launching it?).
Make wxICON_WARNING and wxICON_ERROR the primary constants for their
purpose and define their visual Windows-based synonyms wxICON_HAND and
wxICON_EXCLAMATION in terms of the semantic ones, instead of the other
way around.
Platforms that don't make use of wxGaugeBase::Create when creating a
wxGauge (such as GTK and MSW) access the uninitialised
m_appProgressIndicator. Fix by initialising m_appProgressIndicator to NULL
in the wxGaugeBase constructor. Regression since r78499.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This prevented calls to AdjustScrollbars() of another window from doing
anything if they were called due to a size change from AdjustScrollbars() of
an outer window.
Closes#16852.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is simply a combination of all 3 different wxST_ELLIPSIZE_XXX styles and
makes it simpler to test if any of them is specified.
No real changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions are needed due Android NDK lacking wide character support,
as wchar_t == char according to Android NDK bionic libc/include/wchar.h
WARNING: They are minimally functional (provided provisorily until proper
workaround is found, specially maybe using Qt built-in functionality).
"Basically they produce complete garbage with non-ASCII characters"
For more info see discussion in wx-dev list:
https://groups.google.com/d/msg/wx-dev/71qtIFcujgM/Q-lbwl59vOIJ
Thanks @seandepagnier (modified a bit the comments, added #warning and
restructured #if blocks to be only specific for __ANDROID__)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The original code (see r66404 and r66416) didn't work because it used
wxDataViewRenderer::SetMode() to make the renderer inactive but then used its
GetMode() to restore the previous state -- which was lost. The result of this
was that if the overridden IsEnabled() in the model ever returned false for
any row, all the cells in this column, in all the rows, became insensitive, as
could be seen by the inability to edit any rating in the first page of the
dataview sample (even though it was disabled for a single row only) and any
checkboxes on its third page (even though only the last two of them were
supposed to be disabled).
Fix this simply by making the renderer insensitive at GTK level only, but do
not change the mode at wx level.
See #12686.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a simple high level helper combining an arbitrary control showing
multiple items with the buttons allowing to add items to and remove items from
this control, but using the buttons and the layout appropriate for the current
platform.
Add the implementation itself, an example of using it to the dialogs sample
and the documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use dedicated wxPGProperty::HasFlags, wxPGProperty::SetFlag methods to check or modify wxPGProperty::m_flags member variable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't claim that SetPriority() can only be called before the thread is
created, this is just wrong.
Do document that it must be done after creating the thread in wxMSW (this is a
limitation of this port as POSIX implementation allows calling it at any
moment and could be lifted in the future).
Closes#16809.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The only change in this commit is the omission of the primary wxExpectModal<>
template as it's not needed and it's enough to just forward declare it,
otherwise the changes are to the comments only and try to better explain how
this class should be used, i.e. that it's not required, although it may be
convenient, to specialize it, and also how it is implemented, notably the need
for the CRTP in wxExpectModalBase<>.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to get the best possible description of the dialog: if its class
uses wxRTTI macros, its user-readable name will be used, but otherwise we now
fall back on possibly unreadable but still informative mangled C++ class name
rather than showing just "wxDialog" which is not useful at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't include the word "dialog" in it, by default the description is just the
class name and so typically already includes "dialog" in it, e.g. we could
have "Expected wxFileDialog dialog" which was redundant.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While the example in the previous commit message, with two identical
expectations, still requires a custom description to be have unambiguous
failure messages, in other cases it's enough to show the expected message box
buttons in the error to make it possible to immediately see which expectation
failed, so include the information deduced from the expected button into the
description.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes test failure errors much more intelligible, e.g. in the following
case
... some code ...
wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK));
... some more code ...
wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK));
it was previously impossible to distinguish the first test failure from the
second one from just the failure description (it could be done by looking at
the line numbers since the recent change however), but with
...
wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK).
Describe("first warning message box"));
...
wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK).
Describe("successful completion message box"));
the failure becomes immediately clear.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although it already was (and remains) possible to #undef and re-#define
wxTEST_DIALOG_HOOK_CLASS after including wx/testing.h, it should also be
possible to just define it globally in the testing code before including
anything else and not have to bother with the #undef part.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Give the location (i.e. file name, line number and the name of the function)
at which this macro itself appears instead of the location of ReportFailure()
method inside wxTestingModalHook which was quite useless as it was the same
for all the tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These macros are useful for functions called from other macros to allow
pretending that an assert inside such function actually happens at the point
in the sources where the macro itself appears.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is more convenient to break into the debugger at the exact location of the
assert instead of inside a nested wxTrap() function.
This does the same thing for gcc/x86 as was done for MSVC in r73124.
See #11184.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775