changeset 1348:35218da92a18

remove multiple views capability from dw It was complicated, we don't use it, and we currently had no plans to use it.
author corvid <corvid@lavabit.com>
date Thu, 15 Oct 2009 19:31:06 +0000
parents 4704ad910042
children bc5bde163fff 0fb1bd0e94a9
files dw/fltkplatform.cc dw/fltkplatform.hh dw/fltkui.cc dw/fltkui.hh dw/layout.cc dw/layout.hh
diffstat 6 files changed, 105 insertions(+), 280 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkplatform.cc	Thu Oct 15 20:12:37 2009 +0200
+++ b/dw/fltkplatform.cc	Thu Oct 15 19:31:06 2009 +0000
@@ -18,7 +18,7 @@
  */
 
 
-
+#include "../lout/msg.h"
 #include "fltkcore.hh"
 
 #include <fltk/draw.h>
@@ -297,7 +297,7 @@
    idleFuncRunning = false;
    idleFuncId = 0;
 
-   views = new container::typed::List <FltkView> (false);
+   view = NULL;
    resources = new container::typed::List <ui::FltkResource> (false);
 
    resourceFactory.setPlatform (this);
@@ -308,7 +308,6 @@
    if (idleFuncRunning)
       remove_idle (generalStaticIdle, (void*)this);
    delete idleQueue;
-   delete views;
    delete resources;
 }
 
@@ -320,25 +319,30 @@
 
 void FltkPlatform::attachView (core::View *view)
 {
-   views->append ((FltkView*)view);
+   if (this->view)
+      MSG_ERR("FltkPlatform::attachView: multiple views!\n");
+   this->view = (FltkView*)view;
 
    for (container::typed::Iterator <ui::FltkResource> it =
            resources->iterator (); it.hasNext (); ) {
       ui::FltkResource *resource = it.getNext ();
-      resource->attachView ((FltkView*)view);
+      resource->attachView (this->view);
    }
 }
 
 
 void FltkPlatform::detachView  (core::View *view)
 {
-   views->removeRef ((FltkView*)view);
+   if (this->view != view)
+      MSG_ERR("FltkPlatform::detachView: this->view: %p view: %p\n",
+              this->view, view);
 
    for (container::typed::Iterator <ui::FltkResource> it =
            resources->iterator (); it.hasNext (); ) {
       ui::FltkResource *resource = it.getNext ();
       resource->detachView ((FltkView*)view);
    }
+   this->view = NULL;
 }
 
 
@@ -473,12 +477,7 @@
 void FltkPlatform::attachResource (ui::FltkResource *resource)
 {
    resources->append (resource);
-
-   for (container::typed::Iterator <FltkView> it = views->iterator ();
-        it.hasNext (); ) {
-      FltkView *view = it.getNext ();
-      resource->attachView (view);
-   }
+   resource->attachView (view);
 }
 
 void FltkPlatform::detachResource (ui::FltkResource *resource)
--- a/dw/fltkplatform.hh	Thu Oct 15 20:12:37 2009 +0200
+++ b/dw/fltkplatform.hh	Thu Oct 15 19:31:06 2009 +0000
@@ -126,7 +126,7 @@
    static void generalStaticIdle(void *data);
    void generalIdle();
 
-   lout::container::typed::List <FltkView> *views;
+   FltkView *view;
    lout::container::typed::List <ui::FltkResource> *resources;
 
 public:
--- a/dw/fltkui.cc	Thu Oct 15 20:12:37 2009 +0200
+++ b/dw/fltkui.cc	Thu Oct 15 19:31:06 2009 +0000
@@ -71,84 +71,60 @@
  */
 void FltkResource::init (FltkPlatform *platform)
 {
-   viewsAndWidgets = new lout::container::typed::List <ViewAndWidget> (true);
+   view = NULL;
+   widget = NULL;
    platform->attachResource (this);
 }
 
 FltkResource::~FltkResource ()
 {
    platform->detachResource (this);
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-      it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-
-      if (viewAndWidget->widget) {
-         if (viewAndWidget->view) {
-            viewAndWidget->view->removeFltkWidget(viewAndWidget->widget);
-         }
-         delete viewAndWidget->widget;
+   if (widget) {
+      if (view) {
+         view->removeFltkWidget(widget);
       }
-
+      delete widget;
    }
-   delete viewsAndWidgets;
    if (style)
       style->unref ();
 }
 
 void FltkResource::attachView (FltkView *view)
 {
-   if (view->usesFltkWidgets ()) {
-      ViewAndWidget *viewAndWidget = new ViewAndWidget();
-      viewAndWidget->view = view;
+   if (this->view)
+      MSG_ERR("FltkResource::attachView: multiple views!\n");
 
-      viewAndWidget->widget = createNewWidget (&allocation);
-      viewAndWidget->view->addFltkWidget (viewAndWidget->widget, &allocation);
-      viewsAndWidgets->append (viewAndWidget);
+   if (view->usesFltkWidgets ()) {
+      this->view = view;
+
+      widget = createNewWidget (&allocation);
+      view->addFltkWidget (widget, &allocation);
       if (style)
-         setWidgetStyle (viewAndWidget->widget, style);
+         setWidgetStyle (widget, style);
       if (! enabled)
-         viewAndWidget->widget->deactivate ();
+         widget->deactivate ();
    }
 }
 
 void FltkResource::detachView (FltkView *view)
 {
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      if (viewAndWidget->view == view) {
-         viewsAndWidgets->removeRef (viewAndWidget);
-         return;
-      }
-   }
-
-   MSG_WARN("FltkResource::detachView: View not found.");
+   if (this->view != view)
+      MSG_ERR("FltkResource::detachView: this->view: %p view: %p\n",
+              this->view, view);
+   this->view = NULL;
 }
 
 void FltkResource::sizeAllocate (core::Allocation *allocation)
 {
    this->allocation = *allocation;
-
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      viewAndWidget->view->allocateFltkWidget (viewAndWidget->widget,
-                                               allocation);
-   }
+   view->allocateFltkWidget (widget, allocation);
 }
 
 void FltkResource::draw (core::View *view, core::Rectangle *area)
 {
    FltkView *fltkView = (FltkView*)view;
-   if (fltkView->usesFltkWidgets ()) {
-      for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-           it.hasNext(); ) {
-         ViewAndWidget *viewAndWidget = it.getNext ();
-         if (viewAndWidget->view == fltkView) {
-            fltkView->drawFltkWidget (viewAndWidget->widget, area);
-            break;
-         }
-      }
+   if (fltkView->usesFltkWidgets () && this->view == fltkView) {
+      fltkView->drawFltkWidget (widget, area);
    }
 }
 
@@ -160,11 +136,7 @@
    this->style = style;
    style->ref ();
 
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      setWidgetStyle (viewAndWidget->widget, style);
-   }
+   setWidgetStyle (widget, style);
 }
 
 void FltkResource::setWidgetStyle (::fltk::Widget *widget,
@@ -203,28 +175,20 @@
 
 void FltkResource::setDisplayed(bool displayed)
 {
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      if (displayed)
-         viewAndWidget->widget->show();
-      else
-         viewAndWidget->widget->hide();
-   }
+   if (displayed)
+      widget->show();
+   else
+      widget->hide();
 }
 
 bool FltkResource::displayed()
 {
-   bool ret;
-   Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
+   bool ret = false;
 
-   if (it.hasNext()) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
+   if (widget) {
       // visible() is not the same thing as being show()n exactly, but
       // show()/hide() set it appropriately for our purposes.
-      ret = viewAndWidget->widget->visible();
-   } else {
-      ret = false;
+      ret = widget->visible();
    }
    return ret;
 }
@@ -238,14 +202,10 @@
 {
    this->enabled = enabled;
 
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      if (enabled)
-         viewAndWidget->widget->activate ();
-      else
-         viewAndWidget->widget->deactivate ();
-   }
+   if (enabled)
+      widget->activate ();
+   else
+      widget->deactivate ();
 }
 
 // ----------------------------------------------------------------------
@@ -377,12 +337,7 @@
    delete this->label;
    this->label = strdup (label);
 
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      viewAndWidget->widget->label (this->label);
-   }
-
+   widget->label (this->label);
    queueResize (true);
 }
 
@@ -393,7 +348,7 @@
                                                       *widget, bool relief):
    FltkSpecificResource <dw::core::ui::ComplexButtonResource> (platform)
 {
-   viewsAndViews = new lout::container::typed::List <ViewAndView> (true);
+   flatView = topView = NULL;
    this->relief = relief;
    FltkResource::init (platform);
    ComplexButtonResource::init (widget);
@@ -401,7 +356,6 @@
 
 FltkComplexButtonResource::~FltkComplexButtonResource ()
 {
-   delete viewsAndViews;
 }
 
 void FltkComplexButtonResource::widgetCallback (::fltk::Widget *widget,
@@ -419,7 +373,7 @@
       setButtonEvent(&event);
       res->emitClicked(&event);
    } else {
-      ((FltkViewBase*)res->lastFlatView)->handle(::fltk::event());
+      ((FltkViewBase*)res->flatView)->handle(::fltk::event());
    }
 }
 
@@ -432,55 +386,30 @@
 {
    FltkResource::attachView (view);
 
-   if (view->usesFltkWidgets ()) {
-      ViewAndView *viewAndView = new ViewAndView();
-      viewAndView->topView = view;
-      viewAndView->flatView = lastFlatView;
-      viewsAndViews->append (viewAndView);
-   }
+   if (view->usesFltkWidgets ())
+      topView = view;
 }
 
 void FltkComplexButtonResource::detachView (FltkView *view)
 {
    FltkResource::detachView (view);
-
-   for (Iterator <ViewAndView> it = viewsAndViews->iterator ();
-        it.hasNext(); ) {
-      ViewAndView *viewAndView = it.getNext ();
-      if (viewAndView->topView == view) {
-         viewsAndViews->removeRef (viewAndView);
-         return;
-      }
-   }
-
-   MSG_WARN("FltkComplexButtonResourceResource::detachView: "
-            "View not found.\n");
 }
 
 void FltkComplexButtonResource::sizeAllocate (core::Allocation *allocation)
 {
    FltkResource::sizeAllocate (allocation);
 
-   for (Iterator <ViewAndView> it = viewsAndViews->iterator ();
-        it.hasNext(); ) {
-      ViewAndView *viewAndView = it.getNext ();
-      ((FltkFlatView*)viewAndView->flatView)->resize (
-         reliefXThickness (),
-         reliefYThickness (),
-         allocation->width - 2 * reliefXThickness (),
-         allocation->ascent + allocation->descent - 2 * reliefYThickness ());
+   ((FltkFlatView*)flatView)->resize (
+      reliefXThickness (), reliefYThickness (),
+      allocation->width - 2 * reliefXThickness (),
+      allocation->ascent + allocation->descent - 2 * reliefYThickness ());
 
-      ((FltkFlatView*)viewAndView->flatView)->parent ()->init_sizes ();
-   }
+   ((FltkFlatView*)flatView)->parent ()->init_sizes ();
 }
 
 void FltkComplexButtonResource::setLayout (dw::core::Layout *layout)
 {
-   for (Iterator <ViewAndView> it = viewsAndViews->iterator ();
-        it.hasNext(); ) {
-      ViewAndView *viewAndView = it.getNext ();
-      layout->attachView (viewAndView->flatView);
-   }
+   layout->attachView (flatView);
 }
 
 int FltkComplexButtonResource::reliefXThickness ()
@@ -505,18 +434,15 @@
    if (!relief)
       button->box(::fltk::FLAT_BOX);
 
-   FltkFlatView *flatView =
-      new FltkFlatView (allocation->x + reliefXThickness (),
-                        allocation->y + reliefYThickness (),
-                        allocation->width - 2 * reliefXThickness (),
-                        allocation->ascent + allocation->descent
-                        - 2 * reliefYThickness ());
-   button->add (flatView);
-
-   lastFlatView = flatView;
+   flatView = new FltkFlatView (allocation->x + reliefXThickness (),
+                                allocation->y + reliefYThickness (),
+                                allocation->width - 2 * reliefXThickness (),
+                                allocation->ascent + allocation->descent
+                                   - 2 * reliefYThickness ());
+   button->add ((FltkFlatView *)flatView);
 
    if (layout)
-      layout->attachView (lastFlatView);
+      layout->attachView (flatView);
    return button;
 }
 
@@ -559,13 +485,8 @@
       input->label(label);
       input->set_flag(::fltk::ALIGN_INSIDE_LEFT);
    }
-   if (viewsAndWidgets->isEmpty ()) {
-      // First widget created, attach the set text.
-      if (initText)
-         input->value (initText);
-   } else
-      input->value
-         (((::fltk::Input*)viewsAndWidgets->getFirst()->widget)->value ());
+   if (initText)
+      input->value (initText);
 
    return input;
 }
@@ -611,10 +532,7 @@
 
 const char *FltkEntryResource::getText ()
 {
-   if (viewsAndWidgets->isEmpty ())
-      return initText;
-   else
-      return ((::fltk::Input*)viewsAndWidgets->getFirst()->widget)->value ();
+   return ((::fltk::Input*)widget)->value ();
 }
 
 void FltkEntryResource::setText (const char *text)
@@ -623,11 +541,7 @@
       delete initText;
    initText = strdup (text);
 
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      ((::fltk::Input*)viewAndWidget->widget)->value (initText);
-   }
+   ((::fltk::Input*)widget)->value (initText);
 }
 
 bool FltkEntryResource::isEditable ()
@@ -668,11 +582,7 @@
 FltkMultiLineTextResource::~FltkMultiLineTextResource ()
 {
    /* Free memory avoiding a double-free of text buffers */
-   for (Iterator <ViewAndWidget> it = viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      ViewAndWidget *viewAndWidget = it.getNext ();
-      ((::fltk::TextEditor *) viewAndWidget->widget)->buffer (0);
-   }
+   ((::fltk::TextEditor *) widget)->buffer (0);
    delete buffer;
 }
 
@@ -750,13 +660,7 @@
                                                               *allocation)
 {
    ::fltk::Button *button = createNewButton (allocation);
-
-   if (this->viewsAndWidgets->isEmpty ())
-      button->value (initActivated);
-   else
-      button->value (((::fltk::Button*)this->viewsAndWidgets
-                      ->getFirst()->widget)->value ());
-
+   button->value (initActivated);
    return button;
 }
 
@@ -783,12 +687,7 @@
 template <class I>
 bool FltkToggleButtonResource<I>::FltkToggleButtonResource::isActivated ()
 {
-   if (this->viewsAndWidgets->isEmpty ())
-      return initActivated;
-   else
-      return
-         ((::fltk::Button*)this->viewsAndWidgets->getFirst()->widget)
-         ->value ();
+   return ((::fltk::Button*)this->widget)->value ();
 }
 
 
@@ -796,13 +695,7 @@
 void FltkToggleButtonResource<I>::setActivated (bool activated)
 {
    initActivated = activated;
-
-   for (Iterator <FltkResource::ViewAndWidget> it =
-           this->viewsAndWidgets->iterator ();
-        it.hasNext(); ) {
-      FltkResource::ViewAndWidget *viewAndWidget = it.getNext ();
-      ((::fltk::Button*)viewAndWidget->widget)->value (initActivated);
-   }
+   ((::fltk::Button*)this->widget)->value (initActivated);
 }
 
 // ----------------------------------------------------------------------
--- a/dw/fltkui.hh	Thu Oct 15 20:12:37 2009 +0200
+++ b/dw/fltkui.hh	Thu Oct 15 19:31:06 2009 +0000
@@ -178,14 +178,8 @@
    bool enabled;
 
 protected:
-   class ViewAndWidget: public lout::object::Object
-   {
-   public:
-      FltkView *view;
-      ::fltk::Widget *widget;
-   };
-
-   lout::container::typed::List <ViewAndWidget> *viewsAndWidgets;
+   FltkView *view;
+   ::fltk::Widget *widget;
    core::Allocation allocation;
    FltkPlatform *platform;
 
@@ -260,15 +254,7 @@
    static void widgetCallback (::fltk::Widget *widget, void *data);
 
 protected:
-   class ViewAndView: public lout::object::Object
-   {
-   public:
-      FltkView *topView, *flatView;
-   };
-
-   FltkView *lastFlatView;
-
-   lout::container::typed::List <ViewAndView> *viewsAndViews;
+   FltkView *topView, *flatView;
 
    void attachView (FltkView *view);
    void detachView (FltkView *view);
--- a/dw/layout.cc	Thu Oct 15 20:12:37 2009 +0200
+++ b/dw/layout.cc	Thu Oct 15 19:31:06 2009 +0000
@@ -78,7 +78,7 @@
 Layout::Layout (Platform *platform)
 {
    this->platform = platform;
-   views = new container::typed::List <View> (true);
+   view = NULL;
    topLevel = NULL;
    widgetAtPoint = NULL;
 
@@ -123,7 +123,7 @@
    if (topLevel)
       delete topLevel;
    delete platform;
-   delete views;
+   delete view;
    delete anchorsTable;
    delete textZone;
 }
@@ -156,13 +156,10 @@
    canvasWidth = canvasAscent = canvasDescent = 0;
    scrollX = scrollY = 0;
 
-   for (typed::Iterator <View> it = views->iterator (); it.hasNext (); ) {
-      View *view = it.getNext ();
-      view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
-      if (view->usesViewport ())
-         view->setViewportSize (viewportWidth, viewportHeight, 0, 0);
-      view->queueDrawTotal ();
-   }
+   view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
+   if (view->usesViewport ())
+      view->setViewportSize (viewportWidth, viewportHeight, 0, 0);
+   view->queueDrawTotal ();
 
    setAnchor (NULL);
    updateAnchor ();
@@ -194,7 +191,10 @@
  */
 void Layout::attachView (View *view)
 {
-   views->append (view);
+   if (this->view)
+      MSG_ERR("attachView: Multiple views for layout!\n");
+
+   this->view = view;
    platform->attachView (view);
 
    /*
@@ -236,11 +236,12 @@
 
 void Layout::detachView (View *view)
 {
+   if (this->view != view)
+      MSG_ERR("detachView: this->view: %p view %p\n", this->view, view);
+
    view->setLayout (NULL);
    platform->detachView (view);
-
-   views->detachRef (view);
-
+   this->view = NULL;
    /**
     * \todo Actually, viewportMarkerWidthDiff and
     *       viewportMarkerHeightDiff have to be recalculated here, since the
@@ -251,12 +252,8 @@
 
 void Layout::scroll(ScrollCommand cmd)
 {
-   for (typed::Iterator <View> it = views->iterator (); it.hasNext (); ) {
-      View *view = it.getNext ();
-
-      if (view->usesViewport ())
-         view->scroll(cmd);
-   }
+   if (view->usesViewport ())
+      view->scroll(cmd);
 }
 
 /**
@@ -346,11 +343,7 @@
 
    if (xChanged || yChanged) {
       adjustScrollPos ();
-      for (container::typed::Iterator <View> it = views->iterator ();
-           it.hasNext (); ) {
-         View *thisView = it.getNext();
-         thisView->scrollTo (scrollX, scrollY);
-      }
+      view->scrollTo (scrollX, scrollY);
    }
 
    scrollIdleId = -1;
@@ -500,11 +493,7 @@
 {
    if (cursor != this->cursor) {
       this->cursor = cursor;
-
-      for (typed::Iterator <View> it = views->iterator (); it.hasNext (); ) {
-         View *view = it.getNext ();
-         view->setCursor (cursor);
-      }
+      view->setCursor (cursor);
    }
 }
 
@@ -526,11 +515,7 @@
       bgColor = topLevel->getStyle()->backgroundColor;
    else
       bgColor = NULL;
-
-   for (typed::Iterator <View> it = views->iterator (); it.hasNext (); ) {
-      View *view = it.getNext ();
-      view->setBgColor (bgColor);
-   }
+   view->setBgColor (bgColor);
 }
 
 void Layout::resizeIdle ()
@@ -562,12 +547,9 @@
          emitter.emitCanvasSizeChanged (
             canvasWidth, canvasAscent, canvasDescent);
 
-         // Tell the views about the new world size.
-         for (typed::Iterator <View> it = views->iterator (); it.hasNext ();) {
-            View *view = it.getNext ();
-            view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
-          //  view->queueDrawTotal (false);
-         }
+         // Tell the view about the new world size.
+         view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
+         //  view->queueDrawTotal (false);
 
          if (usesViewport) {
             int actualHScrollbarThickness =
@@ -585,14 +567,10 @@
             }
 
             // Set viewport sizes.
-            for (typed::Iterator <View> it = views->iterator ();
-               it.hasNext (); ) {
-               View *view = it.getNext ();
-               if (view->usesViewport ())
-                  view->setViewportSize (viewportWidth, viewportHeight,
-                                         actualHScrollbarThickness,
-                                         actualVScrollbarThickness);
-            }
+            if (view->usesViewport ())
+               view->setViewportSize (viewportWidth, viewportHeight,
+                                      actualHScrollbarThickness,
+                                      actualVScrollbarThickness);
          }
       }
 
@@ -623,11 +601,7 @@
 
    if (area.isEmpty ()) return;
 
-   for (container::typed::Iterator <View> it = views->iterator ();
-      it.hasNext (); ) {
-      View *view = it.getNext ();
-      view->queueDraw (&area);
-   }
+   view->queueDraw (&area);
 }
 
 void Layout::queueDrawExcept (int x, int y, int width, int height,
@@ -656,11 +630,7 @@
 void Layout::queueResize ()
 {
    if (resizeIdleId == -1) {
-      for (container::typed::Iterator <View> it = views->iterator ();
-           it.hasNext (); ) {
-         View *view = it.getNext ();
-         view->cancelQueueDraw ();
-      }
+      view->cancelQueueDraw ();
 
       resizeIdleId = platform->addIdle (&Layout::resizeIdle);
    }
@@ -873,14 +843,6 @@
       scrollX = x;
       scrollY = y;
 
-      // Tell all views about the scrolling position, except the caller.
-      for (container::typed::Iterator <View> it = views->iterator ();
-           it.hasNext (); ) {
-         View *thisView = it.getNext();
-         if (view != thisView && thisView->usesViewport ())
-            thisView->scrollTo (scrollX, scrollY);
-      }
-
       setAnchor (NULL);
       updateAnchor ();
    }
@@ -909,21 +871,6 @@
    viewportHeight = height;
 
    setSizeHints ();
-
-   int actualHScrollbarThickness =
-      (canvasWidth > viewportWidth) ? hScrollbarThickness : 0;
-   int actualVScrollbarThickness =
-      (canvasAscent + canvasDescent > viewportWidth) ? vScrollbarThickness : 0;
-
-   /* Tell all views about the size, except the caller. */
-   for (container::typed::Iterator <View> it = views->iterator ();
-        it.hasNext (); ) {
-      View *thisView = it.getNext();
-      if (view != thisView && thisView->usesViewport ())
-         thisView->setViewportSize (viewportWidth, viewportHeight,
-                                    actualHScrollbarThickness,
-                                    actualVScrollbarThickness);
-   }
 }
 
 } // namespace dw
--- a/dw/layout.hh	Thu Oct 15 20:12:37 2009 +0200
+++ b/dw/layout.hh	Thu Oct 15 19:31:06 2009 +0000
@@ -58,10 +58,10 @@
    };
 
    Platform *platform;
-   lout::container::typed::List <View> *views;
+   View *view;
    Widget *topLevel, *widgetAtPoint;
 
-   /* The state, which must be projected into the views. */
+   /* The state, which must be projected into the view. */
    style::Color *bgColor;
    style::Cursor cursor;
    int canvasWidth, canvasAscent, canvasDescent;