news download themes documentation links










WinButton.hh

00001 // WinButton.hh for Fluxbox Window Manager
00002 // Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
00003 //
00004 // Permission is hereby granted, free of charge, to any person obtaining a
00005 // copy of this software and associated documentation files (the "Software"),
00006 // to deal in the Software without restriction, including without limitation
00007 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008 // and/or sell copies of the Software, and to permit persons to whom the
00009 // Software is furnished to do so, subject to the following conditions:
00010 //
00011 // The above copyright notice and this permission notice shall be included in
00012 // all copies or substantial portions of the Software.
00013 //
00014 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00017 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00019 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00020 // DEALINGS IN THE SOFTWARE.
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); // don't update transparency (eg in clear)
00047     Type m_type; 
00048     const FluxboxWindow &m_listen_to;
00049     WinButtonTheme &m_theme;
00050 
00051 };

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA