~ubuntu-branches/ubuntu/oneiric/nux/oneiric-updates

« back to all changes in this revision

Viewing changes to Nux/TextureArea.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-08-25 13:42:45 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20110825134245-edi1g8cm2iqibae7
Tags: 1.4.0-0ubuntu1
* New upstream version:
  - "scrolling down in a lens brings it back to the top automatically" 
    (lp: #821534)
* debian/rules: updated shlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 *
20
20
 */
21
21
 
22
 
 
23
22
#ifndef TEXTUREAREA_H
24
23
#define TEXTUREAREA_H
25
24
 
27
26
 
28
27
namespace nux
29
28
{
30
 
 
31
 
  class TextureArea : public View
 
29
  class TextureArea: public View
32
30
  {
33
 
    NUX_DECLARE_OBJECT_TYPE (TextureArea, View);
 
31
    NUX_DECLARE_OBJECT_TYPE(TextureArea, View);
34
32
  public:
35
 
    TextureArea (NUX_FILE_LINE_PROTO);
 
33
    TextureArea(NUX_FILE_LINE_PROTO);
36
34
    virtual ~TextureArea();
37
35
 
38
36
    /*!
40
38
        It \a layer was allocated on the heap, it must be deleted later.
41
39
        @param layer A pointer to a BaseTexture class.
42
40
    */
43
 
    void SetTexture (BaseTexture *texture);
 
41
    void SetTexture(BaseTexture *texture);
44
42
 
45
43
    /*!
46
44
        Set the paint layer of this area. The \a layer argument to this function is cloned by this object.
47
45
        It \a layer was allocated on the heap, it must be deleted later.
48
46
        @param layer A pointer to a concrete class that inherit from AbstractPaintLayer.
49
47
    */
50
 
    void SetPaintLayer (AbstractPaintLayer *layer);
 
48
    void SetPaintLayer(AbstractPaintLayer *layer);
51
49
 
52
50
    //! Convenience function to set a 2D rotation when rendering the area.
53
51
    /*!
54
52
        The rotation is only used for rendering. It should not be used for something else.
55
53
    */
56
 
    void Set2DRotation (float angle);
 
54
    void Set2DRotation(float angle);
57
55
 
58
 
    Matrix4 Get2DRotation () const;
 
56
    Matrix4 Get2DRotation() const;
59
57
 
60
58
    sigc::signal<void, int, int> sigMouseDown;  //!< Signal emmitted when a mouse button is pressed over this area.
61
59
    sigc::signal<void, int, int> sigMouseDrag;  //!< Signal emmitted when the mouse is dragged over this area.
62
60
 
63
61
  protected:
64
 
    virtual long ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
65
62
    virtual void Draw (GraphicsEngine &GfxContext, bool force_draw);
66
63
    virtual void DrawContent (GraphicsEngine &GfxContext, bool force_draw);
67
64
    virtual void PostDraw (GraphicsEngine &GfxContext, bool force_draw);
 
65
 
68
66
    void RecvMouseDown (int x, int y, long button_flags, long key_flags);
69
67
    void RecvMouseUp (int x, int y, long button_flags, long key_flags);
70
68
    void RecvMouseEnter (int x, int y, long button_flags, long key_flags);