1 // This file is a part of Simple Launcher
3 // Copyright (C) 2006, Mikhail Sobolev
5 // Simple Launcher is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License version 2 as published by
7 // the Free Software Foundation.
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 // You should have received a copy of the GNU General Public License along with
15 // this program; if not, write to the Free Software Foundation, Inc., 51
16 // Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef __LAUNCHABLE_ITEM_H__
19 #define __LAUNCHABLE_ITEM_H__
26 #include "launcher-item.h"
28 // TODO: or better use inheritance?
29 class LaunchableItem {
31 LaunchableItem(LauncherItem *, bool);
34 GdkPixbuf *getIcon(int icon_size) const { return myItem->getIcon(icon_size); }
36 const std::string& getName() const { return myItem->getName(); }
37 const std::string& getComment() const { return myItem->getComment(); }
38 const std::string& getService() const { return myItem->getService(); }
40 bool isEnabled(void) const { return myEnabled; }
42 void enable() { myEnabled = true; }
43 void disable() { myEnabled = false; }
44 void toggle() { myEnabled = !myEnabled; }
46 bool activate(osso_context_t *);
53 typedef std::vector<std::pair<std::string, LaunchableItem *> > LaunchableItems;