DXGUIManager.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:3k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1998-1999 DXGuide. All Rights Reserved.
- // File: DXGUIManager.h
- #ifndef _DXGUIMANAGER__H
- #define _DXGUIMANAGER__H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #ifdef GetCurrentTime
- #undef GetCurrentTime
- #endif // GetCurrentTime
- class CDDCursor;
- class CPackFileManager;
- class CDIMouseState;
- class CDIKeyState;
- class CDSBuffer;
- class CDDDevice;
- class CDIMouse;
- class CDIKeyboard;
- class CDDSurface;
- class CDXDialog;
- class CDirectSound;
- class CIMDManager;
- class CDXIMDBar;
- class CDDFrameRate;
- class CDDTextSurface;
- class CDXGUIManager
- {
- friend class CDirectXApp;
- friend class CDDFrameRate;
- friend class CDXNormalDialog; // for m_lpcszCloseBMPName
- public:
- // Flags for DDInit
- enum GUIManagerInitFlag
- {
- GMIF_FRAMERATE = 0x00000001L, // show frame counter
- GMIF_IMD = 0x00000002L, // load IMD file
- };
- protected:
- CDXGUIManager(void);
- ~CDXGUIManager();
- protected:
- bool Create(CDDDevice* pDDDevice,
- DWORD dwGUIManagerInitFlags,
- CDIMouse* pMouse, CDIKeyboard* pKeyboard,
- CDirectSound* pSound,
- LPCTSTR lpszPackFileName = NULL);
- public:
- bool Update(void);
- void SetCursor(int nCursorIndex);
- bool SetTop(CDXDialog* pDialog);
- bool RemoveTop(CDXDialog* pDialog);
- CDIMouseState* GetMouseState(void) const;
- CDIKeyState* GetKeyState(void) const;
- CPackFileManager* GetPackFileManager(void) const;
- CDSBuffer* GetFocusedSound(int nIndex) const;
- CDSBuffer* GetPressDownSound(int nIndex) const;
- __int64 GetCurrentTime(void) const;
- DWORD GetTimeSpanOfms(__int64 i64TimeLast) const;
- __int64 GetTimeSpan(__int64 i64TimeLast) const;
- protected:
- CDIMouseState* m_pMouseState;
- CDIKeyState* m_pKeyState;
- CPackFileManager* m_pPackFileManager;
- CDXDialog* m_pCurrDialog;
- int m_nCurCursorIndex;
- CDirectSound* m_pSound;
- DWORD m_dwGUIManagerInitFlags;
- protected:
- int m_nButtonSoundsNum;
- CDSBuffer** m_ppButtonSoundFocused;
- CDSBuffer** m_ppButtonSoundPressDown;
- int m_nCursorNum;
- CDDCursor** m_ppCursor;
- CIMDManager* m_pIMDManager;
- CDDFrameRate* m_pFrameRate;
- CDDTextSurface* m_pDisplayModeInfo;
- public:
- CIMDManager* GetIMDManager(void) const;
- CDDSurface* GetRenderSurface(void) const;
- protected:
- static const LPCTSTR m_lpcszDescriptionName;
- static const LPCTSTR m_lpcszCloseBMPName;
- static const LPCTSTR m_lpcszAllSectionName;
- static const LPCTSTR m_lpcszButtonSoundsPairNumEntryName;
- static const LPCTSTR m_lpcszButtonSoundSectionFmt;
- static const LPCTSTR m_lpcszFocusedEntryName;
- static const LPCTSTR m_lpcszPressDownEntryName;
- static const LPCTSTR m_lpcszEditFontSectionName;
- static const LPCTSTR m_lpcszNameEntryName;
- static const LPCTSTR m_lpcszSizeEntryName;
- static const LPCTSTR m_lpcszCursorSectionName;
- static const LPCTSTR m_lpcszCursorNumEntryName;
- static const LPCTSTR m_lpcszCursorNameEntryFmt;
- static const LPCTSTR m_lpcszFrameRateSectionName;
- static const LPCTSTR m_lpcszColorEntryName;
- static const LPCTSTR m_lpcszLeftEntryName;
- static const LPCTSTR m_lpcszTopEntryName;
- public:
- CFont m_fontCaption;
- CFont m_fontMessage;
- CFont m_fontEdit;
- protected:
- UINT m_nInsertCaretWidth;
- UINT m_nOvertypeCaretWidth;
- UINT m_nEditXMetrics;
- UINT m_nEditYMetrics;
- UINT m_uiCaretBlinkTime;
- CDDSurface* m_pRenderSurface;
- protected:
- __int64 m_i64TimeNow;
- };
- #include "DXGUIManager.inl"
- #endif // _DXGUIMANAGER__H