22 |
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
23 |
* *************************************************************************/ |
* *************************************************************************/ |
24 |
|
|
25 |
#include <wrapLabel.hh> |
#include "wrapLabel.hh" |
26 |
|
#ifdef PANGOMM_HEADER_FILE |
27 |
|
# include PANGOMM_HEADER_FILE(pangomm.h) |
28 |
|
# include PANGOMM_HEADER_FILE(pangommconfig.h) |
29 |
|
#else |
30 |
|
# include <pangomm/pangomm.h> |
31 |
|
# include <pangommconfig.h> |
32 |
|
#endif |
33 |
|
|
34 |
|
// we don't need this WrapLabel helper class on GTKMM 3 and higher |
35 |
|
#if GTKMM_MAJOR_VERSION < 3 |
36 |
|
|
37 |
/* |
/* |
38 |
* wrapLabel.cc -- |
* wrapLabel.cc -- |
64 |
: mWrapWidth(0), |
: mWrapWidth(0), |
65 |
mWrapHeight(0) |
mWrapHeight(0) |
66 |
{ |
{ |
67 |
|
// pangomm >= 2.35.1 |
68 |
|
#if PANGOMM_MAJOR_VERSION > 2 || (PANGOMM_MAJOR_VERSION == 2 && (PANGOMM_MINOR_VERSION > 35 || (PANGOMM_MINOR_VERSION == 35 && PANGOMM_MICRO_VERSION >= 1))) |
69 |
|
get_layout()->set_wrap(Pango::WrapMode::WORD_CHAR); |
70 |
|
#else |
71 |
get_layout()->set_wrap(Pango::WRAP_WORD_CHAR); |
get_layout()->set_wrap(Pango::WRAP_WORD_CHAR); |
72 |
|
#endif |
73 |
set_alignment(0.0, 0.0); |
set_alignment(0.0, 0.0); |
74 |
set_text(text); |
set_text(text); |
75 |
} |
} |
225 |
|
|
226 |
|
|
227 |
}; /* namespace view */ |
}; /* namespace view */ |
228 |
|
|
229 |
|
#endif // GTKMM_MAJOR_VERSION < 3 |