Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Sep 2000 07:00:34 -0500 (CDT)
From:      Alexander Langer <alex@usw4.freebsd.org>
To:        libh@FreeBSD.org
Subject:   cvs commit: libh/lib/hui Hui.cd.cc Hui.hh HuiQt.cc HuiQt.hh
Message-ID:  <200009231200.HAA26225@usw4.freebsd.org>

next in thread | raw e-mail | index | archive | help
alex        2000/09/23 07:00:34 CDT

  Modified files:
    lib/hui              Hui.cd.cc Hui.hh HuiQt.cc HuiQt.hh 
  Log:
  The second commit to libhui, that gives the first set of functionality
  to the new ContainerWidget:  Moving it and its childs - childs relative
  to the parent.
  
  * Fix constructor for Hui::Position: If called with args, also save these
    values.  I probably broke this when fixing the original version of libh.
  
  * ContainerWidget can now create a button and be the parent of that button.
  
  * ContainerWidget / GroupWidget are both derived from Hui::Widget.  This
    way we can use Pointer<Hui::Widget> to point to both and cast this
    pointer to a Container/GroupWidget to do further things.  See below.
  
  * Every widget (including ContainerWidgets) saves its parent now.
    It is a pointer to Hui::Widget.  Introduce functions to set/get the
    parent.
  
  * If a widget is moved, it checks, if the parent is a Containerwidget
    (using casts). If so, it moves relative to the parent's position.
    If not, behave as before (qwidget()->move()).
  
  * Widget's now save their position in a seperate variable and do not
    call translate(qwidget()->position()) to get their position.
  
  * ContainerWidget::move() moves all childs again to their old position.
    (child->move(child->position()).
    Since Widget::move does this relative to the parent, the child's
    position is adjusted correctly.
  
  * Introduce ContainerWidget::translate() to do some Hui::Position and Qt
    QPoint translations (as HuiQt::Widget can do, too).
  
  * Introduce ContainerWidget::qwidget(), which simply points to the parent's
    qwidget.  Needed for translate().
  
  * Introduce ContainerWidget::real_position(), which gets the REAL position
    (i.e. on the QWidget) of the Widget.  Usually, this would be archived
    by a call to qwidget()->position(), but since ContainerWidget doesn't
    have a widget, we must do it this way.
    While writing this, I wonder if I can't do it in another way (using
    the QPoint position() function which exists anyways).  I'll probably
    change this.  But since this is widget-internal, it doesn't matter.
  
  Revision  Changes    Path
  1.7       +23 -1     libh/lib/hui/Hui.cd.cc
  1.6       +37 -33    libh/lib/hui/Hui.hh
  1.7       +94 -27    libh/lib/hui/HuiQt.cc
  1.7       +95 -48    libh/lib/hui/HuiQt.hh



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-libh" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009231200.HAA26225>