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

CoolInterface.h

Go to the documentation of this file.
00001 //
00002 // CoolInterface.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_COOLINTERFACE_H__B7C102E2_0267_4F3B_B9C2_BA1031758891__INCLUDED_)
00023 #define AFX_COOLINTERFACE_H__B7C102E2_0267_4F3B_B9C2_BA1031758891__INCLUDED_
00024 
00025 #pragma once
00026 
00027 
00028 class CCoolInterface
00029 {
00030 // Construction
00031 public:
00032         CCoolInterface();
00033         virtual ~CCoolInterface();
00034 
00035 // Attributes
00036 public:
00037         CMapStringToPtr m_pNameMap;
00038         CMapPtrToPtr    m_pImageMap;
00039         CImageList              m_pImages;
00040 public:
00041         CFont           m_fntNormal;
00042         CFont           m_fntBold;
00043         CFont           m_fntUnder;
00044         CFont           m_fntCaption;
00045         CFont           m_fntItalic;
00046         CFont           m_fntBoldItalic;
00047 public:
00048         BOOL            m_bCustom;
00049         COLORREF        m_crWindow;
00050         COLORREF        m_crMidtone;
00051         COLORREF        m_crHighlight;
00052         COLORREF        m_crText;
00053         COLORREF        m_crHiText;
00054         COLORREF        m_crBackNormal;
00055         COLORREF        m_crBackSel;
00056         COLORREF        m_crBackCheck;
00057         COLORREF        m_crBackCheckSel;
00058         COLORREF        m_crMargin;
00059         COLORREF        m_crBorder;
00060         COLORREF        m_crShadow;
00061         COLORREF        m_crCmdText;
00062         COLORREF        m_crCmdTextSel;
00063         COLORREF        m_crDisabled;
00064         COLORREF        m_crTipBack;
00065         COLORREF        m_crTipText;
00066         COLORREF        m_crTipBorder;
00067         COLORREF        m_crTipWarnings; // Colour of warning messages
00068         COLORREF        m_crTaskPanelBack;
00069         COLORREF        m_crTaskBoxCaptionBack;
00070         COLORREF        m_crTaskBoxPrimaryBack;
00071         COLORREF        m_crTaskBoxCaptionText;
00072         COLORREF        m_crTaskBoxPrimaryText;
00073         COLORREF        m_crTaskBoxCaptionHover;
00074         COLORREF        m_crTaskBoxClient;
00075 protected:
00076         CSize           m_czBuffer;
00077         CDC                     m_dcBuffer;
00078         CBitmap         m_bmBuffer;
00079         HBITMAP         m_bmOldBuffer;
00080 
00081 // Operations
00082 public:
00083         void            Clear();
00084 public:
00085         void            NameCommand(UINT nID, LPCTSTR pszName);
00086         UINT            NameToID(LPCTSTR pszName);
00087 public:
00088         int                     ImageForID(UINT nID);
00089         void            AddIcon(UINT nID, HICON hIcon);
00090         void            CopyIcon(UINT nFromID, UINT nToID);
00091         HICON           ExtractIcon(UINT nID);
00092         BOOL            AddImagesFromToolbar(UINT nIDToolBar, COLORREF crBack = RGB(0,255,0));
00093         BOOL            ConfirmImageList();
00094 public:
00095         CDC*            GetBuffer(CDC& dcScreen, CSize& szItem);
00096         BOOL            DrawWatermark(CDC* pDC, CRect* pRect, CBitmap* pMark, int nOffX = 0, int nOffY = 0);
00097 public:
00098         void            CreateFonts(LPCTSTR pszFace = NULL, int nSize = 0);
00099         void            CalculateColours(BOOL bCustom = FALSE);
00100         void            OnSysColourChange();
00101 public:
00102         static COLORREF CalculateColour(COLORREF crFore, COLORREF crBack, int nAlpha);
00103         static COLORREF GetDialogBkColor();
00104         static BOOL             IsNewWindows();
00105         static BOOL             EnableTheme(CWnd* pWnd, BOOL bEnable = TRUE);
00106 
00107 };
00108 
00109 extern CCoolInterface CoolInterface;
00110 
00111 typedef struct
00112 {
00113         WORD wVersion;
00114         WORD wWidth;
00115         WORD wHeight;
00116         WORD wItemCount;
00117         WORD* items() { return (WORD*)(this+1); }
00118 } TOOLBAR_RES;
00119 
00120 #endif // !defined(AFX_COOLINTERFACE_H__B7C102E2_0267_4F3B_B9C2_BA1031758891__INCLUDED_)

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