SophiaFramework UNIVERSE 5.3 |
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.
|
[ protected ] SFRTitleFrame( SFRApplicationPtr parent // parent responder SFXRectangleConstRef rect // the position of parent in coordinate AlignEnum = ALIGN_CENTER // align );
[ protected, virtual ] ~SFRTitleFrame(Void);
[ protected ] SFXRectangle AdjustBound( SFXRectangleConstRef rect // the coordinate of region to adjust AEEFont font // font );
[ protected ] Void BaseHandler( SFXGraphicsPtr g // SFXGraphics instance );
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
[ public, const ] SFXRGBColorConstRef GetColor( ColorType index // palette index );
Specify the palette index of SFRTitleFrame::ColorEnum type.
The behavior is not defined when the specified palette index is invalid.
[ public, const ] AEEFont GetFont(Void);
[ public, const ] SFXWideStringConstRef GetTitle(Void);
[ protected ] SFCError MakeHandler(Void);
[ public ] Void SetColor( ColorType index // palette index SFXRGBColorConstRef color // color );
Specify the palette index of SFRTitleFrame::ColorEnum type.
Specity the color.
The behavior is not defined when the specified palette index is invalid.
[ public ] Void SetTitle( SFXWideStringConstRef title // title text );
enum AlignEnum { ALIGN_LEFT = IDF_ALIGN_LEFT, // left alignment. ALIGN_CENTER = IDF_ALIGN_CENTER, // center alignment. ALIGN_RIGHT = IDF_ALIGN_RIGHT // right alignment. };
It is set by constructor when label created.
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 };
SFRTitleFrame::ColorEnum is used to set or get the color of specific part of SFRTitleFrame object.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |