From 6b977b2ded0b8807dd05bb7ee0c318612600027d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 16 Nov 2002 13:00:22 +0000 Subject: [PATCH] add OtkFocusLabel --- otk/Makefile.am | 11 ++++++----- otk/style.cc | 26 -------------------------- otk/style.hh | 3 --- 3 files changed, 6 insertions(+), 34 deletions(-) diff --git a/otk/Makefile.am b/otk/Makefile.am index 6f363b25..8637f46a 100644 --- a/otk/Makefile.am +++ b/otk/Makefile.am @@ -4,11 +4,12 @@ INCLUDES= -I../src noinst_LIBRARIES=libotk.a -libotk_a_SOURCES= color.cc display.cc font.cc gccache.cc image.cc property.cc \ - imagecontrol.cc rect.cc screeninfo.cc texture.cc timer.cc \ - timerqueuemanager.cc style.cc configuration.cc util.cc \ - widget.cc focuswidget.cc button.cc eventhandler.cc \ - eventdispatcher.cc application.cc +libotk_a_SOURCES= color.cc display.cc font.cc gccache.cc image.cc \ + property.cc imagecontrol.cc rect.cc screeninfo.cc \ + texture.cc timer.cc timerqueuemanager.cc style.cc \ + configuration.cc util.cc widget.cc focuswidget.cc \ + button.cc eventhandler.cc eventdispatcher.cc \ + focuslabel.cc application.cc MAINTAINERCLEANFILES= Makefile.in diff --git a/otk/style.cc b/otk/style.cc index 3c40e24b..277924d6 100644 --- a/otk/style.cc +++ b/otk/style.cc @@ -156,32 +156,6 @@ void Style::load(const Configuration &style) { } -void Style::doJustify(const std::string &text, int &start_pos, - unsigned int max_length, - unsigned int modifier) const { - size_t text_len = text.size(); - unsigned int length; - - do { - length = font->measureString(std::string(text, 0, text_len)) + modifier; - } while (length > max_length && text_len-- > 0); - - switch (justify) { - case RightJustify: - start_pos += max_length - length; - break; - - case CenterJustify: - start_pos += (max_length - length) / 2; - break; - - case LeftJustify: - default: - break; - } -} - - void Style::readDatabaseMask(const std::string &rname, PixmapMask &pixmapMask, const Configuration &style) { Window root_window = OBDisplay::screenInfo(screen_number)->getRootWindow(); diff --git a/otk/style.hh b/otk/style.hh index ccf4e49a..c024ade9 100644 --- a/otk/style.hh +++ b/otk/style.hh @@ -65,9 +65,6 @@ public: Style(BImageControl *); ~Style(); - void doJustify(const std::string &text, int &start_pos, - unsigned int max_length, unsigned int modifier) const; - void readDatabaseMask(const std::string &rname, PixmapMask &pixmapMask, const Configuration &style); -- 2.39.2