~3v1n0/unity/light-shortcuts

« back to all changes in this revision

Viewing changes to launcher/QuicklistManager.h

  • Committer: Marco Trevisan (Treviño)
  • Date: 2013-04-26 12:41:09 UTC
  • Revision ID: mail@3v1n0.net-20130426124109-t3b2shjah2omiqa2
Unity: Remove all the views, but the Shortcuts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2
 
/*
3
 
 * Copyright (C) 2010 Canonical Ltd
4
 
 *
5
 
 * This program is free software: you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License version 3 as
7
 
 * published by the Free Software Foundation.
8
 
 *
9
 
 * This program 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
12
 
 * GNU General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
 *
17
 
 * Authored by: Jamal Fanaian <j@jamalfanaian.com>
18
 
 */
19
 
 
20
 
#ifndef QUICKLISTMANAGER_H
21
 
#define QUICKLISTMANAGER_H
22
 
 
23
 
#include <NuxCore/ObjectPtr.h>
24
 
#include <sigc++/sigc++.h>
25
 
 
26
 
namespace nux { class BaseWindow; }
27
 
 
28
 
namespace unity {
29
 
 
30
 
class QuicklistView;
31
 
 
32
 
class QuicklistManager : public sigc::trackable
33
 
{
34
 
public:
35
 
  static QuicklistManager* Default();
36
 
  static void Destroy();
37
 
 
38
 
  ~QuicklistManager();
39
 
 
40
 
  nux::ObjectPtr<QuicklistView> Current();
41
 
 
42
 
  bool RegisterQuicklist(nux::ObjectPtr<QuicklistView> const& quicklist);
43
 
  void ShowQuicklist(nux::ObjectPtr<QuicklistView> const& quicklist, int tip_x, int tip_y, bool hide_existing_if_open = true);
44
 
  void HideQuicklist(nux::ObjectPtr<QuicklistView> const& quicklist);
45
 
 
46
 
  void RecvShowQuicklist(nux::BaseWindow* window);
47
 
  void RecvHideQuicklist(nux::BaseWindow* window);
48
 
 
49
 
  sigc::signal<void, nux::ObjectPtr<QuicklistView> const&> quicklist_opened;
50
 
  sigc::signal<void, nux::ObjectPtr<QuicklistView> const&> quicklist_closed;
51
 
 
52
 
private:
53
 
  QuicklistManager();
54
 
  static QuicklistManager* _default;
55
 
 
56
 
  std::list<nux::ObjectWeakPtr<QuicklistView>> _quicklist_list;
57
 
  nux::ObjectPtr<QuicklistView> _current_quicklist;
58
 
 
59
 
};
60
 
 
61
 
} // NAMESPACE
62
 
#endif
63