Analysis
Overview
User should be able to define custom style templates. Following actions could be done with style templates.
- Create new
- Save changes
- Load style template
- Delete style template
- Save styles set
- Save styles set as - with different name
This functionality should present in paragraph settings hud and detached text frame editor.
Also be aware that paragraph style templates include common character appearance in the paragraph, so please review TEXT_PARAGRAPH_CHAR_STYLE_R0 as well.
Task requirements
- Add combo box in paragraph settings hud and detached text frame editor. This should allow user to choose already defined style templates and to type new style templates name as well as to indicate if there is a change in current template(this indication could be change of color inside the combo box or adding '*' before the name, please implement second proposition for now).
- Also add 6 buttons(Create, Save, Load, Delete, Save styles set, Save styles set as).
- When the user clicks Create button instead of showing new hud(as it was implemented in Sophie 1.0), change the focus to be set on the combo box and change the text to something like "New Style Name". The text should be selected at this moment.
- Delete button deletes the current style, not the entire set.
- Create appropriate file format that allows loading and saving sets of style templates.
Task result
- The result should be code.
Implementation idea
- Review TEXT_PARAGPRAPH_FORMAT_COMMONS_R0 and don't get in to a conflict with implementation of this task.
- You could use org.sophie2.main.view.boundcontrols.BoundComboBox
- The style templates sets are resources so please get familiar with BASE_RESOURCE_MODEL? and his sub tasks.
Related
TEXT_PARAGPRAPH_FORMAT_COMMONS_R0
TEXT_PARAGRAPH_ALIGN_R0
TEXT_PARAGRAPH_SPACING_R0
TEXT_PARAGRAPH_CHAR_STYLE_R0
TEXT_PARAGRAPH_NEXT_STYLE_R0
How to demo
- Run the application
- Create a new book and place text frame inside
- Populate some lorem ipsum text inside with a number of paragraphs(lorem ipsum generator --> http://www.lipsum.com/)
- Set focus in the some of the paragraphs, open paragraph settings hud, create new style
- Set focus on some of the others paragraphs and apply the style defined previously.
- Test saving and loading of style sets.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)