// Label.h: interface for the CLabel class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(__RV_LABEL_H_INCLUDED_)
#define __RV_LABEL_H_INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "indix.h"
//#include "..\incs\sst\ucut.h"

class INDIX_API CLabel : public CIndicater  
{
public:		
	enum{
		TA_LEFT_TOP   = RV_DT_LEFT | RV_DT_TOP,
		TA_TOP_CENTER = RV_DT_HCENTER | RV_DT_TOP,
		TA_RIGHT_TOP  = RV_DT_RIGHT | RV_DT_TOP,
		TA_LEFT_CENTER  = RV_DT_LEFT | RV_DT_VCENTER,
		TA_BOTH_CENTER  = RV_DT_VCENTER | RV_DT_HCENTER,
		TA_RIGHT_CENTER = RV_DT_RIGHT | RV_DT_VCENTER,
		TA_LEFT_BOTTOM  = RV_DT_LEFT | RV_DT_BOTTOM,
		TA_BOTTOM_CENTER = RV_DT_HCENTER | RV_DT_BOTTOM,
		TA_RIGHT_BOTTOM  = RV_DT_RIGHT | RV_DT_BOTTOM,
	};

public:
	CLabel();
	virtual ~CLabel();



	virtual void Show(CDelegate* pDelegate,int mode, BOOL bForce);	

	virtual BOOL Serialize(HANDLE device, BOOL bIn ) ;
	virtual CUCObj* Clone(  CUCObj* twin) ;

	
	virtual BOOL  Create(/*CDelegate* pDelegate=NULL,*/ const TCHAR* strName = NULL, UINT id =-1, int style = RV_UCS_ENABLE | RV_UCS_VISIBLE | RV_UCS_FILLBKG ) ;
	virtual void  Destroy(/*BOOL bEraseStroke=FALSE*/) ;
	  
	void  SetAlignment(int val){
		m_alignment =val;
		RV_UC_NOTIFY_REDRAW(RV_REDRAW_ALL);
	}

	int     GetAlignment() {return m_alignment; };
	//virtual void    SetTextColor(GRgb& val);
	//virtual void    SetBodyColor(GRgb& val);

//	GRgb&   GetTextColor() {return m_textColor;};
//	void    SetTextColor(GRgb& val);
	//GRgb  GetBackColor();
	//void  SetBackColor(GRgb& val);

	//GRgb    GetBorderColor(){ return m_borderColor;};
	//virtual void  SetBorderColor(GRgb& val);

 	const TCHAR* GetCaption(){ return m_strCaption;};
	void  SetCaption(const TCHAR* strCaption);

	BOOL  IsMultiLine();
	void  SetMultiLine(BOOL flag);

	BOOL  IsWordBreak();
	void  SetWordBreak(BOOL flag);

//	int   GetFontStyle();
//	void  SetFontStyle(int style) ;
//	int  GetFontSize();
//	void SetFontSize(int size);
//	const TCHAR* GetFontName();
//	void SetFontName(const TCHAR* strName);

	//使用外部FONT对象
	//如果关联外部的FONT对象，就不能使用
	//FONT属性函数修改。
	//void AttachFont(const GFont* pFont);
	//void DetachFont();
	//BOOL IsExtraFont() { return m_bExtraFont; };
	 
	//获取FONT对象
	//const GFont* GetCurFont();
//public:


  

protected:
	
//	BOOL IsFontStyleChanged();
//	void RecreateFont(CDelegate* pDelegate);
//	void ReleaseFont();

	int       m_alignment; 
	BOOL      m_bMultiLine;  
	BOOL      m_bWordBreak;

	CUtString m_strCaption ; 
	//GRgb      m_textColor;
	//int       m_nFontStyle;
	//CUtString m_strFontName;
	//int       m_nFontSize;

//	GFont* m_pCurFont;
//	BOOL   m_bExtraFont;    //不存储
	 
};













#endif // !defined(__RV_LABEL_H_INCLUDED_)
