SophiaFramework UNIVERSE 5.3 |
#include <SFBHTMLViewer.h.hpp>
class SFBHTMLViewer : public SFBControl;
SFMTYPEDEFWRAPPER(SFBHTMLViewer)
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
SInt32 |
FindElem(
ACharConstPtr element
, SInt32 index
)
Find an element, given the element name and the number of the occurrence.
|
SInt32 |
FindElem(
SFXAnsiStringConstRef element
, SInt32 index
)
Find an element, given the element name and the number of the occurrence.
|
SInt32 |
GetAttrValue(
SInt32 pos
, ACharConstPtr attribute
, ACharPtr buf
, SInt32 bufSize
)
Obtain the value of an attribute of an element.
|
SInt32 |
GetAttrValue(
SInt32 pos
, SFXAnsiStringConstRef attribute
, ACharPtr buf
, SInt32 bufSize
)
Obtain the value of an attribute of an element.
|
SInt32 |
GetAttrValue(
SInt32 pos
, ACharConstPtr attribute
, SFXAnsiStringPtr string
)
Obtain the value of an attribute of an element.
|
SInt32 |
GetAttrValue(
SInt32 pos
, SFXAnsiStringConstRef attribute
, SFXAnsiStringPtr string
)
Obtain the value of an attribute of an element.
|
SInt32 |
GetElemText(
SInt32 pos
, ACharPtr buf
, SInt32 bufSize
)
Obtain the text content of an element.
|
SInt32 |
GetElemText(
SInt32 pos
, SFXAnsiStringPtr string
)
Obtain the text content of an element.
|
SFCError |
GetOption(
SInt32 id
, HVOpt* state
)
Retrieve one of a number of values that describe the state of the viewer.
Note that this does not retrieve the values that have been set through SFBHTMLViewer::SetOption().
|
SInt32 |
GetViewState(
ACharPtr buf
, SInt32 bufSize
)
Return a string that represents the current viewer state.
This string may be passed to SFBHTMLViewer::SetViewState() to restore the viewer state.
|
SInt32 |
GetViewState(
SFXAnsiStringPtr string
)
Return a string that represents the current viewer state.
This string may be passed to SFBHTMLViewer::SetViewState() to restore the viewer state.
|
SFXAnsiString |
GetViewState( Void )
Return a string that represents the current viewer state.
This string may be passed to SFBHTMLViewer::SetViewState() to restore the viewer state.
|
Bool |
IsBusy( Void )
Return true if the viewer is in the process of loading HTML from a SFBAStream or SFBSource.
|
Void |
LoadSource(
SFBSourceSmpConstRef source
)
Load the contents of a SFBSource into the document, parsing the data as HTML.
|
Void |
LoadStream(
SFBAStreamSmpConstRef stream
)
Load the contents of a SFBAStream into the document, parsing the data as HTML.
|
static SFBHTMLViewerSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new SFBHTMLViewer instance.
|
static SFBHTMLViewerSmp |
NewInstance(
AEECLSID id
, SFCErrorPtr exception = null
) Create a new SFBHTMLViewer instance.
|
Void |
ParseBuffer(
ACharConstPtr string
)
Load the viewer with the contents of a zero-terminated string.
|
Void |
ParseBuffer(
SFXAnsiStringConstRef string
)
Load the viewer with the contents of a zero-terminated string.
|
Void |
SetData(
ACharConstPtr buf
, SInt32 bufSize = -1
)
Provide a buffer of HTML to the viewer.
All of the buffer is parsed into the viewer synchronously.
|
Void |
SetData(
SFXAnsiStringConstRef string
)
Provide a buffer of HTML to the viewer.
All of the buffer is parsed into the viewer synchronously.
|
SFCError |
SetIWeb(
SFBWebSmpConstRef web
)
Set the SFBWeb interface with which the viewer will use to obtain sub-objects.
A shorthand function for SFBHTMLViewer::SetOption (HVOPT_PTR_IWEB).
|
SFCError |
SetIndent(
SInt32 indent
)
Set the basic indent amount.
A shorthand function for SFBHTMLViewer::SetOption (HVOPT_N_INDENT).
|
Void |
SetLinkColor(
RGBVAL color
)
Set the default text color.
A Shorthand function for SFBHTMLViewer::SetOption (HVOPT_RGB_LINK).
|
Void |
SetLinkColor(
SFXRGBColorConstRef color
)
Set the default text color.
A Shorthand function for SFBHTMLViewer::SetOption (HVOPT_RGB_LINK).
|
Void |
SetNotifyFn(
PFNHVIEWNOTIFY notify
, VoidPtr data = null
)
Specify the information in a notification callback,
which consists of a function pointer and a void context pointer to be passed to the function when it is called.
|
SFCError |
SetOption(
SInt32 id
, HVOpt state
)
Set one of a number of options that control the behavior of the viewer.
Callers typically do not call this function directly;
there are macros defined for each individual option.
|
SFCError |
SetSBWidth(
SInt32 width
)
Set the width of the vertical scroll bar.
A shorthand function for SFBHTMLViewer::SetOption (HVOPT_N_SBWIDTH).
|
SFCError |
SetTextColor(
RGBVAL color
)
Set the default text color.
A shorthand function for SFBHTMLViewer::SetOption ( HVOPT_RGB_TEXT ).
|
SFCError |
SetTextColor(
SFXRGBColorConstRef color
)
Set the default text color.
A shorthand function for SFBHTMLViewer::SetOption ( HVOPT_RGB_TEXT ).
|
SFCError |
SetType(
ACharConstPtr type
)
Set the MIME type and/or character set for the viewer.
A shorthand function for SFBHTMLViewer::SetOption (HVOPT_SZ_TYPE).
|
SFCError |
SetType(
SFXAnsiStringConstRef type
)
Set the MIME type and/or character set for the viewer.
A shorthand function for SFBHTMLViewer::SetOption (HVOPT_SZ_TYPE).
|
SFCError |
SetURL(
ACharConstPtr url
)
Specify the URL address of the document that is to be loaded into the viewer.
This should be called before HTML is loaded into a document.
|
SFCError |
SetURL(
SFXAnsiStringConstRef url
)
Specify the URL address of the document that is to be loaded into the viewer.
This should be called before HTML is loaded into a document.
|
SFCError |
SetVSpace(
SInt32 vSpace
)
Set the vertical paragraph spacing.
A shorthand function for SFBHTMLViewer::SetOption (HVOPT_N_VSPACE).
|
Void |
SetViewState(
ACharConstPtr state
)
Restore the HTML viewer state (such as scroll position)
to a state represented by a string returned by SFBHTMLViewer::GetViewState().
|
Void |
SetViewState(
SFXAnsiStringConstRef state
)
Restore the HTML viewer state (such as scroll position)
to a state represented by a string returned by SFBHTMLViewer::GetViewState().
|
Void |
Stop( Void )
Cause the viewer to stop loading HTML from a SFBAStream or SFBSource, if the viewer is busy.
If this stops loading of the document, an HVN_DONE notification is triggered.
|
UInt32 |
GetProperties( Void )
(inherits from SFBControl)
Return the control-specific properties or flags.
|
Void |
GetRect(
SFXRectanglePtr rect
)
(inherits from SFBControl)
Get the rectangle of the control.
|
SFXRectangle |
GetRect( Void )
(inherits from SFBControl)
Get the rectangle of the control.
|
Bool |
HandleEvent(
AEEEvent event
, UInt16 wParam
, UInt32 dwParam
)
(inherits from SFBControl)
Pass events to a control. The BREW controls process
various events to allow a device user to enter a text, time, or date
value or choose an item from a menu. Refer to the descriptions of
each control for the events it handles. Your applet must pass a
control all of the events, unless the control is part of a dialog.
Below is an example of an application passing all of the events to
the controls of the application.
|
Bool |
HandleEvent(
SFXEventConstRef event
)
(inherits from SFBControl)
Pass events to a control. The BREW controls process
various events to allow a device user to enter a text, time, or date
value or choose an item from a menu. Refer to the descriptions of
each control for the events it handles. Your applet must pass a
control all of the events, unless the control is part of a dialog.
Below is an example of an application passing all of the events to
the controls of the application.
|
Bool |
IsActive( Void )
(inherits from SFBControl)
Return the active or focus state of the control.
|
Bool |
Redraw( Void )
(inherits from SFBControl)
Instruct the control to redraw its contents.
|
Void |
Reset( Void )
(inherits from SFBControl)
Instruct the control to reset (free/delete) its contents and to immediately leave active/focus mode.
|
Void |
SetActive(
Bool active = true
)
(inherits from SFBControl)
Instruct the control to enter/leave focus or selected mode.
|
Void |
SetProperties(
UInt32 properties
)
(inherits from SFBControl)
Set control-specific properties or flags.
|
Void |
SetRect(
SFXRectangleConstRef rect
)
(inherits from SFBControl)
Set the active screen coordinates of the control.
This may result in the control redrawing its contents.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] SInt32 FindElem( ACharConstPtr element // name of the element to find, // which is a zero-terminated ASCII string (case insensitive) SInt32 index // which occurrence (0 => first element, 1=> second element, and so on) );
[ public ] SInt32 FindElem( SFXAnsiStringConstRef element // name of the element to find, // which is a zero-terminated ASCII string (case insensitive) SInt32 index // which occurrence (0 => first element, 1=> second element, and so on) );
[ public ] SInt32 GetAttrValue( SInt32 pos // location of the element in the document ACharConstPtr attribute // name of attribute ACharPtr buf // pointer to the start of a buffer to hold the result SInt32 bufSize // size of the buffer, in bytes );
[ public ] SInt32 GetAttrValue( SInt32 pos // location of the element in the document SFXAnsiStringConstRef attribute // name of attribute ACharPtr buf // pointer to the start of a buffer to hold the result SInt32 bufSize // size of the buffer, in bytes );
[ public ] SInt32 GetAttrValue( SInt32 pos // location of the element in the document ACharConstPtr attribute // name of attribute SFXAnsiStringPtr string // string to hold the result );
[ public ] SInt32 GetAttrValue( SInt32 pos // location of the element in the document SFXAnsiStringConstRef attribute // name of attribute SFXAnsiStringPtr string // string to hold the result );
[ public ] SInt32 GetElemText( SInt32 pos // the location of the element in the document. // this can be obtained from SFBHTMLViewer::FindElem() ACharPtr buf // pointer to the start of a buffer to hold the result (which is a zero-terminated string) SInt32 bufSize // size of the buffer, in bytes );
[ public ] SInt32 GetElemText( SInt32 pos // the location of the element in the document. // this can be obtained from SFBHTMLViewer::FindElem() SFXAnsiStringPtr string // pointer to the start of a buffer to hold the result (which is a zero-terminated string) );
[ public ] SFCError GetOption( SInt32 id // id of the value being retrieved HVOpt* state // address of variable or memory location to hold the result );
[ public ] SInt32 GetViewState( ACharPtr buf // pointer to start of a buffer to hold the result (which will be a zero-terminated string) SInt32 bufSize // size of the buffer, in bytes );
[ public ] SInt32 GetViewState( SFXAnsiStringPtr string // pointer to start of a buffer to hold the result (which will be a zero-terminated string) );
[ public ] SFXAnsiString GetViewState(Void);
[ public ] Bool IsBusy(Void);
[ public ] Void LoadSource( SFBSourceSmpConstRef source // SFBSource interface );
[ public ] Void LoadStream( SFBAStreamSmpConstRef stream // SFBAStream interface );
[ public, static ] SFBHTMLViewerSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFBHTMLViewerSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] Void ParseBuffer( ACharConstPtr string // pointer to the zero-terminated string containing HTML );
[ public ] Void ParseBuffer( SFXAnsiStringConstRef string // pointer to the zero-terminated string containing HTML );
[ public ] Void SetData( ACharConstPtr buf // pointer to the start of buffer (not necessarily zero-terminated) SInt32 bufSize = -1 // pointer to the start of buffer (not necessarily zero-terminated) // size of buffer, or -1. -1 indicates that psz points to a zero-terminated string // and all of that string is to be loaded into the viewer );
[ public ] Void SetData( SFXAnsiStringConstRef string // pointer to the buffer );
[ public ] SFCError SetIWeb( SFBWebSmpConstRef web // SFBWeb interface );
[ public ] Void SetLinkColor( RGBVAL color // color for links );
[ public ] Void SetLinkColor( SFXRGBColorConstRef color // color for links );
[ public ] Void SetNotifyFn( PFNHVIEWNOTIFY notify // pointer to the function to be called with notifications, // or null if notifications are to be canceled VoidPtr data = null // 32-bit value to be passed to pfnNotify when/if it is called );
[ public ] SFCError SetOption( SInt32 id // id of the option being set HVOpt state // value to assign to the option );
BREW API IHTMLVIEWER_SetOption | SFBHTMLViewer::SetType | SFBHTMLViewer::SetURL | SFBHTMLViewer::SetIndent | SFBHTMLViewer::SetVSpace | SFBHTMLViewer::SetSBWidth | SFBHTMLViewer::SetTextColor | SFBHTMLViewer::SetLinkColor | SFBHTMLViewer::GetOption
[ public ] SFCError SetTextColor( RGBVAL color // color for text );
[ public ] SFCError SetTextColor( SFXRGBColorConstRef color // color for text );
[ public ] SFCError SetType( ACharConstPtr type // pointer to the MIME type string with the following format: // "text/html; charset=iso-8859-1" or "charset=iso-8859-1" // note: The MIME type string follows the semantics // of the Content-type field described in RFC2046 );
[ public ] SFCError SetType( SFXAnsiStringConstRef type // pointer to the MIME type string with the following format: // "text/html; charset=iso-8859-1" or "charset=iso-8859-1" // note: The MIME type string follows the semantics // of the Content-type field described in RFC2046 );
[ public ] SFCError SetURL( ACharConstPtr url // base URL string );
[ public ] SFCError SetURL( SFXAnsiStringConstRef url // base URL string );
[ public ] Void SetViewState( ACharConstPtr state // string returned by SFBHTMLViewer::GetViewState() // which represents a previous view state );
[ public ] Void SetViewState( SFXAnsiStringConstRef state // string returned by SFBHTMLViewer::GetViewState() // which represents a previous view state );
[ public ] Void Stop(Void);
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |