~ubuntu-branches/ubuntu/precise/nux/precise-proposed

« back to all changes in this revision

Viewing changes to Nux/Coverflow.h

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-02-17 13:31:49 UTC
  • mfrom: (1.1.36)
  • Revision ID: package-import@ubuntu.com-20120217133149-2yx9k4d0en35b9vh
Tags: 2.4.0-0ubuntu1
* New upstream release.
  - Dash - Behaviour of the 'All' button in the Dash filters broken in
    several ways   (LP: #841864)
  - Launcher, Spread - Clicking on a Launcher app icon a second time to
    close a spread is broken (LP: #893670)
  - launcher not hiding in one design-specified case (LP: #919162)
  - compiz crashed with SIGSEGV in
    nux::GridHLayout::KeyNavIterationRowOrder() (LP: #916088)

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) 2012 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: Jason Smith <jason.smith@canonical.com>
 
18
 */
 
19
 
 
20
#ifndef COVERFLOWVIEW_H
 
21
#define COVERFLOWVIEW_H
 
22
 
 
23
#include "Nux/ClientArea.h"
 
24
#include "NuxCore/Math/Vector4.h"
 
25
#include "CoverflowModel.h"
 
26
 
 
27
#if defined(NUX_OS_WINDOWS)
 
28
  #define PKGDATADIR "../../data/"
 
29
#endif
 
30
 
 
31
namespace nux
 
32
{
 
33
  class Coverflow: public nux::ClientArea
 
34
  {
 
35
    NUX_DECLARE_OBJECT_TYPE(Coverflow, ClientArea);
 
36
  public:
 
37
    Coverflow();
 
38
    ~Coverflow();
 
39
 
 
40
    Property<unsigned int> animation_length;
 
41
 
 
42
    Property<float> camera_motion_drift_angle;
 
43
    
 
44
    Property<bool> camera_motion_drift_enabled;
 
45
 
 
46
    Property<float> edge_fade;
 
47
 
 
48
    Property<int> flat_icons;
 
49
    
 
50
    Property<float> folding_angle;
 
51
 
 
52
    Property<float> folding_depth;
 
53
 
 
54
    Property<float> folding_rate;
 
55
 
 
56
    Property<float> fov;
 
57
 
 
58
    Property<float> kinetic_scroll_rate;
 
59
 
 
60
    Property<float> mouse_drag_rate;
 
61
 
 
62
    Property<float> pinching;
 
63
 
 
64
    Property<bool> pop_out_selected;
 
65
 
 
66
    Property<float> reflection_fadeout_distance;
 
67
    
 
68
    Property<float> reflection_strength;
 
69
 
 
70
    Property<float> space_between_icons;
 
71
 
 
72
    Property<CoverflowModel::Ptr> model;
 
73
 
 
74
    Property<bool> show_labels;
 
75
 
 
76
    Property<bool> show_drop_shadow;
 
77
    
 
78
    Property<bool> show_reflection;
 
79
 
 
80
    Property<bool> true_perspective;
 
81
 
 
82
    Property<float> y_offset;
 
83
 
 
84
    Property<float> reflection_size;
 
85
 
 
86
    bool AcceptKeyNavFocus();
 
87
 
 
88
    void SetCameraDistance(float distance);
 
89
 
 
90
    float ViewportWidthAtDepth(float depth);
 
91
    float ViewportHeightAtDepth(float depth);
 
92
  protected:
 
93
    virtual bool InspectKeyEvent(unsigned int eventType, unsigned int keysym, const char* character);
 
94
    virtual void ClientDraw(nux::GraphicsEngine& graphics_engine, nux::DrawAreaContext &ctx, bool force_draw);
 
95
 
 
96
  private:
 
97
    struct Impl;
 
98
    Impl* pimpl;
 
99
  };
 
100
}
 
101
 
 
102
#endif // COVERFLOWVIEW_H
 
103