mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
116
Externals/wxWidgets3/include/wx/generic/gridsel.h
vendored
Normal file
116
Externals/wxWidgets3/include/wx/generic/gridsel.h
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/gridsel.h
|
||||
// Purpose: wxGridSelection
|
||||
// Author: Stefan Neis
|
||||
// Modified by:
|
||||
// Created: 20/02/2000
|
||||
// RCS-ID: $Id: gridsel.h 58757 2009-02-08 11:45:59Z VZ $
|
||||
// Copyright: (c) Stefan Neis
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GENERIC_GRIDSEL_H_
|
||||
#define _WX_GENERIC_GRIDSEL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
#include "wx/grid.h"
|
||||
|
||||
class WXDLLIMPEXP_ADV wxGridSelection
|
||||
{
|
||||
public:
|
||||
wxGridSelection(wxGrid *grid,
|
||||
wxGrid::wxGridSelectionModes sel = wxGrid::wxGridSelectCells);
|
||||
|
||||
bool IsSelection();
|
||||
bool IsInSelection(int row, int col);
|
||||
bool IsInSelection(const wxGridCellCoords& coords)
|
||||
{
|
||||
return IsInSelection(coords.GetRow(), coords.GetCol());
|
||||
}
|
||||
|
||||
void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
|
||||
wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; }
|
||||
void SelectRow(int row, const wxKeyboardState& kbd = wxKeyboardState());
|
||||
void SelectCol(int col, const wxKeyboardState& kbd = wxKeyboardState());
|
||||
void SelectBlock(int topRow, int leftCol,
|
||||
int bottomRow, int rightCol,
|
||||
const wxKeyboardState& kbd = wxKeyboardState(),
|
||||
bool sendEvent = true );
|
||||
void SelectBlock(const wxGridCellCoords& topLeft,
|
||||
const wxGridCellCoords& bottomRight,
|
||||
const wxKeyboardState& kbd = wxKeyboardState(),
|
||||
bool sendEvent = true )
|
||||
{
|
||||
SelectBlock(topLeft.GetRow(), topLeft.GetCol(),
|
||||
bottomRight.GetRow(), bottomRight.GetCol(),
|
||||
kbd, sendEvent);
|
||||
}
|
||||
|
||||
void SelectCell(int row, int col,
|
||||
const wxKeyboardState& kbd = wxKeyboardState(),
|
||||
bool sendEvent = true);
|
||||
void SelectCell(const wxGridCellCoords& coords,
|
||||
const wxKeyboardState& kbd = wxKeyboardState(),
|
||||
bool sendEvent = true)
|
||||
{
|
||||
SelectCell(coords.GetRow(), coords.GetCol(), kbd, sendEvent);
|
||||
}
|
||||
|
||||
void ToggleCellSelection(int row, int col,
|
||||
const wxKeyboardState& kbd = wxKeyboardState());
|
||||
void ToggleCellSelection(const wxGridCellCoords& coords,
|
||||
const wxKeyboardState& kbd = wxKeyboardState())
|
||||
{
|
||||
ToggleCellSelection(coords.GetRow(), coords.GetCol(), kbd);
|
||||
}
|
||||
|
||||
void ClearSelection();
|
||||
|
||||
void UpdateRows( size_t pos, int numRows );
|
||||
void UpdateCols( size_t pos, int numCols );
|
||||
|
||||
private:
|
||||
int BlockContain( int topRow1, int leftCol1,
|
||||
int bottomRow1, int rightCol1,
|
||||
int topRow2, int leftCol2,
|
||||
int bottomRow2, int rightCol2 );
|
||||
// returns 1, if Block1 contains Block2,
|
||||
// -1, if Block2 contains Block1,
|
||||
// 0, otherwise
|
||||
|
||||
int BlockContainsCell( int topRow, int leftCol,
|
||||
int bottomRow, int rightCol,
|
||||
int row, int col )
|
||||
// returns 1, if Block contains Cell,
|
||||
// 0, otherwise
|
||||
{
|
||||
return ( topRow <= row && row <= bottomRow &&
|
||||
leftCol <= col && col <= rightCol );
|
||||
}
|
||||
|
||||
void SelectBlockNoEvent(int topRow, int leftCol,
|
||||
int bottomRow, int rightCol)
|
||||
{
|
||||
SelectBlock(topRow, leftCol, bottomRow, rightCol,
|
||||
wxKeyboardState(), false);
|
||||
}
|
||||
|
||||
wxGridCellCoordsArray m_cellSelection;
|
||||
wxGridCellCoordsArray m_blockSelectionTopLeft;
|
||||
wxGridCellCoordsArray m_blockSelectionBottomRight;
|
||||
wxArrayInt m_rowSelection;
|
||||
wxArrayInt m_colSelection;
|
||||
|
||||
wxGrid *m_grid;
|
||||
wxGrid::wxGridSelectionModes m_selectionMode;
|
||||
|
||||
friend class WXDLLIMPEXP_FWD_ADV wxGrid;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGridSelection);
|
||||
};
|
||||
|
||||
#endif // wxUSE_GRID
|
||||
#endif // _WX_GENERIC_GRIDSEL_H_
|
Reference in New Issue
Block a user