src/windows/native/sun/windows/awt_TextComponent.h

Print this page




  33 
  34 #include <ole2.h>
  35 #include <richedit.h>
  36 #include <richole.h>
  37 
  38 
  39 /************************************************************************
  40  * AwtTextComponent class
  41  */
  42 
  43 class AwtTextComponent : public AwtComponent {
  44 public:
  45     /* java.awt.TextComponent canAccessClipboard field ID */
  46     static jfieldID canAccessClipboardID;
  47 
  48     AwtTextComponent();
  49 
  50     static AwtTextComponent* Create(jobject self, jobject parent, BOOL isMultiline);
  51 
  52     virtual LPCTSTR GetClassName();

  53 
  54     int RemoveCR(WCHAR *pStr);
  55 
  56     virtual LONG getJavaSelPos(LONG orgPos);
  57     virtual LONG getWin32SelPos(LONG orgPos);
  58 
  59     void CheckLineSeparator(WCHAR *pStr);
  60 
  61     virtual void SetSelRange(LONG start, LONG end);
  62 
  63     INLINE void SetText(LPCTSTR text) {
  64         ::SetWindowText(GetHWnd(), text);
  65     }
  66 
  67     INLINE virtual int GetText(LPTSTR buffer, int size) {
  68         return ::GetWindowText(GetHWnd(), buffer, size);
  69     }
  70 
  71     // called on Toolkit thread from JNI
  72     static jstring _GetText(void *param);




  33 
  34 #include <ole2.h>
  35 #include <richedit.h>
  36 #include <richole.h>
  37 
  38 
  39 /************************************************************************
  40  * AwtTextComponent class
  41  */
  42 
  43 class AwtTextComponent : public AwtComponent {
  44 public:
  45     /* java.awt.TextComponent canAccessClipboard field ID */
  46     static jfieldID canAccessClipboardID;
  47 
  48     AwtTextComponent();
  49 
  50     static AwtTextComponent* Create(jobject self, jobject parent, BOOL isMultiline);
  51 
  52     virtual LPCTSTR GetClassName();
  53     LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  54 
  55     int RemoveCR(WCHAR *pStr);
  56 
  57     virtual LONG getJavaSelPos(LONG orgPos);
  58     virtual LONG getWin32SelPos(LONG orgPos);
  59 
  60     void CheckLineSeparator(WCHAR *pStr);
  61 
  62     virtual void SetSelRange(LONG start, LONG end);
  63 
  64     INLINE void SetText(LPCTSTR text) {
  65         ::SetWindowText(GetHWnd(), text);
  66     }
  67 
  68     INLINE virtual int GetText(LPTSTR buffer, int size) {
  69         return ::GetWindowText(GetHWnd(), buffer, size);
  70     }
  71 
  72     // called on Toolkit thread from JNI
  73     static jstring _GetText(void *param);