FLImaging 7.1.24.1
GUIListCtrlMassive.h
1#pragma once
2
9#include "GUIWndCtrlBase.h"
10#include <map>
11#include <set>
12
14namespace FLImaging
15{
17 namespace GUI
18 {
19 class FL_EXPORT CGUIHeaderCtrl : public CHeaderCtrl
20 {
21 public:
22 CGUIHeaderCtrl();
23 virtual ~CGUIHeaderCtrl();
24
25 DECLARE_MESSAGE_MAP()
26 afx_msg void OnNMCustomdraw(NMHDR* pNMHDR, LRESULT* pResult);
27 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
28 virtual void PreSubclassWindow();
29 };
30
37 class FL_EXPORT CGUIListCtrlMassive : public CListCtrl, public CGUIWndCtrlBase
38 {
39 public:
40 typedef struct sDropItem
41 {
42 Base::CFLArray<int32_t> flaSelectedIndex;
43 int32_t i32Destination;
44 CGUIListCtrlMassive* pFromWnd;
45 CGUIListCtrlMassive* pToWnd;
46 bool bToTheEnd;
47 }
48 SDropItem;
49
50 public:
58
65 CGUIListCtrlMassive(int32_t i32ItemCnt, CWnd* pParentWnd = nullptr);
66
74
82
83 public:
92
101
111 void SelectItem(int32_t i32Idx, UINT state, UINT stateMask);
112
121
129 CGUIHeaderCtrl* GetHeaderCtrlSubclass();
130
131 HWND CreateListCtrl(CWnd* pParentWnd);
132 HWND CreateListCtrl(CWnd* pParentWnd, DWORD dwStyle);
133 void ResizeListCtrl(CWnd* pParentWnd);
134 BOOL InitListCtrl();
135
136 BOOL InsertAllItems(bool bClearInvisibleIndex = true);
137 BOOL SetItemCount(int32_t i32Count);
138 void PositionHeader();
139 virtual LRESULT ListViewNotify(LPARAM lParam);
140
141 int InsertColumn(_In_ int nCol, _In_z_ LPCTSTR lpszColumnHeading,
142 _In_ int nFormat = LVCFMT_LEFT, _In_ int nWidth = -1, _In_ int nSubItem = -1);
143
144 int InsertItem(_In_ int nItem, _In_z_ LPCTSTR lpszItem); // Real Index
145 int DeleteItem(_In_ int nItem); // Real Index
146
147 BOOL SetItem(_In_ int nItem, _In_ int nSubItem, _In_ UINT nMask, _In_opt_z_ LPCTSTR lpszItem, _In_ int nImage, _In_ UINT nState, _In_ UINT nStateMask, _In_ LPARAM lParam);
148
149 virtual const CResult SetItemText(int32_t i32Row, int32_t i32Column, const wchar_t* pWcsText);
150
151 int GetRowFromPoint(CPoint& point, int* col) const;
152
153 virtual BOOL DeleteAllItems();
154 virtual void EnableEdit(bool bEnable);
155 virtual void EnableEditColumn(bool bEnable, int32_t i32Column);
156 virtual void EnableEditColumn(bool bEnable, const Base::CFLArray<int32_t>& flaColumns);
157 virtual void EnableEditRow(bool bEnable, int32_t i32Row);
158 virtual void EnableEditRow(bool bEnable, const Base::CFLArray<int32_t>& flaRows);
159 virtual bool IsEditEnabled(int32_t i32Row, int32_t i32Column)const;
160 virtual bool IsEditEnabledRow(int32_t i32Row)const;
161 virtual bool IsEditEnabledColumn(int32_t i32Column)const;
162
163 // 가시 인덱스 -> 실제 인덱스 : hidden/visible row 고려한 실제 데이터 인덱스
164 virtual int32_t GetRealRowFromVisibleIndex(int32_t i32Idx) const;
165 // 실제 인덱스 -> 가시 인덱스 : hidden/visible row 고려한 가시 데이터 인덱스
166 // 리스트 컨트롤 상에서 몇 번째에 위치해 있는지 정보입니다.
167 // 만약 실제 인덱스가 inivisible 상태일 경우 -1을 리턴합니다.
168 virtual int32_t GetVisibleIndexFromRealRow(int32_t i32Row) const;
169 virtual bool IsRowVisible(int32_t i32Row) const;
170 virtual void ShowRow(int32_t i32Row, bool bShow);
171 virtual void ShowRows(const Base::CFLArray<int32_t>& flaRows, bool bShow, bool bHideElse = true);
172 virtual void ShowAllRows();
173
174 virtual bool IsColumnVisible(int32_t i32Column) const;
175 virtual void ShowColumn(int32_t i32Column, bool bShow);
176 virtual void ShowColumns(const Base::CFLArray<int32_t>& flaColumns, bool bShow);
177
178 virtual bool IsDragAndDropEnabled()const;
179 virtual void EnableDragAndDrop(bool bEnable);
180
181 virtual const CResult RearrangePageOrder(Base::CFLArray<int32_t>& flaIndices, int32_t i32TargetIndex);
182
183 virtual void RedrawScrollBarPosition(bool bVScrollBar = true);
184
185 protected:
186 virtual CEdit* EditSubLabel(int nItem, int nCol);
187 virtual void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
188 virtual void DropItemOnList(CGUIListCtrlMassive* pDragList, CGUIListCtrlMassive* pDropList);
189 virtual int32_t GetMouseScrollMode(int32_t* pI32DeltaY = nullptr);
190 virtual void AutoScroll();
191 virtual void DestroyDragImage();
192
193 protected:
194 int32_t m_i32ItemCnt;
195
196 std::vector<Base::CFLString<wchar_t>>& m_vctColumn;
197 std::vector<int>& m_vctColumnWidth;
198 std::vector<bool>& m_vctEnableEditColumn;
199 std::vector<bool>& m_vctColumnVisibility;
200
201 std::vector<std::pair<Base::CFLString<wchar_t>, bool>>& m_vctRow;
202 std::vector<bool>& m_vctEnableEditRows;
203
204 std::vector<std::vector<Base::CFLString<wchar_t>> >& m_vct2Item;
205 std::set<int32_t>& m_setInvisibleIndex;
206 std::vector<int32_t>& m_vctInvisibleIndex;
207
208 CBrush m_brBackground;
209
210 CGUIHeaderCtrl* m_pCtrlHeader;
211 CEdit* m_pInPlaceEdit;
212
213 bool m_bDragAndDropEnabled;
214 CImageList* m_pDragImage;
215 bool m_bIsDragging;
216 bool m_bSetFirstColIndex;
217 int32_t m_i32DragIndex;
218 int32_t m_i32DropIndex;
219 int32_t m_i32MovingRegion;
220
221 friend class CGUIDialogImagePageList;
222
223 public:
224 DECLARE_MESSAGE_MAP()
225 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
226 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
227 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
228 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
229 afx_msg void OnNMCustomdraw(NMHDR* pNMHDR, LRESULT* pResult);
230 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
231 afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
232 void OnEndLabelEdit(NMHDR* pNMHDR, LRESULT* pResult);
233 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
234 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
235 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
236 LRESULT OnEditDestroyed(WPARAM wParam, LPARAM lParam);
237 LRESULT OnInternalHandleKeyUp(WPARAM wParam, LPARAM lParam);
238 virtual BOOL PreTranslateMessage(MSG* pMsg);
239 virtual void PreSubclassWindow();
240 afx_msg void OnCaptureChanged(CWnd* pWnd);
241};
242 }
243}
Template type 의 배열 클래스.
Definition FLArray.h:53
FLImaging 모듈의 수행 결과 객체
Definition ResultsDef.h:1676
CGUIListCtrlMassive(const CGUIListCtrlMassive &rh)
복사 생성자
void SelectItem(int32_t i32Idx, UINT state, UINT stateMask)
아이템을 선택 또는 포커스하는 함수
int32_t GetSelectedItemIndex()
선택된 아이템 인덱스를 얻어 오는 함수
virtual ~CGUIListCtrlMassive()
기본 소멸자
CRect GetBoundaryRect()
리스트컨트롤의 사각형을 얻어 오는 함수
CGUIHeaderCtrl * GetHeaderCtrlSubclass()
CGUIHeaderCtrl 클래스로 서브클래싱 된 헤더컨트롤 포인터를 얻어 오는 함수
int32_t GetFocusedItemIndex()
선택된 아이템 인덱스를 얻어 오는 함수
CGUIListCtrlMassive(int32_t i32ItemCnt, CWnd *pParentWnd=nullptr)
생성자
Definition D2DObject.h:12