Пример #1
0
void StatusBarManager::setText(const std::string& name, const std::string& text, bool immediateUpdate)
{
	// Look up the key
	ElementMap::const_iterator found = _elements.find(name);

	// return NULL if not found
	if (found != _elements.end() && found->second->label != NULL)
	{
        if (found->second->text != text)
        {
            // Set the text
            found->second->text = text;

            // Do the rest of the work in the idle callback
            requestIdleCallback();

            if (immediateUpdate)
            {
                flushIdleCallback();
            }
        }
	}
	else
	{
		rError() << "Could not find text status bar element with the name "
			<< name << std::endl;
	}
}
const selection::WorkZone& RadiantSelectionSystem::getWorkZone()
{
    // Flush any pending idle callbacks, we need the workzone now
    flushIdleCallback();

    return _workZone;
}
Пример #3
0
void StatusBarManager::onRadiantShutdown()
{
    flushIdleCallback();

    _tempParent->Destroy();
    _tempParent = NULL;
}