Use NSTextView setTypingAttributes to change the attributes used for the new
text by default as setting them for the selected region didn't do anything
useful under OS X (and did nothing at all when there was no selection).
Closes#12839.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Cast NSText to NSTextView when sending this message to it. Hopefully it
doesn't change the run-time behaviour but just fixes several lines of warnings
that were given without this cast.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample contains disabled code for using other type of windows than
MyCanvas for the splitter children but it didn't compile any more because the
variables were declared as wxScrolledWindow. Fix this by using just wxWindow
for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If a button was created using a normal single-line label (including empty one)
and then its label was changed to something multi-line later, its size stayed
wrong in wxOSX as it still used the fixed size bezel used by normal buttons.
Adjust the bezel after each bezel change now to update the size of the button
if necessary.
Closes#12491.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make the name of the function more general and call it
OSXUpdateAfterLabelChange() as it's supposed to be called whenever the label
changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid code duplication between SetAcceleratorFromLabel() and
wxWidgetImpl::CreateButton(), generalize the former to handle the special
cases taken into account only in the latter previously.
Also use a switch on border flags instead of series of nested ifs as this
seems to be more clear.
No changes in behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r72805 (leaving only the changes to printdlg.cpp which seem
harmless and potentially useful) as it resulted in crashes when using
wxHtmlEasyPrinting because we called wxPrintout::OnPreparePrinting() before
setting the DC to be used, which was wrong.
In fact it's not clear how can we get the correct range of pages at all
because we need a DC to paginate properly (i.e. taking into account its size)
but we need to show a dialog, in which we already want to show the pages
range, before choosing the DC. Perhaps we could create a dummy DC for
pagination purposes but how could this work with printers using different page
sizes?
The best would probably be to avoid setting any limits on the page range as
showing 9999 looks ugly but anything else would be wrong.
See #8349, #11779.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A special preprocessor check for OS X prevented the control from being relaid
out correctly in EditLabel() there, which resulted in problems when trying to
edit a just added item.
Simply remove this check for OS X (and also MSW but this is less important as
this version of the control is almost never used there anyhow) to fix it.
Closes#11179.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Doxygen often has backwards incompatible changes, so verify that we really use
the version the docs are supposed to be generated with.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
"readlink" command also exists under OS X but with a completely different
syntax than under Linux, so just use "pwd -P" to get the physical path name
instead, this should hopefully work everywhere as it's POSIX.
Closes#14796.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes the calculation of the initial best size as previously the default
value was not updated even if longer strings were added later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The default window HDC font is not the same as the wxWindow font, so we need
to always set the font explicitly in this case (when using a wxDC, its HDC
does have the current wxDC font already selected into it, so doing it once
again would be unnecessarily wasteful).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The font is explicitly documented as being possibly NULL in the base class and
wxMSW handles NULL font just fine, so also handle it in the GTK version.
See #14706.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The script calling Doxygen is smart enough to strip the path of the wxWidgets
directory from the paths of the files, but it didn't do it correctly if this
directory was a symlink.
Fix this by using readlink, if available, to get the canonical name.
Closes#14796.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775