summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fxedit/fxet_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/include/fxedit/fxet_edit.h')
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h122
1 files changed, 61 insertions, 61 deletions
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 237aa66b53..6fd7b9a4ee 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -111,7 +111,7 @@ public:
void Empty()
{
- for (FX_INT32 i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
delete m_LineRects.GetAt(i);
m_LineRects.RemoveAll();
@@ -125,7 +125,7 @@ public:
void operator = (CFX_Edit_LineRectArray & rects)
{
Empty();
- for (FX_INT32 i = 0, sz = rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = rects.GetSize(); i < sz; i++)
m_LineRects.Add(rects.GetAt(i));
rects.RemoveAll();
@@ -137,12 +137,12 @@ public:
m_LineRects.Add(pRect);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_LineRects.GetSize();
}
- CFX_Edit_LineRect * GetAt(FX_INT32 nIndex) const
+ CFX_Edit_LineRect * GetAt(int32_t nIndex) const
{
if (nIndex < 0 || nIndex >= m_LineRects.GetSize())
return NULL;
@@ -167,7 +167,7 @@ public:
void Empty()
{
- for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
delete m_Rects.GetAt(i);
this->m_Rects.RemoveAll();
@@ -176,7 +176,7 @@ public:
void Add(const CPDF_Rect & rect)
{
//check for overlaped area
- for (FX_INT32 i = 0, sz = m_Rects.GetSize(); i < sz; i++)
+ for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
if (CPDF_Rect * pRect = m_Rects.GetAt(i))
if (pRect->Contains(rect))return;
@@ -184,12 +184,12 @@ public:
m_Rects.Add(pNewRect);
}
- FX_INT32 GetSize() const
+ int32_t GetSize() const
{
return m_Rects.GetSize();
}
- CPDF_Rect * GetAt(FX_INT32 nIndex) const
+ CPDF_Rect * GetAt(int32_t nIndex) const
{
if (nIndex < 0 || nIndex >= m_Rects.GetSize())
return NULL;
@@ -209,7 +209,7 @@ public:
void BeginRefresh();
void Push(const CPVT_WordRange & linerange,const CPDF_Rect & rect);
void NoAnalyse();
- void Analyse(FX_INT32 nAlignment);
+ void Analyse(int32_t nAlignment);
void AddRefresh(const CPDF_Rect & rect);
const CFX_Edit_RectArray * GetRefreshRects() const;
void EndRefresh();
@@ -285,7 +285,7 @@ public:
class CFX_Edit_Undo
{
public:
- CFX_Edit_Undo(FX_INT32 nBufsize = 10000);
+ CFX_Edit_Undo(int32_t nBufsize = 10000);
virtual ~CFX_Edit_Undo();
void Undo();
@@ -300,13 +300,13 @@ public:
void Reset();
- IFX_Edit_UndoItem* GetItem(FX_INT32 nIndex);
- FX_INT32 GetItemCount(){return m_UndoItemStack.GetSize();}
- FX_INT32 GetCurUndoPos(){return m_nCurUndoPos;}
+ IFX_Edit_UndoItem* GetItem(int32_t nIndex);
+ int32_t GetItemCount(){return m_UndoItemStack.GetSize();}
+ int32_t GetCurUndoPos(){return m_nCurUndoPos;}
private:
- void SetBufSize(FX_INT32 nSize){m_nBufSize = nSize;}
- FX_INT32 GetBufSize(){return m_nBufSize;}
+ void SetBufSize(int32_t nSize){m_nBufSize = nSize;}
+ int32_t GetBufSize(){return m_nBufSize;}
void RemoveHeads();
void RemoveTails();
@@ -314,8 +314,8 @@ private:
private:
CFX_ArrayTemplate<IFX_Edit_UndoItem*> m_UndoItemStack;
- FX_INT32 m_nCurUndoPos;
- FX_INT32 m_nBufSize;
+ int32_t m_nCurUndoPos;
+ int32_t m_nBufSize;
FX_BOOL m_bModified;
FX_BOOL m_bVirgin;
FX_BOOL m_bWorking;
@@ -362,7 +362,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem
{
public:
CFXEU_InsertWord(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps);
+ FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps);
virtual ~CFXEU_InsertWord();
void Redo();
@@ -374,7 +374,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_WordProps m_WordProps;
};
@@ -401,7 +401,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem
{
public:
CFXEU_Backspace(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps);
virtual ~CFXEU_Backspace();
@@ -414,7 +414,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -423,7 +423,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem
{
public:
CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd);
virtual ~CFXEU_Delete();
@@ -436,7 +436,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
FX_BOOL m_bSecEnd;
@@ -463,7 +463,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem
public:
CFXEU_ClearRich(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
const CPVT_WordRange & wrSel,
- FX_WORD word, FX_INT32 charset,
+ FX_WORD word, int32_t charset,
const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps);
virtual ~CFXEU_ClearRich();
@@ -477,7 +477,7 @@ private:
CPVT_WordPlace m_wpNew;
CPVT_WordRange m_wrSel;
FX_WORD m_Word;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -486,7 +486,7 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem
{
public:
CFXEU_InsertText(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
- const CFX_WideString & swText, FX_INT32 charset,
+ const CFX_WideString & swText, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
virtual ~CFXEU_InsertText();
@@ -499,7 +499,7 @@ private:
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
CFX_WideString m_swText;
- FX_INT32 m_nCharset;
+ int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
};
@@ -578,13 +578,13 @@ public:
void SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE);
void SetScrollPos(const CPDF_Point & point);
- void SetAlignmentH(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE);
- void SetAlignmentV(FX_INT32 nFormat = 0, FX_BOOL bPaint = TRUE);
+ void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
+ void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE);
- void SetLimitChar(FX_INT32 nLimitChar = 0, FX_BOOL bPaint = TRUE);
- void SetCharArray(FX_INT32 nCharArray = 0, FX_BOOL bPaint = TRUE);
+ void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE);
+ void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE);
void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE);
- void SetHorzScale(FX_INT32 nHorzScale = 100, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE);
void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE);
void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE);
@@ -596,18 +596,18 @@ public:
FX_BOOL IsRichText() const;
void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE);
FX_BOOL SetRichFontSize(FX_FLOAT fFontSize);
- FX_BOOL SetRichFontIndex(FX_INT32 nFontIndex);
+ FX_BOOL SetRichFontIndex(int32_t nFontIndex);
FX_BOOL SetRichTextColor(FX_COLORREF dwColor);
- FX_BOOL SetRichTextScript(FX_INT32 nScriptType);
+ FX_BOOL SetRichTextScript(int32_t nScriptType);
FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE);
FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE);
FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE);
FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE);
FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace);
- FX_BOOL SetRichTextHorzScale(FX_INT32 nHorzScale = 100);
+ FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100);
FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading);
FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent);
- FX_BOOL SetRichTextAlignment(FX_INT32 nAlignment);
+ FX_BOOL SetRichTextAlignment(int32_t nAlignment);
void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
@@ -618,24 +618,24 @@ public:
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void SetText(FX_LPCWSTR text,FX_INT32 charset = DEFAULT_CHARSET,
+ void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
+ FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Backspace();
FX_BOOL Delete();
FX_BOOL Clear();
FX_BOOL Empty();
- FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset = DEFAULT_CHARSET,
+ FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Redo();
FX_BOOL Undo();
- CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, FX_INT32 charset,
+ CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
- FX_INT32 GetCharSetFromUnicode(FX_WORD word, FX_INT32 nOldCharset);
+ int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
- FX_INT32 WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
- CPVT_WordPlace WordIndexToWordPlace(FX_INT32 index) const;
+ int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const;
+ CPVT_WordPlace WordIndexToWordPlace(int32_t index) const;
CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace & place) const;
@@ -643,24 +643,24 @@ public:
CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace & place) const;
CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const;
- FX_INT32 GetCaret() const;
+ int32_t GetCaret() const;
CPVT_WordPlace GetCaretWordPlace() const;
CFX_WideString GetSelText() const;
CFX_WideString GetText() const;
FX_FLOAT GetFontSize() const;
FX_WORD GetPasswordChar() const;
CPDF_Point GetScrollPos() const;
- FX_INT32 GetCharArray() const;
+ int32_t GetCharArray() const;
CPDF_Rect GetPlateRect() const;
CPDF_Rect GetContentRect() const;
CFX_WideString GetRangeText(const CPVT_WordRange & range) const;
- FX_INT32 GetHorzScale() const;
+ int32_t GetHorzScale() const;
FX_FLOAT GetCharSpace() const;
- FX_INT32 GetTotalWords() const;
- FX_INT32 GetTotalLines() const;
+ int32_t GetTotalWords() const;
+ int32_t GetTotalLines() const;
- void SetSel(FX_INT32 nStartChar,FX_INT32 nEndChar);
- void GetSel(FX_INT32 & nStartChar, FX_INT32 & nEndChar) const;
+ void SetSel(int32_t nStartChar,int32_t nEndChar);
+ void GetSel(int32_t & nStartChar, int32_t & nEndChar) const;
private:
void SelectAll();
@@ -679,14 +679,14 @@ private:
void SetContentChanged();
void EnableNotify(FX_BOOL bNotify);
- void SetText(FX_LPCWSTR text,FX_INT32 charset,
+ void SetText(FX_LPCWSTR text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertWord(FX_WORD word, FX_INT32 charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
+ FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertText(FX_LPCWSTR text, FX_INT32 charset,
+ FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
@@ -708,7 +708,7 @@ private:
void RefreshPushRandomRects(const CPVT_WordRange & wr);
void RefreshWordRange(const CPVT_WordRange& wr);
- void SetCaret(FX_INT32 nPos);
+ void SetCaret(int32_t nPos);
void SetCaret(const CPVT_WordPlace & place);
void SetCaretInfo();
void SetCaretOrigin();
@@ -756,7 +756,7 @@ private:
CFX_Edit_Refresh m_Refresh;
CPDF_Point m_ptCaret;
CFX_Edit_Undo m_Undo;
- FX_INT32 m_nAlignment;
+ int32_t m_nAlignment;
FX_BOOL m_bNotifyFlag;
FX_BOOL m_bEnableOverflow;
FX_BOOL m_bEnableRefresh;
@@ -785,7 +785,7 @@ public:
FX_BOOL GetWord(CPVT_Word & word) const;
FX_BOOL GetLine(CPVT_Line & line) const;
FX_BOOL GetSection(CPVT_Section & section) const;
- void SetAt(FX_INT32 nWordIndex);
+ void SetAt(int32_t nWordIndex);
void SetAt(const CPVT_WordPlace & place);
const CPVT_WordPlace & GetAt() const;
IFX_Edit* GetEdit() const;
@@ -803,11 +803,11 @@ public:
IFX_Edit_FontMap* GetFontMap();
- FX_INT32 GetCharWidth(FX_INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle);
- FX_INT32 GetTypeAscent(FX_INT32 nFontIndex);
- FX_INT32 GetTypeDescent(FX_INT32 nFontIndex);
- FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex);
- FX_INT32 GetDefaultFontIndex();
+ int32_t GetCharWidth(int32_t nFontIndex, FX_WORD word, int32_t nWordStyle);
+ int32_t GetTypeAscent(int32_t nFontIndex);
+ int32_t GetTypeDescent(int32_t nFontIndex);
+ int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
+ int32_t GetDefaultFontIndex();
FX_BOOL IsLatinWord(FX_WORD word);
private: