-
Notifications
You must be signed in to change notification settings - Fork 388
Expand file tree
/
Copy pathStdGridLayoutImpl.h
More file actions
55 lines (40 loc) · 1.22 KB
/
StdGridLayoutImpl.h
File metadata and controls
55 lines (40 loc) · 1.22 KB
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
46
47
48
49
50
51
52
53
54
55
// This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef STD_GRID_LAYOUT_IMPL_H_
#define STD_GRID_LAYOUT_IMPL_H_
#include "StdLayoutImpl.h"
namespace Wt {
class WApplication;
class WLayout;
namespace Impl {
struct Grid;
}
class StdGridLayoutImpl : public StdLayoutImpl
{
public:
StdGridLayoutImpl(WLayout *layout, Impl::Grid& grid);
virtual ~StdGridLayoutImpl();
virtual int minimumHeight() const;
virtual void update(WLayoutItem *);
virtual DomElement *createDomElement(bool fitWidth, bool fitHeight,
WApplication *app);
virtual void updateDom(DomElement& parent);
static bool useJavaScriptHeights(WApplication *app);
virtual void setHint(const std::string& name, const std::string& value);
virtual bool itemResized(WLayoutItem *item);
protected:
virtual void containerAddWidgets(WContainerWidget *container);
private:
Impl::Grid& grid_;
bool useFixedLayout_;
bool forceUpdate_;
int nextRowWithItem(int row, int c) const;
int nextColumnWithItem(int row, int col) const;
bool hasItem(int row, int col) const;
};
}
#endif // STD_GRID_LAYOUT_IMPL_H_