Creating a button with wxID_HELP and a non-empty label used to always show
this label, even if it was just a standard "Help" or "&Help". This didn't work
at all as the help buttons under OS X are too small to show any label.
To fix this, use normal buttons, not help ones, if a really custom label is
used to ensure that it can be seen. And to still use the correct help buttons
in as many cases as possible, ignore the standard "Help" label and its
variants and don't show it at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We used the translation in wrong direction, i.e. interpreted x coordinates as
rows and y coordinates as columns. This could result in passing invalid cell
indices to GetCellSize() and was generally completely wrong.
Closes#12311.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only assign the wx key code wxKeyEvent::m_uniChar if it's a key corresponding
to an ASCII symbol, don't do it for the values outside of ASCII range such as
all the special WXK_ constants. It doesn't make sense to generate Unicode key
codes for e.g. cursor key presses.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Follow our own advice about never creating controls directly on the frame and
using an intermediate wxPanel in our own sample. This is better style and
makes it look better under Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
With MSWSetTransparentBackground() hack only the panel which was the immediate
child of wxNotebook (i.e. its page) inherited the notebook background but not
its children. This resulted in jarring background discontinuities when nested
panels were used.
Fix this by inheriting notebook background in all child panels by testing for
the return value of the parents MSWHasInheritableBackground() method in
wxPanel::HasTransparentBackground() recursively.
Closes#12317.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was
not created with the correct initial size if the default size was specified
when creating it any longer. Fix this by calling SetInitialSize() once again
after setting the bitmap.
See #12323.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We should only honour the bitmap alignment if the button shows both the bitmap
and the label. If only the bitmap is shown (e.g. when wxBitmapButton is used),
it should always be centered as it used to be done in 2.8.
Closes#12323.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The project files under build/osx should now be used, this Xcode project file
was out of date and couldn't be updated automatically.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Making the class names unique doesn't seem to be necessary so revert the patch
which appended unique pointer value to their names (r57030).
See #9031.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The bitmap must be deselected from wxMemoryDC before being used in any other
way but the sample didn't do this. Fix this by simply destroying the DC as
soon as we don't need it, this makes bitmap available for other use as well.
Closes#12310.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
To determine the display to which the window belongs we must use the window
position in screen coordinates returned by wxWindow::GetScreenRect() and not
the positioned returned by GetRect() which is the same only for the top level
windows but not for the child ones.
Closes#12318.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.
The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling Select() for an item should not deselect the other selected items in
multiple selection mode. This is consistent with the GTK and generic versions
behaviour and also just makes more sense but also document that this is indeed
the desired behaviour just in case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As all the other wxWidgets controls take the parameter in their ctor/Create()
it's unexpected that wxDataViewCtrl does not. Add the name parameter and pass
it to wxWindowBase::CreateBase() as usual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDataViewCtrlInternal is a private class used only inside wxWidgets itself
and doesn't need to be exported from the shared library, so remove the
unnecessary WXDLLIMPEXP_ADV from its declaration.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just simplify the code and make it more obviously correct by
ensuring that all temporary tree paths are always destroyed because they are
assigned to a wxGtkTreePath object which does it in its dtor instead of
calling gtk_tree_path_free() manually every time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just refactor the code to use a function mapping GtkTreeIter
to our wxDataViewItem and use it instead of duplicating its code everywhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to include wx/defs.h that (indirectly) defines wxUSE_CHECKLISTBOX
before testing for it in wx/checklst.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.
Closes#12306.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDataViewMainWindow drag and drop code incorrectly used Y coordinate
where X axis should be used to check whether the mouse is inside columns
area. This manifested itself as refusing to accept drops once the
control was sufficiently scrolled down.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
List-only models don't have expanders and so the control shouldn't
reserve any space for them; the notion of expander column doesn't make
sense here.
Previously, this was done correctly only for wxDataViewVirtualListModel;
"ordinary" list models, such as the one used by wxDataViewListCtrl, were
treated as generic tree models and 0th column had ugly empty space
reserved for (never used) expander.
This patch fixes it by adding IsListModel() helper function in
addition to existing IsVirtualListModel(). Some of the
IsVirtualListModel() tests were changed into IsListModel() checks as
appropriate.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to always find the correct wxTextEntry to use in the
implementation of text-related widgets without using any casts. Notably, the
wrong up-cast of wxWindow to wxTextCtrl in wxNSTextFieldControl::controlAction()
which resulted in a crash when the window was actually a wxComboBox can now be
fixed.
Closes#12284.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The last id of the range if offset by the first one by the number of items in
the menu, not the base id of the file history menu.
Closes#12141.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxIPV4address::IPAddress() used %lu to show each of (byte-sized) IPv4 address
components for some reason, which resulted in asserts about format specifier
mismatch. Fix this by just using %u.
Closes#12272.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These are convenience functions for work working with indexes, for
consistency with other wxDataViewListCtrl methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These are commonly needed when using wxDataViewListCtrl, yet they were
only available in wxDataViewIndexListModel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was totally unexpected that construction through the ctor behaved
differently from Create(). Also, the behavior now actually matches
documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775