summaryrefslogtreecommitdiff
path: root/otk/label.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-20 15:26:34 +0000
committerDana Jansens <danakj@orodu.net>2002-12-20 15:26:34 +0000
commit723739dafe91a156fef527f3b53a483195695cf1 (patch)
tree844fa36a1442c71eaca0b3cf2a05d0fdbbfbf62b /otk/label.cc
parent711d4a342f9f459383ad59ceb624fcb853a41512 (diff)
api cleanups
Diffstat (limited to 'otk/label.cc')
-rw-r--r--otk/label.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/otk/label.cc b/otk/label.cc
index ceb6a49c..bbc8a6b7 100644
--- a/otk/label.cc
+++ b/otk/label.cc
@@ -11,8 +11,8 @@ namespace otk {
OtkLabel::OtkLabel(OtkWidget *parent)
: OtkWidget(parent), _text("")
{
- const ScreenInfo *info = OBDisplay::screenInfo(getScreen());
- _xftdraw = XftDrawCreate(OBDisplay::display, getWindow(), info->getVisual(),
+ const ScreenInfo *info = OBDisplay::screenInfo(screen());
+ _xftdraw = XftDrawCreate(OBDisplay::display, window(), info->getVisual(),
info->getColormap());
}
@@ -25,15 +25,15 @@ void OtkLabel::setStyle(Style *style)
{
OtkWidget::setStyle(style);
- setTexture(getStyle()->getLabelUnfocus());
+ setTexture(style->getLabelUnfocus());
}
void OtkLabel::update(void)
{
if (_dirty) {
- const BFont &ft = getStyle()->getFont();
- unsigned int sidemargin = getStyle()->getBevelWidth() * 2;
+ const BFont &ft = style()->getFont();
+ unsigned int sidemargin = style()->getBevelWidth() * 2;
std::string t = _text; // the actual text to draw
int x = sidemargin; // x coord for the text
@@ -52,7 +52,7 @@ void OtkLabel::update(void)
} while (length > max_length && text_len-- > 0);
// justify the text
- switch (getStyle()->textJustify()) {
+ switch (style()->textJustify()) {
case Style::RightJustify:
x += max_length - length;
break;
@@ -66,7 +66,7 @@ void OtkLabel::update(void)
OtkWidget::update();
- ft.drawString(_xftdraw, x, 0, *getStyle()->getTextUnfocus(), t);
+ ft.drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
} else
OtkWidget::update();
}