Commit Graph

43 Commits

Author SHA1 Message Date
Vadim Zeitlin
283b7808d8 added support for readonly cells and 3d border drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 21:10:45 +00:00
Vadim Zeitlin
3da93aae50 the in-place control uses the attr for colours/font info too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 20:18:53 +00:00
Vadim Zeitlin
d1c0b4f97e deTABified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 19:15:13 +00:00
Robin Dunn
9b4aede26d Added getters/setters for cell and grid-default editors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 17:51:33 +00:00
Stefan Neis
4d60017aa5 Added UpdateAttrRows/Cols to change the row/column info in attributes as
needed when Deleting/Inserting rows/columns.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 16:08:16 +00:00
Robin Dunn
fb2957900c Some cleanup.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-15 07:08:42 +00:00
Robin Dunn
75ecbe4594 1. Initialized m_displayed to TRUE to solve a cell highlight problem
for some systems.  If this causes no problems then this flag can be
removed.

2. Took out the edit timer so now a second click in the current cell
will activate the edit control, even if it is several seconds later.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-14 21:35:42 +00:00
Robin Dunn
2c9a89e002 wxGridCellEditor plugged in and operational for strings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-14 11:05:35 +00:00
Robin Dunn
07296f0b12 1. Fixed slow-click timer.
2. Fix for full cell background to be painted.  (One line on the edges
was showing through to the background.)

3. Added current cell highlight.  Currently it just draws a thick
border using the gridLineColour just inside the cell borders.

4. Make dragging a little less sensitive by ensuring that the mouse
drags at least 3 pixels before anything is done to the grid.

5. CaptureMouse while drag-selecting cells and fixed to make cells
visible if dragging outside window boundaries.  Still a problem here
though, it moves way to fast to see what's happening (at least on MSW.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-14 08:53:06 +00:00
Stefan Neis
025562fee3 Shift edit control (since we shifted cells in last version!)
Only draw valid help lines in resizing.
First try to enable EditCtrl on slow clicking: Doesn't work yet.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-13 19:43:54 +00:00
Stefan Neis
dcfe4c3d71 Added enabling/disabling of cell edit control.
Moved grid lines and cells by one pixel.
Call SelectBlock in SetCurrentCell (possibly not, what we want?)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-13 16:58:43 +00:00
Robin Dunn
2796cce3f1 1. Grid cell defaults are now handled by an internal wxGridCellAttr
object.

2. wxGridCellRenderer::Draw updated to expect an attr object and use
it instead of going back to the grid for everything

3. The selection colours are now initialized from wxSystemSettings,
and are configurable.

4. Now either CreateGrid() or SetTable() can be called to initialize
the grid.  Added a test for using a non-default table.

5. Reduced flicker even more byt using empty EVT_ERASE_BACKGROUND
handlers.

6. The beginings of wxGridCellEditor are in there but not activated
yet. (This is the next step.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-13 05:37:37 +00:00
Vadim Zeitlin
758cbedf84 added attr assignment for rows/columns
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 21:14:58 +00:00
Vadim Zeitlin
0a97676587 added an extremely simple cell attr cache (yet it catches 80% of acccesses)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 20:38:04 +00:00
Vadim Zeitlin
ab79958a7f added wxGridCellRenderer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 19:40:56 +00:00
Vadim Zeitlin
2e9a678817 fixed setting more than one attr for a cell
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 18:18:18 +00:00
Vadim Zeitlin
e2b42eebeb added ChangeCursorMode() method, rewrote the col/row resizing code to capture/release mouse properly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 17:43:42 +00:00
Michael Bedward
6d004f675d Added facility to resize rows and cols by dragging grid lines.
Fixed bug where row col resize events were sent twice.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 04:09:20 +00:00
Vadim Zeitlin
b99be8fb78 cell attributes added (doesn't quite work, work in progress, beware, don't use, &c &c)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-09 20:30:27 +00:00
Michael Bedward
7807d81c73 Simplified sizing code. Sub-windows are now sized explicitly in wxGrid::CalcWindowSizes().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-09 07:17:12 +00:00
Michael Bedward
4634a5d6d7 Initializing more variables in wxGrid::Create()
Minor fixes for crashes under wxMotif when setting attributes before
the grid has been first painted.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-09 05:04:21 +00:00
Michael Bedward
790cc4177a Fixes for problem where selection fails to start on dragging mouse in
grid cell window.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-07 05:39:28 +00:00
Stefan Neis
796df70a76 Added different strategy for updating grid lines.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-05 18:04:13 +00:00
Michael Bedward
8fb66724c6 Removed ^M chars again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-05 01:03:52 +00:00
Robert Roebling
d2fdd8d2af Minor GTK fixes for wxGrid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-04 17:01:47 +00:00
Michael Bedward
58dd5b3b3e Many bug fixes for display code:
- clicking outside cell area no longer causes crashes
- clicking beyond labels is now ignored
- better cell selection code
- old grid sample now works with this grid
- newlines can be entered in to cell edit control


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-04 11:17:01 +00:00
Stefan Neis
c3baf426f8 Added drag-shrinking.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 15:14:13 +00:00
Vadim Zeitlin
60ff3b9976 re-checking in files in Unix mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 13:30:28 +00:00
Michael Bedward
b27f2615c7 Used old name SelectCell instead of new name SetCurrentCell
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 07:18:02 +00:00
Michael Bedward
dfaf42d2e8 Added missing SetGridCursor function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 07:11:12 +00:00
Michael Bedward
1f1ce28841 Removed cell highlighting temporarily. Now wxGrid::EnableEditing(bool)
sets the cell edit control to be editable or read-only.

Fixed row sizing problem where text was clipped in the cell edit control.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 06:03:03 +00:00
Michael Bedward
2d66e025ef Major redesign of grid classes:
- wxGrid now derives from wxScrolledWindow
- Row labels, col labels, corner labels and grid cell area
  implemented as separate classes

The new design fixes the display problems (bad flicker when
scrolling) and simplifies the internal handling of grid cell
coordinates, the edit control etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 04:43:45 +00:00
Guillermo Rodriguez Garcia
6f4968e281 Fixes from Mumit Khan to allow DLL compilation; most fixes related to
missing WXDLLEXPORTs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-10 00:55:05 +00:00
Julian Smart
6474416b2e Fixes for VC++ 4 compilation; fixed wxCommandEvent arg in grid.h;
added $(RM) variable to Mingw32 makefile


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-31 12:03:20 +00:00
Michael Bedward
5612a51858 Changes to fix problem where spurious scrollbar(s) were displayed when
the window size had changed and was able to display all rows and/or
all cols.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-29 07:43:04 +00:00
Michael Bedward
52068ea5ff Fixed bug that caused wrong block of cells to be selected if the
mouse was dragged out of the grid cell area.

Cell text values now echo changes in top edit control if in-place
editing is disabled.

Changed highlight scheme again so that a border is drawn around the
current cell whether in-place editing is on or off. Hopefully this is
less confusing.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-27 03:05:05 +00:00
Julian Smart
af111fc338 Removed lots of wxMotif compile warnings. Copied new install.txt into old
install.txt (wxMotif).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-26 13:33:13 +00:00
Julian Smart
60a67569bf Added more compat. functions for wxGrid so grid sample compiles;
fixed regtest compilation prob. (but still crashes on exit); fixed
tab sample compile problem.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-25 14:28:43 +00:00
Michael Bedward
749692cc9f Added EVT_GRID_SELECT_CELL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-19 07:24:46 +00:00
Michael Bedward
45bee2eea9 Removed unused code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-18 03:16:29 +00:00
Michael Bedward
b5f788a51e Changed all EVT_WXGRID... constants to EVT_GRID...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-14 04:42:29 +00:00
Michael Bedward
66242c8007 Added page up and page down key support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-07 06:36:41 +00:00
Michael Bedward
f85afd4e46 Added new wxGrid classes. This is a work in progress !
Define wxUSE_NEW_GRID as 1 in setup.h to compile the new wxGrid
otherwise the old wxGrid class will be compiled.
Treat with caution and expect bugs and missing bits at this stage.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-06 05:13:20 +00:00