📄 ctrlmaintabbar.h
字号:
//
// CtrlMainTabBar.h
//
// Copyright (c) Shareaza Development Team, 2002-2004.
// This file is part of SHAREAZA (www.shareaza.com)
//
// Shareaza is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// Shareaza is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Shareaza; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#pragma once
class CSkinWindow;
class CMainTabBarCtrl : public CControlBar
{
// Construction
public:
CMainTabBarCtrl();
virtual ~CMainTabBarCtrl();
DECLARE_DYNAMIC(CMainTabBarCtrl)
// Item Class
public:
class TabItem : public CCmdUI
{
public:
CMainTabBarCtrl* m_pCtrl;
CString m_sName;
CRect m_rc;
CRect m_rcSrc[5];
BOOL m_bEnabled;
BOOL m_bSelected;
public:
TabItem(CMainTabBarCtrl* pCtrl, LPCTSTR pszName);
void Skin(CSkinWindow* pSkin, CDC* pdcCache, CBitmap* pbmCache);
BOOL Update(CFrameWnd* pTarget);
BOOL HitTest(const CPoint& point) const;
void Paint(CDC* pDstDC, CDC* pSrcDC, const CPoint& ptOffset, BOOL bHover, BOOL bDown);
public:
virtual void Enable(BOOL bEnable);
virtual void SetCheck(BOOL bCheck);
};
// Attributes
protected:
CPtrList m_pItems;
CSkinWindow* m_pSkin;
TabItem* m_pHover;
TabItem* m_pDown;
protected:
CDC m_dcSkin;
CBitmap m_bmSkin;
HBITMAP m_hOldSkin;
// Operations
public:
BOOL Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID);
BOOL HasLocalVersion();
void OnSkinChange();
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
TabItem* HitTest(const CPoint& point) const;
virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
virtual void DoPaint(CDC* pDC);
// Implementation
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
DECLARE_MESSAGE_MAP()
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -