SophiaFramework UNIVERSE 5.3 |
This class draws the responder tree on the device screen. Some private functions of this class are used only in the SFYResponder class and the SFYDistributer class and will not be used directly in the applet development.
Since the SFYApplication class contains an instance of this class by default and automatically performs all the calling and setting necessary for the application, you don't have to operate on this class.
In case of contructing another responder tree, developer needs to use this class directly as the code below. At this time, in order to draw the responder tree on the device screen, the instance of this class needs to be bound with the root responder of the responder tree.
Moreover, the region(responder space) to draw the responder tree needs to be specified in the argument of the SFYRenderer::Initialize function.
Example 875. Construct the responder tree space
SFYRenderer _renderer; SFZRootSmp _root; SFCError error; // initialize the SFYRenderer instance with specifying the responder space in the argument if ((error = _renderer.Initialize(SFXGraphics::GetDeviceRectangle())) == SFERR_NO_ERROR) { // create the root of the responder tree if ((_root = SFZRoot::NewInstance(&error)) != null) { // bind the root of the responder tree with the SFYRenderer instance _root->SetRenderer(&_renderer); // here describe other initialization _root->SetRealBound(_root->GetSuitableBound()); _root->SetStateVisible(true); ... } }
Renderer | Responder Tree | Root Responder | Responder Space | Root(Basic) | SFYResponder | SFYDistributer | SFYApplication SFZRoot
Constructor/Destructor |
---|
SFYRenderer( Void ) Constructor of the SFYRenderer class.
|
~SFYRenderer( Void ) Destructor of the SFYRenderer class.
|
Public Functions | |
---|---|
SFXRectangleConstRef |
GetGlobalBound( Void ) Get the responder space.
|
SFCError |
Initialize( Void ) Initialize this renderer.
|
Bool |
IsRendering( Void ) Check whether or not this renderer is drawing.
|
Void |
Terminate( Void ) Terminate this renderer.
|
[ public, explicit ] SFYRenderer(Void);
[ public ] ~SFYRenderer(Void);
[ public, const ] SFXRectangleConstRef GetGlobalBound(Void);
This function gets the rectangular region(responder space) to draw the responder tree on the device screen, which is set with the SFYRenderer::Initialize function.
[ public ] SFCError Initialize(Void);
This function initializes all the resources necessary to draw the responder tree on the device screen.
Before binding this renderer with the root responder of the responder tree, it needs to be initialized by calling this function.
When this function is called, the rectangular region called "Responder Space" to draw the responder tree will be set to the device screen.
SFYRenderer::Terminate | Responder Tree | Responder Space | Renderer | Root(Basic)
[ public, const ] Bool IsRendering(Void);
This function checks whether the renderer is drawing now.
[ public ] Void Terminate(Void);
This function releases all the resources necessary for drawing the responder tree and terminates this renderer itself.
In case this renderer is bound with the responder tree, it is necessary to terminate all responders of the responder tree before calling this function.
SFYRenderer::Initialize | Responder Tree | Responder Space | Renderer | Root(Basic)
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |