PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFRTitleFrame
Responder which represents a frame with a title.
#include <SFRTitleFrame.hpp>
class SFRTitleFrame : public SFRFrame;
SFMTYPEDEFCLASS(SFRTitleFrame)

Inheritance diagram

 Inheritance diagram of SFRTitleFrameClass

Collaboration diagram

 Collaboration diagram of SFRTitleFrameClass

Reference

SFRFrame | SFRPlainFrame | SFRFrameFrame

Member

Constructor/Destructor
SFRTitleFrame( SFRApplicationPtr parent , SFXRectangleConstRef rect , AlignEnum = ALIGN_CENTER )
Constructor of the SFRTitleFrame class.
~SFRTitleFrame( Void )
Destructor of the SFRTitleFrame class.
Public Functions
SFXRGBColorConstRef GetColor( ColorType index )
Get the color.
AEEFont GetFont( Void )
Get the font.
static
SFXMargin
GetMargin( AEEFont = AEE_FONT_NORMAL )
Get the margin between base and content region (in pixels).
SFXWideStringConstRef GetTitle( Void )
Get the title.
Void SetColor( ColorType index , SFXRGBColorConstRef color )
Set the color
Void SetFont( AEEFont param )
Set the font.
Void SetTitle( SFXWideStringConstRef title )
Set the title.
Protected Functions
SFXRectangle AdjustBound( SFXRectangleConstRef rect , AEEFont font )
Adjust the coordinate of region.
Void BaseHandler( SFXGraphicsPtr g )
[Handler] Redraw the base region of responder.
SFCError MakeHandler( Void )
Redraw the base region of responder.
static
SFXRectangle
AdjustBound( SFXRectangleConstRef rect ) (inherits from SFRFrameFrame)
Adjust the coordinate of region.
Void ContentHandler( SFXGraphicsPtr g ) (inherits from SFRFrame)
[Handler] Redraw the content region.
SFRResponderPtr GetResponder( Void ) (inherits from SFRFrame)
Get the responder.
Types
AlignEnum
Constant that represents the alignment of the title.
ColorEnum
Constant that represents a specific part.

SFRTitleFrame::SFRTitleFrame
Constructor of the SFRTitleFrame class.
[ protected ]
SFRTitleFrame(
    SFRApplicationPtr parent    // parent responder
    SFXRectangleConstRef rect   // the position of parent in coordinate
    AlignEnum  = ALIGN_CENTER   // align
);

Reference

SFRTitleFrame::~SFRTitleFrame


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

Reference

SFRTitleFrame::SFRTitleFrame


SFRTitleFrame::AdjustBound
Adjust the coordinate of region.
[ protected ]
SFXRectangle AdjustBound(
    SFXRectangleConstRef rect   // the coordinate of region to adjust
    AEEFont font                // font
);

SFRTitleFrame::BaseHandler
[Handler] Redraw the base region of responder.
[ protected ]
Void BaseHandler(
    SFXGraphicsPtr g   // SFXGraphics instance
);

Description

The SFRTitleFrame::BaseHandler function paints over the parts of responder with a title frame defined by the SFRTitleFrame::ColorEnum.

Each color of parts depends upon the Behaviour status of responder like the following table:

Parts | Status of Behaviour Enable, Focused and Targeted Enable and Not-Focused Enable, Focus and Not-Targeted Not-Enable
COLOR_CONTENT_BASE: inside the content region ( inherits from the SFRFrame class ) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)
COLOR_CONTENT_LIGHT: top and left edges of content region white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)
COLOR_CONTENT_SHADOW: bottom and right edges of content region gray defined by SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) gray defined by SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) gray defined by SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)
COLOR_HEADER_BASE: inside the frame region gray defined by SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) gray defined by SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00) gray defined by SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00) gray defined by SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00)
COLOR_HEADER_LIGHT: top and left edges of frame region gray defined by SFXRGBColor(0xCC, 0xCC, 0xCC, 0x00) white defined by SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) gray defined by SFXRGBColor(0xCC, 0xCC, 0xCC, 0x00) gray defined by SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00)
COLOR_HEADER_SHADOW: bottom and right edges of frame region gray defined by SFXRGBColor(0x55, 0x55, 0x55, 0x00) gray defined by SFXRGBColor(0x88, 0x88, 0x88, 0x00) gray defined by SFXRGBColor(0x55, 0x55, 0x55, 0x00) gray defined by SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00)
COLOR_HEADER_TITLE: title texts in the frame region black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) gray defined by SFXRGBColor(0x44, 0x44, 0x44, 0x00)
COLOR_FRAME: four inner-edges of base region purple defined by SFXRGBColor(0x66, 0x66, 0xFF, 0x00) black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) gray defined by SFXRGBColor(0x44, 0x44, 0x44, 0x00)
COLOR_TARGET: bottom and right outer-edges of base region black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) black defined by SFXRGBColor(0x00, 0x00, 0x00, 0x00) gray defined by SFXRGBColor(0x44, 0x44, 0x44, 0x00)

Reference: Behaviour

Reference

SFXGraphics


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

Argument

index

Specify the palette index of SFRTitleFrame::ColorEnum type.

Description

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

Reference

SFRTitleFrame::SetColor | SFRTitleFrame::ColorEnum


SFRTitleFrame::GetFont
Get the font.
[ public, const ]
AEEFont GetFont(Void);

Reference

SFRTitleFrame::SetFont


SFRTitleFrame::GetMargin
Get the margin between base and content region (in pixels).
[ public, static ]
SFXMargin GetMargin(
    AEEFont  = AEE_FONT_NORMAL   // font
);

SFRTitleFrame::GetTitle
Get the title.
[ public, const ]
SFXWideStringConstRef GetTitle(Void);

Reference

SFRTitleFrame::SetTitle


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

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

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

Argument

index

Specify the palette index of SFRTitleFrame::ColorEnum type.

color

Specity the color.

Description

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

Reference

SFRTitleFrame::GetColor | SFRTitleFrame::ColorEnum


SFRTitleFrame::SetFont
Set the font.
[ public ]
Void SetFont(
    AEEFont param   // font
);

Reference

SFRTitleFrame::GetFont


SFRTitleFrame::SetTitle
Set the title.
[ public ]
Void SetTitle(
    SFXWideStringConstRef title   // title text
);

Reference

SFRTitleFrame::GetTitle


SFRTitleFrame::AlignEnum
Constant that represents the alignment of the title.
enum AlignEnum {
  ALIGN_LEFT    = IDF_ALIGN_LEFT,   // left alignment.
  ALIGN_CENTER  = IDF_ALIGN_CENTER, // center alignment.
  ALIGN_RIGHT   = IDF_ALIGN_RIGHT   // right alignment.
};

Description

It is set by constructor when label created.

Reference

SFRTitleFrame::SFRTitleFrame


SFRTitleFrame::ColorEnum
Constant that represents a specific part.
enum ColorEnum {
  COLOR_CONTENT_LIGHT = 0,  // top and left edges of content region
  COLOR_CONTENT_SHADOW,     // bottom and right edges of content region
  COLOR_HEADER_BASE,        // inside the frame region
  COLOR_HEADER_LIGHT,       // top and left edges of frame region
  COLOR_HEADER_SHADOW,      // bottom and right edges of frame region
  COLOR_HEADER_TITLE,       // title texts in the frame region
  COLOR_FRAME,              // four inner-edges of base region
  COLOR_TARGET              // bottom and right outer-edges of base region
};

Description

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

Reference

SFRTitleFrame::SetColor | SFRTitleFrame::GetColor