Commit Graph

382 Commits

Author SHA1 Message Date
Vadim Zeitlin
8b854d2f92 Remove MSVC 7 project files and support for generating them
This compiler is not supported any longer.
2021-04-26 16:24:02 +02:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Ilya Sinitsyn
8b6d01c798 Fix grid demo stars drawing to use correct colours and font
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.
2021-04-06 22:51:12 +02:00
Dimitri Schoolwerth
84c989626d Make slowness of attribute lookups more apparent in grid sample
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.
2021-02-15 12:36:03 +01:00
Dimitri Schoolwerth
823d79ce06 Demonstrate intensive attribute usage in grid sample
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".
2021-02-15 12:36:03 +01:00
Dimitri Schoolwerth
30de99470a Add multiple insertion support to grid sample
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.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
058192dde8 Add a few accelerators to menu items of grid sample
Add convenience accelerators for insert and delete menu options.
2021-02-07 22:59:02 +01:00
Vadim Zeitlin
f765c06f1a Show new wxGridSelectNone mode in the grid sample
Allow testing the new selection mode interactively.
2020-10-31 17:13:06 +01:00
Vadim Zeitlin
426a0ed527 Remove HAVE_W32API_H definition and checks
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.
2020-10-20 01:47:47 +02:00
PB
be7e68605e Remove BCC make and project files 2020-10-13 18:54:01 +02:00
PB
f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Vadim Zeitlin
767f19cf25 Add menu item to clear log in the grid window
Just make it more convenient to read the logs in it.
2020-08-21 11:49:34 +02:00
Vadim Zeitlin
65c27c6a6e Rename wxID_ABOUT menu handler in the grid sample
Use "On" prefix for it for consistency with all the other ones.

No real changes.
2020-08-20 17:08:40 +02:00
Vadim Zeitlin
eb60684ac7 Make log window in the grid sample expand too
It is too small to show more than a few lines of logs otherwise.
2020-08-20 17:06:09 +02:00
Vadim Zeitlin
4b918966f6 Refactor logging of wxGridRangeSelectEvent in the grid sample
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.
2020-08-20 16:56:23 +02:00
Daniel Kulp
decc255846 Update grid sample to show selecting events 2020-08-20 16:56:03 +02:00
Maarten Bent
53a2c8c7fb Rebake after manifest changes 2020-07-31 01:53:43 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Vadim Zeitlin
1b9f57621d Add a forgotten wxOVERRIDE in the grid sample
Fix -Winconsistent-missing-override when building this sample.
2020-07-06 12:34:42 +02:00
Vadim Zeitlin
ca84560350 Add wxGridCellActivatableEditor and show it in the grid sample
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.
2020-06-30 02:30:36 +02:00
Vadim Zeitlin
73532c4d95 Fix "wider column" width in the grid sample
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.
2020-06-30 01:39:50 +02:00
Vadim Zeitlin
4b9161f546 Make header cells of numeric columns read only in the sample
This avoid asserts when trying to edit them, as the corresponding
editors expect the cell to have a numeric value.
2020-06-26 22:19:49 +02:00
Vadim Zeitlin
a204981d74 Add a test of wxSpinCtrl-based editor to the grid sample
Just show an example of wxGridCellNumberEditor with range limits in
action to make testing it simpler.
2020-06-26 22:19:49 +02:00
Vadim Zeitlin
f5001e728c Rebake with bakefile 0.2.12
No real changes, just synchronize with the bakefile release used now.
2020-05-02 17:02:36 +02:00
Vadim Zeitlin
f1714b3d69 Merge branches 'fix-autoconf-libdir-order' and 'autoconf-avoid-libinotify-freebsd'
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.
2020-04-16 15:02:12 +02:00
Vadim Zeitlin
47d881b683 Fix order of -L options in autoconf makefiles
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.
2020-04-15 02:33:53 +02:00
Vadim Zeitlin
30eaa28de5 Rename wxGrid::GetSelectionRange() to GetSelectedBlocks()
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.
2020-04-12 02:38:37 +02:00
Vadim Zeitlin
b095e67ac3 Show more detailed information about selection in the grid sample
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.
2020-04-12 02:38:37 +02:00
Vadim Zeitlin
ddc87d66e8 Increase the size of the windows in the grid sample
Make larger part of the grid visible initially and also show more lines
in the log window.

No real changes, this is purely cosmetic.
2020-04-05 15:51:35 +02:00
Vadim Zeitlin
43b3a3fc5b Merge branch 'grid-hidpi'
wxGrid improvements for high DPI and DPI changes

See https://github.com/wxWidgets/wxWidgets/pull/1776
2020-04-04 18:46:54 +02:00
Vadim Zeitlin
393f5c8e2b Use less arbitrary column/row sizes in the grid sample
Base the sizes on the default column/row size instead of just hardcoding
pixel, or even DIP, values.
2020-03-31 19:38:18 +02:00
Vadim Zeitlin
f48c3f1e83 Sprinkle grid sample with FromDIP() to improve its appearance
Make frame sizes and column/row sizes more appropriate for high DPI
displays.
2020-03-31 19:38:18 +02:00
Vadim Zeitlin
104733550e Use wxGridCellAttrPtr typedef
No real changes, just make the code slightly shorter.
2020-03-31 19:37:39 +02:00
Vadim Zeitlin
ca30169767 Restore overflowing for cells with non-default vertical alignment
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.
2020-03-31 19:32:47 +02:00
Vadim Zeitlin
06af121e9c Add wxObjectDataPtr::release()
This makes it possible to use wxObjectDataPtr inside functions returning
raw pointers owned by the caller, such as custom GetAttr() in the grid
sample.
2020-03-31 02:57:01 +02:00
Vadim Zeitlin
15b5a1865c Add a simple wxGrid::AssignTable() wrapper for SetTable()
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.
2020-03-31 02:43:08 +02:00
Maarten Bent
343bd89b63 Rebake after changes 2020-03-27 23:15:03 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
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.
2020-02-11 23:19:31 +01:00
Vadim Zeitlin
41dcd9ecdb Add API for ellipsization support to wxGrid
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.
2020-01-11 19:14:23 +01:00
Vadim Zeitlin
f13085441c Add wxGridFitMode and functions working with it
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.
2020-01-11 18:02:12 +01:00
Vadim Zeitlin
9ec0511924 Add a test of catching wxEVT_CONTEXT_MENU to the grid sample
Verify that these events are seen as coming from the grid itself after
the changes of the previous commit.
2020-01-07 18:22:09 +01:00
Maarten Bent
083f4b3c32 Rename manifests to use underscores 2019-12-13 21:44:26 +01:00
Vadim Zeitlin
7b36d72b44 Merge branch 'vc-pmdpi' of https://github.com/MaartenBent/wxWidgets
Add DPI Awareness option to nmake makefiles and MSVC projects.

See https://github.com/wxWidgets/wxWidgets/pull/1664
2019-12-03 02:29:25 +01:00
Maarten Bent
bed8cd7b52 Rebake after adding DPI awareness option 2019-11-30 22:52:48 +01:00
Vadim Zeitlin
04b6fc2f90 Add another cell with boolean renderer/editor to the sample
No real changes, just test the boolean cells appearance with the default
white background too.
2019-11-28 02:14:50 +01:00
Vadim Zeitlin
fe35ddd34b Make date cells in the grid sample more readable
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
2019-11-01 18:48:07 +01:00
Vadim Zeitlin
349e73994b Merge branch 'dpi-awareness-option' of https://github.com/MaartenBent/wxWidgets
Add wxUSE_DPI_AWARE_MANIFEST option allowing to choose to use a manifest
specifying per-monitor DPI awareness.

See https://github.com/wxWidgets/wxWidgets/pull/1622
2019-10-30 21:25:45 +01:00
Maarten Bent
a72c9b6dbc Run autoconf and rebake after adding wxUSE_DPI_AWARE_MANIFEST 2019-10-30 00:02:08 +01:00
Vadim Zeitlin
0a02f4c190 Increment version number to 3.1.4
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.
2019-10-28 14:11:00 +01:00