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.

78 lines
1.8 KiB

  1. //
  2. // TOOLBAR.H
  3. //
  4. // History:
  5. // 29-MAY-2000 CSLIM Adapted to IME
  6. // 24-JAN-2000 CSLIM Created
  7. #if !defined (__TOOLBAR_H__INCLUDED_)
  8. #define __TOOLBAR_H__INCLUDED_
  9. #include "imc.h"
  10. class CMode;
  11. class FMode;
  12. class HJMode;
  13. class PMode;
  14. class PropertyButton;
  15. class CSysHelpSink;
  16. #define UPDTTB_NONE 0x00000000
  17. #define UPDTTB_CMODE 0x00000001
  18. #define UPDTTB_FHMODE 0x00000002 // Full/Half shape mode
  19. #define UPDTTB_HJMODE 0x00000004 // Hanja mode
  20. #define UPDTTB_PAD 0x00000008 // Pad button
  21. #define UPDTTB_PROP 0x00000010 // Properties button
  22. #define UPDTTB_ALL (UPDTTB_CMODE|UPDTTB_FHMODE|UPDTTB_HJMODE|UPDTTB_PAD|UPDTTB_PROP)
  23. class CToolBar
  24. {
  25. public:
  26. CToolBar();
  27. ~CToolBar();
  28. BOOL Initialize();
  29. void Terminate();
  30. void CheckEnable();
  31. void SetCurrentIC(PCIMECtx pImeCtx);
  32. DWORD SetConversionMode(DWORD dwConvMod);
  33. DWORD GetConversionMode(PCIMECtx pImeCtx = NULL);
  34. // UINT GetConversionModeIDI(PCIMECtx pImeCtx = NULL);
  35. BOOL Update(DWORD dwUpdate = UPDTTB_NONE, BOOL fRefresh = fFalse);
  36. BOOL IsOn(PCIMECtx pImeCtx = NULL);
  37. BOOL SetOnOff(BOOL fOn);
  38. PCIMECtx GetImeCtx() { return m_pImeCtx; }
  39. HWND GetOwnerWnd(PCIMECtx pImeCtx = NULL);
  40. // Syshelp callback (Cicero)
  41. static HRESULT SysInitMenu(void *pv, ITfMenu* pMenu);
  42. static HRESULT OnSysMenuSelect(void *pv, UINT uiCmd);
  43. private:
  44. PCIMECtx m_pImeCtx;
  45. BOOL m_fToolbarInited;
  46. CMode *m_pCMode;
  47. FMode *m_pFMode;
  48. HJMode *m_pHJMode;
  49. #if !defined(_WIN64)
  50. PMode *m_pPMode;
  51. #endif
  52. CSysHelpSink *m_pSysHelp;
  53. CMode *GetCMode() { return m_pCMode; }
  54. FMode *GetFMode() { return m_pFMode; }
  55. HJMode *GetHJMode() { return m_pHJMode; }
  56. #if !defined(_WIN64)
  57. PMode *GetPMode() { return m_pPMode; }
  58. #endif
  59. };
  60. #endif // __TOOLBAR_H__INCLUDED_