Exemplo n.º 1
0
void WWidget::childResized(WWidget *child, WFlags<Orientation> directions)
{
    WWidget *p = parent();

    if (p)
        p->childResized(this, directions);
}
Exemplo n.º 2
0
Arquivo: WWidget.C Projeto: DTidd/wt
void WWidget::scheduleRerender(bool laterOnly, WFlags<RepaintFlag> flags)
{
  if (!flags_.test(BIT_NEED_RERENDER)) {
    flags_.set(BIT_NEED_RERENDER);
    WApplication::instance()->session()->renderer().needUpdate(this, laterOnly);
  }

  if ((flags & RepaintSizeAffected) &&
      !flags_.test(BIT_NEED_RERENDER_SIZE_CHANGE)) {
    flags_.set(BIT_NEED_RERENDER_SIZE_CHANGE);

    webWidget()->parentResized(this, Vertical);

    /*
     * A size change to an absolutely positioned widget will not affect
     * a layout computation, except if it's itself in a layout!
     */
    if (positionScheme() == Absolute && !isInLayout())
      return;

    /*
     * Propagate event up, this will be caught by a container widget
     * with a layout manager.
     */
    WWidget *p = parent();

    if (p)
      p->childResized(this, Vertical);
  }
}
Exemplo n.º 3
0
Arquivo: WWidget.C Projeto: DTidd/wt
void WWidget::childResized(WWidget *child, WFlags<Orientation> directions)
{
  /*
   * Stop propagation at an absolutely positioned widget
   */
  if (positionScheme() == Absolute && !isInLayout())
    return;

  WWidget *p = parent();

  if (p)
    p->childResized(this, directions);
}
Exemplo n.º 4
0
void WWidget::askRerender(bool laterOnly)
{
    if (!flags_.test(BIT_NEED_RERENDER)) {
        flags_.set(BIT_NEED_RERENDER);
        WApplication::instance()->session()->renderer().needUpdate(this, laterOnly);

        /*
         * Let's start with assuming that every change is a potential resize
         *
         * Propagate event up, this will be caught by a container widget
         * with a layout manager.
         */
        WWidget *p = parent();

        if (p)
            p->childResized(this, Vertical);
    }
}