SophiaFramework UNIVERSE 5.3 |
#include <SFZWebBrowserControl.hpp>
class SFZWebBrowserControl : public SFYControl;
SFMTYPEDEFRESPONDER(SFZWebBrowserControl)
The following functions are available in the SFZWebBrowserControl class:
A simple web browser can be created easily by only pasting a SFZWebBrowserControl object.
The SFZWebBrowserControl class holds an internal SFYWebBrowserWidget instance. The SFYWebBrowserWidget class is implemented base on the IHtmlViewer of BREW API. The limitations of SFZWebBrowserControl class on rendering the HTML data are almost the same as that of IHtmlViewer.
Fatal Error | |
---|---|
The SFZWebBrowserControl::HandleError function is invoked when an fatal error occurs. |
Privilege setting of mif file | |
---|---|
To use the SFZWebBrowserControl class, "Web Access" privilege must be checked by mif editor. To load an own root certificate file for SSL connection, "File" privilege must be also checked. |
Sample Code
The following code displays a HTML document in a window by using the simple browser (the SFYWebBrowserWidget class).
SFMTYPEDEFRESPONDER(MyWindow) class MyWindow : public SFZWindow{ SFMSEALRESPONDER(MyWindow) SFMRESPONDERINSTANTIATEFOUR(MyWindow, SFZWindow, SFYContainer, SFYWidget, SFYResponder) public: // Type of MyWindow enum CodeEnum { CODE_TYPE = four_char_code('M', 'W', 'N', 'D') }; SFMTYPEDEFTYPE(CodeEnum) public: static MyWindowSmp NewInstance(SFCErrorPtr exception = null); // Create and initialize a simple browser SFCError Make(Void); protected: explicit MyWindow(Void) static_throws; virtual ~MyWindow(Void); // Simple browser SFZWebBrowserControlSmp _browser; }; // Constructor MyWindow::MyWindow(Void) static_throws { if (static_try()) { // Set the responder type SetType(CODE_TYPE); } } // Destructor MyWindow::~MyWindow(Void) { } // Create and initialize a simple browser SFCError MyWindow::Make(Void) { SFCError error; // A HTML document to display SFXAnsiString buffer( "BrowserControl<br /><br />" "<a href=\"/example/tabbrowser/\">Sophia Craedle</a><br /><br />" ); // Create an instance of the simple browser if ((_browser = SFZWebBrowserControl::NewInstance(&error)) != null) { if ((error = _browser->SetParent(GetThis())) == SFERR_NO_ERROR) { _browser->SetRealBound(GetLocalBound()); _browser->SetState(true, true, true, true); // Open browser _browser->Open(); // Load a HTML document _browser->Load(buffer); _browser->ToFront(); } } return error; }
SFYControl | SFBHTMLViewer | SFYWebBrowserWidget::SetRequestHeader | SFYWebBrowserWidget::SetTimeoutCallback | SFYWebBrowserWidget::SetTimeoutMillisecond | BREW API IHtmlViewer | BREW API IWeb
Constructor/Destructor |
---|
SFZWebBrowserControl( Void ) Constructor of the SFZWebBrowserControl class.
|
~SFZWebBrowserControl( Void ) Destructor of the SFZWebBrowserControl class.
|
Public Functions | |
---|---|
Bool |
AdjustViewer( Void ) Adjust the region of the internal IHTMLViewer instance.
|
Void |
Cancel( Void ) Cancel to connect to the Web server.
|
Void |
ClearHistory( Void ) Clear the history list.
|
Void |
Close( Void ) Close the HTTP connection.
|
SInt32 |
FindElement(
ACharConstPtr element
, SInt32 no
) Find the specified element in the current page.
|
SFXAnsiStringConstRef |
GetBaseUrl( Void ) Get the base URL of HTTP basic authentication.
|
SFXAnsiStringConstRef |
GetContentEncoding( Void ) Get the value of the Content-Encoding field of the HTTP response header.
|
SInt32 |
GetContentLength( Void ) Get the value of the Content-Length field of the HTTP response header.
|
SFXAnsiStringConstRef |
GetContentType( Void ) Get the value of the Content-Type field of the HTTP response header.
|
SFXAnsiStringConstRef |
GetCurrentTitle( Void ) Get the title of the current page.
|
SFXAnsiStringConstRef |
GetCurrentURL( Void ) Get the URL of the current page.
|
SFXDate |
GetDate( Void ) Get the value of the Date field of the HTTP response header.
|
SFXAnsiString |
GetElementText(
SInt32 elementIndex
) Get the text of the specified element.
|
SFXDate |
GetExpires( Void ) Get the value of the Expires field of the HTTP response header.
|
SInt32 |
GetIndent( Void ) Get the width of indent.
|
SFXDate |
GetLastModified( Void ) Get the value of the Last-Modified field of the HTTP response header.
|
SFXRGBColor |
GetLinkColor( Void ) Get the color of link text.
|
SFXAnsiStringConstRef |
GetMethod( Void ) Get the HTTP request method.
|
SInt32 |
GetParagraphSpacing( Void ) Get the spacing between paragraphs.
|
SFXAnsiStringConstRef |
GetPassword( Void ) Get the password of HTTP basic authentication.
|
SFXSocketAddressConstRef |
GetProxyServer( Void ) Get the proxy server.
|
SFBSourceSmpConstRef |
GetRequestContent( Void ) Get the SFBSource instance that manages the HTTP request body.
|
UInt32 |
GetRequestFlag( Void ) Get the HTTP request flag.
|
SFXAnsiStringConstRef |
GetRequestHeader(
SFXAnsiStringConstRef key
) Get the HTTP request header.
|
SFXPropertyConstRef |
GetRequestHeader( Void ) Get the HTTP request header.
|
SFBSourceSmpConstRef |
GetResponseContent( Void ) Get the SFBSource instance that manages the HTTP response body.
|
UInt32 |
GetResponseFlag( Void ) Get the HTTP response flag.
|
SFXAnsiStringConstRef |
GetResponseHeader(
SFXAnsiStringConstRef key
) Get the HTTP response header.
|
SFXPropertyConstRef |
GetResponseHeader( Void ) Get the HTTP response header.
|
SInt32 |
GetResultCode( Void ) Get the HTTP status code.
|
SFBWebSmpConstRef |
GetSFBWeb( Void ) Get the SFBWeb instance managed internally by the HTTP connection.
|
SFBWebRespSmpConstRef |
GetSFBWebResp( Void ) Get the SFBWebResp instance managed internally by the HTTP connection.
|
SInt32 |
GetScrollbarWidth( Void ) Get the width of scroll bar.
|
SFCError |
GetStreamReader(
UInt32 size
, SFXStreamReaderPtr result
) Get the input stream for reading data from the HTTP response body.
|
SFCError |
GetStreamReader(
SFXStreamReaderPtr result
) Get the input stream for reading data from the HTTP response body.
|
SFCError |
GetStreamWriter(
UInt32 size
, SFXStreamWriterPtr result
) Get the output stream for writing data onto the HTTP request body.
|
SFCError |
GetStreamWriter(
SFXStreamWriterPtr result
) Get the output stream for writing data onto the HTTP request body.
|
SFXRGBColor |
GetTextColor( Void ) Get the text color.
|
UInt32 |
GetTimeoutMillisecond( Void ) Get the connection timeout period. [in milliseconds]
|
UInt32 |
GetTrustMode( Void ) Get the SSL trust mode.
|
SFXAnsiStringConstRef |
GetUser( Void ) Get the user name of HTTP basic authentication.
|
SFXAnsiStringConstRef |
GetUserAgent( Void ) Get the user agent of the HTTP request header.
|
AEECLSID |
GetWebClassId( Void ) Get the web class ID to open the HTTP/HTTPS connection.
|
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(
SFBSourceSmpConstRef source
, SFXAnsiStringConstRef url
) Start to render the data in the HTML format.
|
SFCError |
Load(
SFBAStreamSmpConstRef stream
, SFXAnsiStringConstRef url
) Start to render the data in the HTML format.
|
SFCError |
Load(
SFXAnsiStringConstRef data
, SFXAnsiStringConstRef url
) Start to render the data in the HTML format.
|
SFCError |
LoadCertificate(
SInt32 kind
, SFXPathConstRef path
) Load a ASN.1/DER form certificate file or buffer.
|
SFCError |
LoadCertificate(
SInt32 kind
, SFXBufferConstRef buffer
) Load a ASN.1/DER form certificate file or buffer.
|
SFCError |
Navigate(
SFXAnsiStringConstRef url
) Get a page which is specified as url, and start to render the page.
|
SFCError |
Next(
SInt32 n = 1
) Move to the next page in specified history, get and render the page again.
|
SFCError |
Open(
AEECLSID id = AEECLSID_WEB
) Open the HTTP connection.
|
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 the information of HTTP basic authentication.
|
SFCError |
SetIndent(
SInt32 pixel
) Set the width of indent in pixels.
|
Void |
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 |
SetMethod(
SFXAnsiStringConstRef param
) Set the HTTP request method.
|
SFCError |
SetParagraphSpacing(
SInt32 pixel
) Set the spacing between paragraphs in pixels.
|
SFCError |
SetProxyServer(
SFXSocketAddressConstRef param
) Set the proxy server.
|
SFCError |
SetRequestContent(
SFXFileConstRef file
) Set the HTTP request body of the HTTP connection to the specified storage or source.
|
SFCError |
SetRequestContent(
SFXMemoryConstRef memory
) Set the HTTP request body of the HTTP connection to the specified storage or source.
|
SFCError |
SetRequestContent(
SFXStorageConstRef storage
, SInt32 length
) Set the HTTP request body of the HTTP connection to the specified storage or source.
|
SFCError |
SetRequestContent(
SFBSourceSmpConstRef source
, SInt32 length
) Set the HTTP request body of the HTTP connection to the specified storage or source.
|
SFCError |
SetRequestFlag(
UInt32 param
) Set the HTTP request flag.
|
SFCError |
SetRequestHeader(
SFXAnsiStringConstRef key
, SFXAnsiStringConstRef value
) Set the HTTP request header.
|
Void |
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 |
SetTimeoutCallback(
SFXCallback::CallbackSPP spp
, VoidPtr reference
) Set the connection timeout callback.
|
Void |
SetTimeoutMillisecond(
UInt32 msec
) Set the connection timeout period to the specified value. [in milliseconds]
|
SFCError |
SetTrustMode(
UInt32 param
) Set the SSL trust mode.
|
SFCError |
SetUserAgent(
SFXAnsiStringConstRef param
) Set the user agent.
|
Void |
SetWebClassId(
AEECLSID id
) Set the web class ID to open the HTTP/HTTPS connection.
|
Void |
Stop( Void ) Stop rendering.
|
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.
|
SInt32 |
GetCurrentValue( Void )
(inherits from SFYControl)
Get the current value of this control.
|
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 |
GetMaximumValue( Void )
(inherits from SFYControl)
Get the maximum value of this control.
|
SInt32 |
GetMinimumValue( Void )
(inherits from SFYControl)
Get the minimum value of this control.
|
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 |
SetCurrentValue(
SInt32 param
)
(inherits from SFYControl)
Set the current value of this control 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.
|
Void |
SetMaximumValue(
SInt32 param
)
(inherits from SFYControl)
Set the maximum value of the control to the specified value.
|
Void |
SetMinimumValue(
SInt32 param
)
(inherits from SFYControl)
Set the minimum value of the control 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 | |
---|---|
Void |
DoneNotifyHandler(
NotifyRef notify
) [Handler] Notify the end of rendering.
|
Void |
FocusNotifyHandler(
NotifyRef notify
) [Handler] Notify the movement of the cursor.
|
Void |
HandleBoundVirtual( Void )
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 |
HandleError(
SFCError error
) Called when a fatal error occurs.
|
Void |
HandleRenderRequest(
SFXGraphicsPtr graphics
)
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
[Draw this responder.]
|
Void |
JumpNotifyHandler(
NotifyRef notify
) [Handler] Notify when the link is pressed.
|
Void |
ResponseNotifyHandler(
NotifyRef notify
) [Handler] Notify that the server connection completes.
|
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 SFYControl)
This function will be called 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 |
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 SFZWebBrowserControl class.
|
Notify Browser notification struct.
|
HorizontalEnum
(inherits from SFYResponder)
Constants that represent the horizontal alignment.
|
VerticalEnum
(inherits from SFYResponder)
Constants that represent the vertical alignment.
|
[ protected, explicit ] SFZTabControl(Void);
Internal implementation of this constructor is as follows:
/*protected */SFZWebBrowserControl::SFZWebBrowserControl(Void) static_throws { static SFXEventRange::AtomRecConst range[] = { { SFEVT_RESPONDER_BROWSER_NOTIFY, SFEVT_RESPONDER_BROWSER_NOTIFY, SFP16_BEGIN, SFP16_END } }; SFYHandler::RuleRec rule[lengthof(range)]; SFCError error; if (static_try()) { SetType(CODE_TYPE); if ((_widget = SFYWebBrowserWidget::NewInstance(&error)) != null) { static_throw(_widget->SetParent(GetThis())); if (static_try()) { rule[0].spp = XANDLER_FUNCTION(OnNotify); rule[0].reference = this; static_throw(_widget->RegisterHandler(atomic_cast(range), rule, lengthof(range))); if (static_try()) { _widget->SetState(true, true, true, true); } } } else { static_throw(error); } } }// SFZWebBrowserControl::SFZWebBrowserControl // /*private */XANDLER_IMPLEMENT_VOIDBROWSERNOTIFY(SFZWebBrowserControl, OnNotify, invoker, reason, notify) { switch (reason) { case SFYWebBrowserWidget::NOTIFY_RESPONSE: ResponseNotifyHandler(*notify); break; case SFYWebBrowserWidget::NOTIFY_DONE: DoneNotifyHandler(*notify); break; case SFYWebBrowserWidget::NOTIFY_JUMP_SUBMIT: JumpNotifyHandler(*notify); break; case SFYWebBrowserWidget::NOTIFY_FOCUS: FocusNotifyHandler(*notify); break; case SFYWebBrowserWidget::NOTIFY_PAGE_DONE: break; case SFYWebBrowserWidget::NOTIFY_CONTENT_DONE: break; case SFYWebBrowserWidget::NOTIFY_FATAL_ERROR: HandleError(notify->u.nDone); break; } return; }// XANDLER_IMPLEMENT_VOIDBROWSERNOTIFY(OnNotify) //
SFYWebBrowserWidget | SFYWebBrowserWidget::NotifyEnum | SFZWebBrowserControl::ResponseNotifyHandler | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::HandleError
[ public, virtual ] ~SFZWebBrowserControl(Void);
Nothing is done.
[ public ] Bool AdjustViewer(Void);
This function adjusts the region of the internal IHTMLViewer instance.
This function is automatically called when the real region or the virtual region of this responder is changed.
When the global region of this responder is changed by other factors, explicit calling is necessary.
[ public ] Void Cancel(Void);
This function cancels to connect to the Web server.
The registered callback and the connection timeout timer will be canceled, and the state of the HTTP connection will be restored before connecting, if called.
In general, this function is effective in the SFXHTTPConnection::STATE_CONNECT state.
This function is called in the SFZWebBrowserControl::Close function.
SFZWebBrowserControl::Close | SFZWebBrowserControl::SetTimeoutMillisecond | SFZWebBrowserControl::SetTimeoutCallback
[ public ] Void ClearHistory(Void);
This function clears the history list.
[ public ] Void Close(Void);
This function closes the HTTP connection.
This HTTP connection transits into the SFXHTTPConnection::STATE_CLOSE state.
Concretely, the following processings will be performed.
Note | |
---|---|
This function is called in the SFZWebBrowserControl::~SFZWebBrowserControl destructor. This function calls the SFZWebBrowserControl::Cancel function internally. |
SFZWebBrowserControl::~SFZWebBrowserControl | SFZWebBrowserControl::Open | SFZWebBrowserControl::Cancel | SFZWebBrowserControl::GetSFBWeb | SFZWebBrowserControl::GetSFBWebResp
[ protected, virtual ] Void DoneNotifyHandler( NotifyRef notify // the notify );
BREW error code is notified as "notify.u.nDone".
By default nothing happens when the SFZWebBrowserControl::DoneNotifyHandler function is called.
To do something through this function, it is necessary to override the SFZWebBrowserControl::DoneNotifyHandler function.
The code below is to override this function.
#include <SFZResponder/SFZControl/SFZBrowserControl/SFZWebBrowserControl.hpp>
SFMTYPEDEFRESPONDER(MyBrowserControl)
class MyBrowserControl : public SFZWebBrowserControl {
SFBSEALRESPONDER(MyBrowserControl)
SFMRESPONDERINSTANTIATEFOUR(MyBrowserControl, SFZWebBrowserControl, SFYControl, SFYWidget, SFYResponder)
public:
static MyBrowserControlSmp NewInstance(SFCErrorPtr exception = null);
protected:
explicit MyBrowserControl(Void) static_throws;
virtual ~MyBrowserControl(Void);
virtual Void DoneNotifyHandler(NotifyRef notify) {
if (notify.u.nDone != SFERR_NO_ERROR) {
// handle error
}
}
};
Internal implementation of this function is as follows:
/*protected virtual */Void SFZWebBrowserControl::DoneNotifyHandler(NotifyRef notify) { unused(notify); return; }// SFZWebBrowserControl::DoneNotifyHandler //
SFZWebBrowserControl::Notify | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler | SFZWebBrowserControl::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 SFZWebBrowserControl::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 SFZWebBrowserControl::GetElementText function.
[ protected, virtual ] Void FocusNotifyHandler( NotifyRef 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 does nothing in a standard implement.
If does something outside the standard, users need to override the SFZWebBrowserControl::FocusNotifyHandler function.
Internal implementation of this function is as follows:
/*protected virtual */Void SFZWebBrowserControl::FocusNotifyHandler(NotifyRef notify) { unused(notify); return; }// SFZWebBrowserControl::FocusNotifyHandler //
SFZWebBrowserControl::Notify | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler | SFZWebBrowserControl::ResponseNotifyHandler
[ public, const ] SFXAnsiStringConstRef GetBaseUrl(Void);
Base URL of HTTP basic authentication
Get the base URL of HTTP basic authentication.
The value which is set by the SFZWebBrowserControl::SetAuthorizeData function is gotten.
[ public, const ] SFXAnsiStringConstRef GetContentEncoding(Void);
Value of the Content-Encoding field of the HTTP response header
This function gets the value of the Content-Encoding field of the HTTP response header.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.
[ public, const ] SInt32 GetContentLength(Void);
Value of the Content-Length field of the HTTP response header
This function gets the value of the Content-Length field of the HTTP response header.
If the Content-Length field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, -1 will be returned.
[ public, const ] SFXAnsiStringConstRef GetContentType(Void);
Value of the Content-Type field of the HTTP response header
This function gets the value of the Content-Type field of the HTTP response header of the HTTP connection.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.
[ public, const ] SFXAnsiStringConstRef GetCurrentTitle(Void);
Tite of the current page
This function gets the title of the current page.
[ public, const ] SFXAnsiStringConstRef GetCurrentURL(Void);
URL of the current page
This function gets the URL of the current page.
[ public, const ] SFXDate GetDate(Void);
Value of the Date field of the HTTP response header as the SFXDate) instance
This function gets the value of the Date field of the HTTP response header as the SFXDate) instance.
If the Date field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFXDate(0) will be returned.
[ public, const ] SFXAnsiString GetElementText( SInt32 elementIndex // index of the element );
Specify the index of the element returned by the SFZWebBrowserControl::FindElement function.
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 ] SFXDate GetExpires(Void);
Value of the Expires field of the HTTP response header as the SFXDate) instance
This function gets the value of the Expires field of the HTTP response header as the SFXDate) instance.
If the Expires field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFXDate(0) will be returned.
[ public, const ] SInt32 GetIndent(Void);
Width of specified indent in pixels.
[ public, const ] SFXDate GetLastModified(Void);
Value of the Last-Modified field of the HTTP response header as the SFXDate) instance
This function gets the value of the Last-Modified field of the HTTP response header as the SFXDate) instance.
If the Last-Modified field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFXDate(0) will be returned.
[ public, const ] SFXRGBColor GetLinkColor(Void);
Color of the link text.
[ public, const ] SFXAnsiStringConstRef GetMethod(Void);
HTTP request method of this HTTP connection
This function gets the HTTP request method of this HTTP connection set with the SFZWebBrowserControl::SetMethod function.
If this HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.
[ public, const ] SInt32 GetParagraphSpacing(Void);
Space between paragraphs in pixels.
[ public, const ] SFXAnsiStringConstRef GetPassword(Void);
Password of HTTP basic authentication
Get the password of HTTP basic authentication.
The value which is set by the SFZWebBrowserControl::SetAuthorizeData function is gotten.
[ public, const ] SFXSocketAddressConstRef GetProxyServer(Void);
Proxy server of this HTTP connection
This function gets the proxy server of this HTTP connection set with the SFZWebBrowserControl::SetProxyServer function.
If this HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the proxy server of the HTTP connection has not been set, SFXSocketAddress::EmptyInstance() will be returned.
[ public, const ] SFBSourceSmpConstRef GetRequestContent(Void);
SFBSource instance that manages the HTTP request body of the HTTP connection
This function gets the SFBSource instance that manages the HTTP request body of the HTTP connection, which is set with the SFZWebBrowserControl::SetRequestContent function.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the SFBSource instance has not been set, &SFBSourceSmp::EmptyInstance() will be returned.
[ public, const ] UInt32 GetRequestFlag(Void);
HTTP request flag of this HTTP connection
This function gets the HTTP request flag set with the SFZWebBrowserControl::SetRequestFlag function.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, 0 will be returned.
SFZWebBrowserControl::SetRequestFlag | SFZWebBrowserControl::Open | BREW API IWEB_GetResponse
[ public, const ] SFXAnsiStringConstRef GetRequestHeader( SFXAnsiStringConstRef key // field name );
[ public, const ] SFXPropertyConstRef GetRequestHeader(Void);
HTTP request header of this HTTP connection
This function gets the HTTP request header of the HTTP connection set with the SFZWebBrowserControl::SetRequestHeader function. It is possible to get the value of the field specified in the argument. If nothing is specified, all of the HTTP request header will be obtained.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the specified field of the HTTP request header or itself has not been set, the empty string(SFXAnsiString::EmptyInstance()) or the empty property(SFXProperty::EmptyInstance()) will be returned.
SFZWebBrowserControl::SetRequestHeader | SFXProperty | SFXAnsiString
[ public, const ] SFBSourceSmpConstRef GetResponseContent(Void);
SFBSource instance that manages the HTTP response body
This function gets the SFBSource instance that manages the HTTP response body of the HTTP connection.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFBSourceSmp::EmptyInstance() will be returned.
Tip | |
---|---|
After the HTTP connection is established, the HTTP response body can be obtained using this function. |
Note | |
---|---|
The SFZWebBrowserControl::GetStreamReader function gets the stream from the SFBSource instance, return value of the SFZWebBrowserControl::GetResponseContent function. |
Reading the HTTP response body | |
---|---|
If the HTTP response body is read by using the SFZWebBrowserControl::GetResponseContent function, the SFZWebBrowserControl::GetStreamReader function cannot be used. On the contrary, if the HTTP response body is read by using the SFZWebBrowserControl::GetStreamReader function, the SFZWebBrowserControl::GetResponseContent function cannot be used. |
[ public, const ] UInt32 GetResponseFlag(Void);
HTTP response flag of this HTTP connection
This function gets the HTTP response flag of the HTTP connection.
The HTTP response flag can be represented as logical sum of the following flags:
If this HTTP connection is not in the STATE_OPEN_ESTABLISHED state, 0 will be returned.
[ public, const ] SFXAnsiStringConstRef GetResponseHeader( SFXAnsiStringConstRef key // field name );
[ public, const ] SFXPropertyConstRef GetResponseHeader(Void);
HTTP response header of this HTTP connection
This function gets the HTTP response header of the HTTP connection set with the SFZWebBrowserControl::SetRequestHeader function. It is possible to get the value of the field specified in the argument. If nothing is specified, all of the HTTP response header will be obtained.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the specified field of the HTTP response header or itself has not been set, the empty string(SFXAnsiString::EmptyInstance()) or the empty property(SFXProperty::EmptyInstance()) will be returned.
[ public, const ] SInt32 GetResultCode(Void);
HTTP status code of this HTTP connection.
This function gets the HTTP status code of the HTTP connection.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, -1 will be returned.
If the HTTP connection has been established, the return value of this function is same as the nCode field of BREW API's WebRespInfo.
nCode represents either a protocol error code or a *negative* WEB_ERROR (see AEEError.h for codes), use WEB_ERROR_MAP(nCode) to map to AEE error, and WEB_ERROR_SUCCEEDED(nCode) to test for success. A positive number is one that was returned by the server, negative error codes are system errors.
Note | |
---|---|
For more details on WEB_ERROR, see AEEError.h. |
[ public, const ] SFBWebSmpConstRef GetSFBWeb(Void);
SFBWeb instance managed internally by the HTTP connection.
This function gets the SFBWeb instance managed internally by the HTTP connection.
[ public, const ] SFBWebRespSmpConstRef GetSFBWebResp(Void);
SFBWebResp instance managed internally by the HTTP connection.
This function gets the SFBWebResp instance managed internally by the HTTP connection.
[ public, const ] SInt32 GetScrollbarWidth(Void);
Width of scroll bar in pixels.
[ public ] SFCError GetStreamReader( UInt32 size // buffer size SFXStreamReaderPtr result // pointer to the input stream );
[ public ] SFCError GetStreamReader( SFXStreamReaderPtr result // pointer to the input stream );
This function gets the input stream for reading data from the HTTP response body of this HTTP connection.
If the size argument is specified, the buffer size of the input stream will be fixed with the specified value. Otherwise, the buffer size will be variable and the SFXElasticStreamReader class will be used internally.
Tip | |
---|---|
You have to use the SFXBinaryStreamReader, SFXAnsiStringStreamReader, or SFXWideStringStreamReader class for the input stream properly depending on the type of data to be read. |
Reading the HTTP response body | |
---|---|
If the HTTP response body is read by using the SFZWebBrowserControl::GetResponseContent function, the SFZWebBrowserControl::GetStreamReader function cannot be used. On the contrary, if the HTTP response body is read by using the SFZWebBrowserControl::GetStreamReader function, the SFZWebBrowserControl::GetResponseContent function cannot be used. |
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetResponseContent | SFXBinaryStreamReader | SFXAnsiStringStreamReader | SFXWideStringStreamReader | Stream Buffer
[ public ] SFCError GetStreamWriter( UInt32 size // buffer size SFXStreamWriterPtr result // pointer to the output stream );
[ public ] SFCError GetStreamWriter( SFXStreamWriterPtr result // pointer to the output stream );
This function gets the output stream for writing data onto the HTTP request body of the HTTP connection.
If the size argument is specified, the buffer size of the output stream will be fixed with the specified value. Otherwise, the buffer size will be variable and the SFXElasticStreamWriter class will be used internally.
Tip | |
---|---|
You have to use the SFXBinaryStreamWriter, SFXAnsiStringStreamWriter, or SFXWideStringStreamWriter class for the output stream properly depending on the type of data to write. |
Writing the HTTP response body | |
---|---|
If the HTTP response body is set with the SFZWebBrowserControl::SetRequestContent function, the SFZWebBrowserControl::GetStreamWriter function cannot be used. On the contrary, if the HTTP response body is written by using the SFZWebBrowserControl::GetStreamWriter function, the SFZWebBrowserControl::SetRequestContent function cannot be used. |
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetStreamReader | SFZWebBrowserControl::SetRequestContent | SFZWebBrowserControl::Open | SFXBinaryStreamWriter | SFXAnsiStringStreamWriter | SFXWideStringStreamWriter | Stream Buffer
[ public, const ] SFXRGBColor GetTextColor(Void);
Text color of HTML.
[ public, const ] UInt32 GetTimeoutMillisecond(Void);
Connection timeout period [in milliseconds]
This function gets the connection timeout period. [in milliseconds]
[ public, const ] UInt32 GetTrustMode(Void);
SSL trust mode
This function gets the SSL trust mode of this HTTP connection set with the SFZWebBrowserControl::SetTrustMode function.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, 0 will be returned.
SFZWebBrowserControl::SetTrustMode | SFZWebBrowserControl::Open | BREW API ISSL_NegotiateV
[ public, const ] SFXAnsiStringConstRef GetUser(Void);
User name of HTTP basic authentication
Get the user name of HTTP basic authentication.
The value which is set by the SFZWebBrowserControl::SetAuthorizeData function is gotten.
[ public, const ] SFXAnsiStringConstRef GetUserAgent(Void);
User agent of this HTTP connection
This function gets the user agent of the HTTP request header of this HTTP connection set with the SFZWebBrowserControl::SetUserAgent function.
If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.
[ public, const ] AEECLSID GetWebClassId(Void);
Web class ID
This function gets the web class ID to open the HTTP/HTTPS connection.
Default value is AEECLSID_WEB.
[ protected, virtual ] Void HandleBoundVirtual(Void);
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.
In case you want to perform your own processing when the virtual region is changed, override this virtual function.
The default implementation sets real region of the internal SFYWebBrowserWidget instance to the region which is deflated about SFXMargin(2, 2) size from the local region.
Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event | |
---|---|
The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function. |
Another method when the virtual region is changed | |
---|---|
Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder. In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order. In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted. |
Internal implementation of the SFZWebBrowserControl::HandleBoundVirtual function is as follows:
/*protected virtual */Void SFZWebBrowserControl::HandleBoundVirtual(Void) { SFXRectangle rx; rx.Set(GetLocalBound()); rx.Deflate(2, 2); _widget->SetRealBound(rx); return; }// SFZWebBrowserControl::HandleBoundVirtual //
SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Real Region | Virtual Region | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]
This function is called when a fatal error occurs in the SFZWebBrowserControl class.
Default does nothing.
[ protected, virtual, const ] Void HandleRenderRequest( SFXGraphicsPtr graphics // graphic object );
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
In case you want to perform your own drawing of this responder, override this function.
The default implementation is to draw this responder.
The method to darw a responder | |
---|---|
In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder. Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order. In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler. |
Procedure of drawing a responder | |
---|---|
The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually. The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer. Here, the SFYResponder::Render function will be called at the following situations:
If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region. |
Internal implementation of the SFZWebBrowserControl::HandleRenderRequest function is as follows:
/*protected virtual */Void SFZWebBrowserControl::HandleRenderRequest(SFXGraphicsPtr graphics) const { static SFXBevelColor::AtomRecConst frameRgb = { {{{0x00, 0xAA, 0xAA, 0xAA}}}, {{{0x00, 0xFF, 0xFF, 0xFF}}}, {{{0x00, 0xFF, 0xFF, 0xFF}}} }; static SFXRGBColor::AtomRecConst theme[] = { {{{0x00, 0x00, 0x00, 0x00}}}, {{{0x00, 0xDD, 0x99, 0x99}}}, {{{0x00, 0xFF, 0xFF, 0xFF}}} }; SFBDisplaySmp display; SFXRectangle rx; rx.Set(GetLocalBound()); graphics->DrawBevelRectangle(rx, frameRgb); rx.Deflate(1, 1); graphics->DrawRectangle(rx, theme[0]); rx.Deflate(1, 1); if (GetStateFocus(true)) { graphics->DrawRectangle(rx, theme[1]); } else { graphics->DrawRectangle(rx, theme[2]); } return; }// SFZWebBrowserControl::HandleRenderRequest //
SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree
[ public, const ] Bool IsBusy(Void);
[ public, const ] Bool IsInlineEditEnable(Void);
[ public, const ] Bool IsScrollbarEnable(Void);
[ protected, virtual ] Void JumpNotifyHandler( NotifyRef notify // notification );
Open the linked URL automatically.
The SFZWebBrowserControl::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 SFZWebBrowserControl::JumpNotifyHandler function.
The code below is to override the SFZWebBrowserControl::JumpNotifyHandler function.
#include <SFZResponder/SFZControl/SFZBrowserControl/SFZWebBrowserControl.hpp> SFMTYPEDEFRESPONDER(MyBrowserControl) class MyBrowserControl : public SFZWebBrowserControl { SFBSEALRESPONDER(MyBrowserControl) SFMRESPONDERINSTANTIATEFOUR(MyBrowserControl, SFZWebBrowserControl, SFYControl, SFYWidget, SFYResponder) public: static MyBrowserControlSmp NewInstance(SFCErrorPtr exception = null); protected: explicit MyBrowserControl(Void) static_throws; virtual ~MyBrowserControl(Void); virtual Void JumpNotifyHandler(NotifyRef notify) { if (notify.GetUrl().StartWith("mailto:")) { // if it's "mailto:", call the mailer Mailer(notify.GetUrl()); } else { // or just call the standard handler SFZWebBrowserControl::JumpNotifyHandler(notify); } if (notify.ex.absoluteURL.StartWith("mailto:")) { // if it's "mailto:", call the mailer Mailer(notify.ex.absoluteURL); } else { // or just call the standard handler SFZWebBrowserControl::JumpNotifyHandler(notify); } } };
Internal implementation of this function is as follows:
/*protected virtual */Void SFZWebBrowserControl::JumpNotifyHandler(NotifyRef notify) { Navigate(notify.ex.absoluteURL); return; }// SFZWebBrowserControl::JumpNotifyHandler //
SFZWebBrowserControl::Notify | SFZWebBrowserControl::Navigate | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::ResponseNotifyHandler
[ public ] SFCError Load( SFBSourceSmpConstRef source // HTML source SFXAnsiStringConstRef url // URL );
[ public ] SFCError Load( SFBAStreamSmpConstRef stream // HTML stream SFXAnsiStringConstRef url // URL );
[ public ] SFCError Load( SFXAnsiStringConstRef data // HTML data SFXAnsiStringConstRef url // URL );
the source in the HTML format
the stream in the HTML format
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 SFZWebBrowserControl::Load function. To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event. |
[ public ] SFCError LoadCertificate( SInt32 kind // kind of certificate SFXPathConstRef path // file path of certificate );
[ public ] SFCError LoadCertificate( SInt32 kind // kind of certificate SFXBufferConstRef buffer // buffer of certificate );
kind of certificate: any one of WEBOPT_X509_ROOT_CERT, WEBOPT_X509_LEAF_CERT, and WEBOPT_X509_BRANCH_CERT
file path of ASN.1/DER form certificate
buffer of ASN.1/DER form certificate
This function loads a file or buffer of ASN.1/DER form certificate.
This function is valid if and only if the HTTP connection is in the STATE_CLOSE.
Load a root certificate file
SFZWebBrowserControl http; SFCError error; // Load a root certificate before open. if ((error = http.LoadCertificate(WEBOPT_X509_ROOT_CERT, SFXPath("scradle.der"))) == SFERR_NO_ERROR) { if ((error = http.Open()) == SFERR_NO_ERROR) { error = http.Connect("https://www.s-cradle.com/example/tabbrowser/", XALLBACK_INTERNAL(OnConnect)); } }
[ public ] SFCError Open( SFXAnsiStringConstRef url // URL to open );
Specify the URL to access. Render the HTML data of specified URL.
The schemes of http, https, file, and res are supported.
This function gets a page which is specified by the argument, and starts to render it.
Immediately after the inline image is received, it is displayed.
Before calling this function, the connection must be opened by the SFZWebBrowserControl::Open function, and the HTML method must be set by the SFZWebBrowserControl::SetMethod function.
Abount communication error: | |
---|---|
The communication errors cannot be gotten from the return value of SFZWebBrowserControl::Navigate function. To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event. |
SFZWebBrowserControlSmp browser; SFCError error; if ((browser = SFZWebBrowserControl::NewInstance(&error)) != null) { if ((error = browser->Open()) == SFERR_NO_ERROR) { if ((error = browser->SetMethod("GET")) == SFERR_NO_ERRROR) { error = browser->Navigate("/example/tabbrowser/"); } } }
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 SFZWebBrowserControl::Next function. To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event. |
SFZWebBrowserControl::Navigate | SFZWebBrowserControl::Previous | SFZWebBrowserControl::Reload
This function opens this HTTP connection.
This HTTP connection transits into the SFXHTTPConnection::STATE_OPEN state.
Concretely, the following processings will be performed.
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 SFZWebBrowserControl::Previous function. To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event. |
SFZWebBrowserControl::Navigate | SFZWebBrowserControl::Next | SFZWebBrowserControl::Reload
[ public ] Void Reload(Void);
When the current page is displayed by the SFZWebBrowserControl::Load function or by the SFZWebBrowserControl::Navigate function with the argument of IAStream or ISource, the redrawing fails.
[ protected, virtual ] Void ResponseNotifyHandler( NotifyRef notify // notification );
notify.u.nDone: HTTP response code
This function is called before rendering.
The standard implement is to do nothing.
The code below is to override this function.
#include <SFZResponder/SFZControl/SFZBrowserControl/SFZWebBrowserControl.hpp>
SFMTYPEDEFRESPONDER(MyBrowserControl)
class MyBrowserControl : public SFZWebBrowserControl {
SFBSEALRESPONDER(MyBrowserControl)
SFMRESPONDERINSTANTIATEFOUR(MyBrowserControl, SFZWebBrowserControl, SFYControl, SFYWidget, SFYResponder)
public:
static MyBrowserControlSmp NewInstance(SFCErrorPtr exception = null);
protected:
explicit MyBrowserControl(Void) static_throws;
virtual ~MyBrowserControl(Void);
virtual Void ResponseNotifyHandler(NotifyRef notify) {
if (!WEB_ERROR_SUCCEEDED(notify.u.nDone)) {
// if there is a HTTP error, show the warning dialog
WarningDialog(notify.u.nDone);
}
return;
}
};
Internal implementation of this function is as follows:
/*protected virtual */Void SFZWebBrowserControl::ResponseNotifyHandler(NotifyConstRef notify) { unused(notify); return; }// SFZWebBrowserControl::ResponseNotifyHandler //
SFZWebBrowserControl::Notify | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler
[ public ] SFCError SetAuthorizeData( SFXAnsiStringConstRef user // user name SFXAnsiStringConstRef passwd // password SFXAnsiStringConstRef url // base URL of HTTP basic authentication );
Specify a user name.
Specify a password.
Specify a base URL. Pages which start with this URL will be authenticated.
This function sets the information of HTTP basic authentication.
After calling this fuction, pages whose URL starts with specified url argument will be accessed with basic authentication header.
This function is valid if and only if the HTTP connection is in the STATE_OPEN.
To unset the basic authentication information, call this function with specifying empty strings.
Note | |
---|---|
If a return value is not SFERR_NO_ERROR, the basic authentication is not performed. |
Specify the width of indent in pixels.
[ public ] SFCError SetLinkColor( SFXRGBColorConstRef color // link color );
Specify the color of link text.
[ public ] SFCError SetMethod( SFXAnsiStringConstRef param // method (character string) );
This function sets he HTTP request method of the HTTP connection.
As the method argument, the methods supported by the BREW IWeb interface such as "GET", "POST", "HEAD" can be specified.
Default: "GET"
The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.
Note | |
---|---|
This function is valid if and only if this HTTP connection is in the STATE_OPEN state. |
SFZWebBrowserControl::GetMethod | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | SFXAnsiString | BREW API IWeb
Set the spacing between paragraphs in pixels.
[ public ] SFCError SetProxyServer( SFXSocketAddressConstRef param // proxy server );
This function sets the proxy server (SFXSocketAddress) of the HTTP connection to the specified value.
The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetProxyServer | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close SFXSocketAddress
[ public ] SFCError SetRequestContent( SFXFileConstRef file // file storage to set to the HTTP request body );
[ public ] SFCError SetRequestContent( SFXMemoryConstRef memory // memory storage to set to the HTTP request body );
[ public ] SFCError SetRequestContent( SFXStorageConstRef storage // storage to set to the HTTP request body SInt32 length // length of the storage );
[ public ] SFCError SetRequestContent( SFBSourceSmpConstRef source // source to set to the HTTP request body SInt32 length // length of the source );
This function sets the HTTP request body of the HTTP connection to the specified storage or source.
If only the file or memory storage is specified in the argument, its total storage length will be automatically set.
When the length argument is specified, data of the specified length from the current read / write pointer of the storage or source will be set to the HTTP request body of the HTTP connection.
Tip | |
---|---|
If a file storage(SFXFile) is set with the SFZWebBrowserControl::SetRequestContent function, data will be sent directly to the network from the file storage. As a result, big data can be sent. When data is sent with the SFZWebBrowserControl::GetStreamWriter function, the HTTP request body is made in the heap befre sent. As a result, the data size that can be sent will depends on the memory size equipped with the handset device. |
Writing the HTTP response body | |
---|---|
If the HTTP response body is set with the SFZWebBrowserControl::SetRequestContent function, the SFZWebBrowserControl::GetStreamWriter function cannot be used. On the contrary, if the HTTP response body is written by using the SFZWebBrowserControl::GetStreamWriter function, the SFZWebBrowserControl::SetRequestContent function cannot be used. |
The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
Note | |
---|---|
The SFZWebBrowserControl::SetRequestContent function is effective in SophiaFramework UNIVERSE 5.1.11 or above. |
SFZWebBrowserControl::GetRequestContent | SFZWebBrowserControl::GetStreamWriter | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | SFBSource | SFXStorage
This function sets the HTTP request flag of the HTTP connection to the specified value.
Note | |
---|---|
This HTTP request flag will be internally passed to the IWEB_GetResponse function. |
Concretely, the logical sum of the following flags are set as the flag argument.
The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetRequestFlag | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | BREW API IWEB_GetResponse
[ public ] SFCError SetRequestHeader( SFXAnsiStringConstRef key // header name SFXAnsiStringConstRef value // header value );
This function sets the HTTP request header to the specified (key, value) pair.
If this function is called several times with the same key, all the requests are stored together and then will be sent at a time.
The values set by the SFZWebBrowserControl::SetRequestHeader function will be destroyed when the SFZWebBrowserControl::Close function is called or the connection to the Web server is established.
The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetRequestHeader | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close
The scroll bar here is not of SophiaFramework UNIVERSE, 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 SetTimeoutCallback( SFXCallback::CallbackSPP spp // callback VoidPtr reference // data passed to callback );
This function sets the connection timeout callback, which will be called in case there is no response from the server when the connection timeout period elapses from the communication startup.
If no callback is set, by default, the SFXHTTPConnection::OnTimeoutDefault function will be registered as a connection timeout callback.
The SFXHTTPConnection::OnTimeoutDefault function cancels the communication by calling the SFXHTTPConnection::Cancel function as in the internal implementation code below.
/*private */XALLBACK_IMPLEMENT_SFXTIMER(SFXHTTPConnection, OnTimeoutDefault) { Cancel(); return; }// XALLBACK_IMPLEMENT_SFXTIMER(SFXHTTPConnection, OnTimeoutDefault)
Note | |
---|---|
The connection timeout period is set by using the SFZWebBrowserControl::SetTimeoutMillisecond function. |
SFZWebBrowserControl::SetTimeoutMillisecond | SFZWebBrowserControl::Cancel | SFXHTTPConnection::Cancel
This function sets the connection timeout period to the specified value. [in milliseconds]
Defualt: 0 (Timeout processing will not be performed.)
In case there is no response from the server when the connection timeout period elapses from the communication startup, the connection timeout callback registered by calling the SFZWebBrowserControl::SetTimeoutCallback function will be called.
Note | |
---|---|
If the connection timeout period is set to 0, timeout processing will not be performed. |
This function sets the SSL trust mode of the HTTP connection to the specified value (effective only if this HTTP connection is HTTPS).
The value set by this function is effective until the SFZWebBrowserControl::Close function is called.
The SSL_RESULT_SERV_VERS error might occur on the handset device when calling the connecting function immediately after this value is changed.
To avoid this error, call the SFZWebBrowserControl::Close function once, set the SSL trust mode, and then call the connecting function.
One of the following values are available for the SSL trust mode:
Note | |
---|---|
For more details, see BREW API ISSL_NegotiateV in the BREW API Reference |
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetTrustMode | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | BREW API ISSL_NegotiateV
[ public ] SFCError SetUserAgent( SFXAnsiStringConstRef param // user agent );
This function sets the user agent of the HTTP connection to the specified value.
The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.
Note | |
---|---|
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state. |
SFZWebBrowserControl::GetUserAgent | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | SFXAnsiString
This function sets the web class ID to open the HTTP/HTTPS connection.
Default value is AEECLSID_WEB.
[ public ] Void Stop(Void);
Nothing happens except under rendering. The content that has already been displayed takes no influence by calling the SFZWebBrowserControl::Stop function.
enum CodeEnum { CODE_TYPE = four_char_code('c', 'h', 't', 'm') }; SFMTYPEDEFTYPE(CodeEnum)
[ public ] SFMTYPEDEFSTRUCT(Extension) struct Extension { SFXAnsiString absoluteURL; }; SFMTYPEDEFSTRUCT(Notify) class Notify : public HViewNotify { public: Extension ex; Notify (HViewNotify const& hvNotify); Notify (NotifyConstRef notify); }; // HViewNotify: notification data // typedef struct { HVNotifyCode code; // notification code IHtmlViewer* phv; // identifies IHtmlViewer that sent the notification union { HViewJump jump; // HVN_JUMP HViewJump submit; // HVN_SUBMIT int nDone; // HVN_DONE HViewFocus focus; // HVN_FOCUS } u; } HViewNotify; #ifdef _WIN32 typedef unsigned HVNotifyCode; #else typedef int8 HVNotifyCode; #endif
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |