Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

RichElement.h

Go to the documentation of this file.
00001 //
00002 // RichElement.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 
00022 #if !defined(AFX_RICHELEMENT_H__6026BA51_4D21_49AC_AB93_96EF387BFFEA__INCLUDED_)
00023 #define AFX_RICHELEMENT_H__6026BA51_4D21_49AC_AB93_96EF387BFFEA__INCLUDED_
00024 
00025 #pragma once
00026 
00027 class CRichDocument;
00028 class CRichFragment;
00029 class CRichViewCtrl;
00030 
00031 
00032 class CRichElement
00033 {
00034 // Construction
00035 public:
00036         CRichElement(int nType = 0, LPCTSTR pszText = NULL, LPCTSTR pszLink = NULL, DWORD nFlags = 0, int nGroup = 0);
00037         virtual ~CRichElement();
00038 
00039 // Attributes
00040 public:
00041         CRichDocument*  m_pDocument;
00042         int                             m_nType;
00043         int                             m_nGroup;
00044         DWORD                   m_nFlags;
00045         CString                 m_sText;
00046         CString                 m_sLink;
00047         DWORD                   m_hImage;
00048         COLORREF                m_cColour;
00049 
00050 // Operations
00051 public:
00052         void    Show(BOOL bShow = TRUE);
00053         void    SetText(LPCTSTR pszText);
00054         void    SetFlags(DWORD nFlags, DWORD nMask = 0xFFFFFFFF);
00055         void    Delete();
00056 protected:
00057         void    PrePaint(CDC* pDC, BOOL bHover);
00058         void    PrePaintBitmap(CDC* pDC);
00059         void    PrePaintIcon(CDC* pDC);
00060         CSize   GetSize();
00061 
00062         friend class CRichFragment;
00063         friend class CRichViewCtrl;
00064 };
00065 
00066 enum
00067 {
00068         retNull, retNewline, retGap, retAlign,
00069         retBitmap, retIcon, retAnchor, retCmdIcon, retEmoticon,
00070         retText, retLink, retHeading,
00071 };
00072 
00073 enum
00074 {
00075         retfNull                = 0x00,
00076         retfBold                = 0x01,
00077         retfItalic              = 0x02,
00078         retfUnderline   = 0x04,
00079         retfHeading             = 0x08,
00080         retfMiddle              = 0x10,
00081         retfColour              = 0x20,
00082         retfHidden              = 0x80,
00083 };
00084 
00085 enum
00086 {
00087         reaLeft, reaCenter, reaRight
00088 };
00089 
00090 #endif // !defined(AFX_RICHELEMENT_H__6026BA51_4D21_49AC_AB93_96EF387BFFEA__INCLUDED_)

Generated on Thu Dec 15 10:39:47 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2