Exemplo n.º 1
0
//-----------------------------------------------------------------------------
CMenuItem* COptionMenu::addEntry (UTF8StringPtr title, int32_t index, int32_t itemFlags)
{
	if (UTF8StringView (title) == "-")
		return addSeparator (index);
	CMenuItem* item = new CMenuItem (title, 0, 0, 0, itemFlags);
	return addEntry (item, index);
}
Exemplo n.º 2
0
//-----------------------------------------------------------------------------
UTF8StringBuffer newWithString (UTF8StringPtr string)
{
	if (string == 0)
		return 0;
	UTF8StringBuffer buffer = (UTF8StringBuffer)std::malloc (UTF8StringView (string).calculateByteCount ());
	std::strcpy (buffer, string);
	return buffer;
}
Exemplo n.º 3
0
//------------------------------------------------------------------------
void CTextLabel::setText (UTF8StringPtr txt)
{
	if (txt && UTF8StringView (txt) == text)
		return;
	text = txt;
	if (textTruncateMode != kTruncateNone)
		calculateTruncatedText ();
	setDirty (true);
}
Exemplo n.º 4
0
Arquivo: cfont.cpp Projeto: EQ4/vstgui
//-----------------------------------------------------------------------------
void CFontDesc::setName (UTF8StringPtr newName)
{
	if (name && newName && UTF8StringView (name) == newName)
		return;

	String::free (name);
	name = String::newWithString (newName);
	freePlatformFont ();
}
Exemplo n.º 5
0
//----------------------------------------------------------------------------------------------------
bool UIFocusSettingsController::stringToValue (UTF8StringPtr txt, float& result, CTextEdit::StringToValueUserData* userData)
{
	if (txt)
	{
		float value = UTF8StringView (txt).toFloat ();
		result = value;
		return true;
	}
	return false;
}
Exemplo n.º 6
0
Arquivo: cfont.cpp Projeto: EQ4/vstgui
//-----------------------------------------------------------------------------
bool CFontDesc::operator == (const CFontDesc& f) const
{
	if (UTF8StringView (name) == f.getName ())
		return false;
	if (size != f.getSize ())
		return false;
	if (style != f.getStyle ())
		return false;
	return true;
}
Exemplo n.º 7
0
//------------------------------------------------------------------------
bool CCommandMenuItem::isCommandName (IdStringPtr name) const
{
	return UTF8StringView (commandName) == name;
}
Exemplo n.º 8
0
//------------------------------------------------------------------------
bool CCommandMenuItem::isCommandCategory (IdStringPtr category) const
{
	return UTF8StringView (commandCategory) == category;
}