Mercurial > foo_out_sdl
comparison foosdk/sdk/libPPUI/CListControl-Cells.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 | |
| 3 #include "CListControl-Cell.h" | |
| 4 | |
| 5 | |
| 6 class CListCell_Interactive : public CListCell { | |
| 7 public: | |
| 8 bool IsInteractive() override { return true; } | |
| 9 }; | |
| 10 | |
| 11 class CListCell_Text : public CListCell { | |
| 12 public: | |
| 13 void DrawContent( DrawContentArg_t const & ) override; | |
| 14 bool AllowDrawThemeText() override { return true; } | |
| 15 }; | |
| 16 | |
| 17 class CListCell_Edit: public CListCell_Text { | |
| 18 public: | |
| 19 bool ClickToEdit() { return true; } | |
| 20 }; | |
| 21 | |
| 22 class CListCell_TextColors : public CListCell_Text { | |
| 23 public: | |
| 24 void DrawContent( DrawContentArg_t const & ) override; | |
| 25 }; | |
| 26 | |
| 27 class CListCell_MultiText : public CListCell { | |
| 28 public: | |
| 29 void DrawContent( DrawContentArg_t const & ) override; | |
| 30 }; | |
| 31 | |
| 32 class CListCell_Hyperlink : public CListCell_Interactive { | |
| 33 public: | |
| 34 void DrawContent( DrawContentArg_t const & ) override; | |
| 35 bool ApplyTextStyle( LOGFONT & font, double scale, uint32_t state ) override; | |
| 36 HCURSOR HotCursor() override; | |
| 37 LONG AccRole() override; | |
| 38 bool SuppressRowSelect() override { return true; } | |
| 39 }; | |
| 40 | |
| 41 class CListCell_Button : public CListCell_Interactive { | |
| 42 public: | |
| 43 void DrawContent( DrawContentArg_t const & ) override; | |
| 44 const char * Theme() override { return "BUTTON"; } | |
| 45 bool AllowTypeFind() override { return false; } | |
| 46 LONG AccRole() override; | |
| 47 bool SuppressRowSelect() override { return true; } | |
| 48 | |
| 49 protected: | |
| 50 bool m_lite = false; | |
| 51 }; | |
| 52 | |
| 53 class CListCell_ButtonLite : public CListCell_Button { | |
| 54 public: | |
| 55 CListCell_ButtonLite() { m_lite = true; } | |
| 56 }; | |
| 57 | |
| 58 class CListCell_ButtonGlyph : public CListCell_ButtonLite { | |
| 59 public: | |
| 60 bool ApplyTextStyle( LOGFONT & font, double scale, uint32_t state ) override; | |
| 61 }; | |
| 62 | |
| 63 class CListCell_Checkbox : public CListCell_Interactive { | |
| 64 public: | |
| 65 void DrawContent( DrawContentArg_t const & ) override; | |
| 66 const char * Theme() override { return "BUTTON"; } | |
| 67 bool IsToggle() override { return true; } | |
| 68 CRect HotRect( CRect rc ) override; | |
| 69 bool IsRadioToggle() override { return m_radio; } | |
| 70 LONG AccRole() override; | |
| 71 | |
| 72 protected: | |
| 73 bool m_radio = false; | |
| 74 }; | |
| 75 | |
| 76 class CListCell_RadioCheckbox : public CListCell_Checkbox { | |
| 77 public: | |
| 78 CListCell_RadioCheckbox() { m_radio = true; } | |
| 79 | |
| 80 static CListCell_RadioCheckbox instance; | |
| 81 }; | |
| 82 | |
| 83 class CListCell_Combo : public CListCell_Interactive { | |
| 84 public: | |
| 85 void DrawContent(DrawContentArg_t const &) override; | |
| 86 const char * Theme() override { return "COMBOBOX"; } | |
| 87 LONG AccRole() override; | |
| 88 uint32_t EditFlags() override; | |
| 89 bool ClickToEdit() { return true; } | |
| 90 }; | |
| 91 | |
| 92 void RenderButton( HTHEME theme, CDCHandle dc, CRect rcButton, CRect rcUpdate, uint32_t cellState ); | |
| 93 void RenderCheckbox( HTHEME theme, CDCHandle dc, CRect rcCheckBox, unsigned stateFlags, bool bRadio ); | |
| 94 | |
| 95 | |
| 96 class CListCell_Text_FixedColor : public CListCell_Text { | |
| 97 const COLORREF m_col; | |
| 98 public: | |
| 99 CListCell_Text_FixedColor(COLORREF col) : m_col(col) {} | |
| 100 void DrawContent(DrawContentArg_t const & arg) override; | |
| 101 }; |
