30 |
|
|
31 |
namespace view { |
namespace view { |
32 |
|
|
33 |
|
/** @brief Multi-line label for gtk(mm) <= 2. |
34 |
|
* |
35 |
|
* This class is only used for gtk(mm) <= 2. If application is compiled against |
36 |
|
* gtk(mm) >= 3 then this class is not compiled at all. gtk(mm) 3 added support |
37 |
|
* for automatic multi-line labels by calling its set_line_wrap() method. |
38 |
|
* However Gtk::Label may still cause size calculation problems under certain |
39 |
|
* conditions. If you encountered such a problem, then use @c MultiLineLabel for |
40 |
|
* for gtk(mm) >= 3 instead. |
41 |
|
* |
42 |
|
* @see MultiLineLabel for gtk(mm) >= 3 |
43 |
|
*/ |
44 |
class WrapLabel |
class WrapLabel |
45 |
: public Gtk::Label |
: public Gtk::Label |
46 |
{ |
{ |
55 |
virtual void on_size_request(Gtk::Requisition *req); |
virtual void on_size_request(Gtk::Requisition *req); |
56 |
|
|
57 |
private: |
private: |
58 |
void SetWrapWidth(size_t width); |
void SetWrapWidth(int width); |
59 |
|
|
60 |
size_t mWrapWidth; |
int mWrapWidth; |
61 |
|
int mWrapHeight; |
62 |
}; |
}; |
63 |
|
|
64 |
|
|