Don't offer to delete a corrupt .todo; too much chance for making a mistake, like...
[ttodo.git] / eedit.h
blobe4f7905f898f3eabf72d5c6ae558a87fa145c9d0
1 // Copyright (c) 2006 by Mike Sharov <msharov@users.sourceforge.net>
2 //
3 // eedit.h
4 //
6 #ifndef EEDIT_H_2D55AEF271DA70232C96241A36B8EA24
7 #define EEDIT_H_2D55AEF271DA70232C96241A36B8EA24
9 #include "tddoc.h"
11 /// \class CEntryEditDialog editdlg.h editdlg.h
12 class CEntryEditDialog : public CDialog {
13 public:
14 typedef const CTodoEntry& rcentry_t;
15 public:
16 CEntryEditDialog (void);
17 void SetEntry (rcentry_t e);
18 inline rcentry_t Entry (void) const { return (m_Entry); }
19 virtual void OnResize (rcrect_t wr);
20 protected:
21 virtual void OnKey (wchar_t key);
22 virtual void OnGainFocus (void);
23 virtual void OnUpdate (void);
24 private:
25 enum {
26 ctrl_Text,
27 ctrl_CreatedDate,
28 ctrl_DoneDate,
29 ctrl_Last
31 typedef CTodoDocument* pdoc_t;
32 typedef const CTodoDocument* pcdoc_t;
33 private:
34 inline pdoc_t Document (void) { return (TDocument<CTodoDocument>()); }
35 inline pcdoc_t Document (void) const { return (TDocument<CTodoDocument>()); }
36 inline CEditBox& EntryText (void) { return (TCW<CEditBox>(ctrl_Text)); }
37 inline CLabel& CreatedDate (void) { return (TCW<CLabel>(ctrl_CreatedDate)); }
38 inline CLabel& DoneDate (void) { return (TCW<CLabel>(ctrl_DoneDate)); }
39 private:
40 CTodoEntry m_Entry;
43 #endif