Commit Graph

364 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
b66a4b9948 Add a menu item to start editing the cell to grid sample
Show that this is done using EnableCellEditControl() and not
ShowCellEditControl(), as might have been expected.
2019-10-13 01:56:13 +02:00
Vadim Zeitlin
86fab39ac9 Regenerate MinGW makefiles using response files
This avoids errors due to overflowing MSW command line length when
linking monolithic library.

Closes #18135.
2019-10-06 23:04:21 +02:00
Ilya Sinitsyn
e26d90028b Allow disabling hiding columns when using wxHeaderCtrl in wxGrid
Add wxGrid::DisableHidingColumns() method which can be used to prevent
wxHeaderCtrl from allowing the user to hide columns interactively, which
is something it allows to do by default, unlike the "built-in" wxGrid
header.

Also add EnableHidingColumns() and CanHideColumns() for consistency with
the other similar methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/1554
2019-09-16 23:32:59 +02:00
Vadim Zeitlin
8ea46e70c5 Merge branch 'clang-link-error-and-semicolon-warnings' of https://github.com/MaartenBent/wxWidgets
Fix clang warnings about extra semicolons and a link error.

See https://github.com/wxWidgets/wxWidgets/pull/1434
2019-07-26 17:58:27 +02:00
Maarten Bent
2815870507 Resolve some extra semicolon warnings 2019-07-21 17:15:02 +02:00
lucian-rotariu
04f7f1fd32 Add support for freezing columns and/or rows of wxGrid
Add wxGrid::FreezeTo() method which allows to freeze the given number of
columns and/or rows at the beginning of the grid, i.e. keep them pinned
in place while the rest of the grid is scrolled.

The main wxGridWindow (m_gridWin) now corresponds to the non-frozen part
of the grid, with up to 3 new similar windows for the frozen
rows/columns and the frozen corner cells (which only exist if both rows
and columns are frozen) being additionally used.

Doing this involved adding "wxGridWindow*" parameter to many functions
that previously only worked with m_gridWin itself and addressing
additional complications, such as mouse events that can now cross
different windows.

See https://github.com/wxWidgets/wxWidgets/pull/952 for the original
version of the changes.
2019-07-16 18:01:36 +02:00
Vadim Zeitlin
7d229dd695 Allow really using wxHeaderCtrl in the grid sample
The "Native" menu item actually only toggled drawing native-lookalike
labels, but didn't use wxHeaderCtrl as could be expected. Rename the
existing menu item to "Native-like" and add the new "Native" one which
really enables the use of wxHeaderCtrl.
2019-07-10 16:51:31 +02:00
Pavel Kalugin
659ab78c6d Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used
for the grid cells containing only dates, without times.

Also add wxGrid::SetColFormatDate() convenience function.

Refactor wxGridCellDateTimeRenderer slightly to reuse its code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1101
2019-01-04 14:14:01 +01:00
Vadim Zeitlin
e1185d8bf0 Increment version number to 3.1.3
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
2018-12-10 19:06:18 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Blake Eryx
b70ed2d8c8 Remove more wxT() macros from samples
Also use wxString instead of wxChar* strings.

Closes https://github.com/wxWidgets/wxWidgets/pull/950
2018-09-29 17:16:12 +02:00
Blake-Eryx
f58ea62596 Remove (most) occurrences of wxT() macro from the samples
Also replace wxChar* with wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/945
2018-09-23 01:15:08 +02:00
Vadim Zeitlin
6cbc661179 Merge branch 'grid-corner-label'
Add wxGrid::SetCornerLabelValue().

See https://github.com/wxWidgets/wxWidgets/pull/928
2018-09-17 22:57:05 +02:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Pavel Kalugin
34416d7507 Add corner label orientation toggle to grid sample 2018-09-04 18:20:34 +03:00
Pavel Kalugin
ccc93c0cd9 Add corner label alignment command to grid sample 2018-09-04 17:51:01 +03:00
Pavel Kalugin
e07d27ce78 Add a command to set corner label to grid sample 2018-09-04 15:27:35 +03:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00