本文整理汇总了C++中TextObject::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ TextObject::Get方法的具体用法?C++ TextObject::Get怎么用?C++ TextObject::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextObject
的用法示例。
在下文中一共展示了TextObject::Get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetImage
void Button::SetImage( const TextObject& strName, bool bCenter )
{
if ( strName.Get() == "" )
{
if ( m_Image )
{
delete m_Image;
m_Image= NULL;
}
return;
}
if ( !m_Image )
{
m_Image = new ImagePanel( this );
}
m_Image->SetImage( strName );
m_Image->SizeToContents();
m_Image->SetMargin( Margin( 2, 0, 2, 0 ) );
m_bCenterImage = bCenter;
// Ugh.
Padding padding = GetTextPadding();
padding.left = m_Image->Right() + 2;
SetTextPadding( padding );
}
示例2: SetString
void Text::SetString( const TextObject& str )
{
if ( m_String == str ) return;
m_String = str.Get();
m_bTextChanged = true;
Invalidate();
}
示例3: SetAccelerator
void MenuItem::SetAccelerator( const TextObject& strAccelerator )
{
if ( m_Accelerator )
{
m_Accelerator->DelayedDelete();
m_Accelerator = NULL;
}
#ifndef GWEN_NO_UNICODE
if ( strAccelerator.GetUnicode() == L"" )
return;
#else
if ( strAccelerator.Get() == "" )
return;
#endif
m_Accelerator = new Controls::Label( this );
m_Accelerator->Dock( Pos::Right );
m_Accelerator->SetAlignment( Pos::Right | Pos::CenterV );
m_Accelerator->SetText( strAccelerator );
m_Accelerator->SetMargin( Margin( 0, 0, 16, 0 ) );
// TODO.
}