1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
3
* Copyright (C) 2012 Canonical Ltd
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.
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.
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/>.
17
* Authored by: Jason Smith <jason.smith@canonical.com>
20
#ifndef COVERFLOWVIEW_H
21
#define COVERFLOWVIEW_H
23
#include "Nux/ClientArea.h"
24
#include "NuxCore/Math/Vector4.h"
25
#include "CoverflowModel.h"
27
#if defined(NUX_OS_WINDOWS)
28
#define PKGDATADIR "../../data/"
33
class Coverflow: public nux::ClientArea
35
NUX_DECLARE_OBJECT_TYPE(Coverflow, ClientArea);
40
Property<unsigned int> animation_length;
42
Property<float> camera_motion_drift_angle;
44
Property<bool> camera_motion_drift_enabled;
46
Property<float> edge_fade;
48
Property<int> flat_icons;
50
Property<float> folding_angle;
52
Property<float> folding_depth;
54
Property<float> folding_rate;
58
Property<float> kinetic_scroll_rate;
60
Property<float> mouse_drag_rate;
62
Property<float> pinching;
64
Property<bool> pop_out_selected;
66
Property<float> reflection_fadeout_distance;
68
Property<float> reflection_strength;
70
Property<float> space_between_icons;
72
Property<CoverflowModel::Ptr> model;
74
Property<bool> show_labels;
76
Property<bool> show_drop_shadow;
78
Property<bool> show_reflection;
80
Property<bool> true_perspective;
82
Property<float> y_offset;
84
Property<float> reflection_size;
86
bool AcceptKeyNavFocus();
88
void SetCameraDistance(float distance);
90
float ViewportWidthAtDepth(float depth);
91
float ViewportHeightAtDepth(float depth);
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);
102
#endif // COVERFLOWVIEW_H