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.

42 lines
1.3 KiB

  1. #ifndef __T_TEXT_H__
  2. #define __T_TEXT_H__
  3. #include "imgtools.h"
  4. #define MAX_MOVE_DIST_FOR_PLACE 10 // min pixels to move before not considered a place operation
  5. class CTextTool : public CSelectTool
  6. {
  7. DECLARE_DYNAMIC( CTextTool )
  8. protected:
  9. class CTedit* m_pCTedit;
  10. void CreateTextEditObject( CImgWnd* pImgWnd, MTI* pmti );
  11. void PlaceTextOnBitmap ( CImgWnd* pImgWnd );
  12. public:
  13. CTextTool();
  14. ~CTextTool();
  15. virtual void OnUpdateColors( CImgWnd* pImgWnd );
  16. virtual void OnActivate ( BOOL bActivate );
  17. virtual void OnCancel ( CImgWnd* pImgWnd );
  18. virtual void OnStartDrag ( CImgWnd* pImgWnd, MTI* pmti );
  19. virtual void OnEndDrag ( CImgWnd* pImgWnd, MTI* pmti );
  20. virtual void OnDrag ( CImgWnd* pImgWnd, MTI* pmti );
  21. virtual void OnClickOptions( CImgToolWnd* pWnd, const CRect& optionsRect,
  22. const CPoint& clickPoint );
  23. virtual void OnShowControlBars(BOOL bShow);
  24. BOOL IsSlectionVisible () { return ( m_pCTedit != NULL ); }
  25. CTedit* GetTextEditField () { return m_pCTedit; }
  26. BOOL FontPaletteVisible();
  27. void ToggleFontPalette ();
  28. void CloseTextTool ( CImgWnd* pImgWnd );
  29. };
  30. #endif // __T_TEXT_H__