all repos — fluxbox @ c31a8b5290eb4968b1be38e01cf37ca68e59e46e

custom fork of the fluxbox windowmanager

fixed listen to window state
fluxgen fluxgen
commit

c31a8b5290eb4968b1be38e01cf37ca68e59e46e

parent

c955d69323bb343c4921ac5017c2f40563fac9d1

1 files changed, 10 insertions(+), 6 deletions(-)

jump to
M src/WinButton.hhsrc/WinButton.hh

@@ -19,25 +19,29 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -/// $Id: WinButton.hh,v 1.2 2003/03/22 11:38:24 fluxgen Exp $ +/// $Id: WinButton.hh,v 1.3 2003/04/25 17:29:58 fluxgen Exp $ #include "Button.hh" +#include "Observer.hh" + +class FluxboxWindow; /// draws and handles basic window button graphic -/** - window button - */ -class WinButton:public FbTk::Button { +class WinButton:public FbTk::Button, public FbTk::Observer { public: /// draw type for the button enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE}; - WinButton(Type buttontype, const FbTk::FbWindow &parent, int x, int y, + WinButton(const FluxboxWindow &listen_to, + Type buttontype, const FbTk::FbWindow &parent, int x, int y, unsigned int width, unsigned int height); /// override for drawing void exposeEvent(XExposeEvent &event); + void buttonReleaseEvent(XButtonEvent &event); /// override for redrawing void clear(); + void update(FbTk::Subject *subj); private: void drawType(); Type m_type; ///< the button type + const FluxboxWindow &m_listen_to; };