indicatoricon.h

来自「a IndicatorIcon in phone s desk example 」· C头文件 代码 · 共 103 行

H
103
字号
/*
 * ============================================================================
 *  Name     : CIndicatorIcon from CCoeControl
 *  Part of  : IndicatorIconEx
 *  Created  : 01/11/2006 by Vinod Kumar K V
 *  Description:
 *     Some utility functions.
 *  Version  :
 *  Copyright: Copyright (c) 1999 - 2006 Vinsofts Inc.
 *			   (http://cc.1asphost.com/vinsofts/)
 * ============================================================================
 */

#ifndef INDICATORICON_H
#define INDICATORICON_H

//  INCLUDES
#include <aknview.h>

// FORWARD DECLARATIONS
class RWindowGroup;
class CFbsBitmap;

// CLASS DECLARATION

/**
*  Popup window class
*
*/
class CIndicatorIcon : public CCoeControl
	{
	public:
		/**
		* Enumeration for indicator icon
		**/
		enum TIndicatorIcon 
			{
			EIndicatorIconEmpty = 0,
			EIndicatorIconAppActive,
			EIndicatorIconAppInactive
			};

	public:
		/** 
		 * @function NewL
		 * 
		 * @discussion Construct a CIndicatorIcon
		 * @result a pointer to the created instance of CIndicatorIcon
		 */
		static CIndicatorIcon* NewL();

		/** 
		 * @function NewLC
		 * 
		 * @discussion Construct a CIndicatorIcon
		 * @result a pointer to the created instance of CIndicatorIcon
		 */
		static CIndicatorIcon* NewLC();

		/**
		 * Destructor.
		 */
		virtual ~CIndicatorIcon();

	private:  // Constructors

		/**
		 * C++ default constructor.
		 */
		CIndicatorIcon();

		/**
		 * EPOC default constructor.
		 */
		void ConstructL();

	public: // New functions

		/**
		* SetIndicatorIconL(TIndicatorIcon aIconType)
		*
		* Set the indicator icon.
		*/
		void SetIndicatorIconL(TIndicatorIcon aIconType, TBool aRedraw = EFalse);

	private: // Functions from base classes

		/**
		 * From CCoeControl,Draw.
		 * @param Specified area for drawing
		 */
		void Draw(const TRect& aRect) const;

	private:  // Data
		RWindowGroup iMyWindowGroup;
		CFbsBitmap *iIndicator;
		CFbsBitmap *iIndicatorMask;
	};

#endif // INDICATORICON_H

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?