Vadim Zeitlin
2e64ba6d6e
Also add wxGridCellEditorPtr and wxGridCellRendererPtr
...
This is similar to the previous commit and replaces manual calls to
DecRef() on the renderers/editors with the use of smart pointers for
them too.
2020-02-08 15:14:24 +01:00
Vadim Zeitlin
5f34b1749e
Use wxGridCellAttrPtr instead of manual DecRef() calls
...
Provide GetAttrPtr() and GetCellAttrPtr() convenience functions that can
be used instead of the original Ptr-less versions to avoid the need to
manually call DecRef() on the returned wxGridCellAttr pointers.
No real changes, just simplify the code and make it safer.
2020-02-08 14:55:36 +01:00
Ilya Sinitsyn
e0c09c8438
Only overflow left-aligned cells in wxGrid
...
Doing it for cells using a different alignment doesn't work correctly
and it's not clear whether it really makes sense, so just don't do it at
all for now.
Closes https://github.com/wxWidgets/wxWidgets/pull/1726
2020-02-07 19:35:35 +01:00
Ilya Sinitsyn
a40acbb28e
Add CanOverflow function to wxGridCellAttr
...
Add function to determine whether the cell will draw the overflowed text
to neighbour cells. Note that only left aligned cells currently can overflow.
2020-02-07 19:34:50 +01:00
Vadim Zeitlin
ad552d2117
Always use wxRibbonBar image lists in wxRibbonButtonBar
...
Assume that we can always rely on being a child of wxRibbonBar, and
always use its image lists.
2020-02-07 19:29:04 +01:00
Vadim Zeitlin
10c49631a3
Store any number of image lists in wxRibbonBar, not just two
...
The same wxRibbonBar can use multiple button bars with different icon
sizes, so 2 image lists are not enough. But OTOH there is no need to
distinguish between small and large images neither, so 2 may be also 1
too many.
Instead, use however many image lists we need, depending on the size.
For now, just store them in a vector and use linear search in it,
instead of using a map or, maybe, sorted vector, as we suppose there are
never going to be more than a couple of elements in this vector anyhow.
2020-02-07 19:21:33 +01:00
Vadim Zeitlin
18e8a68c1b
Move code accessing bitmaps to wxRibbonButtonBarButtonBase too
...
This also improves encapsulation and allows to avoid duplicating calls
to DrawButtonBarButton().
2020-02-07 19:11:52 +01:00
Vadim Zeitlin
c6b3a6f2b4
Handle image lists in wxRibbonButtonBarButtonBase too
...
This makes more sense and also allows SetButtonIcon() to work with them.
2020-02-07 18:22:08 +01:00
Vadim Zeitlin
5a30886696
Move bitmap-related functions to wxRibbonButtonBarButtonBase
...
Improve encapsulation by making the function setting the members of a
class a member of the same class, instead of doing it outside of it.
2020-02-07 18:11:47 +01:00
Vadim Zeitlin
533fd61c5e
Rename wxRibbonButtonBarButtonBase members to use m_ prefix
...
This will avoid conflict with the function parameters with the same
names in the upcoming commits.
No real changes yet.
2020-02-07 18:09:12 +01:00
Vadim Zeitlin
bd90e484cb
Initialize image list positions in ctor
...
Also add a comment explaining how these indices work.
2020-02-07 17:52:54 +01:00
Vadim Zeitlin
d0fb1c973e
Use correct type for image list position field
...
It's just an int and not a coordinate.
2020-02-07 17:49:41 +01:00
Vadim Zeitlin
557843c504
Remove wxRibbonButtonBar::m_ownerRibbonBar
...
There is already a function returning the containing ribbon bar, so just
use it instead.
2020-02-07 17:47:15 +01:00
Vadim Zeitlin
884c3a2dc2
Use wxImageList in wxRibbonBar unconditionally
...
There shouldn't be any reason not to do it other than possible bugs in
wxImageList itself, that should be fixed there.
2020-02-07 17:44:08 +01:00
wxBen
23ebbb139d
Optionally support using wxImageList in wxRibbonBar
...
This allows to avoid consuming too many bitmap resources.
Closes #18657 .
2020-02-07 17:25:34 +01:00
Ilya Sinitsyn
249e5add7e
Redraw overflowed wxGrid cells to update the background
...
Before drawing the overflowing text we need to redraw the cells it
overflows into to avoid visual artefacts, that could appear even just
due to drawing new text over the same existing text due to
anti-aliasing. E.g. the text in the cell B2 in the grid sample visibly
changed appearance when repeatedly switching the current cell from A1 to
A2 and back again, just due to redrawing A2 contents.
Closes https://github.com/wxWidgets/wxWidgets/pull/1729
2020-02-07 00:12:01 +01:00
Vadim Zeitlin
a2b39f782b
Don't call gtk_disable_setlocale() more than once
...
This is useless and just results in GTK warnings.
2020-02-06 15:59:45 +01:00
Kvaz1r
5663157674
Fix link between flags and buttons in wxAuiManager
...
Don't store the buttons used by a pane separately, but take them
directly from the flags, as this ensures that updating the pane flags,
e.g. by calling CloseButton(false), really removes the corresponding
button.
This also makes wxAuiPaneButton helper completely unnecessary, so just
remove it to simplify the code.
Closes https://github.com/wxWidgets/wxWidgets/pull/1723
Closes #18223 .
2020-02-05 16:02:51 +01:00
Vadim Zeitlin
1650ea7030
Don't use RPC_WSTR absent from older MinGW headers
...
Fix compilation with MinGW 5.3 after the changes of
948ddc6e0f
2020-02-05 03:40:24 +01:00
Vadim Zeitlin
bc2827f6e9
Merge branch 'grid-refresh-block'
...
Avoid asserts due to passing invalid coordinates to RefreshBlock() when
the grid didn't have any rows or columns.
Closes https://github.com/wxWidgets/wxWidgets/pull/1725
Closes #18659 , #18660 .
2020-02-05 03:33:29 +01:00
Vadim Zeitlin
8cf3554399
Update png submodule to avoid -Wundef warnings during build
...
No real changes.
2020-02-04 22:59:31 +01:00
Ilya Sinitsyn
0c9a9dc126
Fix wrong wxGrid::RefreshBlock calling for an empty grid
...
There is no cells to select if the grid is empty (no rows or no columns).
So check for the columns count in SelectRow and check for the rows count in
SelectCol and call RefreshBlock only if it necessary.
Fix https://trac.wxwidgets.org/ticket/18659
Fix https://trac.wxwidgets.org/ticket/18660
2020-02-04 22:59:08 +07:00
Paul Cornett
360bbbc453
Fix a wxVariant ctor argument type after 948ddc6e0f
...
'const void*' won't match 'void*' parameter, gets converted to bool instead
2020-02-04 00:14:19 -08:00
Vadim Zeitlin
2f2ea1d193
Merge branch 'im/osx_fixes' of https://github.com/imciner2/wxWidgets
...
wxOSX fixes for wxGrid background, wxDataViewCtrl with wx[HV]SCROLL
styles and changing the window level.
See https://github.com/wxWidgets/wxWidgets/pull/1717
2020-02-04 02:31:38 +01:00
Vadim Zeitlin
25e256a0f5
Merge branch 'osx_icns_imagehandler' of https://github.com/TcT2k/wxWidgets
...
Add handler for ICNS files (wxBITMAP_TYPE_ICON).
Also remove some old unused Carbon files.
See https://github.com/wxWidgets/wxWidgets/pull/1716
Closes #18647 .
2020-02-04 02:26:42 +01:00
Vadim Zeitlin
8db1e0d0c7
Merge branch 'listctrl-autosize-checkboxes'
...
Fix autosizing column with checkboxes in generic wxListCtrl.
See https://github.com/wxWidgets/wxWidgets/pull/1721
2020-02-04 02:24:02 +01:00
Vadim Zeitlin
0cb0367fce
Merge branch 'd2d-gradient' of https://github.com/MaartenBent/wxWidgets
...
Fix reference count in D2D renderer gradient brushes.
See https://github.com/wxWidgets/wxWidgets/pull/1724
2020-02-04 02:16:19 +01:00
Vadim Zeitlin
276a815ed5
Merge branch 'grid-ellipsize-offset' of https://github.com/thesiv/wxWidgets
...
Fix text cropping when using ellipsization in wxGrid.
See https://github.com/wxWidgets/wxWidgets/pull/1720
2020-02-04 02:14:19 +01:00
Vadim Zeitlin
e171757160
Merge branch 'grid-selecting'
...
Fix several problems related to selecting cells from keyboard in wxGrid.
Closes https://github.com/wxWidgets/wxWidgets/pull/1719
2020-02-04 02:13:20 +01:00
Ilya Sinitsyn
45839843e6
Use a constant for the wxGrid text margin
...
Use a constant instead of a hardcoded value for the text margin.
2020-02-04 05:36:24 +07:00
Ilya Sinitsyn
72824bc269
Fix text cropping when using ellipsization in wxGrid
...
A text is cropped for cells with ellipsization enabled when width of the
cell nearly equal to width of the text because wxGrid::DrawTextRectangle
function variant with the parameter of type wxArrayString adds the offset
before actually drawing the text using dc.DrawText or dc.DrawRotatedText.
2020-02-04 05:36:24 +07:00
Paul Cornett
f4299c3c01
Eliminate a couple more -Wcast-qual warnings
2020-02-03 09:02:14 -08:00
Paul Cornett
ad7dfba124
STL build fix after 948ddc6e0f
2020-02-03 08:59:22 -08:00
Paul Cornett
0ca45d1a59
Remove redundant checks for NULL before calling delete
2020-02-02 23:51:39 -08:00
Paul Cornett
948ddc6e0f
Eliminate -Wcast-qual warnings with GCC and Clang
...
Use const_cast, mutable, and various other changes to avoid -Wcast-qual
2020-02-02 22:50:32 -08:00
Maarten Bent
95d3064a6b
Fix reference count in D2D renderer gradient brushes
...
Closes #18656 .
2020-02-02 14:53:16 +01:00
Maarten Bent
8e2f674c0b
Remove trailing whitespace
2020-02-02 14:50:57 +01:00
Vadim Zeitlin
5b797618a1
Merge WXK_HOME and WXK_END handling in a single case
...
There are more commonalities than differences between the handling of
these 2 keys and it's better to have a single version of this code.
No changes in behaviour.
2020-02-01 02:23:05 +01:00
Vadim Zeitlin
c7707a16c7
Simplify check for current cell in Home/End handling code
...
Prefer to just test whether we have it instead of breaking out of the
case if we don't, this is slightly more straightforward.
No real changes.
2020-02-01 01:57:56 +01:00
Ilya Sinitsyn
6e6eb799c8
Implement wxGrid cells selection for Home and End keys
...
Select cells if Shift is pressed when handling Home and End keys
2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
68ccc77e20
Fix wxGrid Home and End keys handling
...
Take into account that rows and columns may be hidden and columns also can be
reordered.
2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
d455c5b99e
Fix making the wrong wxGrid cell visible when selecting
...
We should make visible the cell of the corner of the current selected block.
Also fix names of the wxGrid::UpdateBlockBeingSelected parameters because
actually passed сщщквы are of any opposite selection block corners.
2020-02-01 01:53:59 +01:00
Vadim Zeitlin
e1fce68be6
Account for checkboxes when autosizing wxListCtrl first column
...
Without this, the text of the first column was truncated when using
checkboxes.
Closes #18661 .
2020-01-31 16:22:49 +01:00
Vadim Zeitlin
1014877302
Slightly reorganize last column width calculation
...
No real changes, just make it more obvious that we increase the last
column width to the remaining margin if it's smaller than it.
2020-01-31 16:18:41 +01:00
Vadim Zeitlin
01d0deb5bf
Get rid of unnecessary variable in wxListCtrl::SetColumnWidth()
...
No real changes, just remove a variable assigned and used exactly once.
2020-01-31 16:15:13 +01:00
Fulvio Senore
9d470f6433
Fix focus-related problems in wxComboCtrl under MSW
...
Allow default handling of focus events to take place, this is needed
at least under MSW to avoid confusing the system focus-tracking logic.
2020-01-31 15:41:55 +01:00
Paul Cornett
0a56399f3c
Fix TLW decorations when GTK3 is using Client Side Decorations
...
We need to avoid setting Window Manager decorations or using deferred show
See #17971
2020-01-30 01:05:45 -08:00
Paul Cornett
26f58bdf78
Fix base class call of virtual SetFont() in wxGenericListCtrl
...
Hard-coding 'wxWindow' improperly bypasses an override in wxControl on GTK3
2020-01-27 11:27:39 -08:00
Paul Cornett
d03a5c1155
Remove unused member function declaration
2020-01-26 09:50:56 -08:00
Paul Cornett
47163f6433
Simplify boolean expression, 'A != false' is just 'A'
...
And correct associated assert message
2020-01-26 09:47:29 -08:00