void PieChartDisplay::onInitialize()
 {
   static int count = 0;
   rviz::UniformStringStream ss;
   ss << "PieChartDisplayObject" << count++;
   overlay_.reset(new OverlayObject(ss.str()));
   onEnable();
   updateSize();
   updateLeft();
   updateTop();
   updateFGColor();
   updateBGColor();
   updateFGAlpha();
   updateFGAlpha2();
   updateBGAlpha();
   updateMinValue();
   updateMaxValue();
   updateTextColor();
   updateTextAlpha();
   updateTextSize();
   updateShowCaption();
   updateAutoColorChange();
   updateMaxColor();
   overlay_->updateTextureSize(texture_size_, texture_size_ + caption_offset_);
   overlay_->hide();
 }
 void Plotter2DDisplay::onInitialize()
 {
   static int count = 0;
   rviz::UniformStringStream ss;
   ss << "Plotter2DDisplayObject" << count++;
   overlay_.reset(new OverlayObject(ss.str()));
   updateBufferSize();
   onEnable();
   updateShowValue();
   updateWidth();
   updateHeight();
   updateLeft();
   updateTop();
   updateFGColor();
   updateBGColor();
   updateFGAlpha();
   updateBGAlpha();
   updateLineWidth();
   updateUpdateInterval();
   updateShowBorder();
   updateAutoColorChange();
   updateMaxColor();
   updateShowCaption();
   updateTextSize();
   updateAutoScale();
   updateMinValue();
   updateMaxValue();
   overlay_->updateTextureSize(width_property_->getInt(),
                               height_property_->getInt() + caption_offset_);
 }
Beispiel #3
0
void OculusDisplay::reset()
{
  rviz::Display::reset();
  if ( oculus_ )
  {
    onDisable();
    onEnable();
  }
}
void GameObject::enable()
{
	if (!isEnable)
	{
		onAwake();
		onEnable();
	}
	isEnable = true;
	isAwake = true;
}
void InteractiveMarkerDisplay::onInitialize()
{
  tf::Transformer* tf = context_->getFrameManager()->getTFClient();
  im_client_.reset( new interactive_markers::InteractiveMarkerClient( *tf, fixed_frame_.toStdString() ) );

  im_client_->setInitCb( boost::bind( &InteractiveMarkerDisplay::initCb, this, _1 ) );
  im_client_->setUpdateCb( boost::bind( &InteractiveMarkerDisplay::updateCb, this, _1 ) );
  im_client_->setResetCb( boost::bind( &InteractiveMarkerDisplay::resetCb, this, _1 ) );
  im_client_->setStatusCb( boost::bind( &InteractiveMarkerDisplay::statusCb, this, _1, _2, _3 ) );

  client_id_ = ros::this_node::getName() + "/" + getNameStd();

  onEnable();
}
Beispiel #6
0
void Node::enable() {
    if(mParent == nullptr || mParent->isEnabled()) {
        mIsEnabled = true;
        
        for(auto iter = mChildren.begin(); iter != mChildren.end(); ++iter) {
            iter->second->enable();
        }

        for(auto iter = mComponents.begin(); iter != mComponents.end(); ++iter) {
            iter->second->enable();
        }

        onEnable();
    }
}
Beispiel #7
0
void Display::enable( bool force )
{
  if ( enabled_ && !force )
  {
    return;
  }

  enabled_ = true;

  if (StatusPropertyPtr status = status_property_.lock())
  {
    status->enable();
  }

  onEnable();

  state_changed_(this);
}
Beispiel #8
0
// only the first time
void OverlayTextDisplay::onInitialize()
{
    onEnable();
    updateTopic();
    updateOvertakePositionProperties();
    updateOvertakeColorProperties();
    updateTop();
    updateLeft();
    updateWidth();
    updateHeight();
    updateTextSize();
    updateFGColor();
    updateFGAlpha();
    updateBGColor();
    updateBGAlpha();
    updateFont();
    updateLineWidth();
    require_update_texture_ = true;
}
void
SoXipMenuItemBase::fieldChanged( SoField* whichField )
{
    if( whichField == &focused )
    {
		onFocus();       
    }
    else if( whichField == &enabled )
    {
		onEnable();
    }
	else if( whichField == &caption )
    {
		updateCaption();
    }
	else if( whichField == &icon )
    {
		updateIcon();
    }
}
Beispiel #10
0
void Widget::setEnabled(bool state)
{
  if (state) {
    if (this->flags & JI_DISABLED) {
      this->flags &= ~JI_DISABLED;
      invalidate();

      onEnable();
    }
  }
  else {
    if (!(this->flags & JI_DISABLED)) {
      getManager()->freeWidget(this); // Free from the manager

      this->flags |= JI_DISABLED;
      invalidate();

      onDisable();
    }
  }
}
Beispiel #11
0
void Frame::enable()
{
	enabled = true;
	enableEvents();
	onEnable();
}