~unity-team/unity/trusty-1066971

« back to all changes in this revision

Viewing changes to unity-shared/PlacesVScrollBar.h

  • Committer: Marco Trevisan (Treviño)
  • Date: 2014-08-06 14:09:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3802.
  • Revision ID: mail@3v1n0.net-20140806140930-knkc0x43ree376r1
PlacesOverlayVScrollBar and VScrollBarOverlayWindow: add support for scaling

Add a new ScrollView class to create ScrollViews with an OverlayScrollbar and with scaling support.
Using them in dash Scopes and Previews.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef PLACES_VSCROLLBAR_H
21
21
#define PLACES_VSCROLLBAR_H
22
22
 
23
 
#include <Nux/Nux.h>
24
 
#include <Nux/View.h>
25
 
#include <Nux/ScrollView.h>
26
 
#include <Nux/BaseWindow.h>
27
23
#include <Nux/VScrollBar.h>
28
 
#include <NuxGraphics/CairoGraphics.h>
29
24
 
30
25
namespace unity
31
26
{
36
31
{
37
32
public:
38
33
  PlacesVScrollBar(NUX_FILE_LINE_PROTO);
39
 
  virtual ~PlacesVScrollBar();
 
34
 
 
35
  nux::Property<double> scale;
40
36
 
41
37
protected:
42
38
  virtual void PreLayoutManagement();
43
39
  virtual long PostLayoutManagement(long LayoutResult);
44
40
 
45
 
  void Draw(nux::GraphicsEngine& gfxContext,
46
 
            bool                 forceDraw);
47
 
  void DrawContent(nux::GraphicsEngine& gfxContext,
48
 
            bool                 forceDraw);
 
41
  void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);
 
42
  void DrawContent(nux::GraphicsEngine& gfxContext, bool forceDraw);
49
43
 
50
44
private:
 
45
  void UpdateSize();
51
46
  void UpdateTexture();
52
47
  void DrawScrollbar(nux::GraphicsEngine& graphics_engine);
53
48
 
54
49
private:
55
 
  nux::BaseTexture* _slider_texture;
 
50
  nux::ObjectPtr<nux::BaseTexture> slider_texture_;
56
51
};
57
52
 
58
53
} // namespace dash