File: csgrdlay.h

package info (click to toggle)
crystalspace 0.94-20020412-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 62,276 kB
  • ctags: 52,843
  • sloc: cpp: 274,783; ansic: 6,608; perl: 6,276; objc: 3,952; asm: 2,942; python: 2,354; php: 542; pascal: 530; sh: 430; makefile: 370; awk: 193
file content (45 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/////////////////////////////////////////////////////////////////////////////
// Copyright:   (c) Aleksandras Gluchovas
// Licence:     wxWindows license
//
// Ported to Crystal Space by Norman Krmer <norman@users.sourceforge.net>
/////////////////////////////////////////////////////////////////////////////

#ifndef __GRIDLAYOUT_G__
#define __GRIDLAYOUT_G__

#include "cslayout.h"

/**
 * Components are displayed in a grid fashion.
 */
class csGridLayout : public csLayout
{
protected:
  int mRows;
  int mCols;
  int mHgap;
  int mVgap;
public:
  csGridLayout (csComponent *pParent);

  csGridLayout (csComponent *pParent, int rows, int cols);

  csGridLayout (csComponent *pParent, int rows, int cols, int hgap, int vgap);

  virtual int GetColumns () { return mCols; }
  virtual int GetHgap () { return mHgap; }
  virtual int GetRows () { return mRows; }
  virtual int GetVgap () { return mVgap; }

  virtual void SetColumns (int columns ) { mCols = columns; }
  virtual void SetHgap (int hgap) { mHgap = hgap; }
  virtual void SetRows (int rows) { mRows = rows; }
  virtual void SetVgap (int vgap) { mVgap = vgap; }

  virtual void SuggestSize (int &sugw, int &sugh);

  virtual void LayoutContainer ();
};

#endif // __GRIDLAYOUT_G__