~unity-team/unity/trusty-1332509

« back to all changes in this revision

Viewing changes to dash/previews/PreviewInfoHintWidget.h

  • Committer: CI bot
  • Author(s): Stephen M. Webb, Marco Trevisan (Treviño), Andrea Azzarone, Pawel Szubert, Chris Townsend, Andrea Azzarone, Eleni Maria Stea
  • Date: 2014-08-26 13:48:28 UTC
  • mfrom: (3800.1.24 prepare-7.2.3-SRU)
  • Revision ID: ps-jenkins@lists.canonical.com-20140826134828-fkev1oisyfl9kbt3
Prepare fixes for upstream micro-release 7.2.3. Fixes: 1283415, 1292391, 1306211, 1312107, 1320051, 1320071, 1324114, 1339629, 1340171, 1340394, 1340477, 1340992, 1340996, 1342208, 1342731, 1347735

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
  NUX_DECLARE_OBJECT_TYPE(PreviewInfoHintWidget, nux::View);
49
49
 
50
50
  PreviewInfoHintWidget(dash::Preview::Ptr preview_model, int icon_size);
51
 
  virtual ~PreviewInfoHintWidget();
 
51
 
 
52
  nux::Property<double> scale;
52
53
 
53
54
  // From debug::Introspectable
54
55
  std::string GetName() const;
55
56
  void AddProperties(debug::IntrospectionData&);
56
 
  
 
57
 
57
58
  void PreLayoutManagement();
58
59
 
59
60
  sigc::signal<void> request_close() const { return preview_container_.request_close; }
61
62
protected:
62
63
  virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
63
64
  virtual void DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw);
64
 
  
 
65
 
65
66
  virtual bool AcceptKeyNavFocus() { return false; }
66
67
 
67
68
  void SetupBackground();
74
75
 
75
76
protected:
76
77
  int icon_size_;
 
78
  nux::HLayout* layout_;
 
79
  nux::VLayout* info_names_layout_;
 
80
  nux::VLayout* info_values_layout_;
77
81
 
78
 
  typedef nux::ObjectPtr<unity::StaticCairoText> StaticCairoTextPtr;
79
 
  typedef std::pair<StaticCairoTextPtr, StaticCairoTextPtr> InfoHint; 
80
 
  std::list<InfoHint> info_hints_;
81
 
  
82
82
  dash::Preview::Ptr preview_model_;
83
 
  typedef nux::ObjectPtr<nux::BaseTexture> BaseTexturePtr;
84
83
 
85
84
private:
86
85
  PreviewContainer preview_container_;
 
86
 
 
87
  void UpdateScale(double scale);
87
88
};
88
89
 
89
90
} // namespace previews