|
1
|
1 #pragma once
|
|
|
2
|
|
|
3 #include <functional>
|
|
|
4
|
|
|
5 namespace InPlaceEdit {
|
|
|
6
|
|
|
7 enum {
|
|
|
8 KEditAborted = 0,
|
|
|
9 KEditTab,
|
|
|
10 KEditShiftTab,
|
|
|
11 KEditEnter,
|
|
|
12 KEditLostFocus,
|
|
|
13
|
|
|
14 KEditMaskReason = 0xFF,
|
|
|
15 KEditFlagContentChanged = 0x100,
|
|
|
16
|
|
|
17 KFlagReadOnly = 1 << 0,
|
|
|
18 KFlagMultiLine = 1 << 1,
|
|
|
19 KFlagAlignCenter = 1 << 2,
|
|
|
20 KFlagAlignRight = 1 << 3,
|
|
|
21 KFlagNumber = 1 << 4,
|
|
|
22 KFlagNumberSigned = 1 << 5,
|
|
|
23
|
|
|
24 KFlagCombo = 1 << 8, // FOR INTERNAL USE
|
|
|
25 KFlagDark = 1 << 9
|
|
|
26 };
|
|
|
27
|
|
|
28 typedef std::function< void (unsigned) > reply_t;
|
|
|
29
|
|
|
30 typedef std::function< void(unsigned, unsigned) > comboReply_t; // status, index (UINT_MAX if n/a)
|
|
|
31
|
|
|
32 HWND Start(HWND p_parentwnd, const RECT & p_rect, bool p_multiline, pfc::rcptr_t<pfc::string_base> p_content, reply_t p_notify);
|
|
|
33
|
|
|
34 HWND StartEx(HWND p_parentwnd, const RECT & p_rect, unsigned p_flags, pfc::rcptr_t<pfc::string_base> p_content, reply_t p_notify, IUnknown * ACData = NULL, DWORD ACOpts = 0);
|
|
|
35
|
|
|
36
|
|
|
37 HWND StartCombo(HWND p_parentwnd, const RECT & p_rect, unsigned p_flags, pfc::string_list_const & data, unsigned iDefault, comboReply_t p_notify);
|
|
|
38
|
|
|
39 void Start_FromListView(HWND p_listview, unsigned p_item, unsigned p_subitem, unsigned p_linecount, pfc::rcptr_t<pfc::string_base> p_content, reply_t p_notify);
|
|
|
40 void Start_FromListViewEx(HWND p_listview, unsigned p_item, unsigned p_subitem, unsigned p_linecount, unsigned p_flags, pfc::rcptr_t<pfc::string_base> p_content, reply_t p_notify);
|
|
|
41
|
|
|
42 bool TableEditAdvance(unsigned & p_item, unsigned & p_column, unsigned p_item_count, unsigned p_column_count, unsigned p_whathappened);
|
|
|
43 bool TableEditAdvance_ListView(HWND p_listview, unsigned p_column_base, unsigned & p_item, unsigned & p_column, unsigned p_item_count, unsigned p_column_count, unsigned p_whathappened);
|
|
|
44
|
|
|
45 }
|