| OLD | NEW | 
|    1 // Copyright 2014 PDFium Authors. All rights reserved. |    1 // Copyright 2014 PDFium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |    5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
|    6  |    6  | 
|    7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |    7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ | 
|    8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |    8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ | 
|    9  |    9  | 
|   10 #include "core/include/fpdfapi/fpdf_parser.h"  // For CPDF_Point. |   10 #include "core/include/fpdfapi/fpdf_parser.h"  // For CFX_FloatPoint. | 
|   11 #include "fpdfsdk/include/fxedit/fx_edit.h" |   11 #include "fpdfsdk/include/fxedit/fx_edit.h" | 
|   12  |   12  | 
|   13 class IFX_Edit; |   13 class IFX_Edit; | 
|   14  |   14  | 
|   15 class CLST_Size { |   15 class CLST_Size { | 
|   16  public: |   16  public: | 
|   17   CLST_Size() : x(0.0f), y(0.0f) {} |   17   CLST_Size() : x(0.0f), y(0.0f) {} | 
|   18  |   18  | 
|   19   CLST_Size(FX_FLOAT other_x, FX_FLOAT other_y) { |   19   CLST_Size(FX_FLOAT other_x, FX_FLOAT other_y) { | 
|   20     x = other_x; |   20     x = other_x; | 
|   21     y = other_y; |   21     y = other_y; | 
|   22   } |   22   } | 
|   23  |   23  | 
|   24   void Default() { |   24   void Default() { | 
|   25     x = 0.0f; |   25     x = 0.0f; | 
|   26     y = 0.0f; |   26     y = 0.0f; | 
|   27   } |   27   } | 
|   28  |   28  | 
|   29   FX_BOOL operator!=(const CLST_Size& size) const { |   29   FX_BOOL operator!=(const CLST_Size& size) const { | 
|   30     return FXSYS_memcmp(this, &size, sizeof(CLST_Size)) != 0; |   30     return FXSYS_memcmp(this, &size, sizeof(CLST_Size)) != 0; | 
|   31   } |   31   } | 
|   32  |   32  | 
|   33   FX_FLOAT x, y; |   33   FX_FLOAT x, y; | 
|   34 }; |   34 }; | 
|   35  |   35  | 
|   36 class CLST_Rect : public CPDF_Rect { |   36 class CLST_Rect : public CFX_FloatRect { | 
|   37  public: |   37  public: | 
|   38   CLST_Rect() { left = top = right = bottom = 0.0f; } |   38   CLST_Rect() { left = top = right = bottom = 0.0f; } | 
|   39  |   39  | 
|   40   CLST_Rect(FX_FLOAT other_left, |   40   CLST_Rect(FX_FLOAT other_left, | 
|   41             FX_FLOAT other_top, |   41             FX_FLOAT other_top, | 
|   42             FX_FLOAT other_right, |   42             FX_FLOAT other_right, | 
|   43             FX_FLOAT other_bottom) { |   43             FX_FLOAT other_bottom) { | 
|   44     left = other_left; |   44     left = other_left; | 
|   45     top = other_top; |   45     top = other_top; | 
|   46     right = other_right; |   46     right = other_right; | 
|   47     bottom = other_bottom; |   47     bottom = other_bottom; | 
|   48   } |   48   } | 
|   49  |   49  | 
|   50   CLST_Rect(const CPDF_Rect& rect) { |   50   CLST_Rect(const CFX_FloatRect& rect) { | 
|   51     left = rect.left; |   51     left = rect.left; | 
|   52     top = rect.top; |   52     top = rect.top; | 
|   53     right = rect.right; |   53     right = rect.right; | 
|   54     bottom = rect.bottom; |   54     bottom = rect.bottom; | 
|   55   } |   55   } | 
|   56  |   56  | 
|   57   ~CLST_Rect() {} |   57   ~CLST_Rect() {} | 
|   58  |   58  | 
|   59   void Default() { left = top = right = bottom = 0.0f; } |   59   void Default() { left = top = right = bottom = 0.0f; } | 
|   60  |   60  | 
|   61   const CLST_Rect operator=(const CPDF_Rect& rect) { |   61   const CLST_Rect operator=(const CFX_FloatRect& rect) { | 
|   62     left = rect.left; |   62     left = rect.left; | 
|   63     top = rect.top; |   63     top = rect.top; | 
|   64     right = rect.right; |   64     right = rect.right; | 
|   65     bottom = rect.bottom; |   65     bottom = rect.bottom; | 
|   66  |   66  | 
|   67     return *this; |   67     return *this; | 
|   68   } |   68   } | 
|   69  |   69  | 
|   70   FX_BOOL operator==(const CLST_Rect& rect) const { |   70   FX_BOOL operator==(const CLST_Rect& rect) const { | 
|   71     return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0; |   71     return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0; | 
|   72   } |   72   } | 
|   73  |   73  | 
|   74   FX_BOOL operator!=(const CLST_Rect& rect) const { |   74   FX_BOOL operator!=(const CLST_Rect& rect) const { | 
|   75     return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) != 0; |   75     return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) != 0; | 
|   76   } |   76   } | 
|   77  |   77  | 
|   78   FX_FLOAT Width() const { return right - left; } |   78   FX_FLOAT Width() const { return right - left; } | 
|   79  |   79  | 
|   80   FX_FLOAT Height() const { |   80   FX_FLOAT Height() const { | 
|   81     if (top > bottom) |   81     if (top > bottom) | 
|   82       return top - bottom; |   82       return top - bottom; | 
|   83     return bottom - top; |   83     return bottom - top; | 
|   84   } |   84   } | 
|   85  |   85  | 
|   86   CPDF_Point LeftTop() const { return CPDF_Point(left, top); } |   86   CFX_FloatPoint LeftTop() const { return CFX_FloatPoint(left, top); } | 
|   87  |   87  | 
|   88   CPDF_Point RightBottom() const { return CPDF_Point(right, bottom); } |   88   CFX_FloatPoint RightBottom() const { return CFX_FloatPoint(right, bottom); } | 
|   89  |   89  | 
|   90   const CLST_Rect operator+=(const CPDF_Point& point) { |   90   const CLST_Rect operator+=(const CFX_FloatPoint& point) { | 
|   91     left += point.x; |   91     left += point.x; | 
|   92     right += point.x; |   92     right += point.x; | 
|   93     top += point.y; |   93     top += point.y; | 
|   94     bottom += point.y; |   94     bottom += point.y; | 
|   95  |   95  | 
|   96     return *this; |   96     return *this; | 
|   97   } |   97   } | 
|   98  |   98  | 
|   99   const CLST_Rect operator-=(const CPDF_Point& point) { |   99   const CLST_Rect operator-=(const CFX_FloatPoint& point) { | 
|  100     left -= point.x; |  100     left -= point.x; | 
|  101     right -= point.x; |  101     right -= point.x; | 
|  102     top -= point.y; |  102     top -= point.y; | 
|  103     bottom -= point.y; |  103     bottom -= point.y; | 
|  104  |  104  | 
|  105     return *this; |  105     return *this; | 
|  106   } |  106   } | 
|  107  |  107  | 
|  108   CLST_Rect operator+(const CPDF_Point& point) const { |  108   CLST_Rect operator+(const CFX_FloatPoint& point) const { | 
|  109     return CLST_Rect(left + point.x, top + point.y, right + point.x, |  109     return CLST_Rect(left + point.x, top + point.y, right + point.x, | 
|  110                      bottom + point.y); |  110                      bottom + point.y); | 
|  111   } |  111   } | 
|  112  |  112  | 
|  113   CLST_Rect operator-(const CPDF_Point& point) const { |  113   CLST_Rect operator-(const CFX_FloatPoint& point) const { | 
|  114     return CLST_Rect(left - point.x, top - point.y, right - point.x, |  114     return CLST_Rect(left - point.x, top - point.y, right - point.x, | 
|  115                      bottom - point.y); |  115                      bottom - point.y); | 
|  116   } |  116   } | 
|  117 }; |  117 }; | 
|  118  |  118  | 
|  119 class CFX_ListItem { |  119 class CFX_ListItem { | 
|  120  public: |  120  public: | 
|  121   CFX_ListItem(); |  121   CFX_ListItem(); | 
|  122   virtual ~CFX_ListItem(); |  122   virtual ~CFX_ListItem(); | 
|  123  |  123  | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
|  145   FX_BOOL m_bCaret; |  145   FX_BOOL m_bCaret; | 
|  146   CLST_Rect m_rcListItem; |  146   CLST_Rect m_rcListItem; | 
|  147 }; |  147 }; | 
|  148  |  148  | 
|  149 class CFX_ListContainer { |  149 class CFX_ListContainer { | 
|  150  public: |  150  public: | 
|  151   CFX_ListContainer() |  151   CFX_ListContainer() | 
|  152       : m_rcPlate(0.0f, 0.0f, 0.0f, 0.0f), |  152       : m_rcPlate(0.0f, 0.0f, 0.0f, 0.0f), | 
|  153         m_rcContent(0.0f, 0.0f, 0.0f, 0.0f) {} |  153         m_rcContent(0.0f, 0.0f, 0.0f, 0.0f) {} | 
|  154   virtual ~CFX_ListContainer() {} |  154   virtual ~CFX_ListContainer() {} | 
|  155   virtual void SetPlateRect(const CPDF_Rect& rect) { m_rcPlate = rect; } |  155   virtual void SetPlateRect(const CFX_FloatRect& rect) { m_rcPlate = rect; } | 
|  156   CPDF_Rect GetPlateRect() const { return m_rcPlate; } |  156   CFX_FloatRect GetPlateRect() const { return m_rcPlate; } | 
|  157   void SetContentRect(const CLST_Rect& rect) { m_rcContent = rect; } |  157   void SetContentRect(const CLST_Rect& rect) { m_rcContent = rect; } | 
|  158   CLST_Rect GetContentRect() const { return m_rcContent; } |  158   CLST_Rect GetContentRect() const { return m_rcContent; } | 
|  159   CPDF_Point GetBTPoint() const { |  159   CFX_FloatPoint GetBTPoint() const { | 
|  160     return CPDF_Point(m_rcPlate.left, m_rcPlate.top); |  160     return CFX_FloatPoint(m_rcPlate.left, m_rcPlate.top); | 
|  161   } |  161   } | 
|  162   CPDF_Point GetETPoint() const { |  162   CFX_FloatPoint GetETPoint() const { | 
|  163     return CPDF_Point(m_rcPlate.right, m_rcPlate.bottom); |  163     return CFX_FloatPoint(m_rcPlate.right, m_rcPlate.bottom); | 
|  164   } |  164   } | 
|  165  |  165  | 
|  166  public: |  166  public: | 
|  167   CPDF_Point InnerToOuter(const CPDF_Point& point) const { |  167   CFX_FloatPoint InnerToOuter(const CFX_FloatPoint& point) const { | 
|  168     return CPDF_Point(point.x + GetBTPoint().x, GetBTPoint().y - point.y); |  168     return CFX_FloatPoint(point.x + GetBTPoint().x, GetBTPoint().y - point.y); | 
|  169   } |  169   } | 
|  170   CPDF_Point OuterToInner(const CPDF_Point& point) const { |  170   CFX_FloatPoint OuterToInner(const CFX_FloatPoint& point) const { | 
|  171     return CPDF_Point(point.x - GetBTPoint().x, GetBTPoint().y - point.y); |  171     return CFX_FloatPoint(point.x - GetBTPoint().x, GetBTPoint().y - point.y); | 
|  172   } |  172   } | 
|  173   CPDF_Rect InnerToOuter(const CLST_Rect& rect) const { |  173   CFX_FloatRect InnerToOuter(const CLST_Rect& rect) const { | 
|  174     CPDF_Point ptLeftTop = InnerToOuter(CPDF_Point(rect.left, rect.top)); |  174     CFX_FloatPoint ptLeftTop = | 
|  175     CPDF_Point ptRightBottom = |  175         InnerToOuter(CFX_FloatPoint(rect.left, rect.top)); | 
|  176         InnerToOuter(CPDF_Point(rect.right, rect.bottom)); |  176     CFX_FloatPoint ptRightBottom = | 
|  177     return CPDF_Rect(ptLeftTop.x, ptRightBottom.y, ptRightBottom.x, |  177         InnerToOuter(CFX_FloatPoint(rect.right, rect.bottom)); | 
|  178                      ptLeftTop.y); |  178     return CFX_FloatRect(ptLeftTop.x, ptRightBottom.y, ptRightBottom.x, | 
 |  179                          ptLeftTop.y); | 
|  179   } |  180   } | 
|  180   CLST_Rect OuterToInner(const CPDF_Rect& rect) const { |  181   CLST_Rect OuterToInner(const CFX_FloatRect& rect) const { | 
|  181     CPDF_Point ptLeftTop = OuterToInner(CPDF_Point(rect.left, rect.top)); |  182     CFX_FloatPoint ptLeftTop = | 
|  182     CPDF_Point ptRightBottom = |  183         OuterToInner(CFX_FloatPoint(rect.left, rect.top)); | 
|  183         OuterToInner(CPDF_Point(rect.right, rect.bottom)); |  184     CFX_FloatPoint ptRightBottom = | 
 |  185         OuterToInner(CFX_FloatPoint(rect.right, rect.bottom)); | 
|  184     return CLST_Rect(ptLeftTop.x, ptLeftTop.y, ptRightBottom.x, |  186     return CLST_Rect(ptLeftTop.x, ptLeftTop.y, ptRightBottom.x, | 
|  185                      ptRightBottom.y); |  187                      ptRightBottom.y); | 
|  186   } |  188   } | 
|  187  |  189  | 
|  188  private: |  190  private: | 
|  189   CPDF_Rect m_rcPlate; |  191   CFX_FloatRect m_rcPlate; | 
|  190   CLST_Rect m_rcContent;  // positive forever! |  192   CLST_Rect m_rcContent;  // positive forever! | 
|  191 }; |  193 }; | 
|  192  |  194  | 
|  193 template <class TYPE> |  195 template <class TYPE> | 
|  194 class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { |  196 class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { | 
|  195  public: |  197  public: | 
|  196   FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; } |  198   FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; } | 
|  197   TYPE GetAt(int32_t nIndex) const { |  199   TYPE GetAt(int32_t nIndex) const { | 
|  198     if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) |  200     if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) | 
|  199       return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); |  201       return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); | 
|  200     return NULL; |  202     return NULL; | 
|  201   } |  203   } | 
|  202   void RemoveAt(int32_t nIndex) { |  204   void RemoveAt(int32_t nIndex) { | 
|  203     if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) |  205     if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) | 
|  204       CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex); |  206       CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex); | 
|  205   } |  207   } | 
|  206 }; |  208 }; | 
|  207  |  209  | 
|  208 class CFX_List : protected CFX_ListContainer, public IFX_List { |  210 class CFX_List : protected CFX_ListContainer, public IFX_List { | 
|  209  public: |  211  public: | 
|  210   CFX_List(); |  212   CFX_List(); | 
|  211   ~CFX_List() override; |  213   ~CFX_List() override; | 
|  212  |  214  | 
|  213   // IFX_List: |  215   // IFX_List: | 
|  214   void SetFontMap(IFX_Edit_FontMap* pFontMap) override; |  216   void SetFontMap(IFX_Edit_FontMap* pFontMap) override; | 
|  215   void SetFontSize(FX_FLOAT fFontSize) override; |  217   void SetFontSize(FX_FLOAT fFontSize) override; | 
|  216   CPDF_Rect GetPlateRect() const override; |  218   CFX_FloatRect GetPlateRect() const override; | 
|  217   CPDF_Rect GetContentRect() const override; |  219   CFX_FloatRect GetContentRect() const override; | 
|  218   FX_FLOAT GetFontSize() const override; |  220   FX_FLOAT GetFontSize() const override; | 
|  219   IFX_Edit* GetItemEdit(int32_t nIndex) const override; |  221   IFX_Edit* GetItemEdit(int32_t nIndex) const override; | 
|  220   int32_t GetCount() const override; |  222   int32_t GetCount() const override; | 
|  221   FX_BOOL IsItemSelected(int32_t nIndex) const override; |  223   FX_BOOL IsItemSelected(int32_t nIndex) const override; | 
|  222   FX_FLOAT GetFirstHeight() const override; |  224   FX_FLOAT GetFirstHeight() const override; | 
|  223   void SetMultipleSel(FX_BOOL bMultiple) override; |  225   void SetMultipleSel(FX_BOOL bMultiple) override; | 
|  224   FX_BOOL IsMultipleSel() const override; |  226   FX_BOOL IsMultipleSel() const override; | 
|  225   FX_BOOL IsValid(int32_t nItemIndex) const override; |  227   FX_BOOL IsValid(int32_t nItemIndex) const override; | 
|  226   int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const override; |  228   int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const override; | 
|  227   void Empty() override; |  229   void Empty() override; | 
|  228   CPDF_Rect GetItemRect(int32_t nIndex) const override; |  230   CFX_FloatRect GetItemRect(int32_t nIndex) const override; | 
|  229   int32_t GetItemIndex(const CPDF_Point& point) const override; |  231   int32_t GetItemIndex(const CFX_FloatPoint& point) const override; | 
|  230   int32_t GetFirstSelected() const override; |  232   int32_t GetFirstSelected() const override; | 
|  231  |  233  | 
|  232  protected: |  234  protected: | 
|  233   void AddItem(const FX_WCHAR* str); |  235   void AddItem(const FX_WCHAR* str); | 
|  234   virtual void ReArrange(int32_t nItemIndex); |  236   virtual void ReArrange(int32_t nItemIndex); | 
|  235   CFX_WideString GetItemText(int32_t nIndex) const; |  237   CFX_WideString GetItemText(int32_t nIndex) const; | 
|  236   void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected); |  238   void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected); | 
|  237   void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret); |  239   void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret); | 
|  238   int32_t GetLastSelected() const; |  240   int32_t GetLastSelected() const; | 
|  239   FX_WCHAR Toupper(FX_WCHAR c) const; |  241   FX_WCHAR Toupper(FX_WCHAR c) const; | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  277   CFX_ArrayTemplate<CPLST_Select_Item*> m_aItems; |  279   CFX_ArrayTemplate<CPLST_Select_Item*> m_aItems; | 
|  278 }; |  280 }; | 
|  279  |  281  | 
|  280 class CFX_ListCtrl : public CFX_List { |  282 class CFX_ListCtrl : public CFX_List { | 
|  281  public: |  283  public: | 
|  282   CFX_ListCtrl(); |  284   CFX_ListCtrl(); | 
|  283   ~CFX_ListCtrl() override; |  285   ~CFX_ListCtrl() override; | 
|  284  |  286  | 
|  285   // CFX_List |  287   // CFX_List | 
|  286   void SetNotify(IFX_List_Notify* pNotify) override; |  288   void SetNotify(IFX_List_Notify* pNotify) override; | 
|  287   void OnMouseDown(const CPDF_Point& point, |  289   void OnMouseDown(const CFX_FloatPoint& point, | 
|  288                    FX_BOOL bShift, |  290                    FX_BOOL bShift, | 
|  289                    FX_BOOL bCtrl) override; |  291                    FX_BOOL bCtrl) override; | 
|  290   void OnMouseMove(const CPDF_Point& point, |  292   void OnMouseMove(const CFX_FloatPoint& point, | 
|  291                    FX_BOOL bShift, |  293                    FX_BOOL bShift, | 
|  292                    FX_BOOL bCtrl) override; |  294                    FX_BOOL bCtrl) override; | 
|  293   void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override; |  295   void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  294   void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl) override; |  296   void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  295   void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; |  297   void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  296   void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; |  298   void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  297   void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; |  299   void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  298   void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; |  300   void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  299   void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; |  301   void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  300   FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; |  302   FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; | 
|  301   void SetPlateRect(const CPDF_Rect& rect) override; |  303   void SetPlateRect(const CFX_FloatRect& rect) override; | 
|  302   void SetScrollPos(const CPDF_Point& point) override; |  304   void SetScrollPos(const CFX_FloatPoint& point) override; | 
|  303   void ScrollToListItem(int32_t nItemIndex) override; |  305   void ScrollToListItem(int32_t nItemIndex) override; | 
|  304   CPDF_Rect GetItemRect(int32_t nIndex) const override; |  306   CFX_FloatRect GetItemRect(int32_t nIndex) const override; | 
|  305   int32_t GetCaret() const override { return m_nCaretIndex; } |  307   int32_t GetCaret() const override { return m_nCaretIndex; } | 
|  306   int32_t GetSelect() const override { return m_nSelItem; } |  308   int32_t GetSelect() const override { return m_nSelItem; } | 
|  307   int32_t GetTopItem() const override; |  309   int32_t GetTopItem() const override; | 
|  308   CPDF_Rect GetContentRect() const override; |  310   CFX_FloatRect GetContentRect() const override; | 
|  309   int32_t GetItemIndex(const CPDF_Point& point) const override; |  311   int32_t GetItemIndex(const CFX_FloatPoint& point) const override; | 
|  310   void AddString(const FX_WCHAR* string) override; |  312   void AddString(const FX_WCHAR* string) override; | 
|  311   void SetTopItem(int32_t nIndex) override; |  313   void SetTopItem(int32_t nIndex) override; | 
|  312   void Select(int32_t nItemIndex) override; |  314   void Select(int32_t nItemIndex) override; | 
|  313   void SetCaret(int32_t nItemIndex) override; |  315   void SetCaret(int32_t nItemIndex) override; | 
|  314   void Empty() override; |  316   void Empty() override; | 
|  315   void Cancel() override; |  317   void Cancel() override; | 
|  316   CFX_WideString GetText() const override; |  318   CFX_WideString GetText() const override; | 
|  317   void ReArrange(int32_t nItemIndex) override; |  319   void ReArrange(int32_t nItemIndex) override; | 
|  318  |  320  | 
|  319   virtual CPDF_Point InToOut(const CPDF_Point& point) const; |  321   virtual CFX_FloatPoint InToOut(const CFX_FloatPoint& point) const; | 
|  320   virtual CPDF_Point OutToIn(const CPDF_Point& point) const; |  322   virtual CFX_FloatPoint OutToIn(const CFX_FloatPoint& point) const; | 
|  321   virtual CPDF_Rect InToOut(const CPDF_Rect& rect) const; |  323   virtual CFX_FloatRect InToOut(const CFX_FloatRect& rect) const; | 
|  322   virtual CPDF_Rect OutToIn(const CPDF_Rect& rect) const; |  324   virtual CFX_FloatRect OutToIn(const CFX_FloatRect& rect) const; | 
|  323  |  325  | 
|  324  private: |  326  private: | 
|  325   void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected); |  327   void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected); | 
|  326   void SetSingleSelect(int32_t nItemIndex); |  328   void SetSingleSelect(int32_t nItemIndex); | 
|  327   void InvalidateItem(int32_t nItemIndex); |  329   void InvalidateItem(int32_t nItemIndex); | 
|  328   void SelectItems(); |  330   void SelectItems(); | 
|  329   FX_BOOL IsItemVisible(int32_t nItemIndex) const; |  331   FX_BOOL IsItemVisible(int32_t nItemIndex) const; | 
|  330   void SetScrollInfo(); |  332   void SetScrollInfo(); | 
|  331   void SetScrollPosY(FX_FLOAT fy); |  333   void SetScrollPosY(FX_FLOAT fy); | 
|  332  |  334  | 
|  333  private: |  335  private: | 
|  334   IFX_List_Notify* m_pNotify; |  336   IFX_List_Notify* m_pNotify; | 
|  335   FX_BOOL m_bNotifyFlag; |  337   FX_BOOL m_bNotifyFlag; | 
|  336   CPDF_Point m_ptScrollPos; |  338   CFX_FloatPoint m_ptScrollPos; | 
|  337   CPLST_Select m_aSelItems;  // for multiple |  339   CPLST_Select m_aSelItems;  // for multiple | 
|  338   int32_t m_nSelItem;        // for single |  340   int32_t m_nSelItem;        // for single | 
|  339   int32_t m_nFootIndex;      // for multiple |  341   int32_t m_nFootIndex;      // for multiple | 
|  340   FX_BOOL m_bCtrlSel;        // for multiple |  342   FX_BOOL m_bCtrlSel;        // for multiple | 
|  341   int32_t m_nCaretIndex;     // for multiple |  343   int32_t m_nCaretIndex;     // for multiple | 
|  342 }; |  344 }; | 
|  343  |  345  | 
|  344 #endif  // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |  346 #endif  // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ | 
| OLD | NEW |