CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csflwlay.h

00001 /*
00002     Copyright (C) Aleksandras Gluchovas
00003     CS port by Norman Krämer <norman@users.sourceforge.net>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CS_CSFLOWLAYOUT_H__
00021 #define __CS_CSFLOWLAYOUT_H__
00022 
00027 #include "cslayout.h"
00028 
00057 class csFlowLayout : public csLayout
00058 {
00059 protected:
00060   int mAlign;
00061   int mHgap;
00062   int mVgap;
00063 
00064   csPoint mPrefDimOfPhase1;
00065 public:
00070   csFlowLayout (csComponent *pParent);
00071   csFlowLayout (csComponent *pParent, int align);
00072   csFlowLayout (csComponent *pParent, int align, int hgap, int vgap);
00073 
00075   int GetAlignment ();
00077   int GetHgap ();
00079   int GetVgap ();
00080 
00082   void SetAlignment (int align);
00084   void SetHgap (int hgap);
00086   void SetVgap (int vgap);
00087 
00088   // impl. of LayoutManager interface
00089 
00090   virtual void SuggestSize (int &sugw, int& sugh);
00091 
00092   virtual void LayoutContainer ();
00093 
00094 public:
00095 
00096   enum ALIGNMNET_ENUM
00097   {
00102     CENTER   = 0,
00103     LEFT     = 1,
00104     RIGHT    = 2,
00105 
00106     LEADING  = LEFT,  // for Western, Europian text-orientation
00107     TRAILING = RIGHT  // -/-
00108   };
00109 };
00110 
00113 #endif // __CS_CSFLOWLAYOUT_H__

Generated for Crystal Space by doxygen 1.2.14