PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFRToolbox
Class to register or unregister the related event-handlers together.
#include <SFRToolbox.h.hpp>
class SFRToolbox;
SFMTYPEDEFCLASS(SFRToolbox)

Reference

SFRHandler

Member

Public Functions
static
SFCError
RegisterIntelligentHandler( SFRResponderPtr responder )
[Handler] Register the 6 handlers (SelectHandler, ClearHandler, FocusUpHandler, FocusDownHandler, FocusLeftHandler, FocusRightHandler) together.
static
SFCError
RegisterManipulateHandler( SFRResponderPtr responder )
[Handler] Register the 4 handlers (SelectHandler, ClearHandler, FocusNextHandler, FocusPreviousHandler) together.
static
SFCError
RegisterMoveHandler( SFRResponderPtr responder )
[Handler] Register the 4 handlers (MoveUpHandler, MoveDownHandler, MoveLeftHandler, MoveRightHandler) together.
static
SFCError
RegisterScrollHandler( SFRResponderPtr responder )
[Handler] Register the 4 handlers (ScrollUpHandler, ScrollDownHandler, ScrollLeftHandler, ScrollRightHandler) together.
static
Void
UnregisterIntelligentHandler( SFRResponderPtr responder )
[Handler] Unregister the handler associated with the event of AVK_SELECT, AVK_CLR, AVK_UP, AVK_DOWN, AVK_LEFT, AVK_RIGHT.
static
Void
UnregisterManipulateHandler( SFRResponderPtr responder )
[Handler] Unregister the handler associated with the event of AVK_SELECT, AVK_CLR, AVK_UP, AVK_DOWN.
static
Void
UnregisterMoveHandler( SFRResponderPtr responder )
[Handler] Unregister the handler associated with the event of AVK_2, AVK_8, AVK_4, AVK_6.
static
Void
UnregisterScrollHandler( SFRResponderPtr responder )
[Handler] Unregister the handler associated with the event of AVK_2, AVK_8, AVK_4, AVK_6.

SFRToolbox::RegisterIntelligentHandler
[Handler] Register the 6 handlers (SelectHandler, ClearHandler, FocusUpHandler, FocusDownHandler, FocusLeftHandler, FocusRightHandler) together.
[ public, static ]
SFCError RegisterIntelligentHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are registered
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

Associate the SFRResponder::SelectHandler function with the AVK_SELECT event, the SFRResponder::ClearHandler function with the AVK_CLR event, the SFRResponder::FocusUpHandler function with the AVK_UP event, the SFRResponder::FocusDownHandler function with the AVK_DOWN event, SFRResponder::FocusLeftHandler with the AVK_LEFT event, and the SFRResponder::FocusRightHandler function with the AVK_RIGHT event, respectively.

Example

Rigister the handlers without the SFRToolbox::RegisterIntelligentHandler function:

RegisterHandler(SFEVT_KEY, AVK_SELECT, HANDLER_AFTER, HANDLER_FUNCTION(SelectHandler));
RegisterHandler(SFEVT_KEY, AVK_CLR, HANDLER_AFTER, HANDLER_FUNCTION(ClearHandler));
RegisterHandler(SFEVT_KEY, AVK_UP, HANDLER_AFTER, HANDLER_FUNCTION(FocusUpHandler));
RegisterHandler(SFEVT_KEY, AVK_DOWN, HANDLER_AFTER, HANDLER_FUNCTION(FocusDownHandler));
RegisterHandler(SFEVT_KEY, AVK_UP, HANDLER_AFTER, HANDLER_FUNCTION(FocusLeftHandler));
RegisterHandler(SFEVT_KEY, AVK_DOWN, HANDLER_AFTER, HANDLER_FUNCTION(FocusRightHandler));

Rigister the handlers with the SFRToolbox::RegisterIntelligentHandler function:

SFRToolbox::RegisterIntelligentHandler(this);

The above two codes are the same.

Reference

SFRToolbox::UnregisterIntelligentHandler | SFRResponder::SelectHandler | SFRResponder::ClearHandler | SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler


SFRToolbox::RegisterManipulateHandler
[Handler] Register the 4 handlers (SelectHandler, ClearHandler, FocusNextHandler, FocusPreviousHandler) together.
[ public, static ]
SFCError RegisterManipulateHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are registered
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

Associate the SFRResponder::SelectHandler function with the AVK_SELECT event, the SFRResponder::ClearHandler function with the AVK_CLR event, the SFRResponder::FocusNextHandler function with the AVK_DOWN event, and the SFRResponder::FocusPreviousHandler function with the AVK_UP event, respectively.

Example

Rigister the handlers without the SFRToolbox::RegisterManipulateHandler function:

RegisterHandler(SFEVT_KEY, AVK_SELECT, HANDLER_AFTER, HANDLER_FUNCTION(SelectHandler));
RegisterHandler(SFEVT_KEY, AVK_CLR, HANDLER_AFTER, HANDLER_FUNCTION(ClearHandler));
RegisterHandler(SFEVT_KEY, AVK_UP, HANDLER_AFTER, HANDLER_FUNCTION(FocusNextHandler));
RegisterHandler(SFEVT_KEY, AVK_DOWN, HANDLER_AFTER, HANDLER_FUNCTION(FocusPreviousHandler));

Rigister the handlers with the SFRToolbox::RegisterManipulateHandler function:

SFRToolbox::RegisterManipulateHandler(this);

The above two codes are the same.

Reference

SFRToolbox::UnregisterManipulateHandler | SFRResponder::SelectHandler | SFRResponder::ClearHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler


SFRToolbox::RegisterMoveHandler
[Handler] Register the 4 handlers (MoveUpHandler, MoveDownHandler, MoveLeftHandler, MoveRightHandler) together.
[ public, static ]
SFCError RegisterMoveHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are registered
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

Associate the SFRResponder::MoveUpHandler function with the AVK_2 event, the SFRResponder::MoveDownHandler function with the AVK_8 event, the SFRResponder::MoveLeftHandler function with the AVK_4 event, and the SFRResponder::MoveRightHandler function with the AVK_6 event, respectively.

Example

Rigister the handlers without the SFRToolbox::RegisterMoveHandler function:

RegisterHandler(SFEVT_KEY, AVK_2, HANDLER_AFTER, HANDLER_FUNCTION(MoveUpHandler));
RegisterHandler(SFEVT_KEY, AVK_8, HANDLER_AFTER, HANDLER_FUNCTION(MoveDownHandler));
RegisterHandler(SFEVT_KEY, AVK_4, HANDLER_AFTER, HANDLER_FUNCTION(MoveLeftHandler));
RegisterHandler(SFEVT_KEY, AVK_6, HANDLER_AFTER, HANDLER_FUNCTION(MoveRightHandler));

Rigister the handlers with the SFRToolbox::RegisterMoveHandler function:

SFRToolbox::RegisterMoveHandler(this);

The above two codes are the same.

Reference

SFRToolbox::UnregisterMoveHandler | SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler


SFRToolbox::RegisterScrollHandler
[Handler] Register the 4 handlers (ScrollUpHandler, ScrollDownHandler, ScrollLeftHandler, ScrollRightHandler) together.
[ public, static ]
SFCError RegisterScrollHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are registered
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

Associate the SFRResponder::ScrollUpHandler function with the AVK_2 event, the SFRResponder::ScrollDownHandler function with the AVK_8 event, the SFRResponder::ScrollLeftHandler function with the AVK_4 event, and the SFRResponder::ScrollRightHandler function with the AVK_6 event, respectively.

Example

Rigister the handlers without the SFRToolbox::RegisterScrollHandler function:

RegisterHandler(SFEVT_KEY, AVK_2, HANDLER_AFTER, HANDLER_FUNCTION(ScrollUpHandler));
RegisterHandler(SFEVT_KEY, AVK_8, HANDLER_AFTER, HANDLER_FUNCTION(ScrollDownHandler));
RegisterHandler(SFEVT_KEY, AVK_4, HANDLER_AFTER, HANDLER_FUNCTION(ScrollLeftHandler));
RegisterHandler(SFEVT_KEY, AVK_6, HANDLER_AFTER, HANDLER_FUNCTION(ScrollRightHandler));

Rigister the handlers with the SFRToolbox::RegisterScrollHandler function:

SFRToolbox::RegisterScrollHandler(this);

The above two codes are the same.

Reference

SFRToolbox::UnregisterScrollHandler | SFRResponder::ScrollUpHandler | SFRResponder::ScrollDownHandler | SFRResponder::ScrollLeftHandler | SFRResponder::ScrollRightHandler


SFRToolbox::UnregisterIntelligentHandler
[Handler] Unregister the handler associated with the event of AVK_SELECT, AVK_CLR, AVK_UP, AVK_DOWN, AVK_LEFT, AVK_RIGHT.
[ public, static ]
Void UnregisterIntelligentHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are unregistered
);

Description

If there is no handler associated with the event of AVK_SELECT, AVK_CLR, AVK_UP, AVK_DOWN, AVK_LEFT, AVK_RIGHT, nothing happens.

Example

Unregister the handlers without the SFRToolbox::UnregisterIntelligentHandler function:

UnregisterHandler(SFEVT_KEY, AVK_RIGHT, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_LEFT, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_DOWN, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_UP, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_CLR, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_SELECT, HANDLER_AFTER);

Unregister the handlers with the SFRToolbox::UnregisterIntelligentHandler function:

SFRToolbox::UnregisterIntelligentHandler(this);

The above two codes are the same.

Reference

SFRToolbox::RegisterIntelligentHandler | SFRResponder::SelectHandler | SFRResponder::ClearHandler | SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler


SFRToolbox::UnregisterManipulateHandler
[Handler] Unregister the handler associated with the event of AVK_SELECT, AVK_CLR, AVK_UP, AVK_DOWN.
[ public, static ]
Void UnregisterManipulateHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are unregistered
);

Description

If there is no handler associated with the event of AVK_SELECT, AVK_CLR, AVK_UP, AVK_DOWN, nothing happens.

Example

Unregister the handlers without the SFRToolbox::UnregisterManipulateHandler function:

UnregisterHandler(SFEVT_KEY, AVK_DOWN, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_UP, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_CLR, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_SELECT, HANDLER_AFTER);

Unregister the handlers with the SFRToolbox::UnregisterManipulateHandler function:

SFRToolbox::UnregisterManipulateHandler(this);

The above two codes are the same.

Reference

SFRToolbox::RegisterManipulateHandler | SFRResponder::SelectHandler | SFRResponder::ClearHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler


SFRToolbox::UnregisterMoveHandler
[Handler] Unregister the handler associated with the event of AVK_2, AVK_8, AVK_4, AVK_6.
[ public, static ]
Void UnregisterMoveHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are unregistered
);

Description

If there is no handler associated with the event of AVK_2 , AVK_8 , AVK_4 , AVK_6, nothing happens.

Example

Unregister the handlers without the SFRToolbox::UnregisterMoveHandler function:

UnregisterHandler(SFEVT_KEY, AVK_6, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_4, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_8, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_2, HANDLER_AFTER);

Unregister the handlers with the SFRToolbox::UnregisterMoveHandler function:

SFRToolbox::UnregisterMoveHandler(this);

The above two codes are the same.

Reference

SFRToolbox::RegisterMoveHandler | SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler


SFRToolbox::UnregisterScrollHandler
[Handler] Unregister the handler associated with the event of AVK_2, AVK_8, AVK_4, AVK_6.
[ public, static ]
Void UnregisterScrollHandler(
    SFRResponderPtr responder   // pointer to the responder where the handlers are unregistered
);

Description

If there is no handler associated with the event of AVK_2 , AVK_8 , AVK_4 , AVK_6, nothing happens.

Example

Unregister the handlers without the SFRToolbox::UnregisterScrollHandler function:

UnregisterHandler(SFEVT_KEY, AVK_6, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_4, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_8, HANDLER_AFTER);
UnregisterHandler(SFEVT_KEY, AVK_2, HANDLER_AFTER);

Unregister the handlers with the SFRToolbox::UnregisterScrollHandler function:

SFRToolbox::UnregisterScrollHandler(this);

The above two codes are the same.

Reference

SFRToolbox::RegisterScrollHandler | SFRResponder::ScrollUpHandler | SFRResponder::ScrollDownHandler | SFRResponder::ScrollLeftHandler | SFRResponder::ScrollRightHandler