25
25
#include "StaticCairoText.h"
26
26
#include "LayoutSystem.h"
27
27
#include "BackgroundEffectHelper.h"
28
#include "UnityWindowView.h"
29
30
#include "Introspectable.h"
48
class SwitcherView : public debug::Introspectable, public nux::View
51
class SwitcherView : public debug::Introspectable, public ui::UnityWindowView
50
NUX_DECLARE_OBJECT_TYPE(SwitcherView, nux::View);
53
NUX_DECLARE_OBJECT_TYPE(SwitcherView, ui::UnityWindowView);
52
55
typedef nux::ObjectPtr<SwitcherView> Ptr;
54
SwitcherView(NUX_FILE_LINE_PROTO);
55
58
virtual ~SwitcherView();
57
60
ui::LayoutWindowList ExternalTargets ();
59
62
void SetModel(SwitcherModel::Ptr model);
60
63
SwitcherModel::Ptr GetModel();
62
void SetupBackground ();
64
65
nux::Property<bool> render_boxes;
65
66
nux::Property<int> border_size;
66
67
nux::Property<int> flat_spacing;
70
71
nux::Property<int> vertical_size;
71
72
nux::Property<int> text_size;
72
73
nux::Property<int> animation_length;
74
nux::Property<int> monitor;
73
75
nux::Property<double> spread_size;
74
nux::Property<nux::Color> background_color;
77
78
// Introspectable methods
78
79
std::string GetName() const;
79
80
void AddProperties(GVariantBuilder* builder);
81
void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
82
void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw);
82
void PreDraw(nux::GraphicsEngine& GfxContext, bool force_draw);
83
void DrawOverlay(nux::GraphicsEngine& GfxContext, bool force_draw, nux::Geometry clip);
84
nux::Geometry GetBackgroundGeometry();
84
86
ui::RenderArg InterpolateRenderArgs(ui::RenderArg const& start, ui::RenderArg const& end, float progress);
85
87
nux::Geometry InterpolateBackground (nux::Geometry const& start, nux::Geometry const& end, float progress);
87
89
std::list<ui::RenderArg> RenderArgsFlat(nux::Geometry& background_geo, int selection, timespec const& current);
89
ui::RenderArg CreateBaseArgForIcon(launcher::AbstractLauncherIcon* icon);
91
ui::RenderArg CreateBaseArgForIcon(launcher::AbstractLauncherIcon::Ptr icon);
91
void DrawBackground(nux::GraphicsEngine& GfxContext, nux::Geometry const& geo);
93
void OnSelectionChanged(launcher::AbstractLauncherIcon* selection);
93
void OnSelectionChanged(launcher::AbstractLauncherIcon::Ptr selection);
94
94
void OnDetailSelectionChanged (bool detail);
95
95
void OnDetailSelectionIndexChanged (unsigned int index);
122
122
guint redraw_handle_;
124
nux::BaseTexture* background_top_;
125
nux::BaseTexture* background_left_;
126
nux::BaseTexture* background_corner_;
127
124
nux::BaseTexture* rounding_texture_;
129
126
nux::StaticCairoText* text_view_;