41
42
m_screen(scr), m_fbwin(fbwin),
42
43
m_instance_name("fluxbox"), m_class_name("fluxbox"),
43
44
m_focused(false), m_attention_state(false),
44
m_titlesig(*this), m_focussig(*this), m_diesig(*this),
45
m_attentionsig(*this) { }
46
m_attentionsig(*this),
46
49
virtual ~Focusable() { }
117
// Used for both title and icon changes.
118
FbTk::Subject &titleSig() { return m_titlesig; }
119
// Used for both title and icon changes.
120
const FbTk::Subject &titleSig() const { return m_titlesig; }
121
FbTk::Subject &focusSig() { return m_focussig; }
122
const FbTk::Subject &focusSig() const { return m_focussig; }
120
typedef FbTk::Signal<void, const std::string&, Focusable&> TitleSignal;
121
/// Used for both title and icon changes.
122
TitleSignal &titleSig() { return m_titlesig; }
123
/// Used for both title and icon changes.
124
const TitleSignal &titleSig() const { return m_titlesig; }
125
FbTk::Signal<void, Focusable&> &focusSig() { return m_focussig; }
126
const FbTk::Signal<void, Focusable&> &focusSig() const { return m_focussig; }
123
127
FbTk::Subject &dieSig() { return m_diesig; }
124
128
const FbTk::Subject &dieSig() const { return m_diesig; }
125
129
FbTk::Subject &attentionSig() { return m_attentionsig; }
126
130
const FbTk::Subject &attentionSig() const { return m_attentionsig; }
127
131
/** @} */ // end group signals
133
/// Notify any listeners that the focus changed for this window.
134
void notifyFocusChanged() {
135
m_focussig.emit(*this);
130
139
BScreen &m_screen; //< the screen in which it works
131
140
FluxboxWindow *m_fbwin; //< the working fluxbox window
136
145
FbTk::PixmapWithMask m_icon; //< icon pixmap with mask
138
147
// state and hint signals
139
FocusSubject m_titlesig, m_focussig, m_diesig, m_attentionsig;
148
FocusSubject m_diesig, m_attentionsig;
151
FbTk::Signal<void, Focusable&> m_focussig;
152
TitleSignal m_titlesig;
142
155
#endif // FOCUSABLE_HH