Deprecate wxGRIDTABLE_REQUEST_VIEW_{GET,SEND}_VALUES
These grid table requests seem to have been never used and were not doing much in wxGrid neither, moreover they were never documented, so just stop supporting them.
This commit is contained in:
@@ -789,9 +789,12 @@ private:
|
|||||||
//
|
//
|
||||||
enum wxGridTableRequest
|
enum wxGridTableRequest
|
||||||
{
|
{
|
||||||
|
// The first two requests never did anything, simply don't use them.
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000,
|
wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000,
|
||||||
wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES,
|
wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES,
|
||||||
wxGRIDTABLE_NOTIFY_ROWS_INSERTED,
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
wxGRIDTABLE_NOTIFY_ROWS_INSERTED = 2002,
|
||||||
wxGRIDTABLE_NOTIFY_ROWS_APPENDED,
|
wxGRIDTABLE_NOTIFY_ROWS_APPENDED,
|
||||||
wxGRIDTABLE_NOTIFY_ROWS_DELETED,
|
wxGRIDTABLE_NOTIFY_ROWS_DELETED,
|
||||||
wxGRIDTABLE_NOTIFY_COLS_INSERTED,
|
wxGRIDTABLE_NOTIFY_COLS_INSERTED,
|
||||||
@@ -2164,11 +2167,6 @@ protected:
|
|||||||
{ UpdateBlockBeingSelected(topLeft.GetRow(), topLeft.GetCol(),
|
{ UpdateBlockBeingSelected(topLeft.GetRow(), topLeft.GetCol(),
|
||||||
bottomRight.GetRow(), bottomRight.GetCol()); }
|
bottomRight.GetRow(), bottomRight.GetCol()); }
|
||||||
|
|
||||||
// ------ functions to get/send data (see also public functions)
|
|
||||||
//
|
|
||||||
bool GetModelValues();
|
|
||||||
bool SetModelValues();
|
|
||||||
|
|
||||||
friend class WXDLLIMPEXP_FWD_ADV wxGridSelection;
|
friend class WXDLLIMPEXP_FWD_ADV wxGridSelection;
|
||||||
friend class wxGridRowOperations;
|
friend class wxGridRowOperations;
|
||||||
friend class wxGridColumnOperations;
|
friend class wxGridColumnOperations;
|
||||||
|
@@ -4538,12 +4538,6 @@ bool wxGrid::ProcessTableMessage( wxGridTableMessage& msg )
|
|||||||
{
|
{
|
||||||
switch ( msg.GetId() )
|
switch ( msg.GetId() )
|
||||||
{
|
{
|
||||||
case wxGRIDTABLE_REQUEST_VIEW_GET_VALUES:
|
|
||||||
return GetModelValues();
|
|
||||||
|
|
||||||
case wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES:
|
|
||||||
return SetModelValues();
|
|
||||||
|
|
||||||
case wxGRIDTABLE_NOTIFY_ROWS_INSERTED:
|
case wxGRIDTABLE_NOTIFY_ROWS_INSERTED:
|
||||||
case wxGRIDTABLE_NOTIFY_ROWS_APPENDED:
|
case wxGRIDTABLE_NOTIFY_ROWS_APPENDED:
|
||||||
case wxGRIDTABLE_NOTIFY_ROWS_DELETED:
|
case wxGRIDTABLE_NOTIFY_ROWS_DELETED:
|
||||||
@@ -5308,51 +5302,6 @@ wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol,
|
|||||||
m_selectedBlockBottomRight = updateBottomRight;
|
m_selectedBlockBottomRight = updateBottomRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// ------ functions to get/send data (see also public functions)
|
|
||||||
//
|
|
||||||
|
|
||||||
bool wxGrid::GetModelValues()
|
|
||||||
{
|
|
||||||
// Hide the editor, so it won't hide a changed value.
|
|
||||||
HideCellEditControl();
|
|
||||||
|
|
||||||
if ( m_table )
|
|
||||||
{
|
|
||||||
// all we need to do is repaint the grid
|
|
||||||
//
|
|
||||||
m_gridWin->Refresh();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxGrid::SetModelValues()
|
|
||||||
{
|
|
||||||
int row, col;
|
|
||||||
|
|
||||||
// Disable the editor, so it won't hide a changed value.
|
|
||||||
// Do we also want to save the current value of the editor first?
|
|
||||||
// I think so ...
|
|
||||||
DisableCellEditControl();
|
|
||||||
|
|
||||||
if ( m_table )
|
|
||||||
{
|
|
||||||
for ( row = 0; row < m_numRows; row++ )
|
|
||||||
{
|
|
||||||
for ( col = 0; col < m_numCols; col++ )
|
|
||||||
{
|
|
||||||
m_table->SetValue( row, col, GetCellValue(row, col) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note - this function only draws cells that are in the list of
|
// Note - this function only draws cells that are in the list of
|
||||||
// exposed cells (usually set from the update region by
|
// exposed cells (usually set from the update region by
|
||||||
// CalcExposedCells)
|
// CalcExposedCells)
|
||||||
|
Reference in New Issue
Block a user