Пример #1
0
WOGRectangle* OGSceneConfig::CreateRectanle(const QDomElement &element)
{
    WOGRectangle*  obj = new WOGRectangle;
    obj->position = StringToPoint(element.attribute("x")
                                  , element.attribute("y"));

    obj->size = StringToSize(element.attribute("width")
                             , element.attribute("height"));

    obj->rotation = element.attribute("rotation").toDouble();

    CreatePObject(obj, element);

    return obj;
}
Пример #2
0
	void Label::init(xml::node& node)
	{
		base_window::init(node);

		xml::node setting = node("Font");
		if(!setting.empty())
		{
			m_font = m_system.getWindowManager().loadFont(setting.first_child().value());
			m_shadow_enabled = setting["shadow"].as_bool();
			m_shadow_scale = StringToSize(setting["shadow_scale"].value());
			m_shadow_offset = StringToPoint(setting["shadow_offset"].value());
		}

		setting = node("Formatting");
		if(!setting.empty())
		{
			m_format = StringToFormatType(setting.first_child().value());
		}

		setting = node("Spacing");
		if(!setting.empty())
		{
			m_spacing = (float)atof(setting.first_child().value());
			if(m_font)
				m_font->setSpacing(m_spacing);
		}

		setting = node("Centred");
		if(!setting.empty())
		{
			m_centred = StringToBool(setting.first_child().value());
		}

		setting = node("Text");
		if(!setting.empty())
		{
			m_text = setting.first_child().value();
		}
	}
Пример #3
0
wxSize Ini::Load(wxString key, const wxSize def_value)
{
	return StringToSize(m_Config->Read(key, SizeToString(def_value)));
}
void CXTPPropertyGridItemSize::SetValue(CString strValue)
{
	SetSize(StringToSize(strValue));
}
Пример #5
0
void base_window::init(xml::node& node)
{
	xml::node setting = node("Visible");
	if(!setting.empty())
	{
		m_visible = StringToBool(setting.first_child().value());
	}
	
	setting = node("Align");
	if(!setting.empty())
	{
		m_alignment = StringToAlignment(setting.first_child().value());
	}
	setting = node("Stick");
	if(!setting.empty())
	{
		m_stick = StringToAlignment(setting.first_child().value());
	}
	setting = node("StickRect");
	if(!setting.empty())
	{
		m_stickRect = StringToRect(setting.first_child().value());
	}
	setting = node("Area");
	if(!setting.empty())
	{
		m_area = StringToArea(setting.first_child().value());
	}
	setting = node("Backcolor");
	if(!setting.empty())
	{
		m_backColor = StringToColor(setting.first_child().value());
	}
	setting = node("Forecolor");
	if(!setting.empty())
	{
		m_foreColor = StringToColor(setting.first_child().value());
	}
	setting = node("TabStop");
	if(!setting.empty())
	{
		m_tabstop = StringToBool(setting.first_child().value());
	}
	setting = node("Draggable");
	if(!setting.empty())
	{
		m_draggable = StringToBool(setting.first_child().value());
	}
	setting = node("AcceptDrop");
	if(!setting.empty())
	{
		m_acceptDrop = StringToBool(setting.first_child().value());
	}
	setting = node("AlwaysOnTop");
	if(!setting.empty())
	{
		m_alwaysOnTop = StringToBool(setting.first_child().value());
	}
	setting = node("Tooltip");
	if(!setting.empty())
	{
		m_tooltip = StringToBool(setting.first_child().value());
	}
	setting = node("Size");
	if(!setting.empty())
	{
		setSize(StringToSize(setting.first_child().value()));
	}
	setting = node("Pos");
	if(!setting.empty())
	{
		setPosition(StringToPoint(setting.first_child().value()));
	}
	setting = node("IgnoreInputEvents");
	if(!setting.empty())
	{
		setIgnoreInputEvents(StringToBool(setting.first_child().value()));
	}

	setting = node("DisableRise");
	if (!setting.empty())
	{
		setDisableRise(StringToBool(setting.first_child().value()));
	}

	onMoved();
}
Пример #6
0
std::pair<int, int> Ini::Load(const std::string& section, const std::string& key, const std::pair<int, int> def_value)
{
	return StringToSize(m_Config->GetValue(section.c_str(), key.c_str(), SizeToString(def_value).c_str()));
	saveIniFile();
}
Пример #7
0
std::pair<int, int> Ini::Load(const std::string& section, const std::string& key, const std::pair<int, int> def_value)
{
	return StringToSize(static_cast<CSimpleIniCaseA*>(m_config)->GetValue(section.c_str(), key.c_str(), SizeToString(def_value).c_str()));
}