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
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 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 recently introduced (in r72591) wxSOCKET_{WAITALL,NOWAIT}_{READ,WRITE}
flags weere for some reason completely different and unrelated to the existing
bidirectional wxSOCKET_{WAITALL,NOWAIT} ones. Change this by defining the
bidirectional version simply as the sum of the two others. This makes much
more sense than testing for either wxSOCKET_XXX or wxSOCKET_XXX_READ or
wxSOCKET_XXX_WRITE being specified.
And it also fixes an assert in wxSocketWaitModeChanger where a sanity check
failed when this class was used with wxSOCKET_WAITALL|wxSOCKET_WAITALL_READ.
See #14506.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes an assert exposed by the addition of wxAuiToolBar::Create() in
r72785: as m_style was not initialized before, calling GetWindowStyle() from
wxControl::Create() returned wrong flags.
Fix this by just removing m_style completely, there doesn't seem to be any
need for it nor for overriding GetWindowStyleFlag().
See #13520.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Factor our common parts of wxDirDialog::ShowModal() and ShowWindowModal() in
OSXCreatePanel() helper.
Also some minor cosmetic changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Change the signature of this method to take the number of strings and the
pointer to the first of them instead of wxVector<wxString> as this allows it
to be used with all of wxVector<wxString>, wxArrayString and raw arrays of
wxStrings.
Also return the computed size from it instead of filling output parameters.
Closes#14781.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just forward back to wxDC itself in this case instead of using the
platform-specific code in wxTextMeasure that only works with native DCs.
See #14781.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxXmlResourceHandlerImplBase::GetAnimation() returned wxAnimation by value
which created references to wxAnimationCtrlNameStr and wxNullAnimation
symbols, defined in the "adv" library, in "core" when using Sun CC even though
they were not referenced directly.
Fix this by returning wxAnimation by pointer to keep it opaque for "core" code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should help with the selected directory not being remembered since
GTK+ 2.24.11 as apparently gtk_file_chooser_get_filename() doesn't work any
more now after hiding the dialog -- so call it before doing this and save the
result.
Also get rid of the ugly and apparently completely unnecessary OnFakeOk().
Closes#14525.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include the wxFILE_EXISTS_NO_FOLLOW bit in wxFILE_EXISTS_SYMLINK definition to
allow using just wxFileName::Exists(wxFILE_EXISTS_SYMLINK) which used to never
work because the link was followed.
Closes#14777.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Including this header from wx/xrc/xmlres.h itself only when WXMAKINGDLL_XRC is
defined doesn't work when we're building a static library and not a shared/DLL
one and we don't have any symbol defined in this case, so just don't try to be
smart and include this header from the files that need it.
This fixes breakage of r72756.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Now that the handlers can be defined outside of the XRC library, we can't use
wxXmlNode in them because this would create an (unsatisfied) link dependency
on the xml library.
To avoid this happening accidentally, don't include wx/xml/xml.h from the XRC
header, unless building the xrc library itself.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no clear way to implement wxRemoveRef() for VC6 so just disable it,
and CallAfter() as it relies on it, for this compiler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag allows to avoid following the symbolic links during the directory
traversal. In particular, this means that links to the directories
(potentially outside the directory being traversed) are not considered as
directories at all when it is used, potentially avoiding surprises.
Closes#14542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Split wxXmlResourceHandler into an ABC and the real implementation to allow
referencing the ABC in the core library itself but without pulling in all of
the XRC into it. This also allows defining XRC handlers, which only depend on
this ABC and not the xrc library, in other libraries, such as richtext, as
demonstrated by the now enabled wxRichTextXMLHandler.
Closes#10996.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxAsyncMethodCallEvent that is handled simply by calling the method this
event was created for and add default handler for this event to wxEvtHandler.
Implement CallAfter() overloads for up to 2 parameters only for now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a very simple template allowing to remove the reference from the given
type, similar to std::remove_reference<>.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Space was reserved for the borders even when it wasn't filled, resulting in
visual artefacts. Fix this by virtualizing the function returning the
additional space needed for the borders and only overriding it to return non
zero in wxAuiGtkTabArt.
Closes#14710.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add support for specifying flexible direction, grow mode in non-flexible
direction and row/column proportions for the growable ones.
Closes#14767.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add "flags" parameter to wxFileName::Exists() to allow testing for the
existing of files of specific type: not only regular or directory but also
symlink, device, FIFO or socket.
And also to pass wxFILE_EXISTS_NO_FOLLOW flag inhibiting following the
symlinks without using DontFollowLink().
Closes#14542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775