20#ifndef __LIB_TABLE_GRID_H__
21#define __LIB_TABLE_GRID_H__
62 wxString
GetValue(
int aRow,
int aCol )
override
64 if( aRow < (
int)
size() )
77 default:
return wxEmptyString;
84 bool CanGetValueAs(
int aRow,
int aCol,
const wxString& aTypeName )
override
86 if( aRow < (
int)
size() )
92 return aTypeName == wxGRID_VALUE_BOOL;
95 return aTypeName == wxGRID_VALUE_STRING;
112 void SetValue(
int aRow,
int aCol,
const wxString& aValue )
override
114 if( aRow < (
int)
size() )
144 bool InsertRows(
size_t aPos = 0,
size_t aNumRows = 1 )
override
148 for(
size_t i = 0; i < aNumRows; i++ )
156 wxGridTableMessage msg(
this,
157 wxGRIDTABLE_NOTIFY_ROWS_INSERTED,
161 GetView()->ProcessTableMessage( msg );
173 for(
int i = aNumRows; i; --i )
178 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, aNumRows );
179 GetView()->ProcessTableMessage( msg );
189 if( aPos <
size() && aPos + aNumRows <=
size() )
192 erase( start, start + aNumRows );
195 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, aPos, aNumRows );
196 GetView()->ProcessTableMessage( msg );
209 case COL_URI:
return _(
"Library Path" );
212 case COL_TYPE:
return _(
"Library Format" );
218 default:
return wxEmptyString;
224 for(
size_t i = 0; i <
size(); ++i )
242 virtual size_t size()
const = 0;
This abstract base class mixes any object derived from LIB_TABLE into wxGridTableBase so the result c...
virtual LIB_TABLE_ROWS_ITER erase(LIB_TABLE_ROWS_ITER aFirst, LIB_TABLE_ROWS_ITER aLast)=0
virtual LIB_TABLE_ROWS_ITER insert(LIB_TABLE_ROWS_ITER aIterator, LIB_TABLE_ROW *aRow)=0
void SetValueAsBool(int aRow, int aCol, bool aValue) override
virtual LIB_TABLE_ROW * at(size_t aIndex)=0
bool CanGetValueAs(int aRow, int aCol, const wxString &aTypeName) override
void SetValue(int aRow, int aCol, const wxString &aValue) override
bool IsEmptyCell(int aRow, int aCol) override
virtual size_t size() const =0
bool DeleteRows(size_t aPos, size_t aNumRows) override
bool AppendRows(size_t aNumRows=1) override
wxString GetValue(int aRow, int aCol) override
bool InsertRows(size_t aPos=0, size_t aNumRows=1) override
virtual LIB_TABLE_ROWS_ITER begin()=0
virtual void push_back(LIB_TABLE_ROW *aRow)=0
LIB_TABLE_ROW * At(size_t aIndex)
bool GetValueAsBool(int aRow, int aCol) override
bool ContainsNickname(const wxString &aNickname)
int GetNumberCols() override
virtual LIB_TABLE_ROW * makeNewRow()=0
int GetNumberRows() override
wxString GetColLabelValue(int aCol) override
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
void SetFullURI(const wxString &aFullURI)
Change the full URI for the library.
const wxString & GetOptions() const
Return the options string, which may hold a password or anything else needed to instantiate the under...
const wxString & GetDescr() const
Return the description of the library referenced by this row.
void SetVisible(bool aVisible=true)
void SetNickName(const wxString &aNickName)
Change the logical name of this library, useful for an editor.
virtual const wxString GetType() const =0
Return the type of library represented by this row.
void SetEnabled(bool aEnabled=true)
Change the enabled status of this library.
void SetDescr(const wxString &aDescr)
Change the description of the library referenced by this row.
virtual void SetType(const wxString &aType)=0
Change the type of library represented by this row that must be implemented in the derived object to ...
const wxString & GetNickName() const
const wxString GetFullURI(bool aSubstituted=false) const
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
bool GetIsEnabled() const
void SetOptions(const wxString &aOptions)
Change the library options strings.
bool GetIsVisible() const
LIB_TABLE_ROWS::iterator LIB_TABLE_ROWS_ITER
const wxColour COLOUR_ROW_ENABLED(0, 0, 0)
const wxColour COLOUR_ROW_DISABLED(100, 100, 100)
wxString UnescapeString(const wxString &aSource)
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...