Rapicorn - Experimental UI Toolkit - Source Code  13.07.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
viewport.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __RAPICORN_VIEWPORT_HH__
00003 #define __RAPICORN_VIEWPORT_HH__
00004 
00005 #include <ui/container.hh>
00006 #include <ui/screenwindow.hh>
00007 
00008 namespace Rapicorn {
00009 
00010 class ViewportImpl : public virtual ResizeContainerImpl {
00011   Region                expose_region_;        // maintained in child coord space
00012   int                   xoffset_, yoffset_;
00013   void                  collapse_expose_region  ();
00014 protected:
00015   virtual Affine        child_affine            (const WidgetImpl &widget);
00016   const Region&         peek_expose_region      () const { return expose_region_; }
00017   void                  discard_expose_region   () { expose_region_.clear(); }
00018   bool                  exposes_pending         () const { return !expose_region_.empty(); }
00019   virtual void          render_recursive        (RenderContext &rcontext);
00020   virtual void          render                  (RenderContext &rcontext, const Rect &rect);
00021   void                  scroll_offsets          (int deltax, int deltay);
00022   void                  do_scrolled             ();
00023   int                   scroll_offset_x         () const { return xoffset_; }
00024   int                   scroll_offset_y         () const { return yoffset_; }
00025 public:
00026   Aida::Signal<void ()> sig_scrolled;
00027   void                  expose_child_region     (const Region &region);
00028   Allocation            child_viewport          ();
00029   explicit              ViewportImpl            ();
00030   virtual              ~ViewportImpl            ();
00031 };
00032 
00033 } // Rapicorn
00034 
00035 #endif  /* __RAPICORN_VIEWPORT_HH__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines