Just add a call to SetTextColoursAndFont() now that it is present in
this renderer base class (see the parent commit) to ensure that the
correct, i.e. corresponding to the column attribute, colour is used for
the stars.
Multiply the number of rows in the grid sample by a factor of 10. This
demonstrates the slowness with attribute lookups better when using
checkered (Ctrl+Shift+K) or coloured (Ctrl+Shift+L) cells, as filling
the grid is slowed down by way more than a factor of 10. Scrolling also
becomes less responsive the further away from the home cell the view is.
As a result of increasing the row count also move the cells positioned
near the end of the grid there again, and don't use fixed coords for
them.
Add options to fill grid either half (checkered cells) or fully (all
cells coloured) with attributes. Available from Grid > "Toggle Checkered
Cells" and "Toggle Coloured Cells".
Only single insertions of rows and columns were supported, allow N
insertions provided the row/column selection is consecutive.
Do the same for deletions: while deleting selected rows and columns
already works it's useful to test deleting multiple positions at once.
All still supported versions of MinGW/Cygwin provide w32api.h file, so
there is no need to test for it.
This allows to simplify the code, but also remove the definition of
HAVE_W32API_H from bake- and makefiles and this, in turn, allows to get
rid of extra flags in MinGW format entirely, as we don't support gcc
2.95 for which they were originally needed neither.
Avoid duplicating the complicated logging code twice, when it's exactly
the same for both the SELECTED and SELECTING events. Just use a common
helper function instead.
Add a helper class making it easier to define activation-only editors
and use it to implement MyGridStarEditor in the sample, showing a
typical example of using such editor.
The changes of the commit 393f5c8e2b (Use less arbitrary column/row
sizes in the grid sample, 2020-03-31) accidentally made this column
narrower than default instead of making it wider due to a typo in the
name of wxGrid method: it should be the default column size, not the
default column label size.
Fix issues with FreeBSD build: use just built, instead of already
installed, libraries (this one is not really FreeBSD specific) and use
kqueue even if sys/inotify.h is available but inotify itself isn't (at
least without linking with an extra library).
Closes#18729.
Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).
See #18729.
This seems to be more consistent with the existing functions and doesn't
create ambiguity with a grid range.
Also rename wxGridSelectionRange to just wxGridBlocks as, in principle,
this class could be used for iterating over any blocks, not just the
selected ones.
No changes in functionality, this is just a renaming.
Show the selected cells/rows/columns/blocks instead of just showing
their number, as we now have an efficient (i.e. taking time proportional
to the number of selected blocks and not to the number of the individual
cells, rows or columns) way of doing this.
See #2576.
Since the changes in a40acbb28e (Add CanOverflow function to
wxGridCellAttr, 2020-02-06), cells with non-default vertical alignment
didn't overflow any more, even if their horizontal alignment was
unchanged and still defaulted to left-aligned.
This was due to assuming that if the alignment of wxGridCellAttr itself
was different from wxALIGN_LEFT, it meant that it wasn't left-aligned,
which seems logical but is in fact false, as the alignment can also be
wxALIGN_INVALID, in which case the real alignment is taken from the
default grid attribute.
Fix this by using GetNonDefaultAlignment() to get the alignment value
effectively used and add a unit test, as well as an example in the
sample, showing that this now works correctly.
This makes it possible to use wxObjectDataPtr inside functions returning
raw pointers owned by the caller, such as custom GetAttr() in the grid
sample.
In many case SetTable() is called with its takeOwnership parameter set
to true, as shown by the grid sample in which all 3 of the calls to
SetTable() set it to true, but calling it in this case is awkward, as
bare "true" in the caller is unreadable and almost invariably requires
an explanatory comment.
Improve the API by adding AssignTable(), which is the same to SetTable()
as the existing AssignImageList() to SetImageLabel(), which always takes
ownership of the table pointer.
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.
Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.
Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
This API is not implemented yet, i.e. ellipsization mode is not
respected for now. This commit just adds the API, documents it and adds
an example of using it in the sample.
Replace "bool overflow" flag with a class allowing to specify the same
overflow/clipping behaviour currently, but also allowing to extend it,
notable to add ellipsization support, in the future.
Preserve the existing API by reimplementing it in terms of the new one.
Also update the same to demonstrate a cell which always overflows,
independently of the default cell behaviour.
Add labels for the columns using date format and labels for the cells
using date renderer/editor explicitly to give a better idea about what's
going on here.
Also use the same rows numbers for date cells as for the column ones for
consistency.
No real changes.
See 659ab78c6d
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
Also a header for the next version to the change log.