Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
arrangementimpl.hh
Go to the documentation of this file.
00001 /* Rapicorn
00002  * Copyright (C) 2005 Tim Janik
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * A copy of the GNU Lesser General Public License should ship along
00015  * with this library; if not, see http://www.gnu.org/copyleft/.
00016  */
00017 #ifndef __RAPICORN_ARRANGEMENT_IMPL_HH__
00018 #define __RAPICORN_ARRANGEMENT_IMPL_HH__
00019 
00020 #include <ui/arrangement.hh>
00021 #include <ui/container.hh>
00022 
00023 namespace Rapicorn {
00024 
00025 class ArrangementImpl : public virtual MultiContainerImpl, public virtual Arrangement {
00026   Point         m_origin;
00027   float         m_origin_hanchor;
00028   float         m_origin_vanchor;
00029   Rect          m_child_area;
00030 public:
00031   explicit                      ArrangementImpl         ();
00032   virtual                       ~ArrangementImpl        ();
00033   virtual Point                 origin                  ()                      { return m_origin; }
00034   virtual void                  origin                  (Point p)               { m_origin = p; invalidate(); }
00035   virtual float                 origin_hanchor          ()                      { return m_origin_hanchor; }
00036   virtual void                  origin_hanchor          (float align)           { m_origin_hanchor = align; invalidate(); }
00037   virtual float                 origin_vanchor          ()                      { return m_origin_vanchor; }
00038   virtual void                  origin_vanchor          (float align)           { m_origin_vanchor = align; invalidate(); }
00039   virtual Rect                  child_area              ();
00040 protected:
00041   virtual void                  size_request            (Requisition &requisition);
00042   virtual void                  size_allocate           (Allocation area);
00043   Allocation                    local_child_allocation  (ItemImpl &child,
00044                                                          double    width,
00045                                                          double    height);
00046 };
00047 
00048 } // Rapicorn
00049 
00050 #endif  /* __RAPICORN_ARRANGEMENT_IMPL_HH__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines