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.

72 lines
1.7 KiB

  1. //
  2. // sysbtn.h
  3. //
  4. #ifndef SYSBTN_H
  5. #define SYSBTN_H
  6. #include "private.h"
  7. #include "nuibase.h"
  8. #include "lbmenu.h"
  9. #include "ids.h"
  10. #include "cicspres.h"
  11. typedef struct tag_TIPMENUITEMMAP {
  12. ITfSystemLangBarItemSink *plbSink;
  13. UINT nOrgID;
  14. UINT nTmpID;
  15. } TIPMENUITEMMAP;
  16. class __declspec(novtable)
  17. CLBarItemSystemButtonBase : public CLBarItemButtonBase,
  18. public ITfSystemLangBarItem
  19. {
  20. public:
  21. CLBarItemSystemButtonBase();
  22. ~CLBarItemSystemButtonBase();
  23. //
  24. // IUnknown methods
  25. //
  26. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  27. STDMETHODIMP_(ULONG) AddRef(void);
  28. STDMETHODIMP_(ULONG) Release(void);
  29. //
  30. // ITfSource
  31. //
  32. STDMETHODIMP AdviseSink(REFIID riid, IUnknown *punk, DWORD *pdwCookie);
  33. STDMETHODIMP UnadviseSink(DWORD dwCookie);
  34. //
  35. // ITfLangBarItem
  36. //
  37. STDMETHODIMP GetInfo(TF_LANGBARITEMINFO *pInfo);
  38. STDMETHODIMP Show(BOOL fShow);
  39. //
  40. // ITfSystemLangBarItem
  41. //
  42. STDMETHODIMP SetIcon(HICON hIcon);
  43. STDMETHODIMP SetTooltipString(WCHAR *pchToolTip, ULONG cch);
  44. //
  45. STDMETHODIMP OnMenuSelect(UINT wID);
  46. protected:
  47. BOOL _InsertCustomMenus(ITfMenu *pMenu, UINT *pnTipCurMenuID);
  48. UINT _MergeMenu(ITfMenu *pMenu, CCicLibMenu *pMenuTip, ITfSystemLangBarItemSink *plbSink, CStructArray<TIPMENUITEMMAP> *pMenuMap, UINT &nCurID);
  49. CStructArray<TIPMENUITEMMAP> *_pMenuMap;
  50. void ClearMenuMap()
  51. {
  52. if (_pMenuMap)
  53. _pMenuMap->Clear();
  54. }
  55. CStructArray<GENERICSINK> _rgEventSinks; // ITfSystemLangBarItemSink
  56. };
  57. #endif SYSBTN_H