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.
This commit is contained in:
Vadim Zeitlin
2020-01-11 18:02:12 +01:00
parent 325408f062
commit f13085441c
4 changed files with 259 additions and 28 deletions

View File

@@ -501,6 +501,9 @@ GridFrame::GridFrame()
grid->SetCellValue( 99, 99, "Ctrl+End\nwill go to\nthis cell" );
grid->SetCellValue( 1, 0, "This default cell will overflow into neighboring cells, but not if you turn overflow off.");
grid->SetCellValue(2, 0, "This one always overflows");
grid->SetCellFitMode(2, 0, wxGridFitMode::Overflow());
grid->SetCellTextColour(1, 2, *wxRED);
grid->SetCellBackgroundColour(1, 2, *wxGREEN);