< prev index next >

jdk/src/java.desktop/windows/native/libawt/windows/awt_TextComponent.h

Print this page




  36 
  37 
  38 /************************************************************************
  39  * AwtTextComponent class
  40  */
  41 
  42 class AwtTextComponent : public AwtComponent {
  43 public:
  44     static jmethodID canAccessClipboardMID;
  45 
  46     AwtTextComponent();
  47 
  48     static AwtTextComponent* Create(jobject self, jobject parent, BOOL isMultiline);
  49 
  50     virtual void Dispose();
  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);
  74 
  75     void SetFont(AwtFont* font);




  36 
  37 
  38 /************************************************************************
  39  * AwtTextComponent class
  40  */
  41 
  42 class AwtTextComponent : public AwtComponent {
  43 public:
  44     static jmethodID canAccessClipboardMID;
  45 
  46     AwtTextComponent();
  47 
  48     static AwtTextComponent* Create(jobject self, jobject parent, BOOL isMultiline);
  49 
  50     virtual void Dispose();
  51 
  52     virtual LPCTSTR GetClassName();
  53     LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  54 
  55     int RemoveCR(WCHAR *pStr);
  56     INLINE virtual int RemoveEOL(WCHAR *pStr) { return 0; }
  57 
  58     virtual LONG getJavaSelPos(LONG orgPos);
  59     virtual LONG getWin32SelPos(LONG orgPos);
  60 
  61     void CheckLineSeparator(WCHAR *pStr);
  62 
  63     virtual void SetSelRange(LONG start, LONG end);
  64 
  65     INLINE void SetText(LPCTSTR text) {
  66         ::SetWindowText(GetHWnd(), text);
  67     }
  68 
  69     INLINE virtual int GetText(LPTSTR buffer, int size) {
  70         return ::GetWindowText(GetHWnd(), buffer, size);
  71     }
  72 
  73     // called on Toolkit thread from JNI
  74     static jstring _GetText(void *param);
  75 
  76     void SetFont(AwtFont* font);


< prev index next >