comparison foosdk/sdk/libPPUI/CListControl-Cell.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
comparison
equal deleted inserted replaced
0:e9bb126753e7 1:20d02a178406
1 #pragma once
2 #include <uxtheme.h> // HTHEME
3 #include <functional>
4
5 class CListCell {
6 public:
7 typedef uint32_t cellState_t;
8 enum {
9 cellState_none = 0,
10 cellState_hot = 1 << 0,
11 cellState_pressed = 1 << 1,
12 cellState_disabled = 1 << 2,
13 };
14
15 struct DrawContentArg_t {
16 DWORD hdrFormat = 0;
17 cellState_t cellState = 0;
18 CRect subItemRect;
19 CDCHandle dc;
20 const wchar_t * text = nullptr;
21 bool allowColors = true;
22 CRect rcHot;
23 CRect rcText;
24 HTHEME theme = NULL;
25 uint32_t colorHighlight = 0;
26 CWindow thisWnd;
27 std::function<void(CDCHandle, const CRect&) > imageRenderer;
28 bool darkMode = false;
29 };
30 virtual void DrawContent( DrawContentArg_t const & arg ) = 0;
31 virtual const char * Theme() { return nullptr; }
32 virtual bool ApplyTextStyle( LOGFONT & font, double scale, uint32_t state );
33 virtual bool IsInteractive() { return false; }
34 virtual bool TracksMouseMove() { return false; }
35 virtual bool SuppressRowSelect() { return false; }
36 virtual bool IsToggle() { return false; }
37 virtual bool IsRadioToggle() { return false; }
38 virtual bool AllowTypeFind() { return true; }
39 virtual CRect HotRect( CRect rc ) { return rc; }
40 virtual HCURSOR HotCursor() { return NULL; }
41 virtual bool AllowDrawThemeText() { return false; }
42 virtual LONG AccRole();
43 virtual uint32_t EditFlags() { return 0; }
44 virtual bool ClickToEdit() { return false; }
45 };