コード例 #1
0
ファイル: WAbstractMedia.C プロジェクト: DTidd/wt
WAbstractMedia::Source::Source(WAbstractMedia *parent,
			       const WLink& link, const std::string &type,
			       const std::string &media)
  :  parent(parent),
     type(type),
     media(media),
     link(link)
{
  if (link.type() == WLink::Resource)
    connection = link.resource()->dataChanged().connect
      (this, &Source::resourceChanged);
}
コード例 #2
0
ファイル: WAbstractMedia.C プロジェクト: kdeforche/wt
WAbstractMedia::Source::Source(WAbstractMedia *parent,
			       const WLink& link, const std::string &type,
			       const std::string &media)
  :  parent(parent),
     type(type),
     media(media),
     link(link)
{
  if (link.type() == LinkType::Resource) {
    /*
    connection = link.resource()->dataChanged().connect
      ([=]() { this->resourceChanged(); });
    */
#ifdef WT_TARGET_JAVA
    connection = link.resource()->dataChanged().connect
      (this, std::bind(&Source::resourceChanged, this));
#else // !WT_TARGET_JAVA
    connection = link.resource()->dataChanged().connect
      (std::bind(&Source::resourceChanged, this));
#endif // WT_TARGET_JAVA
  }
}
コード例 #3
0
ファイル: WPushButton.C プロジェクト: Spencerx/wt
void WPushButton::setLink(const WLink& link)
{
  if (link == link_)
    return;

  link_ = link;
  flags_.set(BIT_LINK_CHANGED);

  if (link.type() == WLink::Resource)
    link.resource()->dataChanged().connect(this, &WPushButton::resourceChanged);

  repaint(RepaintPropertyIEMobile);
}
コード例 #4
0
ファイル: WImage.C プロジェクト: NeilNienaber/wt
void WImage::setImageLink(const WLink& link)
{
  if (link.type() != WLink::Resource && canOptimizeUpdates()
      && (link == imageLink_))
    return;

  imageLink_ = link;

  if (link.type() == WLink::Resource)
    link.resource()->dataChanged().connect(this, &WImage::resourceChanged);

  flags_.set(BIT_IMAGE_LINK_CHANGED);

  repaint(RepaintPropertyIEMobile);
}
コード例 #5
0
ファイル: WCssDecorationStyle.C プロジェクト: 913862627/wt
void WCssDecorationStyle::setBackgroundImage(const WLink& image,
					     Repeat repeat,
					     WFlags<Side> sides)
{
  if (image.type() == WLink::Resource)
    image.resource()->dataChanged().
      connect(this, &WCssDecorationStyle::backgroundImageResourceChanged);

  if (!WWebWidget::canOptimizeUpdates()
      || backgroundImage_ != image
      || backgroundImageRepeat_ != repeat
      || backgroundImageLocation_ != sides) {
    backgroundImage_ = image;
    backgroundImageRepeat_ = repeat;
    backgroundImageLocation_ = sides;
    backgroundImageChanged_ = true;

    changed();
  }
}