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.

55 lines
1.5 KiB

  1. #ifndef _CAPITAL_H
  2. #define _CAPITAL_H
  3. #include "sapilayr.h"
  4. class CSapiIMX;
  5. class CSpTask;
  6. typedef enum
  7. {
  8. CAPCOMMAND_NONE = 0,
  9. CAPCOMMAND_CapThat = 1,
  10. CAPCOMMAND_AllCapsThat = 2,
  11. CAPCOMMAND_NoCapsThat = 3,
  12. CAPCOMMAND_CapsOn = 4,
  13. CAPCOMMAND_CapsOff = 5,
  14. CAPCOMMAND_CapsLetter = 6,
  15. CAPCOMMAND_MinIdWithText = 7,
  16. CAPCOMMAND_CapIt = 8,
  17. CAPCOMMAND_AllCaps = 9,
  18. CAPCOMMAND_NoCaps = 10,
  19. CAPCOMMAND_CapLetter = 11
  20. } CAPCOMMAND_ID;
  21. class CCapCmdHandler
  22. {
  23. public:
  24. CCapCmdHandler(CSapiIMX *psi);
  25. ~CCapCmdHandler( );
  26. HRESULT ProcessCapCommands(CAPCOMMAND_ID idCapCmd, WCHAR *pwszTextToCap, ULONG ulLen);
  27. HRESULT _ProcessCapCommands(TfEditCookie ec,ITfContext *pic, CAPCOMMAND_ID idCapCmd, WCHAR *pwszTextToCap, ULONG ulLen);
  28. private:
  29. HRESULT _GetCapPhrase(TfEditCookie ec,ITfContext *pic, BOOL *fSapiText);
  30. HRESULT _SetNewText(TfEditCookie ec,ITfContext *pic, WCHAR *pwszNewText, BOOL fSapiText);
  31. HRESULT _CapsText(WCHAR **pwszNewText, WCHAR wchLetter=0);
  32. HRESULT _HandleCapsThat(TfEditCookie ec,ITfContext *pic, WCHAR wchLetter=0);
  33. HRESULT _HandleCapsIt(TfEditCookie ec,ITfContext *pic);
  34. HRESULT _CapsOnOff(TfEditCookie ec,ITfContext *pic, BOOL fOn);
  35. CSapiIMX *m_psi;
  36. CComPtr<ITfRange> m_cpCapRange;
  37. CAPCOMMAND_ID m_idCapCmd;
  38. CSpDynamicString m_dstrTextToCap;
  39. ULONG m_ulLen;
  40. };
  41. #endif // _CAPITAL_H