openbox/otk/focuswidget.hh

47 lines
1.1 KiB
C++
Raw Normal View History

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 OtkFocusWidget : public OtkWidget {
public:
2002-12-24 21:27:16 +00:00
OtkFocusWidget(otk::OtkWidget *parent, Direction = Horizontal);
virtual ~OtkFocusWidget();
2002-11-13 10:19:28 +00:00
virtual void focus(void);
virtual void unfocus(void);
2002-12-24 21:27:16 +00:00
virtual void setTexture(otk::BTexture *texture);
virtual void setBorderColor(const otk::BColor *color);
2002-11-13 10:19:28 +00:00
2002-12-24 21:27:16 +00:00
inline void setUnfocusTexture(otk::BTexture *texture)
2002-11-13 10:19:28 +00:00
{ _unfocus_texture = texture; }
2002-12-24 21:27:16 +00:00
inline otk::BTexture *getUnfocusTexture(void) const
2002-11-13 10:19:28 +00:00
{ return _unfocus_texture; }
2002-12-24 21:27:16 +00:00
inline void setUnfocusBorderColor(const otk::BColor *color)
{ _unfocus_bcolor = color; }
2002-12-24 21:27:16 +00:00
inline const otk::BColor *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:
BTexture *_unfocus_texture;
BTexture *_focus_texture;
const BColor *_unfocus_bcolor;
const BColor *_focus_bcolor;
2002-11-13 10:19:28 +00:00
};
}
#endif // __focuswidget_hh