PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFZWindow
Responder which represents a general purpose window to place controls and/or containers.
#include <SFZWindow.h.hpp>
class SFZWindow : public SFYWidget;
SFMTYPEDEFRESPONDER(SFZWindow)

Inheritance diagram

 Inheritance diagram of SFZWindowClass

Collaboration diagram

 Collaboration diagram of SFZWindowClass

Description

How to use

Window is the responder designed to be placed in the root[SFZRoot].

All windows inherit from SFZWindow, which provides functions to move the focus among responders in the window and scroll up and down the virtual region larger than the real region. At this time, scrolling is performed in cooperation with moving the focus.

An applet with controls uses a window as a container for placing them.

[Tip] Tip
In general, whether controls are used or not, a user interface is described into not an application but a window.

The concrete window is the part class which can be used as it is in the applet development. On the other hand, the abstract window is the base class to define and implement a user-defined window.

Table 246. Type of concrete window

Class name Description
SFZWindow General purpose window to place controls and/or containers.
[Important] IMPORTANT

In the concrete window, the SFYResponder::SetParent, SFYResponder::SetState, and SFYResponder::SetRealBound functions must be always called.

Other functions are optionally called.

* When a frame is attached to a window with the SFYResponder::SetFrame function, calling the SFYResponder::SetRealBound function of the window can be omitted by setting the real region of the frame with the SFYResponder::SetRealBound function since that of the window will be internally set to the region obtained by deflating it by the frame margin.

Table 247. Type of abstract window

Class name Description
SFZWindow Abstract class which represents a window.

General Purpose Window to Place Control, Container etc. [SFZWindow]

SFZWindow is the general purpose window to place various controls or containers in.

SFZWindow provides functions to handle the key events for moving the focus among responders in the window and scrolling up and down the virtual region larger than the real region. At this time, scrolling is performed in cooperation with moving the focus.

When controls and/or containers are placed in the window, the focus can be moved among the child responders of the window using the scroll key set with the SFYContainer::SetScrollDownKey / SFYContainer::SetScrollUpKey / SFYContainer::SetPageDownKey / SFYContainer::SetPageUpKey / SFYContainer::SetSnapDownKey / SFYContainer::SetSnapUpKey functions.

The virtual region larger than the real region can be scrolled up and down, and the focus can be moved among responders in the window. At this time, scrolling is performed in cooperation with moving the focus.

Figure 409. Execution Result

Execution Result

Example 900. Sample code to attach a frame to a window [SFZWindow and SFZTitleBevelFrame]

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

  XANDLER_DECLARE_VOIDRENDER(OnRenderRequest)          // root's drawing handler
  XANDLER_DECLARE_BOOLEVENT(OnKey)                     // root's key handler
  XANDLER_DECLARE_VOIDRENDER(OnRenderRequestSFZWindow) // window's drawing handler
  XANDLER_DECLARE_BOOLEVENT(OnKeySFZWindow)            // window's key handler
};


// constructor
helloworld::helloworld(Void) static_throws
{

  // ..... (omitted) .....

  SFCError              error(SFERR_NO_ERROR);
  SFZTitleBevelFrameSmp frame;  // smart pointer to SFZTitleBevelFrame
  SFZWindowSmp          window; // smart pointer to SFZWindow

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

    // set the frame title
    frame->SetText("Title for SFZWindow");

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

              // set windows'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 SFZWindow's drawing handler
#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 color in the center of the window
  graphics->DrawSingleText("Hello World!", invoker->GetLocalBound(), COLOR_BLACK);

  return;
}

// implement SFZWindow's key handler
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;  // return "true" since the event has been handled

         break;
  }

  return result;
}

Figure 410. Execution Result: Attach a Frame to a Window[SFZWindow and SFZTitleBevelFrame]


Execution Result: Attach a Frame to a Window[SFZWindow and SFZTitleBevelFrame]

General Purpose Window as Abstract Class that Represents a Window [SFZWindow]

SFZWindow is the abstract base class for all windows in which controls and/or containers are placed.

When controls and/or containers are placed in the window, the focus can be moved among the child responders of the window using the scroll key set with the SFYContainer::SetScrollDownKey / SFYContainer::SetScrollUpKey / SFYContainer::SetPageDownKey / SFYContainer::SetPageUpKey / SFYContainer::SetSnapDownKey / SFYContainer::SetSnapUpKey functions.

The virtual region larger than the real region can be scrolled up and down, and the focus can be moved among responders in the window. At this time, scrolling is performed in cooperation with moving the focus.

Events and their handlers

In SFZWindow, the following handlers(virtual functions) are registered for the key event[SFEVT_KEY] for scrolling, the region event[SFEVT_RESPONDER_BOUND], and the drawing event[SFEVT_RESPONDER_RENDER].

In a window inheriting from SFZWindow, the following handlers(virtual functions) will be booted up first when the event is received.

Table 248. Events and their Handlers

Event Handler(Virtual function) Default behaviour Override
SFEVT_KEY event of the ScrollUp key set with SFYContainer::SetScrollUpKey SFYContainer::HandleScrollUpKey Scroll up the virtual region *1 Optional
SFEVT_KEY event of the ScrollDown key set with SFYContainer::SetScrollDownKey SFYContainer::HandleScrollDownKey Scroll down the virtual region *2 Optional
SFEVT_KEY event of the PageUp key set with SFYContainer::SetPageUpKey SFYContainer::HandlePageUpKey Scroll up the virtual region by 1 page *3 Optional
SFEVT_KEY event of the PageDown key set with SFYContainer::SetPageDownKey SFYContainer::HandlePageDownKey Scroll down the virtual region by 1 page *4 Optional
SFEVT_KEY event of the SnapUp key set with SFYContainer::SetSnapUpKey SFYContainer::HandleSnapUpKey Scroll up the virtual region to the top *5 Optional
SFEVT_KEY event of the SnapDown key set with SFYContainer::SetSnapDownKey SFYContainer::HandleSnapDownKey Scroll down the virtual region to the bottom *6 Optional
(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event SFYWidget::HandleBoundRequest - Recommended
(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event SFYWidget::HandleBoundOptimize - Recommended
(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event SFYWidget::HandleBoundReal - Optional
(SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event SFYWidget::HandleBoundVirtual - Optional
(SFEVT_RESPONDER_BOUND, SFP16_BOUND_GLOBAL) event SFYWidget::HandleBoundGlobal - Optional
(SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event SFYWidget::HandleRenderRequest - Optional

* "-" in the default behaviour column represents that nothing is implemented.

[Note] NOTE

*1. Execute the SFYContainer::ScrollUp function.

*2. Execute the SFYContainer::ScrollDown function.

*3. Execute the SFYContainer::PageUp function.

*4. Execute the SFYContainer::PageDown function.

*5. Execute the SFYContainer::SnapUp function.

*6. Execute the SFYContainer::SnapDown function.

The minimum code necessary to make a user-defined window is as follows:

Example 901. Declaration

SFMTYPEDEFRESPONDER(USRWindow)
class USRWindow: public SFZWindow {
    SFMSEALRESPONDER(USRWindow)
    SFMRESPONDERINSTANTIATEFOUR(USRWindow, SFZWindow, SFYContainer, SFYWidget, SFYResponder)
public:

    // define responder type
    // small alphabet and symbol must not be used since they are reserved for SophiaFramework UNIVERSE
    enum CodeEnum {
        CODE_TYPE = four_char_code('U', 'W', 'N', 'D')
    };
    SFMTYPEDEFTYPE(CodeEnum)

public:
    static USRWindowSmp NewInstance(SFCErrorPtr exception = null);
protected:
    explicit USRWindow(Void) static_throws;
    virtual ~USRWindow(Void);

    // virtual functions defined in the parent class and recommended to be implemented
    virtual Void HandleBoundRequest(SFXRectanglePtr rectangle) const;
    virtual Void HandleBoundOptimize(SFXRectanglePtr rectangle) const;
    virtual Void HandleBoundReal(Void);
    virtual Void HandleBoundVirtual(Void);
    virtual Void HandleRenderRequest(SFXGraphicsPtr graphics) const;
};

Example 902. Implementation

// constructor
USRWindow::USRWindow(Void) static_throws
{
    if (static_try()) {

        // set the responder type
 SetType(CODE_TYPE);

        // here describe the initialization
    }
}

// destructor
USRWindow::~USRWindow(Void)
{
    // here describe the finalization
}

// function to create instance managed by smart pointer
USRWindowSmp USRWindow::NewInstance(SFCErrorPtr exception)
{
    return static_pointer_cast<USRWindow>(Factory(::new USRWindow, exception));
}

Void USRWindow::HandleBoundRequest(SFXRectanglePtr rectangle) const
{
    // calculate the suitable window size
    // set the rectangle argument to the calculated suitable window size
    // for the rectangle argument, it is recommended to set only its size and not to change its origin in this function
    return;
}

Void USRWindow::HandleBoundOptimize(SFXRectanglePtr rectangle) const
{
    // calculate the suitable window size within rectangular region given by the rectangle argument
    // set the rectangle argument to the calculated suitable window size
    // for the rectangle argument, it is recommended to set only its size and not to change its origin in this function
    return;
}

Void USRWindow::HandleBoundReal(Void)
{
    // here describe the size recalculation if necessary when the real region is changed
    return;
}

Void USRWindow::HandleBoundVirtual(Void)
{
    // here describe the size recalculation if necessary when the virtual region is changed
    return;
}

Void USRWindow::HandleRenderRequest(SFXGraphicsPtr graphics) const
{
    // draw window
    return;
}

Reference

Window(Basic) | SFYContainer | SFZDialog | SFYResponder::ToFront | SFYResponder::Terminate | SFYContainer::SetScrollDownKey | SFYContainer::SetScrollUpKey | SFYContainer::SetPageDownKey | SFYContainer::SetPageUpKey | SFYContainer::SetSnapDownKey | SFYContainer::SetSnapUpKey | Virtual Region | Real Region | Local Region | Frame | Key Event[SFEVT_KEY] | Region Event[SFEVT_RESPONDER_BOUND] | Drawing Event[SFEVT_RESPONDER_RENDER]

Member

Constructor/Destructor
SFZWindow( Void )
Constructor of the SFZWindow class.
~SFZWindow( Void )
Destructor of the SFZWindow class.
Public Functions
static
SFZWindowSmp
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.
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.
SFYResponderSmp GetFrame( Void ) (inherits from SFYResponder)
Get the frame which has been attached to this responder.
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.
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 SetDistributer( SFYDistributerPtr param ) (inherits from SFYResponder)
Bind this responder with the specified distributer.
SFCError SetFrame( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Attach the specified frame to this frame.
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 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
static
SFYResponderSmp
Factory( SFYResponderPtr responder , SFCErrorPtr exception = null ) (inherits from SFYResponder)
This function is used to implement the NewInstance function.
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 SFYWidget)
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 HandleRenderRequest( SFXGraphicsPtr graphics ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
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 SFZWindow class.
HorizontalEnum (inherits from SFYResponder)
Constants that represent the horizontal alignment.
VerticalEnum (inherits from SFYResponder)
Constants that represent the vertical alignment.

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

Description

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

Reference

SFYResponder::SetType | SFZWindow::CodeEnum | Type


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

Description

This destructor does nothing.


SFZWindow::NewInstance
Create a new instance of this responder class.
[ public, static ]
SFZWindowSmp 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:

SFZWindowSmp _window;
SFCError error;

if ((_window = SFZWindow::NewInstance(&error)) != null) {

    ...
}

SFZWindow::CodeEnum
Constant that represents the SFZWindow class.
enum CodeEnum {
    CODE_TYPE = four_char_code('w', 'i', 'n', 'd')
};
SFMTYPEDEFTYPE(CodeEnum)

Reference

SFYResponder::GetType | SFYResponder::SetType