46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
#ifndef IN_PLACE_EDIT_H
|
|
#define IN_PLACE_EDIT_H
|
|
|
|
#include "SubText.h"
|
|
|
|
#define WM_VIEW_CHANGED WM_USER+1
|
|
class CInPlaceEdit:public CEdit,public AcEditorReactor
|
|
{
|
|
protected:
|
|
SubText* m_pSubText;
|
|
bool m_bCreating;
|
|
bool m_bDoModel;
|
|
|
|
CFont m_font;
|
|
CBrush m_brush;
|
|
|
|
BOOL m_bSetMessageText;
|
|
public:
|
|
CInPlaceEdit();
|
|
virtual ~CInPlaceEdit();
|
|
|
|
virtual void lispWillStart(const TCHAR * firstLine);
|
|
virtual void commandWillStart(const TCHAR * cmdStr);
|
|
|
|
void RecalcLayout();
|
|
void BeginEdit(SubText*pSubText);
|
|
void RefreshPlace();
|
|
void MoveToNext(bool bVert,bool bPre);
|
|
void EndEdit(bool bUnhighlightEnt=true);
|
|
void CancelEdit();
|
|
|
|
bool IsLeftEnd();
|
|
bool IsRightEnd();
|
|
bool IsUpEnd();
|
|
bool IsDownEnd();
|
|
|
|
bool GetPosition(int& h, int& l);
|
|
DECLARE_MESSAGE_MAP()
|
|
HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
|
|
virtual BOOL PreTranslateMessage(MSG *pMsg);
|
|
afx_msg LONG_PTR onAcadKeepFocus(UINT_PTR, LONG_PTR);
|
|
afx_msg void OnKillFocus(CWnd*pNewWnd);
|
|
afx_msg BOOL OnEnChange();
|
|
};
|
|
extern CInPlaceEdit g_InPlaceEdit;
|
|
#endif |