jdk/src/java.desktop/windows/native/libawt/windows/awt_TextComponent.h
changeset 27060 cb0fdfacdd25
parent 26751 70bac69b37c9
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_TextComponent.h	Fri Sep 26 18:43:44 2014 +0400
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_TextComponent.h	Tue Sep 30 14:51:33 2014 +0400
@@ -47,6 +47,8 @@
 
     static AwtTextComponent* Create(jobject self, jobject parent, BOOL isMultiline);
 
+    virtual void Dispose();
+
     virtual LPCTSTR GetClassName();
     LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
 
@@ -83,6 +85,8 @@
     MsgRouting HandleEvent(MSG *msg, BOOL synthetic);
     MsgRouting WmPaste();
 
+    INLINE void SetIgnoreEnChange(BOOL b) { m_bIgnoreEnChange = b; }
+
     virtual BOOL IsFocusingMouseMessage(MSG *pMsg);
 
 /*  To be fully implemented in a future release
@@ -115,11 +119,24 @@
     INLINE VOID SetEndSelectionPos(LONG lPos) { m_lEndPos = lPos; }
     INLINE VOID SetLastSelectionPos(LONG lPos) { m_lLastPos = lPos; }
 
+    void EditGetSel(CHARRANGE &cr);
+
     // Used to prevent untrusted code from synthesizing a WM_PASTE message
     // by posting a <CTRL>-V KeyEvent
     BOOL    m_synthetic;
     LONG EditGetCharFromPos(POINT& pt);
 
+    // RichEdit 1.0 control generates EN_CHANGE notifications not only
+    // on text changes, but also on any character formatting change.
+    // This flag is true when the latter case is detected.
+    BOOL    m_bIgnoreEnChange;
+
+    // RichEdit 1.0 control undoes a character formatting change
+    // if it is the latest. We don't create our own undo buffer,
+    // but just prohibit undo in case if the latest operation
+    // is a formatting change.
+    BOOL    m_bCanUndo;
+
     /*****************************************************************
      * Inner class OleCallback declaration.
      */
@@ -166,6 +183,13 @@
 
     static OleCallback sm_oleCallback;
 
+    static WNDPROC sm_pDefWindowProc;
+    HWND    m_hEditCtrl;
+
+    static LRESULT CALLBACK EditProc(HWND hWnd, UINT message,
+                                     WPARAM wParam, LPARAM lParam);
+    MsgRouting WmContextMenu(HWND hCtrl, UINT xPos, UINT yPos);
+
     //
     // Accessibility support
     //