add OtkFocusLabel

This commit is contained in:
Dana Jansens 2002-11-16 13:00:22 +00:00
parent 804b8cc6e5
commit 6b977b2ded
3 changed files with 6 additions and 34 deletions

View file

@ -4,11 +4,12 @@ INCLUDES= -I../src
noinst_LIBRARIES=libotk.a noinst_LIBRARIES=libotk.a
libotk_a_SOURCES= color.cc display.cc font.cc gccache.cc image.cc property.cc \ libotk_a_SOURCES= color.cc display.cc font.cc gccache.cc image.cc \
imagecontrol.cc rect.cc screeninfo.cc texture.cc timer.cc \ property.cc imagecontrol.cc rect.cc screeninfo.cc \
timerqueuemanager.cc style.cc configuration.cc util.cc \ texture.cc timer.cc timerqueuemanager.cc style.cc \
widget.cc focuswidget.cc button.cc eventhandler.cc \ configuration.cc util.cc widget.cc focuswidget.cc \
eventdispatcher.cc application.cc button.cc eventhandler.cc eventdispatcher.cc \
focuslabel.cc application.cc
MAINTAINERCLEANFILES= Makefile.in MAINTAINERCLEANFILES= Makefile.in

View file

@ -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, void Style::readDatabaseMask(const std::string &rname, PixmapMask &pixmapMask,
const Configuration &style) { const Configuration &style) {
Window root_window = OBDisplay::screenInfo(screen_number)->getRootWindow(); Window root_window = OBDisplay::screenInfo(screen_number)->getRootWindow();

View file

@ -65,9 +65,6 @@ public:
Style(BImageControl *); Style(BImageControl *);
~Style(); ~Style();
void doJustify(const std::string &text, int &start_pos,
unsigned int max_length, unsigned int modifier) const;
void readDatabaseMask(const std::string &rname, void readDatabaseMask(const std::string &rname,
PixmapMask &pixmapMask, PixmapMask &pixmapMask,
const Configuration &style); const Configuration &style);