6663b6c9
adorian
projet complet av...
|
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
|
#include <escher/even_odd_buffer_text_cell.h>
#include <assert.h>
EvenOddBufferTextCell::EvenOddBufferTextCell(KDText::FontSize size, float horizontalAlignment, float verticalAlignment) :
EvenOddCell(),
m_bufferTextView(size, horizontalAlignment, verticalAlignment)
{
}
const char * EvenOddBufferTextCell::text() const {
return m_bufferTextView.text();
}
void EvenOddBufferTextCell::setHighlighted(bool highlight) {
EvenOddCell::setHighlighted(highlight);
m_bufferTextView.setBackgroundColor(backgroundColor());
}
void EvenOddBufferTextCell::setEven(bool even) {
EvenOddCell::setEven(even);
m_bufferTextView.setBackgroundColor(backgroundColor());
}
void EvenOddBufferTextCell::setText(const char * textContent) {
m_bufferTextView.setText(textContent);
}
void EvenOddBufferTextCell::setTextColor(KDColor textColor) {
m_bufferTextView.setTextColor(textColor);
}
int EvenOddBufferTextCell::numberOfSubviews() const {
return 1;
}
View * EvenOddBufferTextCell::subviewAtIndex(int index) {
assert(index == 0);
return &m_bufferTextView;
}
void EvenOddBufferTextCell::layoutSubviews() {
m_bufferTextView.setFrame(bounds());
}
|