Analysis
Overview
- Define a view for frames and a base view for frame content.
- The frame view should contain the frame content view.
- Both should contain scene elements.
Task requirements
- Define frame view containing frame content view.
- The frame view should contain a very basic scene element constructed from the scene element of the frame content view.
- Define base view for frame content with very basic features.
- The view should contain a scene element.
Task result
The result of this task should be source code.
Implementation idea
- Create ContentView which is view for frame content .
- It should have a FrameView parent property, a SceneElement property and a FrameContent model property.
- Create FrameView which is view for frames.
- It should have a ContentView child property, a SceneElement property and a Frame model property.
Related
UNPLANNED_BASE_MODEL_FRAME_CONTENT_R0
How to demo
- Create unit test for ContentView. It should:
- Test associating a ContentView with a FrameView.
- Test changing the resource containted in the model property of a FrameView.
- Create a demo for ContentView. (Can't be created at the moment because of problems with FrameView);
Design
Create ContentView which is base abstract class for viewing content. It should have the following properties:
- parent property with template type FrameView.
- model property with template type extending FrameContent.
- element property with template type extending SceneElement which is the SceneElement which is to be rendered by the SceneEngine.
- haloMenu property with template type extending the base class for the content halo menus. (This class is not implemented yet).
Create UndefinedContentView class inheriting ContentView. It should be represent a view for undefined content.
Create ContentViewFactory which is a factory for ContentView-s.
- It should have 1 static method which has a FrameContent argument and returns a ContentView.
- If the FrameContent is undefined then the factory should return an UndefinedContentView.
FrameView should contain contentView child property which is automaticaly computed each time the
content property of the model is changed.
FrameView should also contain a CompositeSceneElement property which contains other SceneElement properties
representing borders, margins etc. and most importantly it should contain the SceneElement property from its ContentView.
Implementation
Unit test:
[1216]