diff foosdk/sdk/libPPUI/InPlaceEdit.h @ 1:20d02a178406 default tip

*: check in everything else yay
author Paper <paper@tflc.us>
date Mon, 05 Jan 2026 02:15:46 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/foosdk/sdk/libPPUI/InPlaceEdit.h	Mon Jan 05 02:15:46 2026 -0500
@@ -0,0 +1,45 @@
+#pragma once
+
+#include <functional>
+
+namespace InPlaceEdit {
+
+	enum {
+		KEditAborted = 0,
+		KEditTab,
+		KEditShiftTab,
+		KEditEnter,
+		KEditLostFocus,
+
+		KEditMaskReason = 0xFF,
+		KEditFlagContentChanged = 0x100,
+
+		KFlagReadOnly = 1 << 0,
+		KFlagMultiLine = 1 << 1,
+		KFlagAlignCenter = 1 << 2,
+		KFlagAlignRight = 1 << 3,
+		KFlagNumber = 1 << 4,
+		KFlagNumberSigned = 1 << 5,
+		
+		KFlagCombo = 1 << 8, // FOR INTERNAL USE
+		KFlagDark = 1 << 9
+	};
+	
+	typedef std::function< void (unsigned) > reply_t;
+	
+	typedef std::function< void(unsigned, unsigned) > comboReply_t; // status, index (UINT_MAX if n/a)
+
+	HWND Start(HWND p_parentwnd, const RECT & p_rect, bool p_multiline, pfc::rcptr_t<pfc::string_base> p_content, reply_t p_notify);
+
+	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);
+
+
+	HWND StartCombo(HWND p_parentwnd, const RECT & p_rect, unsigned p_flags, pfc::string_list_const & data, unsigned iDefault, comboReply_t p_notify);
+
+	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);
+	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);
+
+	bool TableEditAdvance(unsigned & p_item, unsigned & p_column, unsigned p_item_count, unsigned p_column_count, unsigned p_whathappened);
+	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);
+
+}