Leaked source code of windows server 2003
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.

100 lines
2.3 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. SakNodeI.h
  5. Abstract:
  6. Template class for holding the icons for each node type derived
  7. from it.
  8. Author:
  9. Art Bragg 9/26/97
  10. Revision History:
  11. --*/
  12. #ifndef _CSAKNODI_H
  13. #define _CSAKNODI_H
  14. template <class T>
  15. class CSakNodeImpl : public CSakNode {
  16. protected:
  17. static int m_nScopeOpenIcon;
  18. static int m_nScopeCloseIcon;
  19. static int m_nScopeOpenIconX;
  20. static int m_nScopeCloseIconX;
  21. static int m_nResultIcon;
  22. static int m_nResultIconX;
  23. public:
  24. //---------------------------------------------------------------------------
  25. //
  26. // get/SetScopeOpenIconIndex
  27. //
  28. // Get/Put the virtual index of the Open Icon.
  29. //
  30. STDMETHODIMP GetScopeOpenIcon(BOOL bOK, int* pIconIndex)
  31. {
  32. // return FALSE if the index has never been set
  33. if (bOK)
  34. {
  35. *pIconIndex = m_nScopeOpenIcon;
  36. return ((m_nScopeOpenIcon == UNINITIALIZED) ? S_FALSE : S_OK);
  37. } else {
  38. *pIconIndex = m_nScopeOpenIconX;
  39. return ((m_nScopeOpenIconX == UNINITIALIZED) ? S_FALSE : S_OK);
  40. }
  41. }
  42. //---------------------------------------------------------------------------
  43. //
  44. // get/SetScopeCloseIconIndex
  45. //
  46. // Get/Put the virtual index of the Close Icon.
  47. //
  48. STDMETHODIMP GetScopeCloseIcon(BOOL bOK, int* pIconIndex)
  49. {
  50. // return FALSE if the index has never been set
  51. if (bOK) {
  52. *pIconIndex = m_nScopeCloseIcon;
  53. return ((m_nScopeCloseIcon == UNINITIALIZED) ? S_FALSE : S_OK);
  54. } else {
  55. *pIconIndex = m_nScopeCloseIconX;
  56. return ((m_nScopeCloseIconX == UNINITIALIZED) ? S_FALSE : S_OK);
  57. }
  58. }
  59. //---------------------------------------------------------------------------
  60. //
  61. // get/SetResultIconIndex
  62. //
  63. // Get/Put the virtual index of the Close Icon.
  64. //
  65. STDMETHODIMP GetResultIcon(BOOL bOK, int* pIconIndex)
  66. {
  67. // return FALSE if the index has never been set
  68. if (bOK) {
  69. *pIconIndex = m_nResultIcon;
  70. return ((m_nResultIcon == UNINITIALIZED) ? S_FALSE : S_OK);
  71. } else {
  72. *pIconIndex = m_nResultIconX;
  73. return ((m_nResultIconX == UNINITIALIZED) ? S_FALSE : S_OK);
  74. }
  75. }
  76. };
  77. #endif