Updated bsconf to the latest from uSTL
[ttodo.git] / ilist.h
blob28a9443d11c20c5e3fbae2e2b26586118bece760
1 // This file is part of a terminal todo application.
2 //
3 // Copyright (C) 2006 by Mike Sharov <msharov@users.sourceforge.net>
4 // This file is free software, distributed under the MIT License.
5 //
6 // ilist.h
7 //
9 #ifndef ILIST_H_7BDB6D9539FC19CC7C7DA4A0140965B0
10 #define ILIST_H_7BDB6D9539FC19CC7C7DA4A0140965B0
12 #include "cldoc.h"
14 /// List of todo entries.
15 class CTodoList : public CListbox {
16 public:
17 typedef const tdevec_t* pctdevec_t;
18 public:
19 CTodoList (void);
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);
23 protected:
24 virtual void OnUpdate (void);
25 virtual void OnCommand (cmd_t c);
26 virtual void OnUpdateCommandUI (rcmd_t rc) const;
27 private:
28 typedef CCurlistDocument* pdoc_t;
29 typedef const CCurlistDocument* pcdoc_t;
30 typedef CTodoItem::id_t itemid_t;
31 private:
32 inline pdoc_t Document (void) { return (TDocument<CCurlistDocument>()); }
33 inline pcdoc_t Document (void) const { return (TDocument<CCurlistDocument>()); }
34 inline void EditItem (void);
35 private:
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[];
41 #endif