Vadim Zeitlin
613de0e89e
handle actions of the columns popup menu in wxHeaderCtrl itself (but the derived class must implement UpdateColumnVisibility()); also renamed wxHD_DRAGDROP to wxHD_ALLOW_REORDER as it will be possible to reorder columns interactively using a customization dialog and not just by dragging them soon
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-15 22:42:37 +00:00
Vadim Zeitlin
3039ade95d
renamed GetColHeader() to GetGridColHeader() for consistency with the other existing accessors (even if this is redundant) and made it public/documented (also documented the others)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-15 10:34:04 +00:00
Vadim Zeitlin
4797b0145c
refresh the grid after resetting the columns positions to the default order
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-14 20:45:39 +00:00
Vadim Zeitlin
da5a641fc8
added wxHeaderCtrl::ResetColumnsOrder() function; use it from wxGrid
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-14 20:02:44 +00:00
Vadim Zeitlin
009c72169f
add support for hiding columns when using native header control in wxGrid; also added convenient Hide/ShowCol() methods
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-14 17:28:57 +00:00
Vadim Zeitlin
a06072d026
no changes, just replaced SF bug number in a comment with Trac one
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-14 12:43:45 +00:00
Vadim Zeitlin
11393d2900
add support for sorting to grid columns
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-14 00:02:30 +00:00
Vadim Zeitlin
cd68daf58a
support column reordering using drag and drop when using wxHeaderCtrl
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-13 00:24:39 +00:00
Vadim Zeitlin
cd4f6f5f8f
fix compuation of dirty cells when the columns are reordered, this didn't work at all before
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 17:34:13 +00:00
Vadim Zeitlin
e5182b1bc5
really fix STL compilation
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 15:06:15 +00:00
Vadim Zeitlin
1bb7462687
don't duplicate the column reordering in generic wxHeaderCtrl and wxGrid, extract it into a (public) helper function
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-11 22:27:02 +00:00
Vadim Zeitlin
3169a8e837
forward SetColPos() to the header window
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-11 22:16:38 +00:00
Vadim Zeitlin
3454f80227
in STL build wxVector elements need to be assignable as well as copy constructible
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-11 21:41:33 +00:00
Vadim Zeitlin
ad805b9e0d
added wxGrid::UseNativeColHeader() (column reordering doesn't work yet); more wxGrid clean up: refactor Init/InitVars/Create
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-11 19:21:20 +00:00
Francesco Montorsi
b5e9cbb92d
enable wheel-scrolling under wxGTK by allowing GTK+ default processing to happen (see wx-dev thread 'possible fix for wxGrid mouse wheel handling'); closes #1847
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-08 13:22:10 +00:00
Francesco Montorsi
d188378e27
fix typo making wxGrid crash upon usage of PgDown: MovePageDown() is a row operation, not a column op
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-02 19:39:46 +00:00
Vadim Zeitlin
84c144785b
don't make wxGridTableBase::IsEmptyCell() pure virtual, there is really no point to force all derived table classes to implement it when it has a default implementation which works just fine in 99% of cases
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-01 00:13:21 +00:00
Vadim Zeitlin
e882d28829
release the mouse in wxGrid dtor to avoid asserts when the grid is destroyed during e.g. a cell selection operation
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-08 00:06:34 +00:00
Francesco Montorsi
23318a5358
declare all NameStr[] strings as const char using the correct WXDLLIMPEXP_DATA_ macros; in the process, change wxPropGrid window classes to take 'const wxString& name' arguments instead of 'const wxChar *name'
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 22:16:14 +00:00
Vadim Zeitlin
e822d1bd5f
fix more Borland release build warnings about unused variable/code without effect
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-20 10:30:49 +00:00
Vadim Zeitlin
9f7aee0198
added the possibility to draw grid lines across the entire window
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-04 23:23:01 +00:00
Vadim Zeitlin
b09b3048c9
don't crash if the grid is being deleted while a cell editor is still shown ( closes #9991 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-22 16:12:46 +00:00
Vadim Zeitlin
8b5f6d9d47
use a single wxKeyboardEvent parameter instead of 4 bools in tons of places
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-20 00:09:28 +00:00
Vadim Zeitlin
8a3e536cd5
- Main change is the addition of wxGridSelectRowsOrColumns selection mode
...
(which is still probably buggy, wxGridSelection needs to be reviewed)
- Add XYToCell() overloads returning wxGridCellCoords (instead of modifying the
argument passed by reference -- where did this come from?) and document them.
- Added GoToCell() which does make the new current cell visible unlike
SetGridCursor() (which was documented as doing it, but wasn't)
- Changed SetCurrentCell() to only not change the cell if wxEVT_GRID_SELECT_CELL
it generates is vetoed, not just processed as this seems to make more sense
- Split jumbo (~400 lines) ProcessGridCellMouseEvent() function into chunks
- Add many more comments to make reading this code seem less like puzzle
solving for the next unfortunate soul to do it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-19 23:33:04 +00:00
Vadim Zeitlin
10a4531d1d
more grid folding: got rid of duplicate version of methods for finding the closest row/column edge, appending/inserting/deleting rows/columns, and moving cursor vertically/horizontally
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-16 16:31:44 +00:00
Vadim Zeitlin
bec7026270
start of the great grid folding: introduce wxGridOperations class and use it to avoid duplicating the same code for rows and columns in a couple of methods
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-16 08:32:12 +00:00
Vadim Zeitlin
1372f8ccd0
use wxSwap()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 16:13:06 +00:00
Vadim Zeitlin
6b992f7df1
implement CreateGrid() in terms of SetTable() instead of duplicating its code and confusing the issue
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 14:09:26 +00:00
Vadim Zeitlin
ff72f628bb
more cleanup (removed some TODOs/FIXMEs); use native header drawing for the corner window too if it is enabled at all
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 14:06:28 +00:00
Vadim Zeitlin
02f3ee3d10
remove the now unused GetScroll[XY]
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 13:36:28 +00:00
Vadim Zeitlin
d8210cd1b3
remove automatic selection of the current row/column in row/column selection mode when the current cell is changed using the mouse, this is inconsitent with both cell selection mode and the keyboard behaviour in row/column selection mode
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 08:45:29 +00:00
Vadim Zeitlin
32b4e9ecd7
select current column when Ctrl-Space is pressed; the current row when Shift-Space is and everything on Shift-Ctrl-Space
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 08:25:47 +00:00
Vadim Zeitlin
87c819f9c9
improve display of hints during column move ( #9884 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 00:33:39 +00:00
Vadim Zeitlin
7d277ac0f9
don't steal focus back to wxGrid when it hides an editor in the result of losing it ( #9844 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 00:28:15 +00:00
Vadim Zeitlin
1eab965913
fix drawing of the column move hint when the grid is scrolled to the right ( #9776 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 00:19:41 +00:00
Vadim Zeitlin
54181a3329
fix repaining of highlight for merged cells ( #9718 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-15 00:11:49 +00:00
Vadim Zeitlin
72b0a1deec
we don't need to round up the best/fitting grid size to a multiple of scroll units any more now that scrollbars behaviour is really correct
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 23:10:23 +00:00
Vadim Zeitlin
ace8d849d4
need to AdjustScrollbars() after changing the virtual size in CalcDimensions()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 23:06:36 +00:00
Vadim Zeitlin
69367c566e
move the grid-specific workaround for scrollbar hysteresis to wxScrollHelper itself, the scrollbars now should not only appear but also disappear correctly during resizing
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 22:44:08 +00:00
Vadim Zeitlin
f1ff7df032
don't use SetScrollbars() as this forces the grid virtual size to always be the multiple of scroll line size which is simply wrong, the grid doesn't need to be that big ( #3800 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-14 21:09:31 +00:00
Vadim Zeitlin
a6b2078ddd
fix changing size of merged cells ( #9736 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-15 14:36:28 +00:00
Stefan Neis
1506cc6641
Applied fix for wxGrid::ClearAttrCache ( #9712 ).
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-09 17:24:48 +00:00
Stefan Neis
ad7502d861
Make AutoSizing in wxGrid's SetCol/RowSize work and use it from corresponding
...
AutoSize functions. This fixes #4107 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-06 16:30:51 +00:00
Vadim Zeitlin
8a3608697f
don't ignore changes of empty string to 0 or vice versa in float grid cells ( #2802 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-03 15:37:35 +00:00
Vadim Zeitlin
b64845917a
don't call SetInsertionPointToEnd() on read-only combobox in wxGridCellChoiceEditor::Reset() neither (this had been already fixed for StartEdit() before) ( #8843 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-29 00:19:44 +00:00
Vadim Zeitlin
d035e423e4
don't ignore changes of empty string to 0 or vice versa in float grid cells ( #4764 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-28 23:14:35 +00:00
Vadim Zeitlin
053ac76fa2
deprecate wxTE_AUTO_SCROLL as it's always on in the ports which support it anyhow ( #2176 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-28 18:18:54 +00:00
Stefan Neis
5b7668004b
Restricted column/row resizing in cell window to left button for consistency
...
with label windows and because ending the resize is only handled in
case of LeftUp() (Fixing #4212 ).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-28 00:10:20 +00:00
Stefan Neis
96ca74cdda
Cleaned up/Fixed wxGrid{Cell,RowOrCol}AttrData::SetAttr, adding some comments.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-18 11:24:34 +00:00
Stefan Neis
d1b021ffb9
Fixed problems with reassigning the already assigned attribute, see #9567 .
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-15 17:24:22 +00:00