2
* Copyright (C) 2010 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
19
#ifndef INDICATOR_OBJECT_FACTORY_H
20
#define INDICATOR_OBJECT_FACTORY_H
24
#include <sigc++/signal.h>
25
#include <sigc++/trackable.h>
26
#include "IndicatorObjectProxy.h"
28
class IndicatorObjectFactory : public sigc::trackable
32
// This could be empty, if the loading of Indicators is async, so you
33
// should be listening to the signals too
34
virtual std::vector<IndicatorObjectProxy *>& GetIndicatorObjects () = 0;
36
// If the implementation supports it, you'll get a refreshed list of
37
// Indicators (probably though a bunch of removed/added events)
38
virtual void ForceRefresh () = 0;
41
sigc::signal<void, IndicatorObjectProxy *> OnObjectAdded;
42
sigc::signal<void, IndicatorObjectProxy *> OnObjectRemoved;
43
sigc::signal<void, int, int> OnMenuPointerMoved;
46
std::vector<IndicatorObjectProxy *>_indicators;
49
#endif // INDICATOR_OBJECT_FACTORY_H