Пример #1
0
bool Settings::set(const std::string &name, const std::string &value)
{
	if (!setEntry(name, &value, false, false))
		return false;

	doCallbacks(name);
	return true;
}
void GtkReadyToRunListener::internalDoCallbacks()
{
   // Unset timeout id by setting it to 0
   m_timerID = 0;
   // Let Nav2API to it's callbacks using the gtk main loop that called
   // this function so that there is only one execution point.
   doCallbacks(); 
}
Пример #3
0
void VrmlScene::replaceWorld( VrmlMFNode &nodes, VrmlNamespace *ns,
			      Doc *url, Doc *urlLocal )
{
  theSystem->debug("replaceWorld( url %s )\n", url->url());

  delete d_namespace;
  delete d_url;
  delete d_urlLocal;

  d_namespace = ns;
  d_url = url;
  d_urlLocal = urlLocal;

  // Clear bindable stacks.
  bindableRemoveAll( d_backgroundStack ); 
  bindableRemoveAll( d_fogStack ); 
  bindableRemoveAll( d_navigationInfoStack ); 
  bindableRemoveAll( d_viewpointStack );

  // Get rid of current world: pending events, nodes.
  flushEvents();
  d_nodes.removeChildren();

  // Do this to set the relative URL
  d_nodes.addToScene( (VrmlScene *) this, urlDoc()->url() );

  // Add the nodes to a Group and put the group in the scene.
  // This will load EXTERNPROTOs and Inlines.
  d_nodes.addChildren( nodes );

  // Send initial set_binds to bindable nodes
  double timeNow = theSystem->time();
  VrmlSFBool flag(true);
  VrmlNode *bindable = 0;	// compiler warning

  if (d_backgrounds->size() > 0 &&
      (bindable = d_backgrounds->front()) != 0)
    bindable->eventIn( timeNow, "set_bind", &flag );

  if (d_fogs->size() > 0 &&
      (bindable = d_fogs->front()) != 0)
    bindable->eventIn( timeNow, "set_bind", &flag );

  if (d_navigationInfos->size() > 0 &&
      (bindable = d_navigationInfos->front()) != 0)
    bindable->eventIn( timeNow, "set_bind", &flag );

  if (d_viewpoints->size() > 0 &&
      (bindable = d_viewpoints->front()) != 0)
    bindable->eventIn( timeNow, "set_bind", &flag );

  // Notify anyone interested that the world has changed
  doCallbacks( REPLACE_WORLD );

  setModified();
}
Пример #4
0
void VrmlScene::destroyWorld()
{
  doCallbacks( DESTROY_WORLD );
}