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