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
This commit is contained in:
@@ -949,14 +949,28 @@ protected:
|
||||
bool m_inOnKeyDown;
|
||||
int m_batchCount;
|
||||
|
||||
int m_cursorMode;
|
||||
enum { WXGRID_CURSOR_SELECT_CELL,
|
||||
WXGRID_CURSOR_RESIZE_ROW,
|
||||
WXGRID_CURSOR_RESIZE_COL,
|
||||
WXGRID_CURSOR_SELECT_ROW,
|
||||
WXGRID_CURSOR_SELECT_COL
|
||||
enum CursorMode
|
||||
{
|
||||
WXGRID_CURSOR_SELECT_CELL,
|
||||
WXGRID_CURSOR_RESIZE_ROW,
|
||||
WXGRID_CURSOR_RESIZE_COL,
|
||||
WXGRID_CURSOR_SELECT_ROW,
|
||||
WXGRID_CURSOR_SELECT_COL
|
||||
};
|
||||
|
||||
// this method not only sets m_cursorMode but also sets the correct cursor
|
||||
// for the given mode and, if captureMouse is not FALSE releases the mouse
|
||||
// if it was captured and captures it if it must be captured
|
||||
//
|
||||
// for this to work, you should always use it and not set m_cursorMode
|
||||
// directly!
|
||||
void ChangeCursorMode(CursorMode mode,
|
||||
wxWindow *win = (wxWindow *)NULL,
|
||||
bool captureMouse = TRUE);
|
||||
|
||||
wxWindow *m_winCapture; // the window which captured the mouse
|
||||
CursorMode m_cursorMode;
|
||||
|
||||
int m_dragLastPos;
|
||||
int m_dragRowOrCol;
|
||||
bool m_isDragging;
|
||||
|
Reference in New Issue
Block a user