home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////////////
- //
- // File : ColFont.h
- // Project : MsgTrace
- // Component : MsgTracer
- //---------------------------------------------------------------------------
- // Description : declaration of a colored-font
- //
- /////////////////////////////////////////////////////////////////////////////
- //
- // SourceSafe Strings. Do not change.
- //---------------------------------------------------------------------------
- // $Author: jeskes $
- // $Date: $
- // $Revision: $
- //
- /////////////////////////////////////////////////////////////////////////////
-
- #ifndef COLFONT_H
- #define COLFONT_H
-
- /////////////////////////////////////////////////////////////////////////////
-
- class CColoredFont : public CObject
- {
- //---------------------------------------------------------------------------
- // construction
- //---------------------------------------------------------------------------
- public:
- CColoredFont( const CString& sName );
- ~CColoredFont();
-
- //---------------------------------------------------------------------------
- // color & font
- //---------------------------------------------------------------------------
- private:
- CString m_sName;
- COLORREF m_rgbColor;
- CFont* m_pFont;
- int m_nTabSize;
-
- public:
- BOOL ChooseColoredFont();
- int GetTabSize() const;
-
- //---------------------------------------------------------------------------
- // operators
- //---------------------------------------------------------------------------
- public:
- operator CFont* () const;
- operator HFONT () const;
- operator COLORREF () const;
-
- //---------------------------------------------------------------------------
- // helpers
- //---------------------------------------------------------------------------
- private:
- LPCSTR GetEntry( LPCSTR lpszEntry ) const;
- };
-
- /////////////////////////////////////////////////////////////////////////////
-
- inline CColoredFont::operator CFont* () const
- {
- return( m_pFont );
- }
-
- inline CColoredFont::operator HFONT () const
- {
- return( (HFONT) m_pFont->m_hObject );
- }
-
- inline CColoredFont::operator COLORREF () const
- {
- return( m_rgbColor );
- }
-
- inline int CColoredFont::GetTabSize() const
- {
- return( m_nTabSize );
- }
-
- /////////////////////////////////////////////////////////////////////////////
- #endif
-