Пример #1
0
void Toolbar::addTool(ComponentRefPtr TheTool)
{
    if(TheTool->getType() == Separator::getClassType())
    {
        addSeparator(dynamic_pointer_cast<Separator>(TheTool));
    }

    pushToChildren(TheTool);
}
ComponentRefPtr ComboBoxComponentGenerator::getComponent(ComponentRefPtr Parent, const boost::any& Value, Int32 PrimaryAxisIndex, Int32 SecondaryAxisIndex, bool IsSelected, bool HasFocus)
{
    if(Parent->getType().isDerivedFrom(ComboBox::getClassType()))
    {
        return getComboBoxComponent(dynamic_pointer_cast<ComboBox>(Parent), Value, PrimaryAxisIndex, IsSelected, HasFocus);
    }
    else
    {
        return getComboBoxComponent(NULL, Value, PrimaryAxisIndex, IsSelected, HasFocus);
    }
}
Пример #3
0
void Component::setToolTipText(const std::string& ToolTipText)
{
    ComponentRefPtr TheToolTip = createDefaultToolTip();
    if(TheToolTip != NULL &&
       TheToolTip->getType().isDerivedFrom(TextComponent::getClassType()))
    {
        dynamic_pointer_cast<TextComponent>(TheToolTip)->setText(ToolTipText);
    }

    setToolTip(TheToolTip);
}