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