openbox/otk/focuswidget.hh

48 lines
1.1 KiB
C++
Raw Normal View History

// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2002-11-13 10:19:28 +00:00
#ifndef __focuswidget_hh
#define __focuswidget_hh
#include "widget.hh"
#include "application.hh"
2002-11-13 10:19:28 +00:00
namespace otk {
class FocusWidget : public Widget {
2002-11-13 10:19:28 +00:00
public:
FocusWidget(Widget *parent, Direction = Horizontal);
virtual ~FocusWidget();
2002-11-13 10:19:28 +00:00
virtual void focus(void);
virtual void unfocus(void);
virtual void setTexture(Texture *texture);
virtual void setBorderColor(const Color *color);
2002-11-13 10:19:28 +00:00
inline void setUnfocusTexture(Texture *texture)
2002-11-13 10:19:28 +00:00
{ _unfocus_texture = texture; }
inline Texture *getUnfocusTexture(void) const
2002-11-13 10:19:28 +00:00
{ return _unfocus_texture; }
inline void setUnfocusBorderColor(const Color *color)
{ _unfocus_bcolor = color; }
inline const Color *getUnfocusBorderColor(void) const
{ return _unfocus_bcolor; }
2002-11-13 10:19:28 +00:00
inline bool isFocused(void) const { return _focused; }
inline bool isUnfocused(void) const { return !_focused; }
private:
Texture *_unfocus_texture;
Texture *_focus_texture;
2002-11-13 10:19:28 +00:00
const Color *_unfocus_bcolor;
const Color *_focus_bcolor;
2002-11-13 10:19:28 +00:00
};
}
#endif // __focuswidget_hh