Commit Graph

443 Commits

Author SHA1 Message Date
Julian Smart
038a5591e4 Fixed warning, reformatted some code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-18 15:39:23 +00:00
Julian Smart
d43851f77e Applied patch [ 608866 ] wxGrid: vertical column label text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-18 14:25:34 +00:00
Vadim Zeitlin
bf3353768a removed redundant code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-12 11:42:11 +00:00
Ron Lee
12a3f2275c Deprecated wxSizer::Remove( wxWindow* ), s/Remove/Detach/ in most places.
Made wxSizer child list typesafe.  I've not added the wxList implicit
conversion kludge yet, let's see who complains first perhaps..

Deprecated wxSizer::{G,S}etOption in favour of {G,S}etProportion in line
with the parameter name change in the docs.

Added {G,S}etSpacer consistent with the accessors for windows/sizers.

Made all wxSizer index parameters size_t -- we support no sensible
interpretation for negative indexes in them.  Hopefully this will
cause no real problems, but code doing (eg. Remove( 0 )) will need
to change to use 0u to resolve the ambiguity with overloaded members.
This is probably a Good Thing though, ymmv.

s/FALSE/false/g ; s/TRUE/true/g ; s/wxASSERT/wxASSERT_MSG/g in sizer.{cpp,h}

Fixed (I hope) the brokenness in wxSizer::Show -- I have no code to test
this yet, so it's a blind change, but spacers should now be hidden correctly
instead of ignored, and it should be properly reversable over multiple
calls now too.

removed pointless private scoping around DECLARE_CLASS macros.

Replace 0's I added previously with NULL -- not like that will end the
email thread either..

Added Add( wxSizerItem * ) & co.  There are probably a couple of other
places we can usefully do something like this too.  Stopped short of
refactoring everything to raise some issues about sizer method recursion
on -dev.

Updated wxSizer docs some more, they are still incomplete but getting
better.

wrapped KeyCode in wxDEPRECATED, converted all (gtk build) instances
to GetKeyCode.  There may be a few left for other ports.

Fixed a couple of other random compile warnings along the way.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-07 10:22:07 +00:00
Robin Dunn
52d6f640e8 With the fix in gtk/font.cpp and switching to an wxplicit wxBOLD, it
should be okay to uncomment the code setting the label font.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-04 03:59:26 +00:00
Vadim Zeitlin
22f3361e1c use DECLARE_NO_COPY_CLASS() where applicable (patch 633384)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-02 23:38:11 +00:00
Julian Smart
b819b854dd Fixed cell paint background refresh bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-18 12:53:49 +00:00
Julian Smart
1bd71df911 Fixed missing checkbox alignment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-16 12:34:06 +00:00
Vadim Zeitlin
14ac4f3c54 printf() format warning fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-15 22:25:13 +00:00
Vadim Zeitlin
0441833277 fixed Unicode compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-14 12:15:03 +00:00
Julian Smart
73145b0ed1 Applied patches by Scott Pleiter:
[ 643866 ] small wxGrid API changes

adds GetValue to the gridcelleditors to facilitate
querying values from the editors, also changes several
methods to virtuals to simplify inheritance.

[ 643867 ] wxGrid cell LNF & behaviour patch

Enables the grid to render its cells grey when the grid
control is disabled. Also fixes several problems when
making the gridcelleditors visible. Improves the layout
of multi-line row/column labels. Changes the CellEditor
show from a MOUSE_DOWN to a MOUSE_UP, this
stops the editor starting when creating a selection
beginging in the currently selected cell.

[ 643868 ] wxGrid rendering tweaks, improves look.

Draw the row/column using system colours. Change the
default wxGrid settings to have a more neutral starting
point - grey lines, non-bold label font, black/white
selection etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-09 11:14:04 +00:00
Vadim Zeitlin
2b5f62a0b2 merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-04 14:11:26 +00:00
Stefan Neis
ef4d6ce8e4 Fixed some typos that occured in applying patch 606235.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-20 15:08:03 +00:00
Stefan Neis
39b80349a1 Applied revised patch 606235 (Cell overflow refresh fixed).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-15 00:29:49 +00:00
Stefan Neis
dc1f566f6a Applied patch 606235 (Cell overflow refresh fixed).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-11 22:28:20 +00:00
Stefan Neis
d57ad37701 Fixed CoordToRowOrCol according to Patch 607387.
Reverted the "Prevented dragging dividers outside cells" change which just
        worked around the symptoms of the bug in CoordToRowOrCol.
Removed posssibility to resize columns even from below the grid or rows from
        the right of the grid - that kind of "dragging dividers" wasn't even
        prevented by the previous change (according to Patch 607387).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-11 21:44:16 +00:00
Julian Smart
a8de819021 Typo fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-11 19:20:11 +00:00
Julian Smart
31370adbc1 Another try at committing this
Reverted previous 'fixes' now that the array bug has been cured
Prevented dragging dividers outside cells (this would cause an assert)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-11 14:19:08 +00:00
Julian Smart
dcdce64e66 Reverted previous 'fixes' now that the array bug has been cured
Prevented dragging dividers outside cells (this would cause an assert)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-11 14:12:48 +00:00
Julian Smart
c5a7ca8689 Now cleared array elements of arrays before calling Empty(),
after suggestion by John Labenski.
I don't know why this should cure the memory problem,
but it seems to.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-10 20:31:02 +00:00
Julian Smart
64e15340d0 Applied patch [ 607261 ] Fix: wxGrid: row and cell selection
This is a patch against version 1.222 of
src/generic/grid.cpp.

1. The patch contains a fix for the row selection as
mentioned by me on the wx-dev mailing list. After
selecting one row and deselecting it no new row
could be selected.
2. Another change has been made to the function
CoordToRowOrCol() and addresses an error mailed
to wx-dev by John Labensky. The error was that no
cell could be selected until a horizontal and vertical
resize of at least one cell has been made. The error
was that the function could not handle grids with
default row or columns sizes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-10 13:50:52 +00:00
Vadim Zeitlin
e91d2033ee fixed Printf() format spec warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-08 18:00:48 +00:00
Stefan Neis
bca7bfc878 Fixed Refresh to use a "const wxRect *" parameter.
Optimized Refresh rectangles for subwindows in Refresh.
Replaced DisableCellEditControl by HideCellEditControl in two places,
        where I explicitly didn't intent to store the editor's value.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 20:07:22 +00:00
Stefan Neis
c6707d16fe Tried to fix bug 603906 by modifying GetModelValues to disable editor.
Also save and disable editor in SetModelValues. However, I don't have
        a test case ...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 16:22:56 +00:00
Stefan Neis
aa5b885706 Commited John Labenski's patch giving access to the low level selection
representation (Patch 579754).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 13:58:25 +00:00
Stefan Neis
7fbc642095 Fixed bug in CoordToRowOrCol.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 12:46:39 +00:00
Stefan Neis
3ed884a0b8 Some refresh optimizations.
Untabified.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 12:28:03 +00:00
Julian Smart
8dd8f87530 Applied patch [ 605592 ] Unicode patch for dirctrlg.cpp
Markus Greither

 just compiled the wxWindows CVS trunk using
BCC5.5.1 and UNICODE. I noticed a small bug in
girctrlg.cpp, that prevented compilation. There are more
such glitches in the wxGrid, but as I was running out of
time, I disabled this for now. Otherwise, compilation
worked fine and I was able to run the minimal sample
(using UNICOWS on my WIN98SE).

(I also corrected some wxGrid Unicode string typos -- JACS)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-06 14:42:47 +00:00
Julian Smart
ae31cc57f7 Eliminated unreachable code warning in VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-05 20:12:02 +00:00
Stefan Neis
7e48d7d9fb Fixed apparent typo in wxGridCellAttr::MergeWith, hopefully fixing
bug 581558 (wxGrid.SetColAttr vs. SetCellAlignment)
Remove editor in Redimension. This should fix
        bug 593189 (wxGrid:delting rows doesn't hide editor)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-01 18:14:31 +00:00
Stefan Neis
a679468530 Clear attribute cache in Redimension to fix Bug 508407.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-01 16:34:17 +00:00
Stefan Neis
8403515064 Added some const qualifiers.
"Fixed" bug no 500487 by limiting wxGrid::DoGetBestSize's return value by
        DisplaySize.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-01 15:27:26 +00:00
Stefan Neis
a373d23b14 Applied AutoWrap Renderer Bugfix by Roger Gammans (Patch 467479).
Blindly tried to fix crash reported by Roman Vanicek on Mailing list:
        SetCellHighlightColour sometimes segfaults in wxGTK. The
        application crashes in LookupAttr.
        Tentative explanation: Cache handling gets confused if LookupAttr gets
                called on wxGridNoCell.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-01 00:54:01 +00:00
Vadim Zeitlin
ad603bf790 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-31 22:57:16 +00:00
Stefan Neis
27f35b6674 Make use of new array functions.
Added redraw function (by Roger Gammans).
Added Cell overflow & multiple cells (Patch 518206).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-31 22:42:29 +00:00
Julian Smart
85d8c319d6 Applied patch [ 601957 ] wxGrid: Start editing with numberpad key
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-31 11:25:37 +00:00
Robin Dunn
505f70dec6 All editors that derive from wxGridCellTextEditor will now select the
existing value when the editor is started, just like a wxTextCtrl now
does in normal use.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-24 21:40:43 +00:00
Robin Dunn
8a60ff0af8 If the number or float editor is being used but the values are
saved/loaded to the table as strings, then allow empty strings.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-24 21:39:21 +00:00
Robin Dunn
ec53826c06 Fixed wxGridCellFloatEditor::Clone
Changed wxGridCellEditor::GetString to use %f instead of %g to match
the Renderer, otherwise it would truncate/round the value to
m_precision significant digits instead of m_precision digits after the
decimal point.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-24 20:03:42 +00:00
Robin Dunn
70e8d96150 Don't try to release the mouse unless we actually have it captured.
The mouse capture can be lost if an event handler shows a modal
dialog, for example.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-06-24 18:35:17 +00:00
Vadim Zeitlin
3f3dc2efd0 don't crash trying to dereference NULL m_selection (happens when showing a grid without any rows or columns)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-06-20 15:01:10 +00:00
Julian Smart
426b2d8795 Applied drag fix to row labels as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-20 16:16:28 +00:00
Julian Smart
fe77cf604a Captured mouse in grid column label so the drag isn't prematurely and messily
ended when moving out of the column label window.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-20 13:17:31 +00:00
Vadim Zeitlin
1af546bfc3 don't pass arrays by value (and also fixed signed/unsigned comparison warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-28 14:39:37 +00:00
Stefan Neis
33188aa47a Replaced internal calls to XToCol/YToRow added in 1.197 by internal macro
which treats the out of grid case in a way that's more suitable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-28 00:39:04 +00:00
Stefan Neis
68c5a31c6c Fixes to my last commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-27 10:37:15 +00:00
Stefan Neis
b1da81074c Speed-up for very large grids by more efficient search for rows/columns
that need to be updated (in various locations).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-23 17:56:56 +00:00
Vadim Zeitlin
1231429104 fixed the bug which resulted in not showing the grid withotu scrollbars at all
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-12 22:00:38 +00:00
Vadim Zeitlin
94af7d45ef added wxTextCtrl::EmulateKeyPress
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-07 22:29:04 +00:00
Vadim Zeitlin
2f159c5849 don't crash if editing of the cell wasn't started for whatever reason (patch 502692)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-21 16:17:13 +00:00