Exemple #1
0
bool InternalWindow::takeFocus(bool Temporary)
{

    if(getFocused() &&
       getParentDrawingSurface() != NULL &&
       getParentDrawingSurface()->getFocusedWindow() == this)
    {
        return true;
    }
    setFocused(true);
    if(Temporary || getParentDrawingSurface() == NULL)
    {
        FocusEventDetailsUnrecPtr Details(FocusEventDetails::create(this,getSystemTime(),Temporary, NULL));

        focusGained(Details);
    }
    else
    {
        if(getParentDrawingSurface()->getFocusedWindow() != NULL)
        {
            getParentDrawingSurface()->getFocusedWindow()->giveFocus(this);
        }
        getParentDrawingSurface()->setFocusedWindow(this);
        FocusEventDetailsUnrecPtr Details(FocusEventDetails::create(this,getSystemTime(),Temporary, getParentDrawingSurface()->getFocusedWindow()));
        focusGained(Details);
    }
    return true;
}
Exemple #2
0
bool InternalWindow::giveFocus(Component* const NewFocusedComponent, bool Temporary)
{
    if(this == NewFocusedComponent)
    {
        return true;
    }
    else
    {
        setFocused(false);
        FocusEventDetailsUnrecPtr Details(FocusEventDetails::create(this,getSystemTime(),Temporary, NewFocusedComponent));
        focusLost(Details);
        return true;
    }
}
Exemple #3
0
shared_ptr<IBackgroundJob::Details> PortalsOptimizerJob::getDetails() const
{
	String jobName(Engine::instance()->getText("job.optimizer"));

	shared_ptr<Portal> portal = getPortal();
	if(portal != nullptr)
	{
		jobName.append(" - ");
		jobName.append(portal->getPovName());
	}

	shared_ptr<Details> details(OS_NEW Details(jobName.to_wide()));

	return details;
}
Exemple #4
0
void DefaultBoundedRangeModel::changed(ConstFieldMaskArg whichField,
                                       UInt32            origin,
                                       BitVector         details)
{
    Inherited::changed(whichField, origin, details);

    if((whichField & InternalValueFieldMask) ||
            (whichField & InternalValueIsAdjustingFieldMask) ||
            (whichField & InternalMaximumFieldMask) ||
            (whichField & InternalMinimumFieldMask) ||
            (whichField & InternalExtentFieldMask))
    {
        ChangeEventDetailsUnrecPtr Details(ChangeEventDetails::create(NULL, getSystemTime()));
        produceStateChanged(Details);
    }
}
void DocumentWatcher::addWatch(Document* document)
{
	if (m_documents.contains(document)) {
		return;
	}

	// Store document details
	QString path = document->filename();
	if (!path.isEmpty()) {
		m_documents.insert(document, QFileInfo(path));
		const Details& details = m_documents[document];

		// Add path
		m_paths.insert(details.path, document);
		m_watcher->addPath(details.path);
	} else {
		m_documents.insert(document, Details());
	}
}
void DefaultBoundedRangeModel::changed(ConstFieldMaskArg whichField, 
                            UInt32            origin,
                            BitVector         details)
{
    Inherited::changed(whichField, origin, details);

    //Do not respond to changes that have a Sync origin
    if(origin & ChangedOrigin::Sync)
    {
        return;
    }

    if((whichField & InternalValueFieldMask) ||
       (whichField & InternalValueIsAdjustingFieldMask) ||
       (whichField & InternalMaximumFieldMask) ||
       (whichField & InternalMinimumFieldMask) ||
       (whichField & InternalExtentFieldMask))
    {
        ChangeEventDetailsUnrecPtr Details(ChangeEventDetails::create(this, getSystemTime()));
        produceStateChanged(Details);
    }
}
Exemple #7
0
void CGalacticMapSession::Select (CTopologyNode *pNode)

//  Select
//
//  Selects the given node

    {
    //  If this node is already selected, skip

    if (pNode == m_pPainter->GetSelection())
        return;

    //  Select

	g_pUniverse->PlaySound(NULL, g_pUniverse->FindSound(UNID_DEFAULT_SELECT));
    m_pPainter->SetSelection(pNode);

    //  We always stop the performance, if there is one

    StopPerformance(ID_DETAILS);

    //  If we have a valid node, then show data for it.

    if (pNode)
        {
        RECT rcPane = m_rcView;
        rcPane.right = m_rcView.right - SCREEN_BORDER_X;
        rcPane.left = rcPane.right - DETAIL_PANE_WIDTH;
        rcPane.top = m_rcView.top + (RectHeight(m_rcView) - DETAIL_PANE_HEIGHT) / 2;
        rcPane.bottom = rcPane.top + DETAIL_PANE_HEIGHT;

        CGalacticMapSystemDetails Details(m_HI.GetVisuals(), GetReanimator(), rcPane);

        IAnimatron *pAni;
        Details.CreateDetailsPane(pNode, &pAni);

    	StartPerformance(pAni, ID_DETAILS, CReanimator::SPR_FLAG_DELETE_WHEN_DONE);
        }
    }
Exemple #8
0
shared_ptr<IBackgroundJob::Details> PortalsImporterJob::getDetails() const
{
    String jobName(Engine::instance()->getText("job.importer"));

    shared_ptr<Portal> portal = m_impl->getPortal();
    if(portal != nullptr)
    {
        jobName.append(" - ");
        jobName.append(portal->getName());
    }

    shared_ptr<Details> details(OS_NEW Details(jobName.to_wide()));

    String status = Engine::instance()->getText(_S("job.importer.status.") + m_impl->getStatus());
    details->setStatus(status.to_wide());

    shared_ptr<PortalsSerializer> serializer = m_impl->getSerializer();
    if(serializer != nullptr)
        details->setPercentage(serializer->getProgressPercentage());

    shared_ptr<PortalsSerializer::IResult> result = m_impl->getResult();
    if(portal != nullptr && result != nullptr)
    {
        // TOTRANSLATE
        String msg = _S("[center][a class=\"os_button\" href=\"{@url}\"]Enter in portal[/a][br/][sub]Objects: [b]{@total}[/b], Imported: [b]{@imported}[/b], Skipped: [b]{@skipped}[/b], Invalid: [b]{@invalid}[/b][/sub][/center]");

        msg.replace_all(_S("{@url}"), portal->getLink("view"));
        msg.replace_all(_S("{@total}"), conversions::to_utf16(result->getTotalObjects()));
        msg.replace_all(_S("{@imported}"), conversions::to_utf16(result->getImportedObjects()));
        msg.replace_all(_S("{@skipped}"), conversions::to_utf16(result->getSkippedObjects()));
        msg.replace_all(_S("{@invalid}"), conversions::to_utf16(result->getCorruptedObjects()));

        details->setResult(msg);
    }

    return details;
}
Exemple #9
0
shared_ptr<IBackgroundJob::Details> PortalsExporterJob::getDetails() const
{
	String jobName(Engine::instance()->getText("job.exporter"));

	shared_ptr<Portal> portal = getPortal();
	if(portal != nullptr)
	{
		jobName.append(" - ");
		jobName.append(portal->getName());
	}

	shared_ptr<Details> details(OS_NEW Details(jobName.to_wide()));
	details->setPercentage(m_serializer->getProgressPercentage());
	if(m_file != nullptr && m_downloadDirectory != nullptr)
	{
		// TOTRANSLATE
		String msg = _S("[center][a class=\"os_button\" href=\"{@url}\"]Click here for download[/a][/center]");
		msg.replace_all(_S("{@url}"), m_downloadDirectory->getPath().getUrl());
		details->setResult(msg);
		//details->setUrl(m_downloadDirectory->getPath().getUrl().to_ascii());
	}

	return details;
}
Exemple #10
0
void BaseObj::UpdateDetails()
{
   free(_details);
   _details = NULL;
   (void) Details();
}
void TextField::produceActionPerformed(void)
{
    ActionEventDetailsUnrecPtr Details(ActionEventDetails::create(this, getTimeStamp()));

    Inherited::produceActionPerformed(Details);
}
void Component::produceToolTipDeactivated(void)
{
    ComponentEventDetailsUnrecPtr Details(ComponentEventDetails::create(this,getSystemTime()));

    Inherited::produceToolTipDeactivated(Details);
}
void Component::produceComponentHidden(void)
{
    ComponentEventDetailsUnrecPtr Details(ComponentEventDetails::create(this,getSystemTime()));

    Inherited::produceComponentHidden(Details);
}