Calling wxWindow::SetForegroundColour() also changed the window font,
which was unexpected and unnecessary.
Add a separate peer SetForegroundColour() method and implement it to
change just the colour in Cocoa version (and leave unimplemented, just
as it was before, for iOS) and use it in wxWindow to avoid the font
change.
This macro replaces the deprecated __Verify_noErr defined in the SDK.
It is different from assert, as the expression given to the macro is
always evaluated and then, if the result is not zero, and asserts are
on, an assert containing a human readable message with the description
of the error code is triggered.
Closes https://github.com/wxWidgets/wxWidgets/pull/1973
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
Instead of trying to mimic native statusbar background rendering in our
own code, use NSWindow setContentBorderThickness:forEdge: to extend the
border that is drawn by the system. This is the canonical way of doing
statusbars ("bottom bar") in AppKit.
The text is still drawn generically, but that's a much smaller issue
than trying to match the border gradient.
NSTextView doesn't display focus ring by default, which is why wxOSX
did draw it manually, but this behavior can be overriden since OS X
10.3 with NSView.focusRingType property.
The HITheme-based rendering suffered from a number of non-nativeness
issues:
- didn't respect macOS 10.14+ accent colors
- not animated as the native focus ring
- subtly different shape of the outline
- noticeably different outline shape on macOS 11
Remove NeedsFocusRect() and associated workaround for manually drawing
focus ring inside NSTextView (i.e. multiline text controls). This
private interface was only used for wxTextCtrl and nothing else, so
this shouldn't have any impact elsewhere.
* changing datatransfer from CFPasteboard to NSPasteboard API
* factoring and cleaning up
* Switching back naming
* missed file
* getting wxCFStringRef to be independent of system headers
* add unichar include
* using wxCFStringRef in header
* moving to private headers, change method name
* adapting to lesser content in cfstring.h
* Removing malloc/free usage
* use wxScopedArray throughout
* using wxMemoryBuffer instead of char[]
* fixing nonprecomp headers
* missing forward decl in non-precomp builds
__clang_analyzer__ is a constant that only is defined during analyze build, this helps avoiding false positives as long as there is no specific way to silence analyzer messages
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.
This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
NSOpenGLView is needed under 10.14 as a native view, but it doesn’t have its own native key handling, therefore use the same code we have for non-native custom views.
Don't request touch event generation for all windows by default, this
has an inherent overhead and is not needed for 99% of the application
windows, so require calling EnableTouchEvents() explicitly to do it
instead.
Note that this requires properly initializing gesture recognizers in
wxOSX now that they're not always allocated, otherwise releasing them
when destroying the window would crash.
Provide native implementation of this function instead of using the ad hoc one
in common code, which didn't really work -- so remove it completely now.
Closes#17189.
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.
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.
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.
Cocoa has been the default toolkit in wxWidgets for a long time. There is really no good reason to use Carbon in 2016 and this removes a lot of unused and unmaintained code.
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.
Also update the text sample to show it in action.
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().
Currently implemented for MSW and OSX only.
Closes#17133.
Remove UMAGetSystemVersion() function calling which produced the following
warning on the console for every call:
WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.4 instead
of 10.10.4. Use NSProcessInfo's operatingSystemVersion property to get correct
system version number.*
Replace UMAGetSystemVersion with wxPlatformInfo::CheckOSVersion() which
internally uses wxGetOSVersion, which uses Gestalt calls not resulting in this
runtime warning.
Closes https://github.com/wxWidgets/wxWidgets/pull/55
Added EnableFullScreenView() to have a full screen button in the title bar and also allowing ShowFullScreen() to make use of the newer full screen API.
See #14357.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775