news download themes documentation links










ToolbarItem.hh

00001 // ToolbarItem.hh
00002 // Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
00003 //                and Simon Bowden    (rathnor at users.sourceforge.net)
00004 //
00005 // Permission is hereby granted, free of charge, to any person obtaining a
00006 // copy of this software and associated documentation files (the "Software"),
00007 // to deal in the Software without restriction, including without limitation
00008 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00009 // and/or sell copies of the Software, and to permit persons to whom the
00010 // Software is furnished to do so, subject to the following conditions:
00011 //
00012 // The above copyright notice and this permission notice shall be included in
00013 // all copies or substantial portions of the Software.
00014 //
00015 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00018 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00020 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00021 // DEALINGS IN THE SOFTWARE.
00022 
00023 // $Id: ToolbarItem.hh,v 1.3 2003/10/31 10:37:09 rathnor Exp $
00024 
00025 #ifndef TOOLBARITEM_HH
00026 #define TOOLBARITEM_HH
00027 
00029 class ToolbarItem {
00030 public:
00032     enum Type { 
00033         FIXED,  
00034         RELATIVE 
00035     };
00036 
00037     explicit ToolbarItem(Type type);
00038     virtual ~ToolbarItem();
00039 
00040     virtual void move(int x, int y) = 0;
00041     virtual void resize(unsigned int width, unsigned int height) = 0;
00042     virtual void moveResize(int x, int y,
00043                             unsigned int width, unsigned int height) = 0;
00044 
00045     virtual void show() = 0;
00046     virtual void hide() = 0;
00047     virtual unsigned int width() const = 0;
00048     virtual unsigned int height() const = 0;
00049     virtual unsigned int borderWidth() const = 0;
00050     // some items might be there, but effectively empty, so shouldn't appear
00051     virtual bool active() { return true; }
00052 
00053     void setType(Type type) { m_type = type; }
00054     Type type() const { return m_type; }
00055 
00056 private:
00057     Type m_type;
00058 };
00059 
00060 #endif // TOOLBARITEM_HH

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