2003-02-18 15:06:28 +00:00
|
|
|
// FbMenu.hh for Fluxbox Window Manager
|
2005-01-24 18:34:57 +00:00
|
|
|
// Copyright (c) 2003 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
2003-07-10 11:25:13 +00:00
|
|
|
// and Simon Bowden (rathnor at users.sourceforge.net)
|
2003-02-03 13:58:09 +00:00
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
// copy of this software and associated documentation files (the "Software"),
|
|
|
|
// to deal in the Software without restriction, including without limitation
|
|
|
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
// and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
// Software is furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// 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.
|
|
|
|
|
2004-11-19 11:37:27 +00:00
|
|
|
// $Id$
|
2003-02-03 13:58:09 +00:00
|
|
|
|
2003-02-18 15:06:28 +00:00
|
|
|
#ifndef FBMENU_HH
|
|
|
|
#define FBMENU_HH
|
2003-02-03 13:58:09 +00:00
|
|
|
|
|
|
|
#include "Menu.hh"
|
|
|
|
#include "XLayerItem.hh"
|
2003-07-10 11:25:13 +00:00
|
|
|
#include <memory>
|
2003-02-03 13:58:09 +00:00
|
|
|
|
2003-07-10 11:25:13 +00:00
|
|
|
class MenuTheme;
|
|
|
|
class Shape;
|
|
|
|
/// a layered and shaped menu
|
2003-02-18 15:06:28 +00:00
|
|
|
class FbMenu:public FbTk::Menu {
|
2003-02-03 13:58:09 +00:00
|
|
|
public:
|
2003-12-10 23:08:06 +00:00
|
|
|
FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
2003-07-10 11:25:13 +00:00
|
|
|
FbTk::XLayer &layer);
|
2004-06-27 13:43:09 +00:00
|
|
|
virtual ~FbMenu();
|
2004-12-13 14:03:17 +00:00
|
|
|
void updateMenu(int index = -1);
|
2003-07-10 11:25:13 +00:00
|
|
|
void clearWindow();
|
2003-02-03 13:58:09 +00:00
|
|
|
void raise() { m_layeritem.raise(); }
|
|
|
|
void lower() { m_layeritem.lower(); }
|
2003-07-10 11:25:13 +00:00
|
|
|
void reconfigure();
|
2003-02-03 13:58:09 +00:00
|
|
|
private:
|
|
|
|
FbTk::XLayerItem m_layeritem;
|
2003-07-10 11:25:13 +00:00
|
|
|
std::auto_ptr<Shape> m_shape;
|
2003-02-03 13:58:09 +00:00
|
|
|
};
|
|
|
|
|
2003-02-18 15:06:28 +00:00
|
|
|
#endif // FBMENU_HH
|
2003-02-03 13:58:09 +00:00
|
|
|
|