Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.2 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT: Laserguard libraries
  7. // SUBSYSTEM: MFC support library
  8. // FILE: ListWnd.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of CLgListWnd
  13. //----------------------------------------------------------------------------
  14. #ifndef __LIST__WND__H__INCLUDED__
  15. #define __LIST__WND__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "MemoryDC.h"
  20. class CLgListWnd :
  21. public CWnd
  22. {
  23. public:
  24. CLgListWnd();
  25. virtual ~CLgListWnd();
  26. public:
  27. //{{AFX_VIRTUAL(CLgListWnd)
  28. public:
  29. virtual BOOL DestroyWindow();
  30. //}}AFX_VIRTUAL
  31. public:
  32. virtual BOOL Create( CWnd *pParentWnd, int x, int y, int nWidth, int nHeight );
  33. public:
  34. void* GetItemActive();
  35. void* GetItemFromPoint( CPoint* pPoint );
  36. void* GetItem( INT nIndex );
  37. INT GetItemCount() { return m_ArrayItem.GetSize(); }
  38. BOOL SetItemSize( CSize size );
  39. CSize GetItemSize() { return m_ItemSize; }
  40. public:
  41. BOOL Remove( void* pItem );
  42. BOOL Add( void* pItem );
  43. BOOL IsExist( void* pItem );
  44. BOOL Activate( void* pItem );
  45. void RemoveAll();
  46. protected:
  47. virtual void OnItemMove( void* pItem, CRect *pRect, BOOL bShow, BOOL bActive ) {}
  48. virtual void OnItemAdd( void* pItem ) {}
  49. virtual void OnItemRemove( void *pItem ) {}
  50. virtual void OnItemDraw( CDC *pDC, CRect *pRect, void *pItem, BOOL bActive ) {}
  51. virtual void OnItemActivate( void *pItem, BOOL bActive ) {}
  52. protected:
  53. //{{AFX_MSG(CLgListWnd)
  54. afx_msg void OnPaint();
  55. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  56. afx_msg void OnSize(UINT nType, int cx, int cy);
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. protected:
  60. BOOL GetItemRect( INT nIndex, CRect* pRect );
  61. void MoveItems();
  62. protected:
  63. CSize m_ItemSize;
  64. CSize m_Space;
  65. CSize m_Dimensions;
  66. int m_nItemVisibleFirst;
  67. int m_nItemVisibleLast;
  68. int m_nItemScrollMin;
  69. int m_nItemScrollMax;
  70. int m_nItemScrollPos;
  71. int m_nItemActive;
  72. CArray< void*, void* > m_ArrayItem;
  73. CLgMemoryDC m_MemoryDC;
  74. };
  75. //{{AFX_INSERT_LOCATION}}
  76. #endif