~iaz/unity/menubar-lp789979

871.4.4 by Neil Jagdish Patel
Add support for auto-resziing
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2
/*
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
3
* Copyright (C) 2010, 2011 Canonical Ltd
871.4.4 by Neil Jagdish Patel
Add support for auto-resziing
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: Neil Jagdish Patel <neil.patel@canonical.com>
18
*/
19
2356.2.3 by Gord Allott
added tv form factor
20
#ifndef UNITY_SETTINGS_H
21
#define UNITY_SETTINGS_H
871.4.4 by Neil Jagdish Patel
Add support for auto-resziing
22
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
23
#include <sigc++/signal.h>
2356.2.5 by Gord Allott
added in a switch for unity standalone mode against tv mode
24
#include <Nux/Nux.h>
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
25
26
namespace unity
27
{
28
29
enum class FormFactor
30
{
31
  DESKTOP = 1,
2356.2.3 by Gord Allott
added tv form factor
32
  NETBOOK = 2,
33
  TV
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
34
};
35
36
class Settings
871.4.4 by Neil Jagdish Patel
Add support for auto-resziing
37
{
38
public:
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
39
  Settings();
40
  ~Settings();
41
42
  static Settings& Instance();
43
44
  // NOTE: could potentially refactor this into a nux::Property
45
  FormFactor GetFormFactor() const;
1418.2.5 by Neil Jagdish Patel
Fullscreen support
46
  void SetFormFactor(FormFactor factor);
47
2356.2.4 by Gord Allott
added standdalone flag and always maximised flag into Settigns and Dash Style
48
  nux::Property<bool> is_standalone;
1418.2.5 by Neil Jagdish Patel
Fullscreen support
49
  sigc::signal<void> changed;
1307 by Neil Jagdish Patel
Update formatting to match style (as close as possible)
50
51
private:
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
52
  class Impl;
53
  Impl* pimpl;
871.4.4 by Neil Jagdish Patel
Add support for auto-resziing
54
};
55
1635.1.7 by Tim Penhey
Put DashSettings in a namespace, give it a pimpl, and refactor the form factor enum.
56
}
57
2356.2.3 by Gord Allott
added tv form factor
58
#endif // UNITY_SETTINGS_H