Version 12 (modified by danvisel, 16 years ago) (diff) |
---|
Analysis
Overview
The page preview palette is a part of the page tab in the left flap of the main window. It contains a list of representations of all pages in the book which can be manipulated to add, delete, or rearrange pages.
Task requirements
- The page palette should list thumbnails of the pages in the currently selected book.
- Selecting a thumbnail makes its page the current page of the book.
- A selected page may be deleted. User should be able to delete by pressing DELETE or BACKSPACE.
- The thumbnails are redrawn when the user changes pages.
- For this revision, thumbnails should be a fixed width (say 100 pixels wide) so that they are not redrawn when the user changes the flap width.
- For this revision, two buttons should appear at the bottom of the palette, labeled "Add Page Before" and "Add Page After". If "Add Page Before" is clicked, a new page is inserted immediately before the current page. If "Add Page After" is clicked, a new page is inserted immediately after the current page.
Task result
The result of this task is source code.
Implementation idea
Add the palette to the left flap and bind the list of its items to the books pages.
How to demo
- Open the page preview palette and show the thumbnails of all the pages in the book.
- Change something on a page and show that the thumbnails are redrawn.
- Click on another page thumbnail in the page preview palette and see that Sophie goes to that page.
- Add a new page after the current page by clicking the "Add Page Before" button.
- Select a page in the page preview palette and hit DELETE to delete the page.
Design
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))
Testing
Comments
For later revisions:
- The user can rearrange pages by dragging them up and down.
- Dragging a page template from the right flap into the page preview template is creating a new page from this template. The new page is inserted before, between, or after existing pages depending on where the template was dropped.
- A template may be applied to a page by dragging the template to a page in the page preview palette.
- The thumbnails should be resized when the user changes the width of the flap.
Notes:
- I suspect that updating the page thumbnails every time a page is changed will end up making the entire program very slow. Probably we want to redraw thumbnails more frequently that every time the user changes pages, but we might want to think about only making some changes trigger thumbnail redrawing.