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.

82 lines
2.2 KiB

  1. /*****************************************************************************
  2. * statusbr.h
  3. *****************************************************************************/
  4. #ifndef _STATUSBAR_H
  5. #define _STATUSBAR_H
  6. #include <urlmon.h>
  7. CStatusBar * CStatusBar_Create(HWND hwndStatus);
  8. #define MAX_NUM_ZONES_ICONS 12
  9. enum ICON_TODISPLAY
  10. {
  11. ITD_WriteAllowed = 0,
  12. ITD_WriteNotAllowed,
  13. ITD_MAX
  14. };
  15. enum ICON_SLOT
  16. {
  17. ISLOT_WritePermission = 0,
  18. ISLOT_MAX
  19. };
  20. #define STATUS_PANE_STATUS 0
  21. #define STATUS_PANE_USERNAME 1
  22. #define STATUS_PANE_ZONE 2
  23. // #define STATUS_PANE_WRITEICON 4
  24. /*****************************************************************************
  25. *
  26. * CStatusBar
  27. *
  28. *****************************************************************************/
  29. class CStatusBar
  30. {
  31. public:
  32. CStatusBar(HWND hwndStatus);
  33. ~CStatusBar(void);
  34. // Public Member Functions
  35. void SetStatusMessage(UINT nMessageID, LPCTSTR pszExtra);
  36. void SetUserName(LPCTSTR pszUserName, BOOL fAnnonymous);
  37. void SetFolderAttribute(BOOL fWriteAllowed);
  38. void UpdateZonesPane(LPCTSTR pszUrl);
  39. HRESULT Resize(LONG x, LONG y);
  40. friend CStatusBar * CStatusBar_Create(HWND hwndStatus) { return new CStatusBar(hwndStatus); };
  41. protected:
  42. // Private Member Variables
  43. BOOL m_fInited : 1;
  44. BOOL m_fWriteAllowed : 1;
  45. HWND m_hwndStatus; // HWND for entire bar
  46. IInternetSecurityManager * m_pism;
  47. IInternetZoneManager * m_pizm;
  48. HICON m_arhiconZones[MAX_NUM_ZONES_ICONS];
  49. long m_lCurrentZone;
  50. HICON m_arhiconGeneral[ITD_MAX];
  51. LPTSTR m_pszUserName;
  52. LPTSTR m_pszUserNameTT;
  53. // Private Member Variables
  54. HRESULT _InitStatusBar(void);
  55. HRESULT _SetParts(void);
  56. HRESULT _SetIconAndTip(ICON_SLOT nIconSlot, ICON_TODISPLAY nIconToDisplay, LPCTSTR pszTip);
  57. HRESULT _LoadZoneInfo(LPCTSTR pszUrl);
  58. HRESULT _SetZone(void);
  59. void _SetUserParts(void);
  60. void _CacheZonesIcons(void);
  61. };
  62. #endif // _STATUSBAR_H