1
/*****************************************************************
3
* Copyright (c) 2005 Aaron J. Seigo <aseigo@kde.org>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License version 2 as published by the Free Software Foundation.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public License
15
* along with this library; see the file COPYING.LIB. If not, write to
16
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
19
*****************************************************************/
23
#ifndef abstractpanelmanager_h
24
#define abstractpanelmanager_h
26
class ExtensionContainer;
28
class KDE_EXPORT AbstractPanelManager
33
* Returns the manager for the panels
34
* Must be initialized the a subclass as self() does not do any
35
* initializing itself but merely return m_manager
37
static AbstractPanelManager* self() { return m_manager; }
40
* Returns the next panel number in the stacking order
42
virtual int nextPanelOrder() = 0;
45
* Given a preferred position, returns the position that the extension
46
* should appear at when first created.
48
* @param preferred the position that this extension would start at
49
* given the option of doing so
51
virtual Plasma::Position initialPanelPosition(Plasma::Position preferred) = 0;
54
* This method returns the rectangular area defining the available
55
* desktop space available to this container after removing all reserved
56
* spaces due to, for instance, other panels with a higher stacking
59
* @param container the container
60
* @param XineramaScreen the screen that this extension is on. Use
61
* Plasma::AllXineramaScreens to signal that it is not on any
64
virtual QRect workArea(ExtensionContainer* container,
65
int XineramaScreen) = 0;
68
* Given an extension, this method returns whether it is being used as
69
* a universal menu bar
71
* @param container the container to check for being the menu bar
72
* @return returns true if container is a menu bar, otherwise false
74
virtual bool isMenuBar(const QWidget* panel) const = 0;
77
AbstractPanelManager();
78
virtual ~AbstractPanelManager();
80
static AbstractPanelManager* m_manager;
86
#endif // multiple inclusion guard