~macslow/nux/nux.fix-839476

« back to all changes in this revision

Viewing changes to Nux/TextureArea.h

  • Committer: Neil Jagdish Patel
  • Date: 2010-09-01 22:11:16 UTC
  • Revision ID: neil.patel@canonical.com-20100901221116-4hb351fcg6s5nka0
Initial Nux integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010 Inalogic Inc.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it 
 
5
 * under the terms of the GNU Lesser General Public License version 3, as
 
6
 * published by the  Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but 
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranties of 
 
10
 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 
 
11
 * PURPOSE.  See the applicable version of the GNU Lesser General Public 
 
12
 * License for more details.
 
13
 * 
 
14
 * You should have received a copy of both the GNU Lesser General Public 
 
15
 * License version 3 along with this program.  If not, see 
 
16
 * <http://www.gnu.org/licenses/>
 
17
 *
 
18
 * Authored by: Jay Taoko <jay.taoko_AT_gmail_DOT_com>
 
19
 *
 
20
 */
 
21
 
 
22
 
 
23
#ifndef TEXTUREAREA_H
 
24
#define TEXTUREAREA_H
 
25
 
 
26
#include "NuxGraphics/OpenGLEngine.h"
 
27
 
 
28
NAMESPACE_BEGIN_GUI
 
29
 
 
30
class TextureArea : public ActiveInterfaceObject
 
31
{
 
32
public:
 
33
    TextureArea();
 
34
    ~TextureArea();
 
35
    virtual long ProcessEvent(IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
 
36
    virtual void Draw(GraphicsContext& GfxContext, bool force_draw);
 
37
    virtual void DrawContent(GraphicsContext& GfxContext, bool force_draw);
 
38
    virtual void PostDraw(GraphicsContext& GfxContext, bool force_draw);
 
39
 
 
40
    void SetTexture(NTexture* texture);
 
41
    void SetPaintLayer(AbstractPaintLayer* layer);
 
42
    //void SetTexture(const TCHAR* TextureFilename);
 
43
    void RecvMouseDown(int x, int y, long button_flags, long key_flags);
 
44
    void RecvMouseDrag(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
 
45
 
 
46
    sigc::signal<void, int, int> sigMouseDown;
 
47
    sigc::signal<void, int, int> sigMouseDrag;
 
48
 
 
49
private:
 
50
    AbstractPaintLayer* m_PaintLayer;
 
51
};
 
52
NAMESPACE_END_GUI
 
53
 
 
54
#endif // TEXTUREAREA_H