Use underscores on them to show that they are different from properties or
local variables (in pure Objective C they would actually start with
underscores, but this is not a good idea in C++ code) and avoid conflict
between a member name and "wxAlignment" type name, which was confusing.
Instead of disabling vertical alignment support in wxDataViewCtrl, move the
private variables to the header file: this is supported by all versions of the
Objective-C runtime, including the old one used for 32 bit applications,
unlike the new way based on declaring the variable in an anonymous extension.
This replaces the changes of 22216b70e7.
In order to allow inclusion of configure determined flags via a wx/setup.h include also for xcode builds, the include has to move into the setup0.h template
* using fontAttributes dictionary allows for better emulation of bold typefaces, also switch to using color from context, this allows keeping the same dict throughout, as a side effect fix font caching
* reverting in order to maintain crossplatform compatibility
* applying review suggestions
* applying review suggestions
Move it out from the auto-generated section to avoid losing it during the next
build/update-setup-h execution (see e24bc249e4
which added this option in the wrong place).
This was erroneously removed by e82c619402 but
it still needs to be defined here, even if it's not used under macOS, in order
to avoid errors about it being undefined in wx/unix/chkconf.h.
Follow up to 60bd6842e4. Apply equivalent
changes to wxMarkupToAttrString, add a new wxItemMarkupToAttrString
class for mnemonics-less strings and use it in wxDataViewTextRenderer.
Use an enum instead of type-unsafe "int" for the second parameter of the
recently added wxStandardPaths::MakeConfigFileName().
This also avoids unnatural dependency of wxStandardPaths on
wxCONFIG_USE_SUBDIR constant defined in a higher level wxFileConfig class.
No real changes, but just make things a bit more robust and hopefully more
clear.
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.
Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.
Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.
Closes#11830.
Propagate the change done in 49000defcf to the
generated include/wx/msw/setup0.h file to wx/setup_inc.h, so that this change
won't be lost during future regenerations.
Fix breakage introduced by 587067bc68:
pasting text could mangle some Unicode characters if it was in UTF-16.
The code in that commit converted newlines all right, but it also
converted _any_ occurrence of 0x0d to 0x0a, which wasn't very Unicode
friendly.
Fixed by partially reverting the change and adding a dedicated UTF-16
variant of wxMacConvertNewlines13To10() instead.
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).
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.
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.
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.
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 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.
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.
Significantly improve the appearance of wxStatusBar on macOS, both the
modern flat look since 10.10 and older versions. Increase the size to
match native bottom bars, center the text inside it, use appropriate
background and border colors and the same gray for the text as Finder
uses, correctly change the appearance for inactive windows.
This is still far from ideal - that would be using
setContentBorderThickness:forEdge: and rendering the text atop it. But
that seems to be much easier said than done due to interference from
other parts of wx. This is much better than the previous state.
Allow the user to customize smart quotes and dashes substutions on OS X
and also provide the OSXDisableAllSmartSubstitutions() method for
disabling them all at once.
wxDataViewCtrl now behaves consistently with other ports on OS X:
calling SetFont() sets the default font used by renderers and adjusts
row height to fit.
wxDataViewCtrl code expects, quite reasonably, that NSCell's cellSize:
will behave as documented and return the minimal size for image cells
too. Unfortunately, that's not the case.
A cell created as NSImageCell, which seems to exists for exactly this
purpose, will always return the size as (0,0), regardless of whether it
has any image set or not an regardless of its size.
On the other hand, a cell created with NSCell.imageCell constructor
sizes itself correctly, but is not a NSImageCell instance and somehow
interferes with other wxDataViewCtrl rendering, presumably due to its
special status.
The simplest fix to make the sizing work correctly therefore seems to be
to specialize NSImageCell and implement its (trivial) cellSize: method.
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.
Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
Differentiate between setting the label from SetLabel() and from
SetPeer() (i.e. initially), because some native controls shouldn't have
an empty string set as their intitial value.
Override SetInitialSize() to be empty for wxNativeWindow in order to
prevent label-setting issues when an unknown, caller-controlled native
widget is attached. Reverts db9baf9aa5,
which was the previous attempt to fix this, but was causing too many
problems elsewhere.
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.
Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.
Closes#14803.