Don't offer to delete a corrupt .todo; too much chance for making a mistake, like...
[ttodo.git] / elist.h
blob39e936b40dcdd09a8851dfcd27ee8c72a5e4d865
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 todolist_t* pctodolist_t;
13 public:
14 CTodoList (void);
15 void SetList (pctodolist_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 private:
21 typedef CTodoDocument* pdoc_t;
22 typedef const CTodoDocument* pcdoc_t;
23 typedef CTodoEntry::id_t itemid_t;
24 private:
25 inline pdoc_t Document (void) { return (TDocument<CTodoDocument>()); }
26 inline pcdoc_t Document (void) const { return (TDocument<CTodoDocument>()); }
27 inline void EditEntry (void);
28 private:
29 pctodolist_t m_pTodos; ///< Link to the data.
30 itemid_t m_CopiedId; ///< Cut-n-paste link buffer.
33 #endif