00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00023
00024 #include "Button.hh"
00025 #include "Observer.hh"
00026
00027 class FluxboxWindow;
00028 class WinButtonTheme;
00029
00031 class WinButton:public FbTk::Button, public FbTk::Observer {
00032 public:
00034 enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE};
00035 WinButton(const FluxboxWindow &listen_to,
00036 WinButtonTheme &theme,
00037 Type buttontype, const FbTk::FbWindow &parent, int x, int y,
00038 unsigned int width, unsigned int height);
00040 void exposeEvent(XExposeEvent &event);
00041 void buttonReleaseEvent(XButtonEvent &event);
00043 void clear();
00044 void update(FbTk::Subject *subj);
00045 private:
00046 void drawType(bool clear, bool no_trans);
00047 Type m_type;
00048 const FluxboxWindow &m_listen_to;
00049 WinButtonTheme &m_theme;
00050
00051 };