cwidget 0.5.18
center.h
1// center.h -*-c++-*-
2//
3// A simple container/layout widget which centers its child in itself.
4
5#ifndef CENTER_H
6#define CENTER_H
7
8#include "bin.h"
9
10namespace cwidget
11{
12 namespace widgets
13 {
14 class center:public bin
15 {
16 void layout_me();
17
18 protected:
19 center(const widget_ref &w = NULL);
20
21 public:
22 static util::ref_ptr<center> create(const widget_ref &w = NULL)
23 {
24 util::ref_ptr<center> rval(new center(w));
25 rval->decref();
26 return rval;
27 }
28
29 int width_request();
30 int height_request(int width);
31 };
32
34 }
35}
36
37#endif
Definition: bin.h:17
Definition: center.h:15
int width_request()
Definition: center.cc:19
int height_request(int width)
Calculate the desired height of the widget, given its width.
Definition: center.cc:31
The namespace containing everything defined by cwidget.
Definition: columnify.cc:28