void CSchemeVisualizer::AddFontsToList()
{
#ifdef POSIX
	const char strOAccent[] = { 0xc3, 0x93, 0x00 };	// UTF-8 for U+00D3 (LATIN CAPITAL LETTER O WITH ACUTE)
#else
	const uint8 strOAccent[] = { 0xd3, 0x00	};
#endif
	// Stick an intl character in here to test accents (O')
	CFmtStr fmtText( "ABCDEFGHIJKLMN%sPQRSTUVWXYZabcdefhijklmnopqrstuvwxyz0123456789!@#$%%^&*()-_=+", strOAccent );

	const int nFontCount = m_pViewScheme->GetFontCount();

	for ( int i = 0; i < nFontCount; ++i )
	{
		HFont hCurFont = m_pViewScheme->GetFontAtIndex( i );
		const char *pCurFontName = m_pViewScheme->GetFontName( hCurFont );
		CFmtStr fmtName( "FontPanel_%s", pCurFontName );

		Label *pNewFontLabel = new Label( m_pList, fmtName.Access(), fmtText.Access() );
		pNewFontLabel->SetFont( hCurFont );
		pNewFontLabel->SizeToContents();
		pNewFontLabel->SetWide( m_pList->GetWide() );
		m_pList->AddItem( new Label( NULL, "Label", pCurFontName ), pNewFontLabel );
	}
}
Exemple #2
0
void Base::SetToolTip( const UnicodeString& strText )
{
	Label* tooltip = new Label( this );
	tooltip->SetText( strText );
	tooltip->SizeToContents();

	SetToolTip( tooltip );
}
Exemple #3
0
void Base::SetToolTip( const TextObject & strText )
{
	Label* tooltip = new Label( this );
	tooltip->SetText( strText );
	tooltip->SetTextColorOverride( GetSkin()->Colors.TooltipText );
	tooltip->SetPadding( Padding( 5, 3, 5, 3 ) );
	tooltip->SizeToContents();
	SetToolTip( tooltip );
}