Exemplo n.º 1
0
// Set the specifed tab index's title element.
void ElementTabSet::SetTab(int tab_index, Core::Element* element)
{
	Core::Element* tabs = GetChildByTag("tabs");
	if (tab_index >= 0 &&
		tab_index < tabs->GetNumChildren())
		tabs->ReplaceChild(GetChild(tab_index), element);
	else
		tabs->AppendChild(element);
}
Exemplo n.º 2
0
// Set the specified tab index's body element.
void ElementTabSet::SetPanel(int tab_index, Core::Element* element)
{
	// Append the window
	Core::Element* windows = GetChildByTag("panels");
	if (tab_index >= 0 &&
		tab_index < windows->GetNumChildren())
		windows->ReplaceChild(GetChild(tab_index), element);
	else
		windows->AppendChild(element);
}