CrystalSpace

Public API Reference

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

csflwlay.h

00001 /*
00002     Copyright (C) Aleksandras Gluchovas
00003     CS port by Norman Kraemer <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 "csextern.h"
00028  
00029 #include "cslayout.h"
00030 
00059 class CS_CSWS_EXPORT csFlowLayout : public csLayout
00060 {
00061 protected:
00062   int mAlign;
00063   int mHgap;
00064   int mVgap;
00065 
00066   csPoint mPrefDimOfPhase1;
00067 public:
00072   csFlowLayout (csComponent *pParent);
00073   csFlowLayout (csComponent *pParent, int align);
00074   csFlowLayout (csComponent *pParent, int align, int hgap, int vgap);
00075 
00077   int GetAlignment ();
00079   int GetHgap ();
00081   int GetVgap ();
00082 
00084   void SetAlignment (int align);
00086   void SetHgap (int hgap);
00088   void SetVgap (int vgap);
00089 
00090   // impl. of LayoutManager interface
00091 
00092   virtual void SuggestSize (int &sugw, int& sugh);
00093 
00094   virtual void LayoutContainer ();
00095 
00096 public:
00097 
00098   enum ALIGNMNET_ENUM
00099   {
00104     CENTER   = 0,
00105     LEFT     = 1,
00106     RIGHT    = 2,
00107 
00108     LEADING  = LEFT,  // for Western, Europian text-orientation
00109     TRAILING = RIGHT  // -/-
00110   };
00111 };
00112 
00115 #endif // __CS_CSFLOWLAYOUT_H__

Generated for Crystal Space by doxygen 1.3.9.1