1 // This file is part of a terminal todo application.
3 // Copyright (C) 2006 by Mike Sharov <msharov@users.sourceforge.net>
4 // This file is free software, distributed under the MIT License.
9 #ifndef ILIST_H_7BDB6D9539FC19CC7C7DA4A0140965B0
10 #define ILIST_H_7BDB6D9539FC19CC7C7DA4A0140965B0
14 /// List of todo entries.
15 class CTodoList
: public CListbox
{
17 typedef const tdevec_t
* pctdevec_t
;
20 void SetList (pctdevec_t pl
);
21 virtual void OnDrawItem (CGC
& gc
, rcpos_t pos
, uint32_t ii
);
22 virtual void OnKey (wchar_t key
);
24 virtual void OnUpdate (void);
25 virtual void OnCommand (cmd_t c
);
26 virtual void OnUpdateCommandUI (rcmd_t rc
) const;
28 typedef CCurlistDocument
* pdoc_t
;
29 typedef const CCurlistDocument
* pcdoc_t
;
30 typedef CTodoItem::id_t itemid_t
;
32 inline pdoc_t
Document (void) { return (TDocument
<CCurlistDocument
>()); }
33 inline pcdoc_t
Document (void) const { return (TDocument
<CCurlistDocument
>()); }
34 inline void EditItem (void);
36 pctdevec_t m_pTodos
; ///< Link to the data.
37 itemid_t m_CopiedId
; ///< Cut-n-paste link buffer.
38 static const SCommandKey c_CmdKeys
[];