PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFZBevelFrame
Responder which represents a bevel frame.
#include <SFZBevelFrame.h.hpp>
class SFZBevelFrame : public SFYBevelFrame;
SFMTYPEDEFCLASS(SFZBevelFrame)

Inheritance diagram

 Inheritance diagram of SFZBevelFrameClass

Collaboration diagram

 Collaboration diagram of SFZBevelFrameClass

Description

How to use

Bevel frame is a frame which consists of a shadow region, a flat frame region, and a bevel region.

[Note] How to get a frame margin

The frame margin of frame responder can be obtained by calling the SFYResponder::GetSuitableMargin function.

Figure 305. Bevel frame[SFZBevelFrame]


Bevel frame[SFZBevelFrame]

The union set of the shadow region(bottom edge and right edge of 1 pixel width), the flat frame region(1 pixel width), and the bevel frame region(1 pixel width) in the figure is the frame margin of bevel frame. [i.e., SFXMargin(2, 2, 3, 3)].

Figure 306. Bevel frame: Expanded Figure[SFZBevelFrame]


Bevel frame: Expanded Figure[SFZBevelFrame]

The black line is the shadow region, the blue line(default: black) is the flat frame region, and the line of white and gray is the bevel frame region. The union set of these three regions is the frame margin of bevel frame. And the rectangular region surrounded by the frame margin is the content region.

Each width of the shadow region, the flat frame region, and the bevel frame region is 1 pixel.

  1. The shadow region is drawn by calling the SFYPlainFrame::DrawShadow function. (The color of shadow region is set with the SFYPlainFrame::SetShadowColor function.)
  2. The flat frame region is drawn by calling the SFYFlatFrame::DrawFrame function. (The color of flat frame region is set with the SFYFlatFrame::SetFrameColor and SFYFlatFrame::SetFocusColor functions.)
  3. The bevel frame region is drawn by calling the SFYBevelFrame::DrawBevel function. (The color of flat frame region is set with the SFYBevelFrame::SetBevelColor function.)
[Note] Responder with a frame

A window or dialog with a frame can be implemented by calling its SFYResponder::SetFrame function. A real region of a window or dialog is the content region surrounded by the frame margin.

Example 880. Sample code: attach a window with a frame [SFZBevelFrame and SFZWindow]

// define the class
SFMTYPEDEFCLASS(USRApplication)
class USRApplication : public SFYApplication {
  SFMSEALCOPY(USRApplication)
public:
  static SFCInvokerPtr Factory(Void);
private:
  explicit USRApplication(Void) static_throws;
  virtual ~USRApplication(Void);

  XANDLER_DECLARE_VOIDRENDER(OnRenderRequestSFZWindow) // drawing handler
  XANDLER_DECLARE_BOOLEVENT(OnKeySFZWindow)            // key handler of the window
};


// constructor
USRApplication::USRApplication(Void) static_throws
{
  // ... (omitted) ...

  SFZBevelFrameSmp  frame;  // smart pointer to SFZBevelFrame
  SFZWindowSmp      window; // smart pointer to SFZWindow
  SFCError          error(SFERR_NO_ERROR);

  // create the frame
  if ((frame = SFZBevelFrame::NewInstance(&error)) != null) {

    // In general, the frame's state is set to "visible" + "active" + "enable" + "focus".
    frame->SetState(true, true, true, true);

    // create the window
    if ((window = SFZWindow::NewInstance(&error)) != null) {

      // register the drawing handler into window: draw "Hello World!"
      error = window->RegisterHandler(
        SFXEventRange(SFEVT_RESPONDER_RENDER, SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST, SFP16_RENDER_REQUEST),
        XANDLER_INTERNAL(OnRenderRequestSFZWindow)
      );
      if (error == SFERR_NO_ERROR) {

        // register the key handler into the window: close the frame when the SELECT key is pressed
        error = window->RegisterHandler(
          SFXEventRange(SFEVT_KEY, SFEVT_KEY, SFP16_BEGIN, SFP16_END),
          XANDLER_INTERNAL(OnKeySFZWindow)
        );
        if (error == SFERR_NO_ERROR) { 

          // set the window's parent responder to the application class(root)
          error = window->SetParent(GetThis());
          if (error == SFERR_NO_ERROR) {

            // attach the frame to the window
            error = window->SetFrame(frame);
            if (error == SFERR_NO_ERROR) {

              // Set the window's real region to the region obtained by deflating the screen device region by (30, 30).
              // * Automatically, the frame's real region will be set to the region obtained by inflating it by the frame margin.
              window->SetRealBound(GetLocalBound().Deflate(30, 30));

              // set the window's state to "visible" + "active" + "enable" + "focus" together
              window->SetState(true, true, true, true);

              // move the window foremost
              // * automatically, the frame will be moved foremost together
              window->ToFront();
            }
          }
        }
      }
    }
  }
  static_throw(error);
}


// implement the drawing handler of SFZWindow
#define TROPICALBLUE_COLOR (SFXRGBColor(0xCE, 0xD8, 0xF8, 0x00))
#define COLOR_BLACK        (SFXRGBColor(0x00, 0x00, 0x00, 0x00))
XANDLER_IMPLEMENT_VOIDRENDER(helloworld, OnRenderRequestSFZWindow, invoker, reason, graphics)
{
  unused(invoker);
  unused(reason);

  // fill the window's local region in tropical bule color
  graphics->FillRectangle(GetLocalBound(), TROPICALBLUE_COLOR);

  // draw "Hello World!" in black at the center of the window
  graphics->DrawSingleText("Hello World!", invoker->GetLocalBound(), COLOR_BLACK);

  return;
}

// implement the key handler of SFZWindow
XANDLER_IMPLEMENT_BOOLEVENT(helloworld, OnKeySFZWindow, invoker, event)
{
  Bool result(false);
  unused(invoker);

  switch (event.GetP16()) {

    case AVK_SELECT:  // when the SELECT key is pressed

         // close the window only
         // * automatically, the frame will be detached from the window and become invisible
         invoker->Terminate();

         result = true;  // "true" is set since the event has been handled

         break;
  }

  return result;
}

Figure 307. Execution result of the sample code: attach a window with a frame [SFZBevelFrame and SFZWindow]


Execution result of the sample code: attach a window with a frame [SFZBevelFrame and SFZWindow]

Reference

SFZTitleBevelFrame | SFYBevelFrame | SFYFlatFrame | SFYPlainFrame | SFYFrame | SFXMargin | Real Region | SFYResponder::GetSuitableMargin | Frame | SFYResponder::ToFront | SFYResponder::Terminate

Member

Constructor/Destructor
SFZBevelFrame( Void )
Constructor of the SFZBevelFrame class.
~SFZBevelFrame( Void )
Destructor of the SFZBevelFrame class.
Public Functions
static
SFZBevelFrameSmp
NewInstance( SFCErrorPtr exception = null )
Create a new instance of this responder class.
Void ClearHandler( Void ) (inherits from SFYResponder)
Unregister all handlers from this responder.
Void ClearTracer( Void ) (inherits from SFYResponder)
Unregister all dispatching rules from the tracer of this responder.
SFCError Distribute( SFXEventConstRef event , BoolPtr result = null ) (inherits from SFYResponder)
Distribute the specified event.
SFXRGBColorConstRef GetBackgroundColor( Void ) (inherits from SFYWidget)
Get the background color.
SFXBevelColorConstRef GetBevelColor( Void ) (inherits from SFYBevelFrame)
Get the bevel color of bevel frame region.
Bool GetBevelEnable( Void ) (inherits from SFYBevelFrame)
Get the value of flag indicating whether or not the bevel frame region is enabled.
SFYResponderSmp GetChildBack( Void ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SInt32 GetChildCount( Void ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildFront( Void ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYDistributerPtr GetDistributer( Void ) (inherits from SFYResponder)
Get the distributer bound with this responder.
SFXRGBColorConstRef GetFocusColor( Void ) (inherits from SFYFlatFrame)
Get the color of flat frame region in the "focus" state.
SFYResponderSmp GetFrame( Void ) (inherits from SFYResponder)
Get the frame which has been attached to this responder.
SFXRGBColorConstRef GetFrameColor( Void ) (inherits from SFYFlatFrame)
Get the color of flat frame region in the "unfocus" state.
Bool GetFrameEnable( Void ) (inherits from SFYFlatFrame)
Get the value of flag indicating whether or not the flat frame region is enabled.
SFXRectangle GetGlobalBound( Void ) (inherits from SFYResponder)
Get the globle region of this responder.
UInt32 GetID( Void ) (inherits from SFYResponder)
Get the ID of this responder instance.
SFXRectangle GetLocalBound( Void ) (inherits from SFYResponder)
Get the local region of this responder.
SInt32 GetNthBackward( Void ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Void ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SFYResponderSmp GetParent( Void ) (inherits from SFYResponder)
Get the parent responder of this responder.
Bool GetPropertyTransparent( Void ) (inherits from SFYResponder)
Get the transparency attribute of this responder.
SFXRectangleConstRef GetRealBound( Void ) (inherits from SFYResponder)
Get the real region of this responder.
VoidPtr GetReference( Void ) (inherits from SFYResponder)
Get the reference of this responder.
SFYRendererPtr GetRenderer( Void ) (inherits from SFYResponder)
Get the renderer bound with this responder.
SFYResponderSmp GetRoot( Void ) (inherits from SFYResponder)
Get the root responder.
SFXRGBColorConstRef GetShadowColor( Void ) (inherits from SFYPlainFrame)
Get the color of shadow region.
Bool GetShadowEnable( Void ) (inherits from SFYPlainFrame)
Get the value of flag indicating whether or not the shadow region is enabled.
Bool GetStateActive( Bool inherit = false ) (inherits from SFYResponder)
Get the active state of this responder.
Bool GetStateEnable( Bool inherit = false ) (inherits from SFYResponder)
Get the enable state of this responder.
Bool GetStateFocus( Bool inherit = false ) (inherits from SFYResponder)
Get the focus state of this responder.
Bool GetStateValid( Bool inherit = false ) (inherits from SFYResponder)
Get the valid state of this responder.
Bool GetStateVisible( Bool inherit = false ) (inherits from SFYResponder)
Get the visible state of this responder.
SFXRectangle GetSuitableBound( Void ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef rectangle ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef param , HorizontalEnum horizontal , VerticalEnum vertical ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXMargin GetSuitableMargin( Void ) (inherits from SFYResponder)
Get the suitable frame margin region of this responder.
SFCType GetType( Void ) (inherits from SFYResponder)
Get the type of this responder class.
SFXRectangleConstRef GetVirtualBound( Void ) (inherits from SFYResponder)
Get the virtual region of this responder.
Bool HasFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is a content-responder.
Void Initialize( Void ) (inherits from SFYResponder)
Initialize this responder.
Bool IsBack( Void ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is an attachment-frame.
Bool IsFront( Void ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsRoot( Void ) (inherits from SFYResponder)
Check whether or not this responder is the root responder.
SFCError Recover( Void ) (inherits from SFYResponder)
Recover the intersection region between this responder and the responder space by using the saved bitmap to restore the device bitmap.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::OrderEnum order , SFYTracer::StateEnum state , Bool overload ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::OrderEnumConstPtr order , SFYTracer::StateEnumConstPtr state , BoolConstPtr overload , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError Render( Bool force = false ) (inherits from SFYResponder)
Boot up the renderer for redrawing this responder and its descendant responders.
Void SetBackgroundColor( SFXRGBColorConstRef param ) (inherits from SFYWidget)
Set the background color to the specified value.
Void SetBevelColor( SFXBevelColorConstRef param ) (inherits from SFYBevelFrame)
Set the bevel color of bevel frame region to the specified value.
Void SetBevelEnable( Bool param ) (inherits from SFYBevelFrame)
Set the flag indicating whether or not the bevel frame region is enable to the specified value.
Void SetDistributer( SFYDistributerPtr param ) (inherits from SFYResponder)
Bind this responder with the specified distributer.
Void SetFocusColor( SFXRGBColorConstRef param ) (inherits from SFYFlatFrame)
Set the color of flat frame region in the "focus" state to the specified value.
SFCError SetFrame( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Attach the specified frame to this frame.
Void SetFrameColor( SFXRGBColorConstRef param ) (inherits from SFYFlatFrame)
Set the color of flat frame region in the "unfocus" state to the specified value.
Void SetFrameEnable( Bool param ) (inherits from SFYFlatFrame)
Set the flag indicating whether or not the flat frame region is enabled to the specified value.
Void SetID( UInt32 param ) (inherits from SFYResponder)
Set the ID value of this responder to the specified value.
SFCError SetParent( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Set the parent responder of this responder to the specified responder.
Void SetProperty( Bool transparent ) (inherits from SFYResponder)
Set the property of this responder to the specified value.
Void SetPropertyTransparent( Bool param ) (inherits from SFYResponder)
Set the transparency attribute of this responder to the specified value.
Void SetRealBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the real region of this responder to the specified region.
Void SetReference( VoidPtr param ) (inherits from SFYResponder)
Set the reference value of this responder to the specified value.
Void SetRenderer( SFYRendererPtr param ) (inherits from SFYResponder)
Bind this responder with the specified renderer.
Void SetShadowColor( SFXRGBColorConstRef param ) (inherits from SFYPlainFrame)
Set the color of shadow region to the specified value.
Void SetShadowEnable( Bool param ) (inherits from SFYPlainFrame)
Set the flag indicating whether or not the shadow region is enabled to the specified value.
Void SetState( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Set all states of this responder to specified values together.
Void SetStateActive( Bool param ) (inherits from SFYResponder)
Set the active state of this responder to the specified value.
Void SetStateEnable( Bool param ) (inherits from SFYResponder)
Set the enable state of this responder to the specified value.
Void SetStateFocus( Bool param ) (inherits from SFYResponder)
Set the focus state of this responder to the specified value.
Void SetStateVisible( Bool param ) (inherits from SFYResponder)
Set the visible state of this responder to the specified value.
Void SetVirtualBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the virtual region of this responder to the specified value.
SFCError Snapshot( SFBBitmapSmpConstRef bitmap ) (inherits from SFYResponder)
Get a snapshot image of the intersection region between this responder and the responder space by using the saved bitmap.
Void Terminate( Void ) (inherits from SFYResponder)
Terminate this responder.
Void ToBack( Void ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Void ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstRef range ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstPtr range , SInt32 length ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
T const & static_catch( Void ) (inherits from static_exception)
Get the current exception.
Protected Functions
Void HandleMarginRequest( SFXMarginPtr margin )
This function will be called when the (SFEVT_RESPONDER_MARGIN, SFP16_MARGIN_REQUEST) event is received. [Calculate the frame margin of this responder.]
Void HandleRenderRequest( SFXGraphicsPtr graphics )
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
SFXRectangle DrawBevel( SFXGraphicsPtr graphics , SFXRectangleConstRef rectangle ) (inherits from SFYBevelFrame)
Draw the bevel frame region of bevel frame.
SFXRectangle DrawFrame( SFXGraphicsPtr graphics , SFXRectangleConstRef rectangle ) (inherits from SFYFlatFrame)
Draw the flat frame region of flat frame.
SFXRectangle DrawShadow( SFXGraphicsPtr graphics , SFXRectangleConstRef rectangle ) (inherits from SFYPlainFrame)
Draw the shadow region of plain frame.
static
SFYResponderSmp
Factory( SFYResponderPtr responder , SFCErrorPtr exception = null ) (inherits from SFYResponder)
This function is used to implement the NewInstance function.
SFXMarginConstRef GetBevelMargin( Void ) (inherits from SFYBevelFrame)
Get the margin of bevel frame region.
SFXMarginConstRef GetFrameMargin( Void ) (inherits from SFYFlatFrame)
Get the margin of flat frame region.
SFXMarginConstRef GetShadowMargin( Void ) (inherits from SFYPlainFrame)
Get the margin of shadow region.
SFYResponderSmp GetThis( Void ) (inherits from SFYResponder)
Get the smart pointer of this responder.
Void HandleBoundGlobal( SFXRectangleConstRef rectangle ) (inherits from SFYWidget)
This function will be called when the global region is changed.
Void HandleBoundOptimize( SFXRectanglePtr rectangle ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received. [Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
Void HandleBoundReal( Void ) (inherits from SFYFrame)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event is received. [Perform the processing when the real region is changed.]
Void HandleBoundRequest( SFXRectanglePtr rectangle ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received. [Calculate the suitable rectangle size of this responder.]
Void HandleBoundVirtual( Void ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
Void Invalidate( Void ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void Invalidate( SFXRectangleConstRef param ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void InvokeBackward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
Void InvokeForward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
Void SetType( SFCType param ) (inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
Void static_throw( static_exception< T > const & param ) (inherits from static_exception)
Set an exception.
Void static_throw( T const & param ) (inherits from static_exception)
Set an exception.
Bool static_try( Void ) (inherits from static_exception)
Confirm whether or not the exception is retained.
Types
CodeEnum
Constant that represents the SFZBevelFrame class.
HorizontalEnum (inherits from SFYResponder)
Constants that represent the horizontal alignment.
VerticalEnum (inherits from SFYResponder)
Constants that represent the vertical alignment.

SFZBevelFrame::SFZBevelFrame
Constructor of the SFZBevelFrame class.
[ protected, explicit ]
SFZBevelFrame(Void);

Description

This constructor sets the type of this responder to "fbvl".

Reference

SFYResponder::SetType | SFZBevelFrame::CodeEnum | Type


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

Description

This destructor does nothing.


SFZBevelFrame::HandleMarginRequest
This function will be called when the (SFEVT_RESPONDER_MARGIN, SFP16_MARGIN_REQUEST) event is received. [Calculate the frame margin of this responder.]
[ protected, virtual, const ]
Void HandleMarginRequest(
    SFXMarginPtr margin   // calculated frame margin region
);

Return value

The margin region of the frame[By default, SFXMargin(2, 2, 3, 3)].

Description

This function will be called when the margin event [SFXEvent(SFEVT_RESPONDER_MARGIN, SFP16_MARGIN_REQUEST, rectangle)] is received.

This function calculates the frame margin of this responder.

In case you want to calculate the frame margin of this responder when the margin event [SFXEvent(SFEVT_RESPONDER_MARGIN, SFP16_MARGIN_REQUEST, rectangle)] is received, override this virtual function.

In addition, this frame margin will be drawn by the SFZBevelFrame::HandleRenderRequest function.

The default implementation is to calculate the frame margin which consists of a shadow region, a flat frame region, and a bevel frame region.

The shadow region, the flat frame region, and the bevel frame region can be obtained by calling the SFYPlainFrame::GetShadowMargin function, the SFYFlatFrame::GetFrameMargin function, and the SFYBevelFrame::GetBevelMargin function respectively.

The deafult return value is SFXMargin(2, 2, 3, 3).

Figure 308. Bevel Frame[SFZBevelFrame]


Bevel Frame[SFZBevelFrame]

The union set of the shadow region, flat frame region and the bevel frame region is the frame margin of bevel frame[SFXMargin(2, 2, 3, 3)].

Figure 309. Bevel Frame: Expanded Figure[SFZBevelFrame]


Bevel Frame: Expanded Figure[SFZBevelFrame]

The black line is the shadow region, the blue line(default: black) is the flat frame region, and the line of white and gray is the bevel frame region. The union set of these three regions is the frame margin of bevel frame. And the rectangular region surrounded by the frame margin is the content region.

Each width of the shadow region, the flat frame region, and the bevel frame region is 1 pixel.

[Note] Margin event[(SFEVT_RESPONDER_MARGIN, SFP16_MARGIN_REQUEST) event]

The SFYResponder::GetSuitableMargin function will send the margin event [SFXEvent(SFEVT_RESPONDER_MARGIN, SFP16_MARGIN_REQUEST, margin)] to this responder.

Then, the SFYFrame::HandleMarginRequest virtual function will be called.

The margin element (P32 parameter) of the margin event is set to SFXMargin::ZeroInstance() as an initial value.

Internal Implementation

Internal implementation of the SFZBevelFrame::HandleMarginRequest function is as follows:

/*protected virtual */Void SFZBevelFrame::HandleMarginRequest(SFXMarginPtr margin) const
{
    margin->Add(GetShadowMargin());
    margin->Add(GetFrameMargin());
    margin->Add(GetBevelMargin());
    return;
}// SFZBevelFrame::HandleMarginRequest //

Reference

SFYResponder::GetSuitableMargin | SFYBevelFrame::GetBevelMargin | SFYFlatFrame::GetFrameMargin | SFYPlainFrame::GetShadowMargin | SFZBevelFrame::HandleRenderRequest | SFXMargin | Margin Event[SFEVT_RESPONDER_MARGIN]


SFZBevelFrame::HandleRenderRequest
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
[ protected, virtual, const ]
Void HandleRenderRequest(
    SFXGraphicsPtr graphics   // graphics object
);

Description

This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.

In case you want to perform your own drawing of this responder, override this function.

The default implementation is to draw this responder.

[Note] The method to darw a responder

In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder.

Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order.

In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler.

[Note] Procedure of drawing a responder

The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually.

The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer.

Here, the SFYResponder::Render function will be called at the following situations:

  1. At the end of the event loop
  2. At the applet start / resume or the end of a highest priority event handler
  3. In the callback, which is outside the event loop.

If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region.

Internal Implementation

Internal implementation of the SFZBevelFrame::HandleRenderRequest function is as follows:

/*protected virtual */Void SFZBevelFrame::HandleRenderRequest(SFXGraphicsPtr graphics) const
{
    DrawBevel(graphics, DrawFrame(graphics, DrawShadow(graphics, GetLocalBound())));
    return;
}// SFZBevelFrame::HandleRenderRequest //

Reference

SFYBevelFrame::DrawBevel | SFYFlatFrame::DrawFrame | SFYPlainFrame::DrawShadow | SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree


SFZBevelFrame::NewInstance
Create a new instance of this responder class.
[ public, static ]
SFZBevelFrameSmp NewInstance(
    SFCErrorPtr exception = null   // error value
);

Argument

exception

Return the error value generated inside the function.

Return value

  • If succeeds: not null pointer
  • Otherwise: null pointer

Description

This function creates a new instance of this responder class.

If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails such as insufficient memory, a null pointer will be returned, and the "exception" argument holds the error value.

Example

The code to create a new instance of this responder class is as follows:

SFZBevelFrameSmp _bevelframe;
SFCError error;

if ((_bevelframe = SFZBevelFrame::NewInstance(&error)) != null) {

    ...
}

SFZBevelFrame::CodeEnum
Constant that represents the SFZBevelFrame class.
enum CodeEnum {
    CODE_TYPE = four_char_code('f', 'b', 'v', 'l')
};
SFMTYPEDEFTYPE(CodeEnum)

Reference

SFYResponder::GetType | SFYResponder::SetType