1 // Copyright (c) 2006 by Mike Sharov <msharov@users.sourceforge.net>
8 /// Default constructor.
9 CTodoFrame::CTodoFrame (void)
12 AddChild (new CTodoList
);
13 AddChild (new CEntryEditDialog
);
14 assert (pane_Last
== Children().size());
17 /// Registers each child pane with the document.
18 void CTodoFrame::OnInitialUpdate (void)
20 CWindow::OnInitialUpdate();
21 Document()->RegisterView (&TodoList());
22 Document()->RegisterView (&EntryEditor());
25 /// Allows each child pane to close the frame by closing itself.
26 void CTodoFrame::OnChildClose (uoff_t i
)
28 CWindow::OnChildClose (i
);
32 /// Resizes and places child windows.
33 void CTodoFrame::OnResize (rcrect_t wr
)
35 CWindow::OnResize (wr
);
36 TodoList().OnResize (Rect (0, 0, wr
.Width(), wr
.Height() - 8));
37 EntryEditor().OnResize (Rect (0, wr
.Height() - 8, wr
.Width(), 8));