PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFRFrame
Responder which provides the function of frame.
#include <SFRFrame.hpp>
class SFRFrame;
SFMTYPEDEFCLASS(SFRFrame)

Inheritance diagram

 Inheritance diagram of SFRFrameClass

Reference

SFRPlainFrame | SFRFrameFrame | SFRTitleFrame

Member

Constructor/Destructor
SFRFrame( SFRResponderPtr parent )
Constructor of the SFRFrame class.
~SFRFrame( Void )
Destructor of the SFRFrame class.
Public Functions
SFXRGBColorConstRef GetColor( ColorType index )
Get the color.
Void SetColor( ColorType index , SFXRGBColorConstRef color )
Set the color
Protected Functions
static
SFXRectangle
AdjustBound( SFXRectangleConstRef rect )
Adjust the coordinate of region.
Void ContentHandler( SFXGraphicsPtr g )
[Handler] Redraw the content region.
SFRResponderPtr GetResponder( Void )
Get the responder.
SFCError MakeHandler( Void )
Redraw the content region of responder.
Types
ColorEnum
Constant that represents a specific part.

SFRFrame::SFRFrame
Constructor of the SFRFrame class.
[ protected ]
SFRFrame(
    SFRResponderPtr parent   // parent responder
);

Reference

SFRFrame::~SFRFrame


SFRFrame::~SFRFrame
Destructor of the SFRFrame class.
[ protected, virtual ]
~SFRFrame(Void);

Reference

SFRFrame::SFRFrame


SFRFrame::AdjustBound
Adjust the coordinate of region.
[ protected, static ]
SFXRectangle AdjustBound(
    SFXRectangleConstRef rect   // the coordinate of region to adjust
);

Description

When the width or height of coordinate of region is less than "0", adjust it to "1".


SFRFrame::ContentHandler
[Handler] Redraw the content region.
[ protected ]
Void ContentHandler(
    SFXGraphicsPtr g   // SFXGraphics instance
);

Description

The SFRFrame::ContentHandler function fills the content region of responder with white space.

Details : Basic Structure and Processing

Reference

SFXGraphics


SFRFrame::GetColor
Get the color.
[ public, const ]
SFXRGBColorConstRef GetColor(
    ColorType index   // palette index
);

Argument

index

Specify the palette index of SFRFrame::ColorEnum type.

Description

The behavior is not defined when the specified palette index is invalid.

Reference

SFRFrame::SetColor | SFRFrame::ColorEnum


SFRFrame::GetResponder
Get the responder.
[ protected, const ]
SFRResponderPtr GetResponder(Void);

SFRFrame::MakeHandler
Redraw the content region of responder.
[ protected ]
SFCError MakeHandler(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

The SFRFrame::MakeHandler function internally registers the SFRFrame::ContentHandler handler function with the event pair of SREVT_RESPONDER_RENDER and SRP16_RENDER_CONTENT.

Reference

SFRFrame::ContentHandler


SFRFrame::SetColor
Set the color
[ public ]
Void SetColor(
    ColorType index             // palette index
    SFXRGBColorConstRef color   // color
);

Argument

index

Specify the palette index of SFRFrame::ColorEnum type.

color

Specity the color.

Description

The behavior is not defined when the specified palette index is invalid.

Reference

SFRFrame::GetColor | SFRFrame::ColorEnum


SFRFrame::ColorEnum
Constant that represents a specific part.
enum ColorEnum {
  COLOR_CONTENT_BASE = 0,  // inside the content region
};

Description

SFRFrame::ColorEnum is used to set or get the color of specific part of SFRFrameFrame object.

Reference

SFRFrame::SetColor | SFRFrame::GetColor