Exemplo n.º 1
0
void UI::OnWindowClose(tb::TBWindow *window)
{
    if (widgetWrap_.Contains(window))
    {
        UIWidget* widget = widgetWrap_[window];
        VariantMap eventData;
        eventData[WindowClosed::P_WINDOW] = widget;
        widget->SendEvent(E_WINDOWCLOSED, eventData);
    }
}
Exemplo n.º 2
0
void UI::OnWidgetFocusChanged(TBWidget *widget, bool focused)
{
    if (widgetWrap_.Contains(widget))
    {
        VariantMap evData;
        UIWidget* uiWidget = widgetWrap_[widget];
        evData[UIWidgetFocusChanged::P_WIDGET]  = uiWidget;
        evData[UIWidgetFocusChanged::P_FOCUSED]  = focused;
        uiWidget->SendEvent(E_UIWIDGETFOCUSCHANGED, evData);
    }
}