Browse Source

Give up on using chars for expand/collapse rows.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21820
pull/19/head
Jeff Young 2 months ago
parent
commit
06cdf0be98
  1. 103
      common/widgets/grid_text_helpers.cpp
  2. 51
      common/widgets/indicator_icon.cpp
  3. 5
      common/widgets/wx_grid.cpp
  4. 2
      eeschema/dialogs/dialog_lib_fields_table.cpp
  5. 3
      eeschema/dialogs/dialog_symbol_fields_table.cpp
  6. 34
      eeschema/fields_data_model.cpp
  7. 16
      eeschema/fields_data_model.h
  8. 30
      eeschema/lib_fields_data_model.cpp
  9. 6
      eeschema/lib_fields_data_model.h
  10. 22
      include/widgets/grid_text_helpers.h
  11. 54
      include/widgets/indicator_icon.h
  12. 18
      include/widgets/wx_grid.h

103
common/widgets/grid_text_helpers.cpp

@ -24,14 +24,15 @@
#include <widgets/grid_text_helpers.h>
#include <widgets/wx_grid.h>
#include <scintilla_tricks.h>
#include <widgets/indicator_icon.h>
#include <kiplatform/ui.h>
//-------- GRID_CELL_TEXT_EDITOR ------------------------------------------------------
//
GRID_CELL_TEXT_EDITOR::GRID_CELL_TEXT_EDITOR() : wxGridCellTextEditor()
{
}
{}
void GRID_CELL_TEXT_EDITOR::SetValidator( const wxValidator& validator )
@ -75,17 +76,99 @@ void GRID_CELL_TEXT_EDITOR::SetSize( const wxRect& aRect )
}
//-------- GRID_CELL_ESCAPED_TEXT_RENDERER ------------------------------------------------------
//-------- GRID_CELL_TEXT_RENDERER ------------------------------------------------------
//
GRID_CELL_ESCAPED_TEXT_RENDERER::GRID_CELL_ESCAPED_TEXT_RENDERER() :
GRID_CELL_TEXT_RENDERER::GRID_CELL_TEXT_RENDERER() :
wxGridCellStringRenderer()
{}
void GRID_CELL_TEXT_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC, const wxRect& aRect,
int aRow, int aCol, bool isSelected )
{
WX_GRID_TABLE_BASE* table = dynamic_cast<WX_GRID_TABLE_BASE*>( aGrid.GetTable() );
if( !table || !table->IsExpanderColumn( aCol ) )
return wxGridCellStringRenderer::Draw( aGrid, aAttr, aDC, aRect, aRow, aCol, isSelected );
wxString value = aGrid.GetCellValue( aRow, aCol );
wxRect rect = aRect;
rect.Inflate( -1 );
// erase background
wxGridCellRenderer::Draw( aGrid, aAttr, aDC, aRect, aRow, aCol, isSelected );
// draw the icon
int leftCut = aDC.FromDIP( 4 );
INDICATOR_ICON::ICON_ID state = ROW_ICON_PROVIDER::STATE::OFF;
if( table->GetGroupType( aRow ) == GROUP_COLLAPSED )
state = ROW_ICON_PROVIDER::STATE::CLOSED;
else if( table->GetGroupType( aRow ) == GROUP_EXPANDED )
state = ROW_ICON_PROVIDER::STATE::OPEN;
wxBitmap bitmap = static_cast<WX_GRID&>( aGrid ).GetRowIconProvider()->GetIndicatorIcon( state );
bitmap.SetScaleFactor( KIPLATFORM::UI::GetPixelScaleFactor( &aGrid ) );
aDC.DrawBitmap( bitmap,
rect.GetLeft() + leftCut,
rect.GetTop() + ( rect.GetHeight() - bitmap.GetLogicalHeight() ) / 2,
true );
leftCut += bitmap.GetLogicalWidth();
leftCut += aDC.FromDIP( 4 );
if( table->GetGroupType( aRow ) == CHILD_ITEM )
leftCut += aDC.FromDIP( 12 );
rect.x += leftCut;
rect.width -= leftCut;
// draw the text
SetTextColoursAndFont( aGrid, aAttr, aDC, isSelected );
aGrid.DrawTextRectangle( aDC, value, rect, wxALIGN_LEFT, wxALIGN_CENTRE );
}
wxSize GRID_CELL_TEXT_RENDERER::GetBestSize( wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col )
{
WX_GRID_TABLE_BASE* table = dynamic_cast<WX_GRID_TABLE_BASE*>( grid.GetTable() );
if( !table || !table->IsExpanderColumn( col ) )
return wxGridCellStringRenderer::GetBestSize( grid, attr, dc, row, col );
INDICATOR_ICON::ICON_ID state = ROW_ICON_PROVIDER::STATE::OFF;
wxBitmap bitmap = static_cast<WX_GRID&>( grid ).GetRowIconProvider()->GetIndicatorIcon( state );
bitmap.SetScaleFactor( KIPLATFORM::UI::GetPixelScaleFactor( &grid ) );
wxString text = grid.GetCellValue( row, col );
wxSize size = wxGridCellStringRenderer::DoGetBestSize( attr, dc, text );
size.x += bitmap.GetLogicalWidth() + dc.FromDIP( 8 );
if( table->GetGroupType( row ) == CHILD_ITEM )
size.x += dc.FromDIP( 12 );
size.y = std::max( size.y, dc.FromDIP( 2 ) );
return size;
}
void GRID_CELL_ESCAPED_TEXT_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
const wxRect& aRect, int aRow, int aCol,
bool isSelected )
//-------- GRID_CELL_ESCAPED_TEXT_RENDERER ------------------------------------------------------
//
GRID_CELL_ESCAPED_TEXT_RENDERER::GRID_CELL_ESCAPED_TEXT_RENDERER() :
wxGridCellStringRenderer()
{}
void GRID_CELL_ESCAPED_TEXT_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC, const wxRect& aRect,
int aRow, int aCol, bool isSelected )
{
wxString unescaped = UnescapeString( aGrid.GetCellValue( aRow, aCol ) );
@ -100,8 +183,8 @@ void GRID_CELL_ESCAPED_TEXT_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr
}
wxSize GRID_CELL_ESCAPED_TEXT_RENDERER::GetBestSize( wxGrid & aGrid, wxGridCellAttr & aAttr,
wxDC & aDC, int aRow, int aCol )
wxSize GRID_CELL_ESCAPED_TEXT_RENDERER::GetBestSize( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC,
int aRow, int aCol )
{
wxString unescaped = UnescapeString( aGrid.GetCellValue( aRow, aCol ) );
return wxGridCellStringRenderer::DoGetBestSize( aAttr, aDC, unescaped );
@ -117,7 +200,7 @@ GRID_CELL_STC_EDITOR::GRID_CELL_STC_EDITOR( bool aIgnoreCase, bool aSingleLine,
m_ignoreCase( aIgnoreCase ),
m_singleLine( aSingleLine ),
m_onCharFn( std::move( onCharFn ) )
{ }
{}
void GRID_CELL_STC_EDITOR::SetSize( const wxRect& aRect )

51
common/widgets/indicator_icon.cpp

@ -65,12 +65,6 @@ void INDICATOR_ICON::SetIndicatorState( ICON_ID aIconId )
}
INDICATOR_ICON::ICON_ID INDICATOR_ICON::GetIndicatorState() const
{
return m_currentId;
}
wxImage createBlankImage( int size )
{
wxImage image( size, size );
@ -96,7 +90,7 @@ wxImage createBlankImage( int size )
// Create an arrow icon of a particular size, colour and direction. 0 points up, 1 points
// right, and so forth.
wxBitmap createArrow( int size, double aScaleFactor, int aDirection, wxColour aColour )
wxBitmap createArrow( int size, double aScaleFactor, int aDirection, const wxColour& aColour )
{
wxImage image = createBlankImage( size );
@ -127,6 +121,42 @@ wxBitmap createArrow( int size, double aScaleFactor, int aDirection, wxColour aC
}
// Create a turndown icon of a particular size, colour and direction. 0 points up,
// 1 points right, and so forth.
wxBitmap createTurndown( int size, double aScaleFactor, int aDirection, const wxColour& aColour )
{
wxImage image = createBlankImage( size );
int startX = size / 2 - 1;
int len = 1;
int startY = 1 + ( aDirection % 2 );
for( int y = startY; y < startY + size - 3; ++y )
{
for( int x = startX; x < startX + len; ++x )
{
image.SetRGB( x, y, aColour.Red(), aColour.Green(), aColour.Blue() );
image.SetAlpha( x, y, ( y % 2 ) ? wxIMAGE_ALPHA_OPAQUE : wxIMAGE_ALPHA_OPAQUE / 2 );
}
// Next row will start one pixel back and be two pixels longer
if( y % 2 )
{
startX -= 1;
len += 2;
}
}
for( int i = 0; i < aDirection; ++i )
image = image.Rotate90();
wxBitmap bmp( image );
bmp.SetScaleFactor( aScaleFactor );
return bmp;
}
// Create a diamond icon of a particular size and colour.
wxBitmap createDiamond( int size, double aScaleFactor, wxColour aColour )
{
@ -173,7 +203,8 @@ ROW_ICON_PROVIDER::ROW_ICON_PROVIDER( int aSizeDIP, wxWindow* aWindow )
};
double scale = aWindow->GetDPIScaleFactor();
wxColour shadowColor = wxSystemSettings().GetColour( wxSYS_COLOUR_3DDKSHADOW );
wxColour shadowColor = wxSystemSettings::GetColour( wxSYS_COLOUR_3DDKSHADOW );
wxColour textColor = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXTEXT );
m_blankBitmap = wxBitmap( createBlankImage( toPhys( aSizeDIP ) ) );
m_blankBitmap.SetScaleFactor( scale );
@ -182,6 +213,8 @@ ROW_ICON_PROVIDER::ROW_ICON_PROVIDER( int aSizeDIP, wxWindow* aWindow )
m_upArrowBitmap = createArrow( toPhys( aSizeDIP - 2 ), scale, 0, shadowColor );
m_downArrowBitmap = createArrow( toPhys( aSizeDIP - 2 ), scale, 2, shadowColor );
m_dotBitmap = createDiamond( toPhys( aSizeDIP ), scale, wxColour( 128, 144, 255 ) );
m_closedBitmap = createTurndown( toPhys( aSizeDIP ), scale, 1, textColor );
m_openBitmap = createTurndown( toPhys( aSizeDIP ), scale, 2, textColor );
}
@ -194,6 +227,8 @@ const wxBitmap& ROW_ICON_PROVIDER::GetIndicatorIcon( INDICATOR_ICON::ICON_ID aId
case STATE::ON: return m_rightArrowBitmap;
case STATE::DIMMED: return m_dotBitmap;
case STATE::OFF: return m_blankBitmap;
case STATE::OPEN: return m_openBitmap;
case STATE::CLOSED: return m_closedBitmap;
default: return m_blankBitmap;
}
}

5
common/widgets/wx_grid.cpp

@ -28,6 +28,7 @@
#include <wx/event.h> // Needed for textentry.h on MSW
#include <wx/textentry.h>
#include <widgets/indicator_icon.h>
#include <widgets/grid_icon_text_helpers.h>
#include <widgets/wx_grid.h>
#include <widgets/ui_common.h>
@ -215,6 +216,8 @@ WX_GRID::WX_GRID( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxS
SetDefaultCellFont( KIUI::GetControlFont( this ) );
SetLabelFont( KIUI::GetControlFont( this ) );
m_rowIconProvider = new ROW_ICON_PROVIDER( KIUI::c_IndicatorSizeDIP, this );
Connect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );
Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( WX_GRID::onCellEditorShown ), nullptr, this );
Connect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( WX_GRID::onCellEditorHidden ), nullptr, this );
@ -226,6 +229,8 @@ WX_GRID::~WX_GRID()
if( m_weOwnTable )
DestroyTable( GetTable() );
delete m_rowIconProvider;
Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( WX_GRID::onCellEditorShown ), nullptr, this );
Disconnect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( WX_GRID::onCellEditorHidden ), nullptr, this );
Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );

2
eeschema/dialogs/dialog_lib_fields_table.cpp

@ -36,6 +36,7 @@
#include <widgets/grid_checkbox.h>
#include <widgets/grid_icon_text_helpers.h>
#include <widgets/grid_text_button_helpers.h>
#include <widgets/grid_text_helpers.h>
#include <widgets/std_bitmap_button.h>
#include <tools/sch_actions.h>
#include <tool/tool_manager.h>
@ -453,6 +454,7 @@ void DIALOG_LIB_FIELDS_TABLE::SetupColumnProperties( int aCol )
}
else
{
attr->SetRenderer( new GRID_CELL_TEXT_RENDERER() );
attr->SetEditor( m_grid->GetDefaultEditor() );
m_dataModel->SetColAttr( attr, aCol );
}

3
eeschema/dialogs/dialog_symbol_fields_table.cpp

@ -40,6 +40,7 @@
#include <tools/sch_editor_control.h>
#include <kiplatform/ui.h>
#include <widgets/grid_text_button_helpers.h>
#include <widgets/grid_text_helpers.h>
#include <widgets/bitmap_button.h>
#include <widgets/std_bitmap_button.h>
#include <widgets/wx_grid.h>
@ -456,6 +457,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::SetupColumnProperties( int aCol )
if( m_dataModel->ColIsReference( aCol ) )
{
attr->SetReadOnly();
attr->SetRenderer( new GRID_CELL_TEXT_RENDERER() );
m_dataModel->SetColAttr( attr, aCol );
}
else if( m_dataModel->GetColFieldName( aCol ) == GetCanonicalFieldName( FIELD_T::FOOTPRINT ) )
@ -491,6 +493,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::SetupColumnProperties( int aCol )
}
else
{
attr->SetRenderer( new GRID_CELL_TEXT_RENDERER() );
attr->SetEditor( m_grid->GetDefaultEditor() );
m_dataModel->SetColAttr( attr, aCol );
}

34
eeschema/fields_data_model.cpp

@ -344,38 +344,8 @@ bool FIELDS_EDITOR_GRID_DATA_MODEL::IsExpanderColumn( int aCol ) const
wxString FIELDS_EDITOR_GRID_DATA_MODEL::GetValue( int aRow, int aCol )
{
GetView()->SetReadOnly( aRow, aCol, false );
if( IsExpanderColumn( aCol ) )
{
// Poor-man's tree controls
if( m_rows[aRow].m_Flag == GROUP_COLLAPSED )
{
GetView()->SetReadOnly( aRow, aCol, true );
return wxT( "" ) + GetValue( m_rows[aRow], aCol );
}
else if( m_rows[aRow].m_Flag == GROUP_EXPANDED )
{
GetView()->SetReadOnly( aRow, aCol, true );
return wxT( "" ) + GetValue( m_rows[aRow], aCol );
}
else if( m_rows[aRow].m_Flag == CHILD_ITEM )
{
return wxT( " " ) + GetValue( m_rows[aRow], aCol );
}
else
{
#ifdef __WXMAC__
return wxT( "" ) + GetValue( m_rows[aRow], aCol );
#else
return wxT( " " ) + GetValue( m_rows[aRow], aCol );
#endif
}
}
else
{
return GetValue( m_rows[aRow], aCol );
}
GetView()->SetReadOnly( aRow, aCol, IsExpanderColumn( aCol ) );
return GetValue( m_rows[aRow], aCol );
}

16
eeschema/fields_data_model.h

@ -94,16 +94,6 @@ protected:
};
enum GROUP_TYPE
{
GROUP_SINGLETON,
GROUP_COLLAPSED,
GROUP_COLLAPSED_DURING_SORT,
GROUP_EXPANDED,
CHILD_ITEM
};
struct DATA_MODEL_ROW
{
DATA_MODEL_ROW( const SCH_REFERENCE& aFirstReference, GROUP_TYPE aType )
@ -249,7 +239,11 @@ public:
bool ColIsItemNumber( int aCol );
bool ColIsAttribute( int aCol );
bool IsExpanderColumn( int aCol ) const;
bool IsExpanderColumn( int aCol ) const override;
GROUP_TYPE GetGroupType( int aRow ) const override
{
return m_rows[aRow].m_Flag;
}
void SetSorting( int aCol, bool ascending )
{

30
eeschema/lib_fields_data_model.cpp

@ -200,35 +200,7 @@ bool LIB_FIELDS_EDITOR_GRID_DATA_MODEL::IsExpanderColumn( int aCol ) const
wxString LIB_FIELDS_EDITOR_GRID_DATA_MODEL::GetValue( int aRow, int aCol )
{
GetView()->SetReadOnly( aRow, aCol, false );
if( IsExpanderColumn( aCol ) )
{
// Poor-man's tree controls
if( m_rows[aRow].m_Flag == GROUP_COLLAPSED )
{
GetView()->SetReadOnly( aRow, aCol, true );
return wxT( "" ) + GetValue( m_rows[aRow], aCol );
}
else if( m_rows[aRow].m_Flag == GROUP_EXPANDED )
{
GetView()->SetReadOnly( aRow, aCol, true );
return wxT( "" ) + GetValue( m_rows[aRow], aCol );
}
else if( m_rows[aRow].m_Flag == CHILD_ITEM )
{
return wxT( " " ) + GetValue( m_rows[aRow], aCol );
}
else
{
#ifdef __WXMAC__
return wxT( "" ) + GetValue( m_rows[aRow], aCol );
#else
return wxT( " " ) + GetValue( m_rows[aRow], aCol );
#endif
}
}
GetView()->SetReadOnly( aRow, aCol, IsExpanderColumn( aCol ) );
return GetValue( m_rows[aRow], aCol );
}

6
eeschema/lib_fields_data_model.h

@ -170,7 +170,11 @@ public:
bool ColIsSymbolName( int aCol );
bool ColIsCheck( int aCol );
bool IsExpanderColumn( int aCol ) const;
bool IsExpanderColumn( int aCol ) const override;
GROUP_TYPE GetGroupType( int aRow ) const override
{
return m_rows[aRow].m_Flag;
}
void SetSorting( int aCol, bool ascending )
{

22
include/widgets/grid_text_helpers.h

@ -18,8 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KICAD_GRID_TEXT_HELPERS_H
#define KICAD_GRID_TEXT_HELPERS_H
#pragma once
#include <functional>
#include <memory>
@ -50,6 +49,22 @@ protected:
};
/**
* A general-purpose text renderer for WX_GRIDs backed by WX_GRID_TABLE_BASE tables that can handle
* drawing expand/collapse controls.
*/
class GRID_CELL_TEXT_RENDERER : public wxGridCellStringRenderer
{
public:
GRID_CELL_TEXT_RENDERER();
void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wxDC& aDC, const wxRect& aRect, int aRow,
int aCol, bool isSelected ) override;
wxSize GetBestSize( wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col ) override;
};
/**
* A text renderer that can unescape text for display
* This is useful where it's desired to keep the underlying storage escaped.
@ -102,6 +117,3 @@ protected:
std::function<void( wxStyledTextEvent&, SCINTILLA_TRICKS* )> m_onCharFn;
};
#endif // KICAD_GRID_TEXT_HELPERS_H

54
include/widgets/indicator_icon.h

@ -21,8 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef ROW_INDICATOR__H_
#define ROW_INDICATOR__H_
#pragma once
#include <wx/statbmp.h>
#include <wx/panel.h>
@ -35,12 +34,10 @@ class wxStaticBitmap;
class INDICATOR_ICON : public wxPanel
{
public:
/**
* An id that refers to a certain icon state.
*
* Exactly what that state might mean in terms of icons is up
* to the icon provider.
* Exactly what that state might mean in terms of icons is up to the icon provider.
*/
using ICON_ID = int;
@ -50,7 +47,6 @@ public:
class ICON_PROVIDER
{
public:
virtual ~ICON_PROVIDER() {};
/**
@ -61,24 +57,13 @@ public:
virtual const wxBitmap& GetIndicatorIcon( ICON_ID aIconId ) const = 0;
};
/**
* Accessor for the default icon providers, which take
* true and false for IDs, meaning on/off.
*
* @param aAlternative false for blue arrow/blank, true for the green diamond.
*/
static ICON_PROVIDER& GetDefaultRowIconProvider( bool aAlternative );
/**
* @param aParent the owning window.
* @param aIconProvider the icon provider to get icons from.
* @param aInitialIcon is the initial state of the icon (the meaning
* depends on what is the purpose of the icon).
* @param aID the ID to use for the widgets - events will have
* this ID.
* @param aInitialIcon is the initial state of the icon.
* @param aID the ID to use for the widgets - events will have this ID.
*/
INDICATOR_ICON( wxWindow* aParent, ICON_PROVIDER& aIconProvider,
ICON_ID aInitialIcon, int aID );
INDICATOR_ICON( wxWindow* aParent, ICON_PROVIDER& aIconProvider, ICON_ID aInitialIcon, int aID );
/**
* Set the row indicator to the given state.
@ -87,12 +72,6 @@ public:
*/
void SetIndicatorState( ICON_ID aIconId );
/**
* @return the current state of the indicator.
*/
ICON_ID GetIndicatorState() const;
/**
* Update the window ID of this control and its children.
*
@ -105,15 +84,9 @@ public:
}
private:
/// Object that delivers icons for the indicator (currently uses a default implementation).
ICON_PROVIDER& m_iconProvider;
/// Handle on the bitmap widget.
wxStaticBitmap* m_bitmap;
/// Is the icon currently "on".
ICON_ID m_currentId;
ICON_PROVIDER& m_iconProvider; /// Object that delivers icons for the indicator
wxStaticBitmap* m_bitmap; /// Handle on the bitmap widget.
ICON_ID m_currentId; /// Is the icon currently "on".
};
@ -132,12 +105,10 @@ public:
ON, ///< Row "on" or "selected"
UP, ///< Row above design alpha
DOWN, ///< Row below design alpha
OPEN, ///< Tree control open
CLOSED ///< Tree control closed
};
/**
* @param aAlt false: normal icons (blue arrow/blank), true:
* alternative icons (blue arrow/green diamond).
*/
ROW_ICON_PROVIDER( int aSizeDIP, wxWindow* aWindow );
/// @copydoc INDICATOR_ICON::ICON_PROVIDER::GetIndicatorIcon()
@ -149,7 +120,6 @@ private:
wxBitmap m_upArrowBitmap;
wxBitmap m_downArrowBitmap;
wxBitmap m_dotBitmap;
wxBitmap m_openBitmap;
wxBitmap m_closedBitmap;
};
#endif // ROW_INDICATOR__H_

18
include/widgets/wx_grid.h

@ -36,6 +36,17 @@
#include <units_provider.h>
class wxTextEntryBase;
class ROW_ICON_PROVIDER;
enum GROUP_TYPE
{
GROUP_SINGLETON,
GROUP_COLLAPSED,
GROUP_COLLAPSED_DURING_SORT,
GROUP_EXPANDED,
CHILD_ITEM
};
class WX_GRID_TABLE_BASE : public wxGridTableBase
@ -64,6 +75,9 @@ public:
return nullptr;
}
virtual bool IsExpanderColumn( int aCol ) const { return false; }
virtual GROUP_TYPE GetGroupType( int aRow ) const { return GROUP_SINGLETON; }
protected:
wxGridCellAttr* enhanceAttr( wxGridCellAttr* aInputAttr, int aRow, int aCol,
wxGridCellAttr::wxAttrKind aKind );
@ -287,6 +301,8 @@ public:
void SetGridWidthsDirty() { m_gridWidthsDirty = true; }
ROW_ICON_PROVIDER* GetRowIconProvider() const { return m_rowIconProvider; }
protected:
/**
* A re-implementation of wxGrid::DrawColLabel which left-aligns the first column and draws
@ -345,4 +361,6 @@ protected:
bool m_gridWidthsDirty = true;
int m_gridWidth = 0;
ROW_ICON_PROVIDER* m_rowIconProvider;
};
Loading…
Cancel
Save