These classes only have inline methods and so don't need to be exported in the
first place and, moreover, doing it results in link problems where these
templates are instantiated for a type not used inside the library itself.
Closes#17777.
It only accepts std::vector<wxString>, not std::vector<T> for any type
convertible to wxString as both the documentation and the code misleadingly
claimed.
Due to a bug in MinGW (see https://sourceforge.net/p/mingw/bugs/2322/),
_stricmp() and _strnicmp() declarations are not visible when compiling without
optimizations. Work around this by declaring them ourselves.
See #17762.
Set WINVER/_WIN32_WINNT ourselves before letting MinGW to set them to very low
values corresponding to Windows 2000 on its own and preventing our code from
seeing any later additions to the Windows API, such as AttachConsole()
function used in src/msw/app.cpp.
Closes#17677.
Use wxMacConvertNewlines13To10(), not wxMacConvertNewlines10To13() when
copying content from native pasteboard. Perform this conversion not only
for 8bit text, but for UTF-16 one (which is the one actually used on
modern OS X versions) as well.
Improve the logic for determining whether the statusbar should be
renderer as for active/key window or a background one.
wxTopLevelWindow::IsActive() is not a sufficient test because it returns
false in some situations when the statusbar need to appear as active
(another floating window) and also didn't account for window-modal
sheets (which don't change statusbar appearance either).
When you compile wxWidgets with base64 support disabled, then
wxConfigBase does not declare DoReadBinary and DoWriteBinary.
Add a guard to wxRegConfig, so wxOVERRIDE won't cause an error.
Add wxGraphicsContext::CreateFromNativeHDC() and wxGraphicsRenderer::
CreateContextFromNativeHDC() to allow creation not only from native
renderer object, but also from HDC, which is something universally
supported by win32 implementations.
Fix ClearColumns() to release associations between m_OutlineView and
native Cocoa control when re-creating the latter. Previously it only
created a new association, but left the old one with no-deleted native
control in the map.
Fixes#17485.
This method allows to use the Windows class to use for the window being
created instead of always using "wxWindow" or "wxWindowNR".
This can be useful to make it possible to handle some windows specially from
outside the application, e.g. use specific class names for accessibility
purposes as will be done by the next commit.
Add a flag to let wxApp::GetRegisteredClassName() register just a single Win32
class instead of always registering two of them: the "normal" (but rarely used)
version and the "NR" version used unless wxFULL_REPAINT_ON_RESIZE style is
specified.
With the new RegClass_OnlyNR, only the latter is registered and used.
This is not used yet, but will be soon.
Determine which class name to use in MSWCreate() caller instead of doing it
partly there and partly in MSWCreate() itself, which used to add the "NR"
suffix if necessary -- now it doesn't do this any more and just really created
the window using the given class.
No real changes, just prepare for future enhancements.
Use wxPoint and wxSize instead of individual "int" variables to make the code
slightly shorter and avoid clang warnings about "y" and "h" being possibly
uninitialized (which couldn't happen, but the compiler didn't understand it,
at least in non-optimized builds).
Compile accessibility support on Windows by default now that the generic
wxDataViewCtrl control implements accessible interface. After the
changes from 7dab555f71, accessibility
support is much more lightweight and doesn't interfere with normal win32
behavior, so this change shouldn't affect accessibility-unaware code in
any way.
__USE_MINGW_ANSI_STDIO is apparently not defined when using MinGW as a
cross-compiler from Linux, so 7c730334a2
resulted in -Wundef warning about this.
Fix this by checking if the macro is defined before testing its value.
See #17736.
Add wxDataViewRenderer:: SetValueAdjuster() and a
wxDataViewValueAdjuster class. This can be used to customize rendering
of values depending on whether they are highlighted (selection) or not,
without having to implement an entire new custom renderer.
Add wxHAS_STDPATHS_INSTALL_PREFIX to make checking for
wxStandardPaths::GetInstallPrefix()'s availability simpler, as the
condition under which it is compiled is nontrivial.
Fixes compilation after 2c24ee9216 on
Cygwin, which is a UNIX, but its wxStandardPaths implementation is a
Windows one.
Avoid the problems 3b4ee5a0 attempted to address in a much simpler way:
when a "size-allocate" is in progress, call gtk_widget_size_allocate()
directly, rather than deferring a call to gtk_widget_queue_resize().
See #17585
wxMSW propagates accelerators to the top menu in wxMenu::UpdateAccel(),
but the reverse operation in wxMenu::DoRemove() didn't do it, resulting
in leaked leftover accelerator entries that could prevent the same
accelerator from working if an item using it was later added. Fix by
adding RemoveAccel() helper method that behaves analogously to
UpdateAccel().
ATSU was deprecated for a long time and was finally removed from OS X
SDK in 10.11. wxOSX_USE_ATSU_TEXT was unconditionally disabled already,
so the code was never used and can be safely removed.
When using MinGW own, more standard-compliant, STDIO library, the correct
format specified to use for long long values is "%lld" and not "%I64d" as when
using MSVC CRT.
Closes#17736.
This patch allows specification of the maximum width of static texts
created with wxDialog::CreateTextSizer.
The patch preserves backwards compatibility by setting the previous
width value as the default argument value.
Closes https://github.com/wxWidgets/wxWidgets/pull/355
Using Bind() with a method of the class deriving from wxEvtHandler
non-publicly used to result in a compile-time error, but at least with C++11
we can detect this case and allow the code to compile.
Closes#17623.
When using non-default row height, text would be aligned to the top of
the row. This is a known limitation of NSTextFieldCell and the solution
is to either switch to modern view-based rendering or customize the cell
as this commit does.
See https://red-sweater.com/blog/148/what-a-difference-a-cell-makes for
Daniel Jalkut's description of this solution.
Don't override renderer's wxDVR_DEFAULT_ALIGNMENT alignment when
column's alignment is set. Call a method to recompute effective
alignment instead.
Related to a6be5bda that fixed a similar issue in wxGTK.
A convenience helper for writing generic code that may operate on
different kinds of DCs, all supported by wxGraphicsContext, but without
knowing its specific type.
Postpone resetting indent in wxOSX wxDataViewCtrl to avoid always removing,
and hence never showing the expanders at all, for wxTreeListCtrl whose model
starts its life as a list but becomes a tree as soon as any items with
children are added to it.
By postponing the call to IsListModel() until the next resize, we give the
model the time it needs to decide what it's going to be, while still removing
the unnecessary indent if there is no need for it.
Closes#17409.
Use more clear "src" and "dest" names for wxConcatFiles, wxCopyFile, and
wxRenameFile functions arguments instead of non-self-descriptive file1, file2,
etc used before.
No real changes.
Implement wxSysErrorMsg's functionality without using static buffers;
have the caller provide the buffer. When the caller uses the original
API and does not provide a buffer, a static buffer is still used.
wxSysErrorMsgStr() returns a wxString.
Also use strerror_r() instead of strerror() on platforms other than MSW.
Don't unconditionally use wxWidgets' implementation of IAccessible for
all windows when wxUSE_ACCESSIBILITY is 1, because it is inferior to the
system provided one: it often lacks appropriate labels, doesn't fully
support navigation and wxIAccessible isn't fully implemented.
The approach, when using MSAA, recommended by Microsoft documentation is
to customize accessibility for custom controls only, by proxying to the
standard and overriding what is necessary. By making this change, user
code is still allowed to customize accessibility if needed, without
negatively impacting standard controls that don't need any custom code.
See also https://github.com/wxWidgets/wxWidgets/pull/340