~3v1n0/unity/overlay-border-scale

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/ShortcutView.h

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <Nux/View.h>
29
29
#include <Nux/VLayout.h>
30
30
 
 
31
#include "UnityWindowView.h"
31
32
#include "BackgroundEffectHelper.h"
32
33
#include "ShortcutModel.h"
33
34
 
36
37
namespace shortcut
37
38
{
38
39
 
39
 
class View : public nux::View
 
40
class View : public ui::UnityWindowView
40
41
{
41
 
  NUX_DECLARE_OBJECT_TYPE(View, nux::View);
 
42
  NUX_DECLARE_OBJECT_TYPE(View, ui::UnityWindowView);
42
43
public:
43
44
  typedef nux::ObjectPtr<View> Ptr;
44
45
 
45
46
  // Ctor and dtor
46
 
  View(NUX_FILE_LINE_PROTO);
 
47
  View();
47
48
  ~View();
48
49
  
49
50
  // Public methods
50
51
  void SetModel(Model::Ptr model);
51
52
  Model::Ptr GetModel();
52
 
 
53
 
  void SetupBackground(bool enabled);
54
 
 
55
 
  // Properties  
56
 
  nux::Property<nux::Color> background_color;
57
53
  
58
54
protected:
59
55
  // Protected methods
60
 
  void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
61
 
  void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw);
 
56
  void DrawOverlay(nux::GraphicsEngine& GfxContext, bool force_draw, nux::Geometry clip);
 
57
  nux::Geometry GetBackgroundGeometry();
62
58
 
63
59
private:
64
60
  // Private methods
66
62
  nux::LinearLayout* CreateShortKeyEntryLayout(AbstractHint* hint);
67
63
  nux::LinearLayout* CreateIntermediateLayout();
68
64
 
69
 
  void DrawBackground(nux::GraphicsEngine& GfxContext, nux::Geometry const& geo);
70
65
  void RenderColumns();
71
66
    
72
67
  // Private members
73
68
  Model::Ptr model_;
74
69
 
75
 
  nux::BaseTexture* background_top_;
76
 
  nux::BaseTexture* background_left_;
77
 
  nux::BaseTexture* background_corner_;
78
 
  nux::BaseTexture* rounding_texture_;
79
 
 
80
70
  nux::VLayout* layout_;
81
71
  nux::HLayout* columns_layout_;
82
72
  std::vector<nux::VLayout*> columns_;
83
 
  
84
 
  BackgroundEffectHelper bg_effect_helper_;
85
 
  
86
73
};
87
74
 
88
75
} // namespace shortcut