示例#1
0
//This is called everytime a window that has a button closes
void pawsControlWindow::WindowClose(pawsWidget* wnd)
{
    pawsButton* btn = FindButtonFromWindow(wnd->GetName());
    Icon* icon = GetIcon(btn->GetName());
    icon->IsActive = false;
    btn->SetBackground(icon->orgRes.GetData());
}
示例#2
0
// When a new window registers make a new entry for them in our list.
void pawsControlWindow::Register( pawsControlledWindow* window )
{
    Icon * icon = new Icon;
    icon->window = window;
    icon->theirButton = FindButtonFromWindow( window->GetName() );
    icon->orgRes = icon->theirButton->GetBackground();
    icon->IsActive = false;
    icon->IsOver = false;

    buttons.Push( icon );
}
示例#3
0
//This is called everytime a window that has a button opens
void pawsControlWindow::WindowOpen(pawsWidget* wnd)
{
    pawsButton* btn = FindButtonFromWindow(wnd->GetName());
    Icon* icon = GetIcon(btn->GetName());

    icon->IsActive = true;

    csString bg(icon->orgRes);
    bg += "_active";

    btn->SetBackground(bg.GetData());
}
// When a new window registers make a new entry for them in our list.
void pawsControlWindow::Register( pawsControlledWindow* window )
{
    Icon * icon = new Icon;
    icon->window = window;
    icon->theirButton = FindButtonFromWindow( window->GetName() );
    if( icon->theirButton==NULL )
    {
        Error2("pawsControlWindow::Register couldn't find window %s!", window->GetName() );
        return;
    }
    icon->orgRes = icon->theirButton->GetBackground();
    icon->IsActive = false;
    icon->IsOver = false;

    buttons.Push( icon );
}