Use ccache
[ttodo.git] / eedit.h
blob5b8da5cdaa62e75ea9e4a4241b8ec091445ed627
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 "ui/dialog.h"
10 #include "tddoc.h"
12 /// \class CEntryEditDialog editdlg.h editdlg.h
13 class CEntryEditDialog : public CDialog {
14 public:
15 typedef const CTodoEntry& rcentry_t;
16 public:
17 CEntryEditDialog (void);
18 void SetEntry (rcentry_t e);
19 inline rcentry_t Entry (void) const { return (m_Entry); }
20 virtual void OnResize (rcrect_t wr);
21 protected:
22 virtual void OnKey (wchar_t key);
23 virtual void OnGainFocus (void);
24 virtual void OnUpdate (void);
25 private:
26 enum {
27 ctrl_Text,
28 ctrl_CreatedDate,
29 ctrl_DoneDate,
30 ctrl_Last
32 typedef CTodoDocument* pdoc_t;
33 typedef const CTodoDocument* pcdoc_t;
34 private:
35 inline pdoc_t Document (void) { return (TDocument<CTodoDocument>()); }
36 inline pcdoc_t Document (void) const { return (TDocument<CTodoDocument>()); }
37 inline CEditBox& EntryText (void) { return (TCW<CEditBox>(ctrl_Text)); }
38 inline CLabel& CreatedDate (void) { return (TCW<CLabel>(ctrl_CreatedDate)); }
39 inline CLabel& DoneDate (void) { return (TCW<CLabel>(ctrl_DoneDate)); }
40 private:
41 CTodoEntry m_Entry;
44 #endif