예제 #1
0
파일: MSLayout.C 프로젝트: PlanetAPL/a-plus
void MSLayout::computeSize(void)
{
  drawBackground();
  placement();
  positionLabel();
  drawShadow();  
}
예제 #2
0
void ofxDatGuiComponent::setLabel(string label)
{
    if (mLabel.forceUpperCase) label = ofToUpper(label);
    mLabel.text = label;
    mLabel.rect = mFont->rect(mLabel.text);
    positionLabel();
}
예제 #3
0
파일: MSLayout.C 프로젝트: PlanetAPL/a-plus
void MSLayout::updateTitle(void)
{
  undrawShadow();
  label()->freeze();
  label()->foreground(titleForeground());
  int h=label()->height();
  int w=label()->width();

  label()->font(titleFont());
  MSBoolean doPlacement=MSFalse;
  label()->label(title());
  int ml=label()->columns();
  if (ml==0&&label()->mapped()==MSTrue)
   {
     label()->unmap();
     doPlacement=MSTrue;
   }
  else if (ml>0&&label()->mapped()==MSFalse)
   {
     label()->map();
     doPlacement=MSTrue;
   }
  positionLabel();
  label()->unfreeze();
  if (label()->height()!=h||label()->width()!=w||doPlacement==MSTrue) adjustSize();
  else if (label()->mapped()==MSTrue) label()->redraw();
  drawShadow();
}
예제 #4
0
void ofxDatGuiComponent::setWidth(int width, float labelWidth)
{
    mStyle.width = width;
    if (labelWidth > 1){
// we received a pixel value //
        mLabel.width = labelWidth;
    }   else{
// we received a percentage //
        mLabel.width = mStyle.width * labelWidth;
    }
    mIcon.x = mStyle.width - (mStyle.width * .05) - 20;
    mLabel.rightAlignedXpos = mLabel.width - mLabel.margin;
    for (int i=0; i<children.size(); i++) children[i]->setWidth(width, labelWidth);
    positionLabel();
}
예제 #5
0
void ofxDatGuiComponent::setLabelAlignment(ofxDatGuiAlignment align)
{
    mLabel.alignment = align;
    for (int i=0; i<children.size(); i++) children[i]->setLabelAlignment(align);
    positionLabel();
}
예제 #6
0
void KRenameListView::resizeEvent(QResizeEvent* e)
{
    QListView::resizeEvent( e );
    positionLabel();
}
예제 #7
0
파일: MSLayout.C 프로젝트: PlanetAPL/a-plus
void MSLayout::configure(void)
{
  if (label()!=0) positionLabel();
}