本文整理汇总了C++中COLOR4D::SetFromWxString方法的典型用法代码示例。如果您正苦于以下问题:C++ COLOR4D::SetFromWxString方法的具体用法?C++ COLOR4D::SetFromWxString怎么用?C++ COLOR4D::SetFromWxString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COLOR4D
的用法示例。
在下文中一共展示了COLOR4D::SetFromWxString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadSettings
void LIB_VIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
{
EDA_DRAW_FRAME::LoadSettings( aCfg );
// Fetch grid settings from Symbol Editor
wxString symbolEditor = LIB_EDIT_FRAME_NAME;
bool btmp;
COLOR4D wtmp;
if( aCfg->Read( symbolEditor + ShowGridEntryKeyword, &btmp ) )
SetGridVisibility( btmp );
if( wtmp.SetFromWxString( aCfg->Read( symbolEditor + GridColorEntryKeyword, wxT( "NONE" ) ) ) )
SetGridColor( wtmp );
// Grid shape, etc.
GetGalDisplayOptions().ReadAppConfig( *aCfg, symbolEditor );
aCfg->Read( LIBLIST_WIDTH_KEY, &m_libListWidth, 150 );
aCfg->Read( CMPLIST_WIDTH_KEY, &m_cmpListWidth, 150 );
m_showPinElectricalTypeName = aCfg->Read( CMPVIEW_SHOW_PINELECTRICALTYPE_KEY, true );
// Set parameters to a reasonable value.
if( m_libListWidth > m_FrameSize.x/2 )
m_libListWidth = m_FrameSize.x/2;
if( m_cmpListWidth > m_FrameSize.x/2 )
m_cmpListWidth = m_FrameSize.x/2;
}
示例2: LoadSettings
void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
{
EDA_BASE_FRAME::LoadSettings( aCfg );
wxString baseCfgName = ConfigBaseName();
bool btmp;
if( aCfg->Read( baseCfgName + ShowGridEntryKeyword, &btmp ) )
SetGridVisibility( btmp );
// Read grid color:
COLOR4D wtmp = COLOR4D::UNSPECIFIED;
if( wtmp.SetFromWxString( aCfg->Read(
baseCfgName + GridColorEntryKeyword, wxT( "NONE" ) ) ) )
SetGridColor( wtmp );
aCfg->Read( baseCfgName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L );
// m_LastGridSizeId is an offset, expected to be >= 0
if( m_LastGridSizeId < 0 )
m_LastGridSizeId = 0;
m_UndoRedoCountMax = aCfg->Read( baseCfgName + MaxUndoItemsEntry,
long( DEFAULT_MAX_UNDO_ITEMS ) );
aCfg->Read( baseCfgName + FirstRunShownKeyword, &m_firstRunDialogSetting, 0L );
m_galDisplayOptions->ReadConfig( aCfg, baseCfgName + GalDisplayOptionsKeyword );
}
示例3: LoadSettings
void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
{
EDA_BASE_FRAME::LoadSettings( aCfg );
wxString baseCfgName = ConfigBaseName();
wxConfigBase* cmnCfg = Pgm().CommonSettings();
// Read units used in dialogs and toolbars
EDA_UNITS_T unitsTmp;
if( aCfg->Read( baseCfgName + UserUnitsEntryKeyword, (int*) &unitsTmp ) )
SetUserUnits( unitsTmp );
else
SetUserUnits( MILLIMETRES );
// Read show/hide grid entry
bool btmp;
if( aCfg->Read( baseCfgName + ShowGridEntryKeyword, &btmp ) )
SetGridVisibility( btmp );
// Read grid color:
COLOR4D wtmp = COLOR4D::UNSPECIFIED;
if( wtmp.SetFromWxString( aCfg->Read( baseCfgName + GridColorEntryKeyword, wxT( "NONE" ) ) ) )
SetGridColor( wtmp );
aCfg->Read( baseCfgName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L );
// m_LastGridSizeId is an offset, expected to be >= 0
if( m_LastGridSizeId < 0 )
m_LastGridSizeId = 0;
m_UndoRedoCountMax = aCfg->Read( baseCfgName + MaxUndoItemsEntry,
long( DEFAULT_MAX_UNDO_ITEMS ) );
aCfg->Read( baseCfgName + FirstRunShownKeyword, &m_firstRunDialogSetting, 0L );
m_galDisplayOptions.ReadConfig( *cmnCfg, *aCfg, baseCfgName, this );
}