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

GraphItem.h

Go to the documentation of this file.
00001 //
00002 // GraphItem.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_GRAPHITEM_H__6C5709B5_EB88_4CAB_B61E_74F11AAB9F65__INCLUDED_)
00023 #define AFX_GRAPHITEM_H__6C5709B5_EB88_4CAB_B61E_74F11AAB9F65__INCLUDED_
00024 
00025 #pragma once
00026 
00027 typedef struct
00028 {
00029         DWORD   m_nCode;
00030         UINT    m_nStringID;
00031         UINT    m_nUnits;
00032 } GRAPHITEM;
00033 
00034 
00035 class CGraphItem
00036 {
00037 // Construction
00038 public:
00039         CGraphItem(DWORD nCode = 0, DWORD nParam = 0, COLORREF nColour = RGB(255,255,255));
00040         virtual ~CGraphItem();
00041 
00042 // Attributes
00043 public:
00044         DWORD           m_nCode;
00045         DWORD           m_nParam;
00046         COLORREF        m_nColour;
00047 public:
00048         CString         m_sName;
00049         CPen            m_pPen[4];
00050         COLORREF        m_cPen[4];
00051 public:
00052         DWORD*          m_pData;
00053         DWORD           m_nData;
00054         DWORD           m_nLength;
00055         DWORD           m_nPosition;
00056 public:
00057         static GRAPHITEM        m_pItemDesc[];
00058 
00059 // Operations
00060 public:
00061         void            SetCode(DWORD nCode);
00062         void            Clear();
00063         DWORD           Add(DWORD nValue);
00064         DWORD           GetValueAt(DWORD nPosition) const;
00065         DWORD           GetMaximum() const;
00066         void            SetHistory(DWORD nSize, BOOL bMax = FALSE);
00067         DWORD           Update();
00068         void            Serialize(CArchive& ar);
00069         void            MakeGradient(COLORREF crBack);
00070 public:
00071         static QWORD            GetValue(DWORD nCode, DWORD nParam = 0);
00072         static GRAPHITEM*       GetItemDesc(DWORD nCode);
00073 
00074 };
00075 
00076 #define GRC_TOTAL_BANDWIDTH_IN                  1
00077 #define GRC_TOTAL_BANDWIDTH_OUT                 2
00078 #define GRC_TOTAL_BANDWIDTH_TCP_IN              3
00079 #define GRC_TOTAL_BANDWIDTH_TCP_OUT             4
00080 #define GRC_TOTAL_BANDWIDTH_UDP_IN              5
00081 #define GRC_TOTAL_BANDWIDTH_UDP_OUT             6
00082 
00083 #define GRC_GNUTELLA_CONNECTIONS                11
00084 #define GRC_GNUTELLA_CONNECTIONS_ALL    12
00085 #define GRC_GNUTELLA_BANDWIDTH_IN               13
00086 #define GRC_GNUTELLA_BANDWIDTH_OUT              14
00087 #define GRC_GNUTELLA_PACKETS_IN                 15
00088 #define GRC_GNUTELLA_PACKETS_OUT                16
00089 
00090 #define GRC_DOWNLOADS_FILES                             21
00091 #define GRC_DOWNLOADS_TRANSFERS                 22
00092 #define GRC_DOWNLOADS_BANDWIDTH                 23
00093 
00094 #define GRC_UPLOADS_TRANSFERS                   31
00095 #define GRC_UPLOADS_BANDWIDTH                   32
00096 
00097 #define GRC_GNUTELLA_ROUTED                             41
00098 #define GRC_GNUTELLA_DROPPED                    42
00099 #define GRC_GNUTELLA_LOST                               43
00100 #define GRC_GNUTELLA_QUERIES                    44
00101 
00102 #define GRC_RANDOM                                              100
00103 
00104 #endif // !defined(AFX_GRAPHITEM_H__6C5709B5_EB88_4CAB_B61E_74F11AAB9F65__INCLUDED_)

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