ScrollableTextArea::ScrollableTextArea() {

  scrollBarDisappearTime = 300;

  scrollContainer.isScaleable(false);
  scrollContainer.isRotateable(false);
  scrollContainer.setDragDamping(0.1);
  scrollContainer.setDragThreshold(0.0);
  addChild(&scrollContainer);

  scrollBar.setColor(ofColor::grey);
  scrollBar.setSize(2, 10);
  addChild(&scrollBar);

  setMaskType(MASK_TYPE_CLIPPLANES);
  setMaskObject(&_mask);

  tf.setColor(ofColor::black);

  scrollContainer.addChild(&tf);
  scrollContainer.addPositioner("scrollStop", &scrollRestrictor);

  scrollBar.isVisible(false);
  needsScrolling = false;

  ofAddListener(scrollContainer.lastTouchUpEvent, this, &ScrollableTextArea::onScrollStop);
  ofAddListener(scrollContainer.dragStartEvent, this, &ScrollableTextArea::onScrollStart);
}
Пример #2
0
MaskPolygon &MaskPolygon::operator=(const MaskPolygon otherPoly)
{
    if (this == &otherPoly)
        return *this;
    setMaskType(otherPoly.getMaskType());
    setMaskPolygon(otherPoly.getMaskPolygon());
    setImgNr(otherPoly.getImgNr());
    setInverted(otherPoly.isInverted());
    return *this;
};
Пример #3
0
void ossimMaskFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
   if( property.valid() )
   {
      if(property->getName() == MASK_FILTER_MASK_TYPE_KW)
      {
         setMaskType(property->valueToString());
      }
      else
      {
         ossimImageCombiner::setProperty(property);
      }
   }
}
Пример #4
0
bool ossimMaskFilter::loadState(const ossimKeywordlist& kwl,
                                const char* prefix)
{
   bool result = ossimImageCombiner::loadState(kwl, prefix);
   
   theInputListIsFixedFlag  = true;
   theOutputListIsFixedFlag = false;
   setNumberOfInputs(2);

   const char* lookup = kwl.find(prefix, MASK_FILTER_MASK_TYPE_KW);
   if (lookup)
   {
      setMaskType(ossimString(lookup));
   }

   return result;
}