Moved dependency class to tde
[ttodo.git] / elist.h
blob8b344d1feb793c23f2ae26ad35790cb962e0a2a9
1 // elist.h
2 //
4 #ifndef ELIST_H_7BDB6D9539FC19CC7C7DA4A0140965B0
5 #define ELIST_H_7BDB6D9539FC19CC7C7DA4A0140965B0
7 #include "tddoc.h"
9 /// List of todo entries.
10 class CTodoList : public CListbox {
11 public:
12 typedef const tdevec_t* pctdevec_t;
13 public:
14 CTodoList (void);
15 void SetList (pctdevec_t pl);
16 virtual void OnDrawItem (CGC& gc, rcpos_t pos, uint32_t ii);
17 virtual void OnKey (wchar_t key);
18 protected:
19 virtual void OnUpdate (void);
20 virtual void OnCommand (cmd_t c);
21 virtual void OnUpdateCommandUI (rcmd_t rc) const;
22 private:
23 typedef CTodoDocument* pdoc_t;
24 typedef const CTodoDocument* pcdoc_t;
25 typedef CTodoEntry::id_t itemid_t;
26 private:
27 inline pdoc_t Document (void) { return (TDocument<CTodoDocument>()); }
28 inline pcdoc_t Document (void) const { return (TDocument<CTodoDocument>()); }
29 inline void EditEntry (void);
30 private:
31 pctdevec_t m_pTodos; ///< Link to the data.
32 itemid_t m_CopiedId; ///< Cut-n-paste link buffer.
33 static const SCommandKey c_CmdKeys[];
36 #endif