It's not used anywhere else with constructors taking more than one
(non-optional) argument and is not really useful with them (and not
useful at all until C++17), so don't use it here neither for
consistency.
No real changes.
Using --with is more appropriate for libcurl and WinHTTP as they
introduce dependencies on external libraries and is done for
NSURLSession too for consistency.
And there doesn't seem to be any real reason to make these options names
longer by including "webrequest" in their names, they're clear and
unambiguous enough even without it.
This is mostly useful for disabling the use of WinHTTP, e.g. because
only libcurl-based backend will be used or because WinHTTP headers or
libraries are not available and so using it would fail in any case.
This is simpler and better (supports cross-compiling, manual override,
...) than doing it manually.
Also disable wxWebRequest completely under Unix if libcurl was not
found, as it's the only backend which can be used on non-MSW/Mac
platforms.
Check that the stream is valid, if specified at all, and return false if
it isn't -- or if no size was specified and determining stream size
failed.
Check for SetData() success in the test to provide better diagnostics in
case the file it uses is not found (as is the case when running the test
from another directory, for example).
Also pass wxSharedPtr<> by const reference instead of by value to avoid
unnecessary copies.
Show the condition which failed for wxASSERT() (as opposed to
wxASSERT_MSG()), as otherwise the error message didn't show any
information at all, making diagnosing the problem impossible.
Also show the assert location, as this can be useful too and there
doesn't seem to be any reason not to do it.
Calling SystemParametersInfoForDpi() with LOGFONTA parameter corrupted
the stack because this function only accepts LOGFONTW, i.e. it wrote
twice as much data into the provided buffer as the caller expected.
This could be fixed by allocating a temporary wide buffer and converting
back, but this doesn't seem to be worth it, so just disable the use of
the DPI-specific function in the ANSI build.
Closes#19002.
This results in various problems, including both the problems with
handling keyboard input (see #16840) and, even less expectedly,
graphical issues with flickering (see #18462).
Fixing or working around these issues doesn't seem to be easily
possible, but we can at least warn people about the problem.
Closes https://github.com/wxWidgets/wxWidgets/pull/2138
Add the #pragma to link with shlwapi in the same object file which uses
this function, as even though the same pragma was already present in
other files, they could be completely discarded by the linker resulting
in link errors about unresolved StrCmpLogicalW() later.
Also move the MinGW-specific function declaration to the top of the
file, near the inclusion of the header which would normally declare it.
The rect offset was correctly changed in 04a7a3f150 (Fix drawing outside
of the splitter sash under macOS, 2020-12-05), but its size was not. Fix
it too now.
See #18861.
As we don't use any special value for the inactive caption background,
use the same value as for normal caption text for inactive caption text
too.
This is almost certainly not ideal, but at least allows the tab labels
to be readable.
Closes#18988.
This should have been done together with the changes of 41410610ef
(Don't force wxPU_CONTAINS_CONTROLS on wxPopupTransientWindow,
2020-07-10) as without this style controls inside wxComboPopup couldn't
accept focus any more, which broke the previously working code.
There is no need to check if the control is a wxComboBox if it turns out
to already be a wxTextCtrl.
No real changes, just a micro-optimization and simplification.
To fix the problem with GetValue() not returning the updated value from
the event handlers, just set the new value forcefully ourselves before
generating the event rather than postponing sending the event.
This makes the event order under Mac consistent with those elsewhere,
i.e. wxEVT_COMBOBOX_CLOSEUP is now received after wxEVT_COMBOBOX there
too, and not before, as without this change.
See #18973.
In particular, don't map them to left mouse clicks because this is
really wrong.
Ideal would be to handle them in some way, but for now just throwing
them away is better than generating wrong events.
Closes#18967.
We need to adjust the indices of the currently selected items as we need
to keep the same items, not the same indices, selected after new items
insertion.
Closes#18902.
This seems to have been needed in the past (see #12365), but is not
needed any more and results in unexpectedly scrolling down to the last
inserted item, which is undesirable and inconsistent with the other
platforms.
Simply revert f58438058b (Show the first, not the last, inserted item in
wxListBox in wxOSX., 2010-11-05) to fix this.
Closes#18861.
Update the width when items are expanded and collapsed and also take the
expander width into account.
Change m_ModelNotifier type to avoid casts when calling wxOSX-specific
method on it.
Closes#14939.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
This didn't work any more since IsShown() returned true even for
iconized windows, so we never did anything if all windows (and, in
particular, the only window) were (was) iconized.
Fix this by checking for IsIconized() first and IsShown() only if it
returns false because it seems that IsShown() is indeed supposed to
return true for iconized windows -- at least it also does it in wxMSW.
Closes#18998.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Add the usual handlers for '-', '+' and '*' keys. The last one is
especially convenient, as it does something that couldn't be easily done
at all interactively before.