fixed listen to window state
This commit is contained in:
parent
c955d69323
commit
c31a8b5290
1 changed files with 10 additions and 6 deletions
|
@ -19,25 +19,29 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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 "Button.hh"
|
||||||
|
#include "Observer.hh"
|
||||||
|
|
||||||
|
class FluxboxWindow;
|
||||||
|
|
||||||
/// draws and handles basic window button graphic
|
/// draws and handles basic window button graphic
|
||||||
/**
|
class WinButton:public FbTk::Button, public FbTk::Observer {
|
||||||
window button
|
|
||||||
*/
|
|
||||||
class WinButton:public FbTk::Button {
|
|
||||||
public:
|
public:
|
||||||
/// draw type for the button
|
/// draw type for the button
|
||||||
enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE};
|
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);
|
unsigned int width, unsigned int height);
|
||||||
/// override for drawing
|
/// override for drawing
|
||||||
void exposeEvent(XExposeEvent &event);
|
void exposeEvent(XExposeEvent &event);
|
||||||
|
void buttonReleaseEvent(XButtonEvent &event);
|
||||||
/// override for redrawing
|
/// override for redrawing
|
||||||
void clear();
|
void clear();
|
||||||
|
void update(FbTk::Subject *subj);
|
||||||
private:
|
private:
|
||||||
void drawType();
|
void drawType();
|
||||||
Type m_type; ///< the button type
|
Type m_type; ///< the button type
|
||||||
|
const FluxboxWindow &m_listen_to;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue