0
|
1 |
/*
|
|
2 |
============================================================================
|
|
3 |
Name : NPRAppView.h
|
|
4 |
Author : John Kern
|
|
5 |
Copyright (c) 2009 Symbian Foundation Ltd
|
|
6 |
This component and the accompanying materials are made available
|
|
7 |
under the terms of the License "Eclipse Public License v1.0"
|
|
8 |
which accompanies this distribution, and is available
|
|
9 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
10 |
|
|
11 |
Initial Contributors:
|
|
12 |
Symbian Foundation Ltd - initial contribution.
|
|
13 |
|
|
14 |
Contributors: John Kern
|
|
15 |
Description : Declares view class for application.
|
|
16 |
============================================================================
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef __NPRAPPVIEW_h__
|
|
20 |
#define __NPRAPPVIEW_h__
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <coecntrl.h>
|
|
24 |
|
|
25 |
// CLASS DECLARATION
|
|
26 |
class CNPRAppView : public CCoeControl
|
|
27 |
{
|
|
28 |
public:
|
|
29 |
// New methods
|
|
30 |
|
|
31 |
/**
|
|
32 |
* NewL.
|
|
33 |
* Two-phased constructor.
|
|
34 |
* Create a CNPRAppView object, which will draw itself to aRect.
|
|
35 |
* @param aRect The rectangle this view will be drawn to.
|
|
36 |
* @return a pointer to the created instance of CNPRAppView.
|
|
37 |
*/
|
|
38 |
static CNPRAppView* NewL(const TRect& aRect);
|
|
39 |
|
|
40 |
/**
|
|
41 |
* NewLC.
|
|
42 |
* Two-phased constructor.
|
|
43 |
* Create a CNPRAppView object, which will draw itself
|
|
44 |
* to aRect.
|
|
45 |
* @param aRect Rectangle this view will be drawn to.
|
|
46 |
* @return A pointer to the created instance of CNPRAppView.
|
|
47 |
*/
|
|
48 |
static CNPRAppView* NewLC(const TRect& aRect);
|
|
49 |
|
|
50 |
/**
|
|
51 |
* ~CNPRAppView
|
|
52 |
* Virtual Destructor.
|
|
53 |
*/
|
|
54 |
virtual ~CNPRAppView();
|
|
55 |
|
|
56 |
public:
|
|
57 |
// Functions from base classes
|
|
58 |
|
|
59 |
/**
|
|
60 |
* From CCoeControl, Draw
|
|
61 |
* Draw this CNPRAppView to the screen.
|
|
62 |
* @param aRect the rectangle of this view that needs updating
|
|
63 |
*/
|
|
64 |
void Draw(const TRect& aRect) const;
|
|
65 |
|
|
66 |
/**
|
|
67 |
* From CoeControl, SizeChanged.
|
|
68 |
* Called by framework when the view size is changed.
|
|
69 |
*/
|
|
70 |
virtual void SizeChanged();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* From CoeControl, HandlePointerEventL.
|
|
74 |
* Called by framework when a pointer touch event occurs.
|
|
75 |
* Note: although this method is compatible with earlier SDKs,
|
|
76 |
* it will not be called in SDKs without Touch support.
|
|
77 |
* @param aPointerEvent the information about this event
|
|
78 |
*/
|
|
79 |
virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
|
|
80 |
|
|
81 |
private:
|
|
82 |
// Constructors
|
|
83 |
|
|
84 |
/**
|
|
85 |
* ConstructL
|
|
86 |
* 2nd phase constructor.
|
|
87 |
* Perform the second phase construction of a
|
|
88 |
* CNPRAppView object.
|
|
89 |
* @param aRect The rectangle this view will be drawn to.
|
|
90 |
*/
|
|
91 |
void ConstructL(const TRect& aRect);
|
|
92 |
|
|
93 |
/**
|
|
94 |
* CNPRAppView.
|
|
95 |
* C++ default constructor.
|
|
96 |
*/
|
|
97 |
CNPRAppView();
|
|
98 |
|
|
99 |
};
|
|
100 |
|
|
101 |
#endif // __NPRAPPVIEW_h__
|
|
102 |
// End of File
|