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.

1032 lines
26 KiB

  1. //
  2. // candobj.h
  3. //
  4. #ifndef CANDOBJ_H
  5. #define CANDOBJ_H
  6. #include "mscandui.h"
  7. #include "candprop.h"
  8. #include "candfunc.h"
  9. #include "candext.h"
  10. class CCandidateUI;
  11. //
  12. // CCandidateStringEx
  13. //
  14. class CCandidateStringEx : public ITfCandidateString,
  15. public ITfCandidateStringInlineComment,
  16. public ITfCandidateStringPopupComment,
  17. public ITfCandidateStringColor,
  18. public ITfCandidateStringFixture,
  19. public ITfCandidateStringIcon
  20. {
  21. public:
  22. CCandidateStringEx( CCandidateItem *pCandItem );
  23. virtual ~CCandidateStringEx( void );
  24. //
  25. // IUnknown methods
  26. //
  27. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  28. STDMETHODIMP_(ULONG) AddRef( void );
  29. STDMETHODIMP_(ULONG) Release( void );
  30. //
  31. // ITfCandidateString methods
  32. //
  33. STDMETHODIMP GetString( BSTR *pbstr );
  34. STDMETHODIMP GetIndex( ULONG *pnIndex );
  35. //
  36. // ITfCandidateStringInlineComment methods
  37. //
  38. STDMETHODIMP GetInlineCommentString( BSTR *pbstr );
  39. //
  40. // ITfCandidateStringPopupComment methods
  41. //
  42. STDMETHODIMP GetPopupCommentString( BSTR *pbstr );
  43. STDMETHODIMP GetPopupCommentGroupID( DWORD *pdwGroupID );
  44. //
  45. // ITfCandidateStringColor methods
  46. //
  47. STDMETHODIMP GetColor( CANDUICOLOR *pcol );
  48. //
  49. // ITfCandidateStringFixture methods
  50. //
  51. STDMETHODIMP GetPrefixString( BSTR *pbstr );
  52. STDMETHODIMP GetSuffixString( BSTR *pbstr );
  53. //
  54. // ITfCandidateStringIcon methods
  55. //
  56. STDMETHODIMP GetIcon( HICON *phIcon );
  57. protected:
  58. long m_cRef;
  59. CCandidateItem *m_pCandItem;
  60. };
  61. //
  62. // CCandUICandWindow
  63. //
  64. class CCandUICandWindow : public ITfCandUICandWindow
  65. {
  66. public:
  67. CCandUICandWindow( CCandWindowProperty *pProp );
  68. virtual ~CCandUICandWindow( void );
  69. //
  70. // IUnknown methods
  71. //
  72. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  73. STDMETHODIMP_(ULONG) AddRef( void );
  74. STDMETHODIMP_(ULONG) Release( void );
  75. //
  76. // ITfCandUIObject methods
  77. //
  78. STDMETHODIMP Enable( BOOL fEnable );
  79. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  80. STDMETHODIMP Show( BOOL fShow );
  81. STDMETHODIMP IsVisible( BOOL *pfVisible );
  82. STDMETHODIMP SetPosition( POINT *pptPos );
  83. STDMETHODIMP GetPosition( POINT *pptPos );
  84. STDMETHODIMP SetSize( SIZE *psize );
  85. STDMETHODIMP GetSize( SIZE *psize );
  86. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  87. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  88. STDMETHODIMP SetText( BSTR bstr );
  89. STDMETHODIMP GetText( BSTR *pbstr );
  90. STDMETHODIMP SetToolTipString( BSTR bstr );
  91. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  92. //
  93. // ITfCandUIWindow methods
  94. //
  95. STDMETHODIMP GetWindow( HWND *phWnd );
  96. STDMETHODIMP SetUIDirection( CANDUIUIDIRECTION textflow );
  97. STDMETHODIMP GetUIDirection( CANDUIUIDIRECTION *ptextflow );
  98. STDMETHODIMP EnableAutoMove( BOOL fEnable );
  99. STDMETHODIMP IsAutoMoveEnabled( BOOL *pfEnabled );
  100. protected:
  101. long m_cRef;
  102. CCandWindowProperty *m_pProp;
  103. };
  104. //
  105. // CCandUICandListBox
  106. //
  107. class CCandUICandListBox : public ITfCandUICandListBox
  108. {
  109. public:
  110. CCandUICandListBox( CCandListBoxProperty *pProp );
  111. virtual ~CCandUICandListBox( void );
  112. //
  113. // IUnknown methods
  114. //
  115. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  116. STDMETHODIMP_(ULONG) AddRef( void );
  117. STDMETHODIMP_(ULONG) Release( void );
  118. //
  119. // ITfCandUIObject methods
  120. //
  121. STDMETHODIMP Enable( BOOL fEnable );
  122. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  123. STDMETHODIMP Show( BOOL fShow );
  124. STDMETHODIMP IsVisible( BOOL *pfVisible );
  125. STDMETHODIMP SetPosition( POINT *pptPos );
  126. STDMETHODIMP GetPosition( POINT *pptPos );
  127. STDMETHODIMP SetSize( SIZE *psize );
  128. STDMETHODIMP GetSize( SIZE *psize );
  129. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  130. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  131. STDMETHODIMP SetText( BSTR bstr );
  132. STDMETHODIMP GetText( BSTR *pbstr );
  133. STDMETHODIMP SetToolTipString( BSTR bstr );
  134. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  135. //
  136. // ITfCandUICandListBox methods
  137. //
  138. STDMETHODIMP SetHeight( LONG lLines );
  139. STDMETHODIMP GetHeight( LONG *plLines );
  140. STDMETHODIMP GetCandidateStringRect( ULONG nIndex, RECT *prc );
  141. protected:
  142. long m_cRef;
  143. CCandListBoxProperty *m_pProp;
  144. };
  145. //
  146. // CCandUICandString
  147. //
  148. class CCandUICandString : public ITfCandUICandString
  149. {
  150. public:
  151. CCandUICandString( CCandStringProperty *pProp );
  152. virtual ~CCandUICandString( void );
  153. //
  154. // IUnknown methods
  155. //
  156. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  157. STDMETHODIMP_(ULONG) AddRef( void );
  158. STDMETHODIMP_(ULONG) Release( void );
  159. //
  160. // ITfCandUIObject methods
  161. //
  162. STDMETHODIMP Enable( BOOL fEnable );
  163. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  164. STDMETHODIMP Show( BOOL fShow );
  165. STDMETHODIMP IsVisible( BOOL *pfVisible );
  166. STDMETHODIMP SetPosition( POINT *pptPos );
  167. STDMETHODIMP GetPosition( POINT *pptPos );
  168. STDMETHODIMP SetSize( SIZE *psize );
  169. STDMETHODIMP GetSize( SIZE *psize );
  170. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  171. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  172. STDMETHODIMP SetText( BSTR bstr );
  173. STDMETHODIMP GetText( BSTR *pbstr );
  174. STDMETHODIMP SetToolTipString( BSTR bstr );
  175. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  176. protected:
  177. long m_cRef;
  178. CCandStringProperty *m_pProp;
  179. };
  180. //
  181. // CCandUICandIndex
  182. //
  183. class CCandUICandIndex : public ITfCandUICandIndex
  184. {
  185. public:
  186. CCandUICandIndex( CCandIndexProperty *pProp );
  187. virtual ~CCandUICandIndex( void );
  188. //
  189. // IUnknown methods
  190. //
  191. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  192. STDMETHODIMP_(ULONG) AddRef( void );
  193. STDMETHODIMP_(ULONG) Release( void );
  194. //
  195. // ITfCandUIObject methods
  196. //
  197. STDMETHODIMP Enable( BOOL fEnable );
  198. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  199. STDMETHODIMP Show( BOOL fShow );
  200. STDMETHODIMP IsVisible( BOOL *pfVisible );
  201. STDMETHODIMP SetPosition( POINT *pptPos );
  202. STDMETHODIMP GetPosition( POINT *pptPos );
  203. STDMETHODIMP SetSize( SIZE *psize );
  204. STDMETHODIMP GetSize( SIZE *psize );
  205. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  206. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  207. STDMETHODIMP SetText( BSTR bstr );
  208. STDMETHODIMP GetText( BSTR *pbstr );
  209. STDMETHODIMP SetToolTipString( BSTR bstr );
  210. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  211. protected:
  212. long m_cRef;
  213. CCandIndexProperty *m_pProp;
  214. };
  215. //
  216. // CCandUIInlineComment
  217. //
  218. class CCandUIInlineComment : public ITfCandUIInlineComment
  219. {
  220. public:
  221. CCandUIInlineComment( CInlineCommentProperty *pProp );
  222. virtual ~CCandUIInlineComment( void );
  223. //
  224. // IUnknown methods
  225. //
  226. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  227. STDMETHODIMP_(ULONG) AddRef( void );
  228. STDMETHODIMP_(ULONG) Release( void );
  229. //
  230. // ITfCandUIObject methods
  231. //
  232. STDMETHODIMP Enable( BOOL fEnable );
  233. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  234. STDMETHODIMP Show( BOOL fShow );
  235. STDMETHODIMP IsVisible( BOOL *pfVisible );
  236. STDMETHODIMP SetPosition( POINT *pptPos );
  237. STDMETHODIMP GetPosition( POINT *pptPos );
  238. STDMETHODIMP SetSize( SIZE *psize );
  239. STDMETHODIMP GetSize( SIZE *psize );
  240. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  241. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  242. STDMETHODIMP SetText( BSTR bstr );
  243. STDMETHODIMP GetText( BSTR *pbstr );
  244. STDMETHODIMP SetToolTipString( BSTR bstr );
  245. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  246. protected:
  247. long m_cRef;
  248. CInlineCommentProperty *m_pProp;
  249. };
  250. //
  251. // CCandUIPopupCommentWindow
  252. //
  253. class CCandUIPopupCommentWindow : public ITfCandUIPopupCommentWindow
  254. {
  255. public:
  256. CCandUIPopupCommentWindow( CPopupCommentWindowProperty *pProp );
  257. virtual ~CCandUIPopupCommentWindow( void );
  258. //
  259. // IUnknown methods
  260. //
  261. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  262. STDMETHODIMP_(ULONG) AddRef( void );
  263. STDMETHODIMP_(ULONG) Release( void );
  264. //
  265. // ITfCandUIObject methods
  266. //
  267. STDMETHODIMP Enable( BOOL fEnable );
  268. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  269. STDMETHODIMP Show( BOOL fShow );
  270. STDMETHODIMP IsVisible( BOOL *pfVisible );
  271. STDMETHODIMP SetPosition( POINT *pptPos );
  272. STDMETHODIMP GetPosition( POINT *pptPos );
  273. STDMETHODIMP SetSize( SIZE *psize );
  274. STDMETHODIMP GetSize( SIZE *psize );
  275. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  276. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  277. STDMETHODIMP SetText( BSTR bstr );
  278. STDMETHODIMP GetText( BSTR *pbstr );
  279. STDMETHODIMP SetToolTipString( BSTR bstr );
  280. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  281. //
  282. // ITfCandUIPopupCommentWindow methods
  283. //
  284. STDMETHODIMP GetWindow( HWND *phWnd );
  285. STDMETHODIMP SetDelayTime( LONG lTime );
  286. STDMETHODIMP GetDelayTime( LONG *plTime );
  287. STDMETHODIMP EnableAutoMove( BOOL fEnable );
  288. STDMETHODIMP IsAutoMoveEnabled( BOOL *pfEnabled );
  289. protected:
  290. long m_cRef;
  291. CPopupCommentWindowProperty *m_pProp;
  292. };
  293. //
  294. // CCandUIPopupCommentTitle
  295. //
  296. class CCandUIPopupCommentTitle : public ITfCandUIPopupCommentTitle
  297. {
  298. public:
  299. CCandUIPopupCommentTitle( CPopupCommentTitleProperty *pProp );
  300. virtual ~CCandUIPopupCommentTitle( void );
  301. //
  302. // IUnknown methods
  303. //
  304. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  305. STDMETHODIMP_(ULONG) AddRef( void );
  306. STDMETHODIMP_(ULONG) Release( void );
  307. //
  308. // ITfCandUIObject methods
  309. //
  310. STDMETHODIMP Enable( BOOL fEnable );
  311. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  312. STDMETHODIMP Show( BOOL fShow );
  313. STDMETHODIMP IsVisible( BOOL *pfVisible );
  314. STDMETHODIMP SetPosition( POINT *pptPos );
  315. STDMETHODIMP GetPosition( POINT *pptPos );
  316. STDMETHODIMP SetSize( SIZE *psize );
  317. STDMETHODIMP GetSize( SIZE *psize );
  318. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  319. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  320. STDMETHODIMP SetText( BSTR bstr );
  321. STDMETHODIMP GetText( BSTR *pbstr );
  322. STDMETHODIMP SetToolTipString( BSTR bstr );
  323. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  324. protected:
  325. long m_cRef;
  326. CPopupCommentTitleProperty *m_pProp;
  327. };
  328. //
  329. // CCandUIPopupCommentText
  330. //
  331. class CCandUIPopupCommentText : public ITfCandUIPopupCommentText
  332. {
  333. public:
  334. CCandUIPopupCommentText( CPopupCommentTextProperty *pProp );
  335. virtual ~CCandUIPopupCommentText( void );
  336. //
  337. // IUnknown methods
  338. //
  339. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  340. STDMETHODIMP_(ULONG) AddRef( void );
  341. STDMETHODIMP_(ULONG) Release( void );
  342. //
  343. // ITfCandUIObject methods
  344. //
  345. STDMETHODIMP Enable( BOOL fEnable );
  346. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  347. STDMETHODIMP Show( BOOL fShow );
  348. STDMETHODIMP IsVisible( BOOL *pfVisible );
  349. STDMETHODIMP SetPosition( POINT *pptPos );
  350. STDMETHODIMP GetPosition( POINT *pptPos );
  351. STDMETHODIMP SetSize( SIZE *psize );
  352. STDMETHODIMP GetSize( SIZE *psize );
  353. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  354. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  355. STDMETHODIMP SetText( BSTR bstr );
  356. STDMETHODIMP GetText( BSTR *pbstr );
  357. STDMETHODIMP SetToolTipString( BSTR bstr );
  358. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  359. protected:
  360. long m_cRef;
  361. CPopupCommentTextProperty *m_pProp;
  362. };
  363. //
  364. // CCandUIToolTip
  365. //
  366. class CCandUIToolTip : public ITfCandUIToolTip
  367. {
  368. public:
  369. CCandUIToolTip( CToolTipProperty *pProp );
  370. virtual ~CCandUIToolTip( void );
  371. //
  372. // IUnknown methods
  373. //
  374. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  375. STDMETHODIMP_(ULONG) AddRef( void );
  376. STDMETHODIMP_(ULONG) Release( void );
  377. //
  378. // ITfCandUIObject methods
  379. //
  380. STDMETHODIMP Enable( BOOL fEnable );
  381. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  382. STDMETHODIMP Show( BOOL fShow );
  383. STDMETHODIMP IsVisible( BOOL *pfVisible );
  384. STDMETHODIMP SetPosition( POINT *pptPos );
  385. STDMETHODIMP GetPosition( POINT *pptPos );
  386. STDMETHODIMP SetSize( SIZE *psize );
  387. STDMETHODIMP GetSize( SIZE *psize );
  388. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  389. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  390. STDMETHODIMP SetText( BSTR bstr );
  391. STDMETHODIMP GetText( BSTR *pbstr );
  392. STDMETHODIMP SetToolTipString( BSTR bstr );
  393. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  394. protected:
  395. long m_cRef;
  396. CToolTipProperty *m_pProp;
  397. };
  398. //
  399. // CCandUICaption
  400. //
  401. class CCandUICaption : public ITfCandUICaption
  402. {
  403. public:
  404. CCandUICaption( CWindowCaptionProperty *pProp );
  405. virtual ~CCandUICaption( void );
  406. //
  407. // IUnknown methods
  408. //
  409. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  410. STDMETHODIMP_(ULONG) AddRef( void );
  411. STDMETHODIMP_(ULONG) Release( void );
  412. //
  413. // ITfCandUIObject methods
  414. //
  415. STDMETHODIMP Enable( BOOL fEnable );
  416. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  417. STDMETHODIMP Show( BOOL fShow );
  418. STDMETHODIMP IsVisible( BOOL *pfVisible );
  419. STDMETHODIMP SetPosition( POINT *pptPos );
  420. STDMETHODIMP GetPosition( POINT *pptPos );
  421. STDMETHODIMP SetSize( SIZE *psize );
  422. STDMETHODIMP GetSize( SIZE *psize );
  423. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  424. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  425. STDMETHODIMP SetText( BSTR bstr );
  426. STDMETHODIMP GetText( BSTR *pbstr );
  427. STDMETHODIMP SetToolTipString( BSTR bstr );
  428. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  429. protected:
  430. long m_cRef;
  431. CWindowCaptionProperty *m_pProp;
  432. };
  433. //
  434. // CCandUIMenuButton
  435. //
  436. class CCandUIMenuButton : public ITfCandUIMenuButton
  437. {
  438. public:
  439. CCandUIMenuButton( CMenuButtonProperty *pProp );
  440. virtual ~CCandUIMenuButton( void );
  441. //
  442. // IUnknown methods
  443. //
  444. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  445. STDMETHODIMP_(ULONG) AddRef( void );
  446. STDMETHODIMP_(ULONG) Release( void );
  447. //
  448. // ITfCandUIObject methods
  449. //
  450. STDMETHODIMP Enable( BOOL fEnable );
  451. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  452. STDMETHODIMP Show( BOOL fShow );
  453. STDMETHODIMP IsVisible( BOOL *pfVisible );
  454. STDMETHODIMP SetPosition( POINT *pptPos );
  455. STDMETHODIMP GetPosition( POINT *pptPos );
  456. STDMETHODIMP SetSize( SIZE *psize );
  457. STDMETHODIMP GetSize( SIZE *psize );
  458. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  459. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  460. STDMETHODIMP SetText( BSTR bstr );
  461. STDMETHODIMP GetText( BSTR *pbstr );
  462. STDMETHODIMP SetToolTipString( BSTR bstr );
  463. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  464. //
  465. // ITfCandUIMenuButton methods
  466. //
  467. STDMETHODIMP Advise( ITfCandUIMenuEventSink *pSink );
  468. STDMETHODIMP Unadvise( void );
  469. protected:
  470. long m_cRef;
  471. CMenuButtonProperty *m_pProp;
  472. };
  473. //
  474. // CCandUIExtraCandidate
  475. //
  476. class CCandUIExtraCandidate : public ITfCandUIExtraCandidate
  477. {
  478. public:
  479. CCandUIExtraCandidate( CExtraCandidateProperty *pProp );
  480. virtual ~CCandUIExtraCandidate( void );
  481. //
  482. // IUnknown methods
  483. //
  484. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  485. STDMETHODIMP_(ULONG) AddRef( void );
  486. STDMETHODIMP_(ULONG) Release( void );
  487. //
  488. // ITfCandUIObject methods
  489. //
  490. STDMETHODIMP Enable( BOOL fEnable );
  491. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  492. STDMETHODIMP Show( BOOL fShow );
  493. STDMETHODIMP IsVisible( BOOL *pfVisible );
  494. STDMETHODIMP SetPosition( POINT *pptPos );
  495. STDMETHODIMP GetPosition( POINT *pptPos );
  496. STDMETHODIMP SetSize( SIZE *psize );
  497. STDMETHODIMP GetSize( SIZE *psize );
  498. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  499. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  500. STDMETHODIMP SetText( BSTR bstr );
  501. STDMETHODIMP GetText( BSTR *pbstr );
  502. STDMETHODIMP SetToolTipString( BSTR bstr );
  503. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  504. protected:
  505. long m_cRef;
  506. CExtraCandidateProperty *m_pProp;
  507. };
  508. //
  509. // CCandUIRawData
  510. //
  511. class CCandUIRawData : public ITfCandUIRawData
  512. {
  513. public:
  514. CCandUIRawData( CCandRawDataProperty *pProp );
  515. virtual ~CCandUIRawData( void );
  516. //
  517. // IUnknown methods
  518. //
  519. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  520. STDMETHODIMP_(ULONG) AddRef( void );
  521. STDMETHODIMP_(ULONG) Release( void );
  522. //
  523. // ITfCandUIObject methods
  524. //
  525. STDMETHODIMP Enable( BOOL fEnable );
  526. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  527. STDMETHODIMP Show( BOOL fShow );
  528. STDMETHODIMP IsVisible( BOOL *pfVisible );
  529. STDMETHODIMP SetPosition( POINT *pptPos );
  530. STDMETHODIMP GetPosition( POINT *pptPos );
  531. STDMETHODIMP SetSize( SIZE *psize );
  532. STDMETHODIMP GetSize( SIZE *psize );
  533. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  534. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  535. STDMETHODIMP SetText( BSTR bstr );
  536. STDMETHODIMP GetText( BSTR *pbstr );
  537. STDMETHODIMP SetToolTipString( BSTR bstr );
  538. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  539. protected:
  540. long m_cRef;
  541. CCandRawDataProperty *m_pProp;
  542. };
  543. //
  544. // CCandUICandTipWindow
  545. //
  546. class CCandUICandTipWindow : public ITfCandUICandTipWindow
  547. {
  548. public:
  549. CCandUICandTipWindow( CCandTipWindowProperty *pProp );
  550. virtual ~CCandUICandTipWindow( void );
  551. //
  552. // IUnknown methods
  553. //
  554. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  555. STDMETHODIMP_(ULONG) AddRef( void );
  556. STDMETHODIMP_(ULONG) Release( void );
  557. //
  558. // ITfCandUIObject methods
  559. //
  560. STDMETHODIMP Enable( BOOL fEnable );
  561. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  562. STDMETHODIMP Show( BOOL fShow );
  563. STDMETHODIMP IsVisible( BOOL *pfVisible );
  564. STDMETHODIMP SetPosition( POINT *pptPos );
  565. STDMETHODIMP GetPosition( POINT *pptPos );
  566. STDMETHODIMP SetSize( SIZE *psize );
  567. STDMETHODIMP GetSize( SIZE *psize );
  568. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  569. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  570. STDMETHODIMP SetText( BSTR bstr );
  571. STDMETHODIMP GetText( BSTR *pbstr );
  572. STDMETHODIMP SetToolTipString( BSTR bstr );
  573. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  574. //
  575. // ITfCandUICandTipWindow methods
  576. //
  577. STDMETHODIMP GetWindow( HWND *phWnd );
  578. protected:
  579. long m_cRef;
  580. CCandTipWindowProperty *m_pProp;
  581. };
  582. //
  583. // CCandUICandTipButton
  584. //
  585. class CCandUICandTipButton : public ITfCandUICandTipButton
  586. {
  587. public:
  588. CCandUICandTipButton( CCandTipButtonProperty *pProp );
  589. virtual ~CCandUICandTipButton( void );
  590. //
  591. // IUnknown methods
  592. //
  593. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  594. STDMETHODIMP_(ULONG) AddRef( void );
  595. STDMETHODIMP_(ULONG) Release( void );
  596. //
  597. // ITfCandUIObject methods
  598. //
  599. STDMETHODIMP Enable( BOOL fEnable );
  600. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  601. STDMETHODIMP Show( BOOL fShow );
  602. STDMETHODIMP IsVisible( BOOL *pfVisible );
  603. STDMETHODIMP SetPosition( POINT *pptPos );
  604. STDMETHODIMP GetPosition( POINT *pptPos );
  605. STDMETHODIMP SetSize( SIZE *psize );
  606. STDMETHODIMP GetSize( SIZE *psize );
  607. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  608. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  609. STDMETHODIMP SetText( BSTR bstr );
  610. STDMETHODIMP GetText( BSTR *pbstr );
  611. STDMETHODIMP SetToolTipString( BSTR bstr );
  612. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  613. protected:
  614. long m_cRef;
  615. CCandTipButtonProperty *m_pProp;
  616. };
  617. //
  618. //
  619. //
  620. class CCandUIFnAutoFilter : public ITfCandUIFnAutoFilter
  621. {
  622. public:
  623. CCandUIFnAutoFilter( CCandidateUI *pCandUI, CCandFnAutoFilter *pFnFilter );
  624. virtual ~CCandUIFnAutoFilter( void );
  625. //
  626. // IUnknown methods
  627. //
  628. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  629. STDMETHODIMP_(ULONG) AddRef( void );
  630. STDMETHODIMP_(ULONG) Release( void );
  631. //
  632. // ITfCandUIFnAutoFilter methods
  633. //
  634. STDMETHODIMP Advise( ITfCandUIAutoFilterEventSink *pSink );
  635. STDMETHODIMP Unadvise( void );
  636. STDMETHODIMP Enable( BOOL fEnable );
  637. STDMETHODIMP GetFilteringString( CANDUIFILTERSTR strtype, BSTR *pbstr );
  638. protected:
  639. long m_cRef;
  640. CCandidateUI *m_pCandUI;
  641. CCandFnAutoFilter *m_pFnAutoFilter;
  642. };
  643. //
  644. // CCandUIFnSort
  645. //
  646. class CCandUIFnSort : public ITfCandUIFnSort
  647. {
  648. public:
  649. CCandUIFnSort( CCandidateUI *pCandUI, CCandFnSort *pFnSort );
  650. virtual ~CCandUIFnSort( void );
  651. //
  652. // IUnknown methods
  653. //
  654. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  655. STDMETHODIMP_(ULONG) AddRef( void );
  656. STDMETHODIMP_(ULONG) Release( void );
  657. //
  658. // ITfCandFnSort methods
  659. //
  660. STDMETHODIMP Advise( ITfCandUISortEventSink *pSink );
  661. STDMETHODIMP Unadvise( void );
  662. STDMETHODIMP SortCandidateList( BOOL fSort );
  663. STDMETHODIMP IsCandidateListSorted( BOOL *pfSorted );
  664. protected:
  665. long m_cRef;
  666. CCandidateUI *m_pCandUI;
  667. CCandFnSort *m_pFnSort;
  668. };
  669. //
  670. // CCandUIFnExtension
  671. //
  672. class CCandUIFnExtension : public ITfCandUIFnExtension
  673. {
  674. public:
  675. CCandUIFnExtension( CCandidateUI *pCandUI, CCandUIExtensionMgr *pExtensionMgr );
  676. virtual ~CCandUIFnExtension( void );
  677. //
  678. // IUnknown methods
  679. //
  680. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  681. STDMETHODIMP_(ULONG) AddRef( void );
  682. STDMETHODIMP_(ULONG) Release( void );
  683. //
  684. // ITfCandUIFnExtension methods
  685. //
  686. STDMETHODIMP AddExtObject( LONG id, REFIID riid, IUnknown **ppunk );
  687. STDMETHODIMP GetExtObject( LONG id, REFIID riid, IUnknown **ppunk );
  688. STDMETHODIMP DeleteExtObject( LONG id );
  689. protected:
  690. long m_cRef;
  691. CCandidateUI *m_pCandUI;
  692. CCandUIExtensionMgr *m_pExtensionMgr;
  693. };
  694. //
  695. // CCandUIFnKeyConfig
  696. //
  697. class CCandUIFnKeyConfig : public ITfCandUIFnKeyConfig
  698. {
  699. public:
  700. CCandUIFnKeyConfig( CCandidateUI *pCandUI );
  701. virtual ~CCandUIFnKeyConfig( void );
  702. //
  703. // IUnknown methods
  704. //
  705. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  706. STDMETHODIMP_(ULONG) AddRef( void );
  707. STDMETHODIMP_(ULONG) Release( void );
  708. //
  709. // CCandUIFnKeyConfig methods
  710. //
  711. STDMETHODIMP SetKeyTable( ITfContext *pic, ITfCandUIKeyTable *pCandUIKeyTable );
  712. STDMETHODIMP GetKeyTable( ITfContext *pic, ITfCandUIKeyTable **ppCandUIKeyTable);
  713. STDMETHODIMP ResetKeyTable( ITfContext *pic );
  714. protected:
  715. long m_cRef;
  716. CCandidateUI *m_pCandUI;
  717. };
  718. //
  719. // CCandUIFnUIConfig
  720. //
  721. class CCandUIFnUIConfig : public ITfCandUIFnUIConfig
  722. {
  723. public:
  724. CCandUIFnUIConfig( CCandidateUI *pCandUI );
  725. virtual ~CCandUIFnUIConfig( void );
  726. //
  727. // IUnknown methods
  728. //
  729. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  730. STDMETHODIMP_(ULONG) AddRef( void );
  731. STDMETHODIMP_(ULONG) Release( void );
  732. //
  733. // CCandUIFnUIConfig methods
  734. //
  735. STDMETHODIMP SetUIStyle( ITfContext *pic, CANDUISTYLE style );
  736. STDMETHODIMP GetUIStyle( ITfContext *pic, CANDUISTYLE *pstyle );
  737. STDMETHODIMP SetUIOption( ITfContext *pic, DWORD dwOption );
  738. STDMETHODIMP GetUIOption( ITfContext *pic, DWORD *pdwOption );
  739. protected:
  740. long m_cRef;
  741. CCandidateUI *m_pCandUI;
  742. };
  743. //
  744. // CCandUIExtSpace
  745. //
  746. class CCandUIExtSpace : public ITfCandUIExtSpace
  747. {
  748. public:
  749. CCandUIExtSpace( CCandidateUI *pCandUI, CExtensionSpace *pExtension );
  750. virtual ~CCandUIExtSpace( void );
  751. //
  752. // IUnknown methods
  753. //
  754. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  755. STDMETHODIMP_(ULONG) AddRef( void );
  756. STDMETHODIMP_(ULONG) Release( void );
  757. //
  758. // ITfCandUIExtObject methods
  759. //
  760. STDMETHODIMP GetID( LONG *pid );
  761. STDMETHODIMP Enable( BOOL fEnable );
  762. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  763. STDMETHODIMP Show( BOOL fShow );
  764. STDMETHODIMP IsVisible( BOOL *pfVisible );
  765. STDMETHODIMP SetPosition( POINT *pptPos );
  766. STDMETHODIMP GetPosition( POINT *pptPos );
  767. STDMETHODIMP SetSize( SIZE *psize );
  768. STDMETHODIMP GetSize( SIZE *psize );
  769. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  770. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  771. STDMETHODIMP SetText( BSTR bstr );
  772. STDMETHODIMP GetText( BSTR *pbstr );
  773. STDMETHODIMP SetToolTipString( BSTR bstr );
  774. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  775. protected:
  776. long m_cRef;
  777. CCandidateUI *m_pCandUI;
  778. CExtensionSpace *m_pExtension;
  779. };
  780. //
  781. // CCandUIExtPushButton
  782. //
  783. class CCandUIExtPushButton : public ITfCandUIExtPushButton
  784. {
  785. public:
  786. CCandUIExtPushButton( CCandidateUI *pCandUI, CExtensionPushButton *pExtension );
  787. virtual ~CCandUIExtPushButton( void );
  788. //
  789. // IUnknown methods
  790. //
  791. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  792. STDMETHODIMP_(ULONG) AddRef( void );
  793. STDMETHODIMP_(ULONG) Release( void );
  794. //
  795. // ITfCandUIExtObject methods
  796. //
  797. STDMETHODIMP GetID( LONG *pid );
  798. STDMETHODIMP Enable( BOOL fEnable );
  799. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  800. STDMETHODIMP Show( BOOL fShow );
  801. STDMETHODIMP IsVisible( BOOL *pfVisible );
  802. STDMETHODIMP SetPosition( POINT *pptPos );
  803. STDMETHODIMP GetPosition( POINT *pptPos );
  804. STDMETHODIMP SetSize( SIZE *psize );
  805. STDMETHODIMP GetSize( SIZE *psize );
  806. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  807. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  808. STDMETHODIMP SetText( BSTR bstr );
  809. STDMETHODIMP GetText( BSTR *pbstr );
  810. STDMETHODIMP SetToolTipString( BSTR bstr );
  811. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  812. //
  813. // ITfCandUIExtPushButton method
  814. //
  815. STDMETHODIMP Advise( ITfCandUIExtButtonEventSink *pSink );
  816. STDMETHODIMP Unadvise( void );
  817. STDMETHODIMP SetIcon( HICON hIcon );
  818. STDMETHODIMP SetBitmap( HBITMAP hBitmap );
  819. protected:
  820. long m_cRef;
  821. CCandidateUI *m_pCandUI;
  822. CExtensionPushButton *m_pExtension;
  823. };
  824. //
  825. // CCandUIExtToggleButton
  826. //
  827. class CCandUIExtToggleButton : public ITfCandUIExtToggleButton
  828. {
  829. public:
  830. CCandUIExtToggleButton( CCandidateUI *pCandUI, CExtensionToggleButton *pExtension );
  831. virtual ~CCandUIExtToggleButton( void );
  832. //
  833. // IUnknown methods
  834. //
  835. STDMETHODIMP QueryInterface( REFIID riid, void **ppvObj );
  836. STDMETHODIMP_(ULONG) AddRef( void );
  837. STDMETHODIMP_(ULONG) Release( void );
  838. //
  839. // ITfCandUIExtObject methods
  840. //
  841. STDMETHODIMP GetID( LONG *pid );
  842. STDMETHODIMP Enable( BOOL fEnable );
  843. STDMETHODIMP IsEnabled( BOOL *pfEnabled );
  844. STDMETHODIMP Show( BOOL fShow );
  845. STDMETHODIMP IsVisible( BOOL *pfVisible );
  846. STDMETHODIMP SetPosition( POINT *pptPos );
  847. STDMETHODIMP GetPosition( POINT *pptPos );
  848. STDMETHODIMP SetSize( SIZE *psize );
  849. STDMETHODIMP GetSize( SIZE *psize );
  850. STDMETHODIMP SetFont( LOGFONTW *pLogFont );
  851. STDMETHODIMP GetFont( LOGFONTW *pLogFont );
  852. STDMETHODIMP SetText( BSTR bstr );
  853. STDMETHODIMP GetText( BSTR *pbstr );
  854. STDMETHODIMP SetToolTipString( BSTR bstr );
  855. STDMETHODIMP GetToolTipString( BSTR *pbstr );
  856. //
  857. // ITfCandUIExtToggleButton method
  858. //
  859. STDMETHODIMP Advise( ITfCandUIExtButtonEventSink *pSink );
  860. STDMETHODIMP Unadvise( void );
  861. STDMETHODIMP SetIcon( HICON hIcon );
  862. STDMETHODIMP SetBitmap( HBITMAP hBitmap );
  863. STDMETHODIMP SetToggleState( BOOL fToggle );
  864. STDMETHODIMP GetToggleState( BOOL *pfToggled );
  865. protected:
  866. long m_cRef;
  867. CCandidateUI *m_pCandUI;
  868. CExtensionToggleButton *m_pExtension;
  869. };
  870. #endif // CANDOBJ_H