cwidget  0.5.17
frame.h
1 // frame.h -*-c++-*-
2 //
3 // A container that draws a frame around the widget it contains.
4 // (needs a lot more work to gracefully handle layout issues :) )
5 
6 #ifndef FRAME_H
7 #define FRAME_H
8 
9 #include "bin.h"
10 
11 namespace cwidget
12 {
13  namespace widgets
14  {
15  class frame : public bin
16  {
17  void layout_me();
18 
19  protected:
20  frame(const widget_ref &w);
21 
22  public:
23  static util::ref_ptr<frame> create(const widget_ref &w)
24  {
25  util::ref_ptr<frame> rval(new frame(w));
26  rval->decref();
27  return rval;
28  }
29 
33  int width_request();
34 
41  int height_request(int width);
42 
43  virtual void paint(const style &st);
44  };
45 
47  }
48 }
49 
50 #endif
A "style" is a setting to be applied to a display element (widget, text, etc).
Definition: style.h:51
Definition: frame.h:15
int height_request(int width)
Calculate the desired height of the frame.
Definition: frame.cc:33
int width_request()
Definition: frame.cc:21
The namespace containing everything defined by cwidget.
Definition: columnify.cc:26
Definition: bin.h:16
virtual void paint(const style &st)
Display this widget.
Definition: frame.cc:65