SophiaFramework UNIVERSE 5.3 |
#include <SFRBrowserControl.hpp>
class SFRBrowserControl : public SFRControl;
SFMTYPEDEFCLASS(SFRBrowserControl)
The following functions are available in the SFRBrowserControl class:
A simple Web Browser can be created easily by only pasting a SFRBrowserControl object.
The SFRBrowserControl class is implemented base on the IHtmlViewer of BREW API. The limitations of SFRBrowserControl class on rendering the HTML data are almost the same as that of IHtmlViewer.
Error Value
Several member functions of SFRBrowserControl class record its status internally if an error occurs.
The latest error of member function can be gotten by the static_catch function.
SFERR_NO_ERROR is returned if no error occurs.
The code below is to use a simple Web Browser:
SFMTYPEDEFCLASS(MyWindow) class MyWindow : public SFRTitleWindow { SFMSEALCOPY(MyWindow) public: MyWindow(Void) static_throws; virtual ~MyWindow(Void) { return; } // define the simple Web Browser as a member function of pointer type SFRBrowserControlPtr _browser; // simple Web Browser }; // constructor(error processing is omitted) MyWindow::MyWindow(Void) : SFRTitleWindow(SFRApplication::GetInstance(), SFXRectangle(20, 20, 200, 250), "my window") static_throws { // input the browser by string SFXAnsiString buffer( "BrowserControl<br /><br />" "<a href=\"/example/tabbrowser/\">Sophia Cradle</a><br /><br />" ); // create a simple Web Browser // the first argument: parent responder // the second argument: position and size of the tab _browser = ::new SFRBrowserControl(this, rect); // start rendering the string as HTML _browser->Load(buffer); return; }
SFRResponder | SFRApplication | SFRWindow | SFRDialog | SFRControl | SFBHTMLViewer | SFBWeb | Simple Web Browser
Constructor/Destructor |
---|
SFRBrowserControl(
SFRResponderPtr director
, SFXRectangleConstRef rect
, BehaviorType behavior = BEHAVIOR_SFRBROWSERCONTROL
, SFCType attribute = ATTRIBUTE_SFRBROWSERCONTROL
)
Constructor of the SFRBrowserControl class.
|
~SFRBrowserControl( Void )
Destructor of the SFRBrowserControl class.
|
Public Functions | |
---|---|
SFCError |
ClearHistory( Void ) Clear the history list.
|
SInt32 |
FindElement(
ACharConstPtr element
, SInt32 no
) Find the specified element in the current page.
|
HistoryEntry |
GetCurrentHistory( Void ) Get the history of the current page.
|
UInt32 |
GetCurrentHistoryIndex( Void ) Get the index of current history.
|
SFXAnsiString |
GetElementAttribute(
SInt32 elementIndex
, ACharConstPtr attr
) Get the attribute of specified element.
|
SFXAnsiString |
GetElementText(
SInt32 elementIndex
) Get the text of the specified element.
|
HistoryEntry |
GetHistory(
UInt32 historyIndex = 0
) Get the history content by the specified index.
|
HistoryEntryConstPtr |
GetHistoryList( Void ) Get the history list.
|
UInt32 |
GetHistorySize( Void ) Get the number of entries in history list.
|
SInt32 |
GetIndent( Void ) Get the width of indent.
|
SFXRGBColor |
GetLinkColor( Void ) Get the color of link text.
|
SInt32 |
GetParagraphSpacing( Void ) Get the spacing between paragraphs.
|
SInt32 |
GetScrollbarWidth( Void ) Get the width of scroll bar.
|
SFXRGBColor |
GetTextColor( Void ) Get the text color.
|
SFBWebSmpConstRef |
GetWeb( Void ) Get the IWeb instance for communication.
|
Bool |
IsBusy( Void ) Check whether or not the browser control is busy in accessing the network, or rendering.
|
Bool |
IsInlineEditEnable( Void ) Check whether the text is edited in some part of screen or not.
|
Bool |
IsScrollbarEnable( Void ) Check whether the scroll bar is enabled or not.
|
SFCError |
Load(
SFXAnsiStringConstRef data
)
Start to render the string in the HTML format.
|
SFCError |
Load(
SFXAnsiStringConstRef data
, SFXAnsiStringConstRef url
)
Start to render the string in the HTML format.
|
SFCError |
Move(
UInt32 historyIndex = 0
)
Move to the specified page in history list and render it again.
|
SFCError |
Next(
SInt32 n = 1
) Move to the next page in specified history, get and render the page again.
|
SFCError |
Open(
SFXAnsiStringConstRef url
) Start to render the page of specified URL.
|
SFCError |
Open(
SFXAnsiStringConstRef url
, SFXAnsiStringConstRef method
) Start to render the page of specified URL.
|
SFCError |
Open(
SFXAnsiStringConstRef url
, SFXAnsiStringConstRef method
, SFXAnsiStringConstRef data
) Start to render the page of specified URL.
|
SFCError |
Open(
SFXAnsiStringConstRef url
, SFXAnsiStringConstRef method
, SFXBufferConstRef data
) Start to render the page of specified URL.
|
SFCError |
Open(
SFBSourceSmpConstRef source
) Start to render the page of specified URL.
|
SFCError |
Open(
SFBSourceSmpConstRef source
, SFXAnsiStringConstRef basdUrl
) Start to render the page of specified URL.
|
SFCError |
Open(
SFBAStreamSmpConstRef stream
) Start to render the page of specified URL.
|
SFCError |
Open(
SFBAStreamSmpConstRef src
, SFXAnsiStringConstRef baseUrl
) Start to render the page of specified URL.
|
SFCError |
Previous(
SInt32 n = 1
) Move to the previous page in specified history, get and render the page again.
|
Void |
Reload( Void )
Reload and render the current page.
|
SFCError |
SetAuthorizeData(
SFXAnsiStringConstRef user
, SFXAnsiStringConstRef passwd
, SFXAnsiStringConstRef url
) Set information on the Basic HTTP authorization.
|
SFCError |
SetHistorySize(
UInt32 size
) Set the size of history list.
|
SFCError |
SetIndent(
SInt32 pixel
) Set the width of indent in pixels.
|
SFCError |
SetInlineEditEnable(
Bool enable
)
Set whether the text is edited in some part of screen or not.
|
SFCError |
SetLinkColor(
SFXRGBColorConstRef color
) Set the color of link text.
|
SFCError |
SetParagraphSpacing(
SInt32 pixel
) Set the spacing between paragraphs.
|
SFCError |
SetScrollbarEnable(
Bool enable
) Enable or disable the scroll bar.
|
SFCError |
SetScrollbarWidth(
SInt32 pixel
) Set the width of scroll bar in pixels.
|
SFCError |
SetTextColor(
SFXRGBColorConstRef color
) Set the text color.
|
Void |
SetWeb(
SFBWebSmpConstRef web
) Set the IWeb interface for communication.
|
Void |
Stop( Void )
Stop accessing the network and rendering.
|
SFCError |
UnsetAuthorizeData( Void ) Cancel the settings for Basic HTTP authorization.
|
Void |
UnsetWeb( Void )
Cancel the settings set by the SFRBrowserControl::SetWeb function.
|
Bool |
ClearHandler( Void )
(inherits from SFRResponder)
[Handler] Clear the " Targeted " status of responder, or destroy the responder.
|
Bool |
Compare(
SFCType type
, SFCType attribute
, BehaviorType behavior
)
(inherits from SFRResponder)
Compare with type, attribute and behavior.
|
Bool |
FocusDown(
Bool repeat = true
)
(inherits from SFRResponder)
Focus down to the next responder.
|
Bool |
FocusDownHandler( Void )
(inherits from SFRResponder)
[Handler] Focus down to the next responder.
|
Bool |
FocusLeft(
Bool repeat = true
)
(inherits from SFRResponder)
Focus left to the next responder.
|
Bool |
FocusLeftHandler( Void )
(inherits from SFRResponder)
[Handler] Focus left to the next responder.
|
Bool |
FocusNext(
Bool repeat = true
)
(inherits from SFRResponder)
Focus to the next sibling responder.
|
Bool |
FocusNextHandler( Void )
(inherits from SFRResponder)
[Handler] Focus to the next sibling responder.
|
Bool |
FocusPrevious(
Bool repeat = true
)
(inherits from SFRResponder)
Focus to the previous sibling responder.
|
Bool |
FocusPreviousHandler( Void )
(inherits from SFRResponder)
[Handler] Focus to the previous sibling responder.
|
Bool |
FocusRight(
Bool repeat = true
)
(inherits from SFRResponder)
Focus right to the next responder.
|
Bool |
FocusRightHandler( Void )
(inherits from SFRResponder)
[Handler] Focus right to the next responder.
|
Bool |
FocusUp(
Bool repeat = true
)
(inherits from SFRResponder)
Focus up to the next responder.
|
Bool |
FocusUpHandler( Void )
(inherits from SFRResponder)
[Handler] Focus up to the next responder.
|
SFCType |
GetAttribute( Void )
(inherits from SFRResponder)
Get the attribute.
|
SFRResponderPtr |
GetBack(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the child responder at the most background that matches the specified search condition.
|
SFXRectangleConstRef |
GetBaseBound( Void )
(inherits from SFRResponder)
Get the base region with the coordinate of content region of parent responder.
|
SFXRectangle |
GetBaseWorld( Void )
(inherits from SFRResponder)
Get the base region.
|
SFXRectangleConstRef |
GetContentBound( Void )
(inherits from SFRResponder)
Get the content region with the coordinate of base region.
|
SFXRectangle |
GetContentWorld( Void )
(inherits from SFRResponder)
Get the content region.
|
SFRResponderPtr |
GetDirector( Void )
(inherits from SFRResponder)
Get the parent responder.
|
SFRResponderPtr |
GetFocus( Void )
(inherits from SFRResponder)
Get the responder with focus in its ownership hierarchy.
|
SFXMargin |
GetFrameMargin( Void )
(inherits from SFRResponder)
Get the margin between base and content region(in pixels).
|
SFRResponderPtr |
GetFront(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE | STATUS_ENABLE
)
(inherits from SFRResponder)
Get the child responder at the most foreground that matches the specified search condition.
|
SInt16 |
GetIndexBackward(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the index number from the most background of responder that matches the specified search condition.
|
SInt16 |
GetIndexForward(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the index number from the most foreground of responder that matches the specified search condition.
|
Bool |
GetInheritEnable( Void )
(inherits from SFRResponder)
Get the " Enable / Disable " status of responder including its parent responders.
|
Bool |
GetInheritFocus( Void )
(inherits from SFRResponder)
Get the " Focused / Unfocused " status of responder including its parent responders.
|
Bool |
GetInheritTarget( Void )
(inherits from SFRResponder)
Get the " Target / Not-Target " status of responder including its parent responders.
|
Bool |
GetInheritVisible( Void )
(inherits from SFRResponder)
Get the " Visible / Invisible " status of responder including its parent responders.
|
SFRResponderPtr |
GetLeft(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the previous responder among the grouped responders that matches the specified search condition.
|
SInt16 |
GetMoveInterval( Void )
(inherits from SFRResponder)
Get the move interval in pixels.
|
SInt16 |
GetMoveMargin( Void )
(inherits from SFRResponder)
Get the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
|
SFRResponderPtr |
GetNext(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
, Bool repeat = true
)
(inherits from SFRResponder)
Get the next sibling responder that matches the specified search condition.
|
SFRResponderPtr |
GetNthBackward(
SInt16 index
, SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the Nth child responder from the most background that matches the specified search condition.
|
SFRResponderPtr |
GetNthForward(
SInt16 index
, SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the Nth child responder from the most foreground that matches the specified search condition.
|
SFRResponderPtr |
GetPrevious(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
, Bool repeat = true
)
(inherits from SFRResponder)
Get the previous sibling responder that matches the specified search condition.
|
VoidPtr |
GetReference( Void )
(inherits from SFRResponder)
Get the reference value.
|
SFRResponderPtr |
GetRight(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the next responder among the grouped responders that matches the specified search condition.
|
SInt16 |
GetScrollInterval( Void )
(inherits from SFRResponder)
Get the scroll interval in pixels.
|
Bool |
GetStatusEnable( Void )
(inherits from SFRResponder)
Get the value of " Enable / Disable " flag.
|
Bool |
GetStatusFocus( Void )
(inherits from SFRResponder)
Get the value of " Focused / Unfocused " flag.
|
Bool |
GetStatusTarget( Void )
(inherits from SFRResponder)
Get the value of " Target / Non-target " flag.
|
Bool |
GetStatusVisible( Void )
(inherits from SFRResponder)
Get the value of " Visible / Invisible " flag.
|
SFXGrid |
GetTranslate( Void )
(inherits from SFRResponder)
Get the origin coordinate of virtual region with the coordinate of content region.
|
SInt16 |
GetTravelMargin( Void )
(inherits from SFRResponder)
Get the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
|
SFCType |
GetType( Void )
(inherits from SFRResponder)
Get the responder type.
|
SFXRectangleConstRef |
GetVirtualBound( Void )
(inherits from SFRResponder)
Get the virtual region with the coordinate of content region.
|
SFXRectangle |
GetVirtualWorld( Void )
(inherits from SFRResponder)
Get the virtual region
|
Void |
Group(
SFRResponderPtr with
)
(inherits from SFRResponder)
Group the responder with the group of which representative responder is specified as an argument.
|
Void |
GroupMove(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Move all the responders grouped together.
|
Void |
GroupScroll(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Scroll all the virtual regions of responders grouped together.
|
Void |
GroupSelect( Void )
(inherits from SFRResponder)
Select all the responders grouped together. ( move all of them to the most foreground )
|
Void |
GroupStatusEnable(
Bool enable
)
(inherits from SFRResponder)
Set the " Enable / Disable " status of all the responders grouped together.
|
Void |
GroupStatusVisible(
Bool visible
)
(inherits from SFRResponder)
Set the " Visible / Invisible " status of all the responders grouped together.
|
Void |
InvalidateBase( Void )
(inherits from SFRResponder)
Register an area in the base region to be redrawn.
|
Void |
InvalidateBase(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Register an area in the base region to be redrawn.
|
Void |
InvalidateContent( Void )
(inherits from SFRResponder)
Register an area in the content region to be redrawn.
|
Void |
InvalidateContent(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Register an area in the content region to be redrawn.
|
Void |
InvalidateVirtual( Void )
(inherits from SFRResponder)
Register an area in the virtual region to be redrawn.
|
Void |
InvalidateVirtual(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Register an area in the virtual region to be redrawn.
|
Bool |
Invoke(
SFXEventConstRef event
)
(inherits from SFRResponder)
Send the specified event.
|
Bool |
MoveDownHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder down.
|
Bool |
MoveLeftHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder left.
|
Bool |
MoveRightHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder right.
|
Bool |
MoveUpHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder up.
|
SFCError |
RegisterHandler(
HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum type
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum type
, UInt16 p16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum type
, UInt16 bp16
, UInt16 ep16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum btype
, SFCEventEnum etype
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum btype
, SFCEventEnum endType
, UInt16 p16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum btype
, SFCEventEnum etype
, UInt16 bp16
, UInt16 ep16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterTracer(
BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum type
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum type
, UInt16 p16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum type
, UInt16 bgnP16
, UInt16 endP16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 p16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 bgnP16
, UInt16 endP16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
Void |
Scroll(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Scroll the virtual region.
|
Bool |
ScrollDownHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region down.
|
Bool |
ScrollLeftHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region left.
|
Bool |
ScrollRightHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region right.
|
Bool |
ScrollUpHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region up.
|
Void |
Select( Void )
(inherits from SFRResponder)
Select the responder and move it to the most foreground.
|
Bool |
SelectHandler( Void )
(inherits from SFRResponder)
[Handler] Set the target status of a responder to true.
|
Void |
SetBaseBound(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Set the base region with the coordinate of virtual region of parent responder.
|
Void |
SetContentBound(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Set the content region with the coordinate of base region.
|
Void |
SetFrameMargin(
SFXMarginConstRef param
)
(inherits from SFRResponder)
Set the margin between base and content region(in pixels).
|
Void |
SetMoveInterval(
SInt16 interval
)
(inherits from SFRResponder)
Set the move interval in pixels.
|
Void |
SetMoveMargin(
SInt16 margin
)
(inherits from SFRResponder)
Set the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
|
Void |
SetReference(
VoidPtr ref
)
(inherits from SFRResponder)
Set the reference value.
|
Void |
SetScrollInterval(
SInt16 interval
)
(inherits from SFRResponder)
Set the scroll interval in pixels.
|
Void |
SetStatusEnable(
Bool enable
)
(inherits from SFRResponder)
Set the value of " Enable / Disable " flag.
|
Void |
SetStatusFocus(
Bool focus
)
(inherits from SFRResponder)
Set the value of " Focused / Unfocused " flag.
|
Void |
SetStatusTarget(
Bool target
)
(inherits from SFRResponder)
Set the value of " Target / Not-Target " flag.
|
Void |
SetStatusVisible(
Bool visible
)
(inherits from SFRResponder)
Set the value of " Visible / Invisible " flag.
|
Void |
SetTranslate(
SFXGridConstRef point
)
(inherits from SFRResponder)
Set the origin coordinate of virtual region with the coordinate of content region.
|
Void |
SetTravelMargin(
SInt16 margin
)
(inherits from SFRResponder)
Set the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
|
Void |
SetVirtualBound(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Set the virtual region with the coordinate of content region.
|
Void |
Travel(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Scroll the virtual region of responder so that the specified rectangle can get into the content region.
|
Void |
Ungroup( Void )
(inherits from SFRResponder)
Ungroup the responders which are grouped together.
|
Void |
UnregisterHandler(
HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum type
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum type
, UInt16 p16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum type
, UInt16 bgnP16
, UInt16 endP16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum bgnType
, SFCEventEnum endType
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 p16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 bgnP16
, UInt16 endP16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterTracer( Void )
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum type
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum type
, UInt16 p16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum type
, UInt16 bgnP16
, UInt16 endP16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 p16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 bgnP16
, UInt16 endP16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Protected Functions | |
---|---|
Void |
DoneNotifyHandler(
DoneNotifyConstRef notify
) [Handler] Notify the end of rendering.
|
Void |
FocusNotifyHandler(
FocusNotifyConstRef notify
) [Handler] Notify the movement of the cursor.
|
Void |
JumpNotifyHandler(
JumpNotifyConstRef notify
) [Handler] Notify when the link is pressed.
|
Bool |
ResponseNotifyHandler(
ResponseNotifyConstRef notify
) [Handler] Notify that the server connection completes.
|
Bool |
GetAppearanceTransparent( Void )
(inherits from SFRResponder)
Get the value of APPEARANCE_TRANSPARENT flag.
|
Bool |
GetPropertyClosable( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_CLOSABLE flag.
|
Bool |
GetPropertyDirect( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_DIRECT flag.
|
Bool |
GetPropertyMovable( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_MOVABLE flag.
|
Bool |
GetPropertyScrollable( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_SCROLLABLE flag.
|
Bool |
GetPropertySelect( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_SELECT flag.
|
Bool |
GetPropertyTravel( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_TRAVEL flag.
|
HandlerRecConstPtr |
SearchHandler(
SFXEventConstRef event
, HandlerEnum timing
)
(inherits from SFRHandler)
Search for the handler that matches the specified event.
|
TracerRecConstPtr |
SearchTracer(
SFXEventConstRef event
)
(inherits from SFRTracer)
Search for the tracer that matches the specified event.
|
Types |
---|
DEFAULT
Enumerated type for the initial value of SFRBrowserControl parameter.
|
DoneNotify
The class to preserve the information on the timing when rendering is finished.
|
FocusNotify
The class to preserve the information on the focus movement of browser.
|
HistoryEntry
The structure for history entries.
|
JumpNotify
The class to preserve the information on the url links pressed in the browser by user.
|
ResponseNotify
The class to preserve the information on the timing when rendering is finished.
|
BehaviorEnum
(inherits from SFRControl)
Constant that represents the behavior of control.
|
HandlerEnum
(inherits from SFRHandler)
Constant that represents the timing to call the handler.
|
SFRHandlerSPP
(inherits from SFRHandler)
Type of the callback function.
|
TracerEnum
(inherits from SFRTracer)
Constant that represents the trace order.
|
TracerTraceMPP
(inherits from SFRTracer)
Type of the callback function.
|
[ public ] SFRBrowserControl( SFRResponderPtr director // parent responder SFXRectangleConstRef rect // size of the control BehaviorType behavior = BEHAVIOR_SFRBROWSERCONTROL // behavior SFCType attribute = ATTRIBUTE_SFRBROWSERCONTROL // attribute );
Initialize member variables, and create the IHtmlViewer interface for rendering the web pages.(*)
* The IWeb interface is not created here.
[ public, virtual ] ~SFRBrowserControl(Void);
The SFRBrowserControl::~SFRBrowserControl function terminates communication and rendering of HTML data and releases all the resources internally.
[ public ] SFCError ClearHistory(Void);
Return the current history number as 0.
[ protected, virtual ] Void DoneNotifyHandler( DoneNotifyConstRef notify // the notify );
The information to be notified is set in the "notify" argument. The HTTP response code or the BREW error code can be gotten through this argument.
By default nothing happens when the SFRBrowserControl::DoneNotifyHandler function is called.
To do something through this function, it is necessary to override the SFRBrowserControl::DoneNotifyHandler function.
The timing when the SFRBrowserControl::DoneNotifyHandler function is called is different from that of the SFRBrowserControl::ResponseNotifyHandler function.
The code below is to override this function.
#include <SFRResponder/SFRControl/SFRBrowserControl.hpp> class MyBrowserControl : public SFRBrowserControl { public: MyBrowserControl(SFRResponderPtr director, SFXRectangleConstRef rect) : SFRBrowserControl(director, rect) { } protected: virtual Void DoneNotifyHandler(DoneNotifyConstRef notify) { if (notify.GetErrorCode() != SFERR_NO_ERROR) { // if communication error occored, show the error dialog ErrorDialog(notify.GetErrorCode()); } else if (WEB_SUCCEEDED(notify.GetDoneCode())) { // if HTTP error occored, show the warning dialog WarningDialog(notify.GetResposenCode()); } } };
SFRBrowserControl::DoneNotify | SFRBrowserControl::FocusNotifyHandler | SFRBrowserControl::JumpNotifyHandler | SFRBrowserControl::ResponseNotifyHandler
[ public, const ] SInt32 FindElement( ACharConstPtr element // name of the element SInt32 no // number of the element );
Specify the name of the element to find.
Specify the index of the element to find.
If set to 0, the first matching element is returned. If set to n, the (n+1)th matching element is returned.
Return the index of specified element when found. Return a minus value when not found.
The SFRBrowserControl::FindElement function is used to search the specified element in the current page. The index of specified element that is found can be used in the SFRBrowserControl::GetElementText or SFRBrowserControl::GetElementAttribute function.
[ protected, virtual ] Void FocusNotifyHandler( FocusNotifyConstRef notify // notification );
This argument is the notification. It gets the current position, type and status of the tag that the cursor is pointing to.
It do nothing in a standard implement.
If do something outside the standard, users need to override the FocusNotifyHandler() function.
SFRBrowserControl::FocusNotify | SFRBrowserControl::DoneNotifyHandler | SFRBrowserControl::JumpNotifyHandler | SFRBrowserControl::ResponseNotifyHandler
[ public, const ] HistoryEntry GetCurrentHistory(Void);
It returns the history of the current page.
[ public, const ] UInt32 GetCurrentHistoryIndex(Void);
It returns the current history index of the current page.
It can be modified by Move function, Previous function, and Next function. And can be initialized to 0 by ClearHistory function.
SFRBrowserControl::Move | SFRBrowserControl::Previous | SFRBrowserControl::Next | SFRBrowserControl::ClearHistory
[ public, const ] SFXAnsiString GetElementAttribute( SInt32 elementIndex // index of the element ACharConstPtr attr // attribute );
Specify the index of the element returned by the SFRBrowserControl::FindElement function. function.
Specify the attribute name.
Return the content of attribute. If the specified attribute is not found, an empty string is returned.
Get the attribute of specified element in the current page. if the specified element is not found, an empty string is returned.
About the attribute without value. | |
---|---|
As for an element such as <HR NOSHADE> which has an attribute without value, when trying to get its attribute, "NOSHADE" which is the same as the name of attribute is returned. |
[ public, const ] SFXAnsiString GetElementText( SInt32 elementIndex // index of the element );
Specify the index of the element returned by the SFRBrowserControl::FindElement function. function
Return the content of the element. If the specified element is empty, an empty string is returned.
Get the text of the specified element in the current page.
[ public, const ] HistoryEntry GetHistory( UInt32 historyIndex = 0 // history index );
Specify the history index. If not specified, index is set to 0, and the last history content visited is returned.
Return the history content. If there is no history content, or the historyIndex argument is invalid, an empty string is set to the "url" member of SFRBrowserControl::HistoryEntry structure.
SFRBrowserControl::HistoryEntry | SFRBrowserControl::GetHistoryList | SFRBrowserControl::GetCurrentHistory
[ public, const ] HistoryEntryConstPtr GetHistoryList(Void);
Return a pointer to the history list: an array of SFRBrowserControl::HistoryEntry structure, which size is the return value by the SFRBrowserControl::GetHistorySize function.
The top entry of history list is the latest history, and the history number matches the index of entry of history list.
If no information is set to a history entry, its "url" member of SFRBrowserControl::HistoryEntry structure is set to an empty string.
Warning | |
---|---|
The history list returned by the SFRBrowserControl::GetHistoryList function must not be modified. |
Display all the titles and URLs in the history list for debugging.
void PrintHistoryList(SFBrowserControlConstRef browser) { int i; SFBrowserControl::HistoryEntryConstPtr historyList = browser.GetHistoryList(); for (i=0; i < browser.GetHistorySize(); i++) { DBGPRINTF("title '%s' url %s", (ACharConstPtr)historyList[i].title, (ConstACharPtr)historyList[i].url); } }
[ public, const ] UInt32 GetHistorySize(Void);
Return the number of entries in the current history list.
The history number used by the SFRBrowserControl::Move or SFRBrowserControl::GetHistory function must be less than the number of entries in history list returned by the SFRBrowserControl::GetHistorySize function.
* The size of history list returned by the SFRBrowserControl::GetHistoryList function equals the return value of SFRBrowserControl::GetHistorySize function.
SFRBrowserControl::GetHistory | SFRBrowserControl::GetHistoryList | SFRBrowserControl::Move | SFRBrowserControl::SetHistorySize
[ public, const ] SInt32 GetIndent(Void);
Return the width of specified indent in pixels.
[ public, const ] SFXRGBColor GetLinkColor(Void);
Return the color of link text.
[ public, const ] SInt32 GetParagraphSpacing(Void);
Return the spacing between paragraphs in pixels.
[ public, const ] SInt32 GetScrollbarWidth(Void);
Return the width of scroll bar in pixels.
[ public, const ] SFXRGBColor GetTextColor(Void);
Return the text color of HTML.
[ public, const ] SFBWebSmpConstRef GetWeb(Void);
If the IWeb instance is not set by the SFRBrowserControl::SetWeb function and the IWeb instance is not created internally, return null.
Caution when specifying the WebOpt. | |
---|---|
Though any WebOpt can be set to the IWeb instance, the user setting of WebOpt must be preserved until another IWeb instance is used. Please see the "Instructions about the life-time of WEBOPT" in the BREW API Reference. |
The behavior when suspended. | |
---|---|
When suspended, the IWeb instance is set to be created internally by default settings. At this time, the information on WebOpt settings is also reset. To continue to use your own IWeb instance, set it by the resume handler again. |
SFBWeb | SFRBrowserControl::UnsetWeb | SFRBrowserControl::SetWeb
[ public, const ] Bool IsBusy(Void);
[ public, const ] Bool IsInlineEditEnable(Void);
[ public, const ] Bool IsScrollbarEnable(Void);
[ protected, virtual ] Void JumpNotifyHandler( JumpNotifyConstRef notify // notification );
The information to be notified is set in the "notify" argument. The URL, HTTP method, POST data of pressed link are preserved.
Open the linked URL automatically.
The SFRBrowserControl::JumpNotifyHandler function do nothing except the http://, https://, file://, and res:// streams.
To do something other than default settings, it is necessary to override the SFRBrowserControl::JumpNotifyHandler function.
The code below is to override the SFRBrowserControl::JumpNotifyHandler function.
#include <SFRResponder/SFRControl/SFRBrowserControl.hpp> class MyBrowserControl : public SFRBrowserControl { public: MyBrowserControl(SFRResponderPtr director, SFXRectangleConstRef rect) : SFRBrowserControl(director, rect) { } protected: virtual Void JumpNotifyHandler(JumpNotifyConstRef notify) { if (notify.GetUrl().StartWith("mailto:")) { // if it's "mailto:", call the mailer Mailer(notify.GetUrl()); } else { // or just call the standard handler SFRBrowserControl::JumpNotifyHandler(notify); } } };
SFRBrowserControl::JumpNotify | SFRBrowserControl::Open | SFRBrowserControl::DoneNotifyHandler | SFRBrowserControl::FocusNotifyHandler | SFRBrowserControl::ResponseNotifyHandler
[ public ] SFCError Load( SFXAnsiStringConstRef data // HTML data );
[ public ] SFCError Load( SFXAnsiStringConstRef data // HTML data SFXAnsiStringConstRef url // URL );
the string in the HTML format
URL ( All the URLs in the HTML data are relative URLs from this "url" argument.)
Immediately after the inline image is received, it is displayed.
About communication error: | |
---|---|
The communication errors cannot be gotten from the return value of SFRBrowserControl::Load function. To get the communication errors or the event that rendering is finished, it is necessary to create a new class inheriting from the SFRBrowserControl class with overrided SFRBrowserControl::DoneNotifyHandler function. |
index of history list about the page to move to. If not specified, move to the page of entry in history list (the value of index is 0), i.e., move to the latest page of history list.
If the specified index is greater than the size of history list, or there is no history entry of specified index, SFERR_INVALID_PARAM is returned as an error.
About communication error: | |
---|---|
The communication errors cannot be gotten from the return value of SFRBrowserControl::Move function. To get the communication errors or the event that rendering is finished, it is necessary to create a new class inheriting from the SFRBrowserControl class with overrided SFRBrowserControl::DoneNotifyHandler function. |
SFRBrowserControl::DoneNotifyHandler | SFRBrowserControl::Open | SFRBrowserControl::Previous | SFRBrowserControl::Next | SFRBrowserControl::Reload
Specify the number of history list to move ahead. If not specified, move one history entry ahead.
If the specified index number is negative, the history entry go back by its absolute value is displayed. If it is out of the history list, SFERR_INVALID_PARAM is returned as an error.
About communication error: | |
---|---|
The communication errors cannot be gotten from the return value of SFRBrowserControl::Next function. To get the communication errors or the event that rendering is finished, it is necessary to create a new class inheriting from the SFRBrowserControl class with overrided SFRBrowserControl::DoneNotifyHandler function. |
SFRBrowserControl::DoneNotifyHandler | SFRBrowserControl::Open | SFRBrowserControl::Move | SFRBrowserControl::Previous | SFRBrowserControl::Reload
[ public ] SFCError Open( SFXAnsiStringConstRef url // URL to open );
[ public ] SFCError Open( SFXAnsiStringConstRef url // URL to open SFXAnsiStringConstRef method // HTTP method );
[ public ] SFCError Open( SFXAnsiStringConstRef url // URL to open SFXAnsiStringConstRef method // HTTP method SFXAnsiStringConstRef data // data to send to the server by POST method );
[ public ] SFCError Open( SFXAnsiStringConstRef url // URL to open SFXAnsiStringConstRef method // HTTP method SFXBufferConstRef data // data to send to the server by POST method );
[ public ] SFCError Open( SFBSourceSmpConstRef source // HTML source );
[ public ] SFCError Open( SFBSourceSmpConstRef source // HTML souce SFXAnsiStringConstRef basdUrl // base URL );
[ public ] SFCError Open( SFBAStreamSmpConstRef stream // HTML stream );
[ public ] SFCError Open( SFBAStreamSmpConstRef src // HTML stream SFXAnsiStringConstRef baseUrl // base URL );
Specify the URL to access. Render the HTML data of specified URL.
The schemes of http, https, file, and res are supported.
Specify the HTTP method to access the page.
GET and POST methods are supported.(GET is a default method)
In case of POST method, specify data to send to the server.
URL ( All the URLs in the HTML data are relative URLs from this "url" argument.)
ISource interface that preserves the HTML data
IAStream interface that preserves the HTML data
Immediately after the inline image is received, it is displayed.
The Errors about communication. | |
---|---|
The Errors about communication cannot be gotten by return values. While finishing rendering and getting the errors about communication, It is necessary to inherit from the SFRBrowserControl class, create a new class with overrided DoneNotifyHandler function. |
Specify the number of history to move back. If it is elided, move to 1 history previous.
If the specified index number is negative, the history entry go back by its absolute value is displayed. If it is out of the history list, SFERR_INVALID_PARAM is returned as an error.
About communication error: | |
---|---|
The communication errors cannot be gotten from the return value of SFRBrowserControl::Previous function. To get the communication errors or the event that rendering is finished, it is necessary to create a new class inheriting from the SFRBrowserControl class with overrided SFRBrowserControl::DoneNotifyHandler function. |
SFRBrowserControl::DoneNotifyHandler | SFRBrowserControl::Open | SFRBrowserControl::Move | SFRBrowserControl::Next | SFRBrowserControl::Reload
[ public ] Void Reload(Void);
When the current page is displayed by the SFRBrowserControl::Load function or by the SFRBrowserControl::Open function with the argument of IAStream or ISource, the redrawing fails if its "url" is not set validlly.
[ protected, virtual ] Bool ResponseNotifyHandler( ResponseNotifyConstRef notify // notification );
The information to be notified is set in the "notify" argument. The HTTP response code or the BREW error code can be gotten through this argument.
This function is called before rendering.
The standard implement is to do nathing and return a false. To do any other process, it is necessary to overrice the ResponseNotifyHandler() function.
This function is different with SFRBrowserControl::DoneNotifyHandler in the timing being called.
The code below is to override this function.
#include <SFRResponder/SFRControl/SFRBrowserControl.hpp> class MyBrowserControl : public SFRBrowserContorl { public: MyBrowserControl(SFRResponderPtr director, SFXRectangleConstRef rect) : SFRBrowserControl(director, rect) { } protected: virtual Void ResponseNotifyHandler(ResponseNotifyConstRef notify) { if (notify.GetErrorCode() != SFERR_NO_ERROR) { // if there is a communication error, show the error dialog, stop rendering ErrorDialog(notify.GetErrorCode()); return true; } else if (WEB_SUCCEEDED(notify.GetDoneCode())) { // if there is a HTTP error, show the warning dialog WarningDialog(notify.GetResposenCode()); } return false; // if there is normal or warning, render the HTML page } };
SFRBrowserControl::ResponseNotify | SFRBrowserControl::DoneNotifyHandler | SFRBrowserControl::FocusNotifyHandler | SFRBrowserControl::JumpNotifyHandler
[ public ] SFCError SetAuthorizeData( SFXAnsiStringConstRef user // user name for the Basic HTTP authorization SFXAnsiStringConstRef passwd // password for the Basic HTTP authorization SFXAnsiStringConstRef url // URL for the Basic HTTP authorization );
Specify the user name for the Basic HTTP authorization.
Specify the password for the Basic HTTP authorization.
Specify the URL for the Basic HTTP authorization. The web pages reachable from this URL link are protected for the Basic HTTP authorization.
The Basic HTTP authorization is not processed when an error code other than SFERR_NO_ERROR is returned.
After this setting, all the http request headers are included with this authorization information when accessing the web pages .
When accessing the web pages not reachable from the specified URL link, this authorization settings are canceled.
To cancel the authorization settings, use the UnsetAuthorizeData function.
The new size of history list. It cannot be set to 0 or a value smaller than the current value.
The size of history list is not modified when an error code other than SFERR_NO_ERROR is returned.
If the value less than the size of current history list is set, old history entries outside the specified size are removed.
The value less than the size returned by SFRBrowserControl::GetCurrentHistoryIndex function cannot be set.
SFRBrowserControl::GetCurrentHistoryIndex | SFRBrowserControl::GetHistory | SFRBrowserControl::GetHistoryList | SFRBrowserControl::Move | SFRBrowserControl::SetHistorySize
Specify the width of indent in pixels.
[ public ] SFCError SetLinkColor( SFXRGBColorConstRef color // link color );
Specify the color of link text.
Set the spacing between paragraphs in pixels.
The scroll bar here is not of SophiaFramework, but of the standard BREW.
Specify the width of the scroll bar in pixels.
[ public ] SFCError SetTextColor( SFXRGBColorConstRef color // color );
Specify the color of HTML text.
[ public ] Void SetWeb( SFBWebSmpConstRef web // iWeb interface );
The IWeb interface for communication.
Use the specified IWeb interface for HTTP accessing.
If it is under rendering, or communicating, interrupt it.
Caution when specify the WebOpt. | |
---|---|
Though any WebOpt can be set for gotten IWeb instance, the user-set data of WebOpt should be kept by user till it is useable by another IWeb instance. Please see the "Instructions about the life-time of WEBOPT" in BREW API Reference. |
The behavior when suspend. | |
---|---|
When suspend, the IWeb instance is set to be created internally as default. At this time, the information of specified WebOpt will be reset, too. When continue to use user-original IWeb instance, Please reset it by resume handler. |
The specified value can be gotten by GetWeb function.
Set the user agent name.
The setting will be abandoned if the device suspends. It is necessary to set in the resume handler again.
SCError SetUserAgent(SFRBrowserControlRef browser) {
SFBWebSmp web;
web = browser.GetWeb();
if (web == null) {
web = SFBWeb::Instance();
}
WebOpt opts[2];
opts[0].nId = WEB_HEADER;
// do not release the setting string if it is in effective until you secure the heap of it
opts[0].pVal = "User-Agent: ibROWSE/0.1 (SophiaFramework; I; BREW 3.1)\r\n";
opts[1].nId = WEBOPT_END;
opts[1].pVal = null;
int s = web->AddOpt(opts);
if (s != SFERR_NO_ERROR) {
return s;
}
browser.SetWeb(web);
return SFERR_NO_ERROR;
}
SFBWeb | SFRBrowserControl::UnsetWeb | SFRBrowserControl::GetWeb
[ public ] Void Stop(Void);
Nothing happens except under accessing the network or rendering. The content that has already been displayed takes no influence by calling the SFRBrowserControl::Stop function.
[ public ] SFCError UnsetAuthorizeData(Void);
The SFRBrowserControl::UnsetAuthorizeData function used to cancel the settings for Basic HTTP authorization set by the SFRBrowserControl::SetAuthorizeData function.
After calling this function, information on the Basic HTTP authorization is not included with the http request header.
[ public ] Void UnsetWeb(Void);
The SFRBrowserControl::UnsetWeb function is used to have the IWeb interface for communication to be created inside the control.
In case of rendering or communicating, its process is interrupted.
SFBWeb | SFRBrowserControl::SetWeb | SFRBrowserControl::GetWeb
enum DEFAULT { HISTORY_SIZE = 30 };
Only HISTORY_SIZE is defined to represent the size of history list.
[ public ] SFMTYPEDEFCLASS(DoneNotify) class DoneNotify : public Notify { public: DoneNotify (SFBHTMLViewerConstRef hv, int done_code); SInt32 GetDoneCode (Void) const; SFCError GetErrorCode (Void) const; UInt32 GetResponseCode(Void) const; };
The DoneNotify class is derived from the HVNotify of BREW API.
The DoneNotify class is mainly used as the argument of SFRBrowserControl::DoneNotifyHandler function.
The member functions of DoneNotify class are as below:
GetDoneCode | Get the result code of communication or rendering. To check whether the communication succeeded or not, pass the result code to the WEB_ERROR_SUCCEEDED function. If communication succeeded, the response code from server is returned. Otherwise, a negative value is returned. And the result code can be converted into the BREW error code to send it to the WEB_ERROR_MAP function. |
GetErrorCode | Get the error code of communication or rendering. If no error, SFERR_NO_ERROR is returned. |
GetResponseCode | Get the response code from server. 0 is returned if the HTTP session failed because of communication error etc. |
[ public ] SFMTYPEDEFCLASS(FocusNotify) class FocusNotify : public Notify { public: FocusNotify (SFBHTMLViewerConstRef hv, SInt32 elementNo, HVFocusType type, SInt32 state); SInt32 GetElementNo(Void) const; HVFocusType GetFocusType(Void) const; SInt32 GetState (Void) const; };
The FocusNotify class is derived from the HVNotify of BREW API.
The FocusNotify class is mainly used as the argument of SFRBrowserControl::FocusNotifyHandler function.
The member functions of FocusNotify class are as below:
GetState | Get the status of focused element. This value is meaningful only when the return value of GetFocusType function is HVFOCUS_CHECKBOX or HVFOCUS_RADIO. If the checkbox or radiobutton focused is not selected, 0 is returned. Otherwise a value other than 0 is returned. |
GetElementNo | Get the position of focused element. The return value is of the same type as the element position by the SFRBrowserControl::FindElement function. |
GetFocusType |
Get the type of focused element.
The return value is one of the following:
|
[ public ] struct HistoryEntry { SFXAnsiString url; SFXAnsiString title; };
[ public ] SFMTYPEDEFCLASS(JumpNotify) class JumpNotify : public Notify { public: JumpNotify (SFBHTMLViewerConstRef hv, SInt32 elementNo, ConstACharPtr url, ConstACharPtr method=null, ConstACharPtr data=null); JumpNotify (SFBHTMLViewerConstRef hv, ConstACharPtr url, ConstACharPtr method=null, ConstACharPtr data=null); SInt32 GetElementNo(Void) const; SFXAnsiStringConst GetUrl (Void) const; SFXAnsiStringConst GetMethod (Void) const; SFXAnsiStringConst GetData (Void) const; };
The JumpNotify class is derived from the HVNotify of BREW API.
The JumpNotify class is mainly used as the argument of SFRBrowserControl::JumpNotifyHandler function.
The member functions of JumpNotify class are as below:
GetElementNo | Get the position of link element selected. The return value is of the same type as the element position by the SFRBrowserControl::FindElement function. |
GetUrl | Get the URL of link selected by user. |
GetMethod | Get the access method to the server of selected URL link. Get and POST are supported. |
GetData | Get data to be sent to the server by POST method. If there is no data to be sent, or the method is not POST, an empty string is returned. |
[ public ] SFMTYPEDEFCLASS(ResponseNotify) class ResponseNotify : public Notify { public: ResponseNotify (SFBHTMLViewerConstRef hv, int error_code); SFCError GetErrorCode (Void) const; UInt32 GetResponseCode(Void) const; };
The ResponseNotify class is derived from the HVNotify of BREW API.
The ResponseNotify class is mainly used as the argument of SFRBrowserControl::ResponseNotifyHandler function.
The member functions of ResponseNotify class are as below:
GetErrorCode | Return the error code in communicating or rendering. If no error, SFERR_NO_ERRO is returned. |
GetResponseCode | Return the response code from the server. 0 is returned if the HTTP session failed because of communication error etc. |
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |