`Beri et al.
`
`US006141018A
`[11] Patent Number:
`[45] Date of Patent:
`
`6,141,018
`Oct. 31, 2000
`
`[54] METHOD AND SYSTEM FOR DISPLAYING
`HYPERTEXT DOCUMENTS WITH VISUAL
`EFFECTS
`
`[75] Inventors: Sanjay Beri, Ottawa, Canada;
`Benjamin W. Slivka, Clyde Hill, Wash.
`
`[73] Assignee: Microsoft Corporation, Redmond,
`Wash.
`
`[21] Appl. No.: 08/815,818
`[22]
`Filed:
`Mar. 12, 1997
`
`[51] Int. Cl.7 .................................................... .. G06F 17/21
`[52] US. Cl. ........................................... .. 345/473; 707/513
`[58] Field of Search ................................... .. 707/526, 513;
`463/31; 705/40; 345/333, 473
`
`[56]
`
`References Cited
`
`U.S. PATENT DOCUMENTS
`
`9/1994 Agulnick et a1. ..................... .. 345/156
`5,347,295
`5,572,643 11/1996 Judson ........... ..
`709/218
`5,572,651 11/1996 Weber et a1. .
`345/326
`5,905,492
`5/1999 Straub et a1. .
`.. 345/333
`5,983,208 11/1999 Haller et a1. ........................
`705/40
`
`OTHER PUBLICATIONS
`Author, Marquee, http;//WWW.microsoft.com/Workshop/au
`thor/neWhtml/htmlr020.htm, Apr. 28, 1997, pp. 24,25.
`Jim O’Donnell, Eric Ladd and Mark BroWn, Using
`Microsoft Internet Explorer 3, Que Corporation, 1996,
`Indianapolis, Indiana, Chapters 2, 3, 20 and 25.
`Gavron, Jacquelyn and Joseph MOran. “HoW to Use
`MIcrosoft (TM) WindoWs(TM) NT4.” (Emeryville: Ziff
`David Press, 1996) xiv, 14, 15, 130—131, 138—142, Jan. 1,
`1996.
`Lamay, Laura and Michael G. Moncur. “Laura Lemay’s
`Web Workshor: Javascript(TM).” (Indianapolis: Sams.net,
`1996) 222, 163—168, Jan. 1, 1996.
`Richard, Kevin. “PC Magazine.” Apr. 9, 1996, 1—5.
`Foley, James D. and others “Computer Graphics: Principles
`and Practice.” 2d. (Reading: Addison—Wesley, 1990) pp.
`1057—1080, Jan. 1, 1990.
`“Interactive Home.” (Jan. 1, 1996) pp. 1—4.
`
`Simsom, Gar?nkel, L. “The Christian Science Monitor.”
`(Mar. 28, 1996) pp. 1—8.
`Gibbs, Mark. “Network World.” (Feb. 19, 1996) pp. 1—12.
`PoWell, James E. “Windows Magazine.” (Nov. 1, 1996) pp.
`1—4.
`“The Seybold Report on Internet Publishing.” (Oct. 1, 1996)
`pp. 1—9.
`Marquee Active OC; Apr. 18, 1996.
`HTML reference; Apr. 28, 1997; WW.microsoft.com/Work
`shop/author/neWhtml/htmlr020.htm.
`Special Edition Using Microsoft Internet Explorer 3 Written
`by Jim O’Donnell, Eric Ladd, and Mark BroWn; Copyright
`1996; WWW.mcp.com/que.
`HTML Reference; May, 1997; WWW.microsoft.com/author/
`neWhtml/htmlrefhtm.
`
`Primary Examiner—James P. Trammell
`Assistant Examiner—John Leonard Young
`Attorney, Agent, or Firm—Banner & Witcoff, Ltd.
`
`[57]
`
`ABSTRACT
`
`A computer system for displaying an image of a hypertext
`document in an animated marquee. The computer system
`includes a hypertext document vieWer that receives an
`identi?cation of a hypertext document and generates an
`image of the hypertext document: The computer system also
`includes a marquee object that receives an identi?cation of
`an hypertext document, that invokes the hypertext document
`vieWer to generate an image of the hypertext document, and
`that displays the image of the generated hypertext document.
`The computer system also includes a broWser that receives
`an identi?cation of an hypertext document that contains an
`indication of the marquee object along With a reference to
`another hypertext document and that invokes the hypertext
`document vieWer sending the identi?cation of the hypertext
`document. When the hypertext document vieWer receives
`the identi?cation of the hypertext document that contains the
`indication of the marquee object, the hypertext document
`vieWer sends the reference to the other hypertext document
`to the marquee object. The marquee object generates an
`image of the other hypertext document and displays the
`generated image of the other hypertext document in an
`animated manner.
`
`56 Claims, 9 Drawing Sheets
`
`BROWSER O MSHTML.DLL
`
`503
`i
`
`502
`(
`
`MARQUEE A MSHTMLDLL
`CONTROL
`
`V OTHER
`CONTROL
`
`DOC.HTML
`
`Jr 505
`MARQUEEHTML
`
`Apple 1106 - Page 1
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 1 of9
`
`6,141,018
`
`02 x
`
`0-.
`
`no;
`
`wNoF
`
`
`
`mew mow/v
`
`fwov
`
`moi
`2. .QE
`
`wmov
`
`moi
`2‘ 8%
`
`3 .9E we
`
`Apple 1106 - Page 2
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 2 of9
`
`6,141,018
`
`8v ANQN
`
`Now
`
`nN .QE
`
`mm .OE
`
`
`
`?ow AEN
`
`Anon
`
`
`
`
`
`#ONN MON/v NONM
`
`
`
`
`
`wwom mmow wNoN
`
`mm .QE
`
`UN .QE
`
`Apple 1106 - Page 3
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 3 of9
`
`6,141,018
`
`PomL
`
`FomR
`
`Pmom
`
`Mmom
`
`om .0_n_
`
`mom
`
`.6 .QE
`
`mm .OE
`
`Um .OE
`
`Apple 1106 - Page 4
`
`
`
`U.S. Patent
`
`Oct. 31, 2000
`
`Sheet 4 0f 9
`
`6,141,018
`
`MEMORY
`
`F401
`
`01a
`
`WEB
`BROWSER
`01a
`
`r402
`MEMORY
`02a
`DOCUMENTSi
`02a
`WEB
`BROWSER
`
`CPU 2%
`
`IIO
`
`02b
`CPU
`
`01d
`DISPLAY
`
`FIG. 4
`
`( 501
`
`{- 502
`502
`503
`f
`Y
`A
`MSHTML.DLL\_/ MARQUEE A MSHTMLDLL
`A
`BRQWSER V
`CONTROL
`
`OTHER
`CONTROL
`
`DOC.HTML _
`
`r 505
`MARQUEEHTML
`
`FIG. 5
`
`Apple 1106 - Page 5
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 5 of9
`
`6,141,018
`
`601
`
`602
`
`603
`
`{601 a
`
`(6028
`
`CALCULATE
`X BOUNCE
`
`CALCULATE
`Y BOUNCE
`
`(603a
`
`CALCULATE
`X CIRCULAR
`
`604
`
`Y
`
`(6043
`
`CALCULATE
`Y CIRCULAR
`
`N
`
`N
`
`N
`
`N
`
`DISPLAY MARQUEE f 605
`
`RETURN
`
`11
`
`FIG- 6
`
`Apple 1106 - Page 6
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 6 of9
`
`6,141,018
`
`LEADING EDGE
`INTERSECTS
`
`703
`
`RAILING EDG
`INTERSECTS
`
`IMAGE WIDTH
`GREATER THAN
`WINDOW WIDTH
`
`II
`
`FIRE BOUNCE EVENT
`
`II
`
`REVERSE DIRECTION
`
`II
`
`ADJUST HORIZONTAL
`POSITION BY SCROLL
`PIXELS X
`
`1 706
`
`RETURN
`
`FIG. 7
`
`Apple 1106 - Page 7
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 7 of9
`
`6,141,018
`
`CALCULATE
`X CIRCULAR
`
`801
`
`N
`
`RAILING EDG
`INTERSECTS
`TRAILING
`BORDE '
`
`LEFT
`
`RIGHT
`
`l
`
`I
`
`SET HORIZONTAL POSITION
`: LEFT BORDER
`
`I804
`
`SET HORIZONTAL POSITION
`= RIGHT BORDER-IMAGE
`WIDTH
`
`L :
`
`Y 805
`ADJUST HORIZONTAL
`POSITION BY SCROLL
`PIXELS X
`
`II
`
`RETURN
`
`FIG. 8
`
`Apple 1106 - Page 8
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 8 of9
`
`6,141,018
`
`Y 901
`
`DRAW IMAGE AT
`HORIZONTAL AND VERTICAL
`POSITION
`
`Y 903
`
`REPLICATE IMAGES
`HORIZONTALLY
`
`y 905
`
`REPLICATE IMAGES
`VERTICALLY
`
`Apple 1106 - Page 9
`
`
`
`U.S. Patent
`
`0a. 31, 2000
`
`Sheet 9 of9
`
`6,141,018
`
`REPLICATE
`'MAGES
`HORIZONTALLY
`
`wmoow FILLED
`HORIZONTALLY
`
`ADJUST FOR
`WHITE SPACE
`
`1003
`
`V
`SELECT NEXT URL
`
`1004
`/
`
`1
`DISPLAY URL IN
`wmoow
`
`INSERT URL
`
`1101
`,/
`V
`MOVE URL'S INDEX >
`IURI- t<>ln$ert»‘*d’ter
`
`1102
`V /
`INSERT URL AT
`iURL tolnsertAfter + 1
`
`1103
`
`"
`
`LAST + +
`
`‘I
`
`RETURN
`
`iURL >
`ilastURL OR
`iURL < 1
`
`iCurrentURL = iURL
`
`FIG. 12
`
`Apple 1106 - Page 10
`
`
`
`1
`METHOD AND SYSTEM FOR DISPLAYING
`HYPERTEXT DOCUMENTS WITH VISUAL
`EFFECTS
`
`6,141,018
`
`TECHNICAL FIELD
`The present invention relates generally to the ?eld of
`displaying hypertext documents, and in particular, to ani
`mating the display of hypertext documents.
`BACKGROUND OF THE INVENTION
`The Internet comprises a vast number of computers
`interconnected so that information can be exchanged among
`the computers. Various protocol and other interface stan
`dards have been developed for the Internet so that each
`computer Will understand information of the other comput
`ers. The World-Wide Web (“WWW”) is a subset of the
`Internet computers that support the Hypertext Transfer Pro
`tocol (“HTTP”). HTTP is an application-level protocol for
`distributed, collaborative, hypertext information systems
`that de?nes the format and contents of messages and
`responses sent betWeen client programs (“clients”) and
`server programs (“servers”) over the Internet. In addition,
`HTTP is a generic, stateless, object-oriented protocol Which
`can be used for many other tasks, such as name servers and
`distributed object management systems, through various
`extensions.
`The Internet facilitates information exchange betWeen
`servers and clients that are located throughout the World.
`Each computer on the Internet has a unique address (e.g.,
`“acme.com”). When a client Wishes to access a resource
`(e.g., document), the client speci?es a Uniform Resource
`Locator (“URL”) that uniquely identi?es the computer on
`Which the server executes and the resource. An example of
`a URL is “http://acme.com/page1.” In this example, the
`server is identi?ed by “acme.com” and the resource is
`identi?ed by “page1.” The URL has tWo parts: a scheme and
`a scheme-speci?c part. The scheme identi?es the high-level
`protocol through Which the information is to be exchanged,
`and the scheme-speci?c part contains additional information
`that identi?es the server computer and the resource. The
`“http” at the beginning of the example URL identi?es the
`scheme and indicates that the remainder of the URL should
`be interpreted according to HTTP. The remainder speci?es a
`server computer (e.g., “acme.com”) folloWed by additional
`information that is speci?c to the server. For example, the
`additional information may be a path name Within the server
`computer to a Hypertext Markup Language (“HTML”)
`document.
`HTML is a page description language that is used to
`specify the format and layout of Web pages. When a Web
`broWser receives a URL that identi?es a Web page, it
`retrieves via the WWW an HTML document that describes
`that Web page. The broWser then processes that HTML
`document and displays the Web page that is described by the
`document. HTML and various extensions to HTML provide
`a rich set of tags that de?ne the formatting and content of the
`page to be displayed. The tags can be as simple as indicating
`that text is to be displayed in italics or as complex as
`indicating that a computer program is to be executed to
`provide the content of a portion of the Web page. The Web
`pages are usually de?ned to include graphical components.
`For example, an HTML document may contain a URL that
`identi?es a bitmap that is to be displayed as part of the Web
`page. When a Web broWser encounters such a URL Within
`an HTML document, the broWser uses the URL to locate and
`retrieve the bitmap and then display the bitmap as part of the
`Web page.
`
`10
`
`15
`
`25
`
`35
`
`45
`
`55
`
`65
`
`2
`Microsoft Corporation has de?ned various extension to
`HTML. One such extension is knoWn as a <marquee> tag.
`The <marquee> tag indicates that certain text is to be
`scrolled Within a marquee WindoW on a Web page. The
`attributes of the <marquee> tag specify the siZe of the
`marquee WindoW and the direction and speed of scrolling.
`The <marquee> tag thus provides a visual effect that is
`similar to the electronic marquees found on some buildings
`that display the headline neWs.
`Another extension to HTML is knoWn as an <object> tag.
`An <object> tag speci?es computer code that is to be
`executed to generate content for the Web page. The <object>
`tag includes parameters that are to be provided to the
`computer code to control its execution. The computer code
`is an ActiveX object (i.e., ActiveX control) that supports an
`interface standard that is described in Understanding
`ActiveX and OLE, by David Chappell and published by
`Microsoft Press in 1996, Which is hereby incorporated by
`reference. The <object> tag includes information that iden
`ti?es the object and the siZe of the object WindoW in Which
`the object can display the content that it generates. The
`ActiveX standard de?nes a mechanism through Which an
`object can notify the broWser of certain events. For example,
`if a user clicks on the object WindoW, the object could notify
`the broWser that a click Was received. The broWser could
`then take some action. The HTML document may even
`include instructions in a scripting language, such as Visual
`Basic (VB) Scripting, that are to be executed When an object
`generates an event. When the broWser is noti?ed of an event,
`it then executes the script for that event. The ActiveX
`standard also de?nes a mechanism by Which the broWser can
`set attributes of the object. The object exposes its function
`ality via OLE automation.
`The <marquee> tag provides a useful, but limited
`mechanism, for scrolling text on a Web page. It Would be
`desirable to have a mechanism that provides sophisticated
`animation of arbitrary information on a Web page.
`
`SUMMARY OF THE INVENTION
`The present invention provides a method and system for
`displaying an arbitrary image in an animated marquee. The
`image can be displayed With various visual effects. For
`example, the image can be displayed to bounce off each
`border of the marquee WindoW in Which it is displayed. The
`image can also be displayed so that replications of the image
`continually scroll across the marquee WindoW. In one
`embodiment, the animated marquee is controlled by an
`ActiveX object (i.e., marquee object) that is speci?ed by an
`<object> tag an HTML document. The <object> tag identi
`?es the image and speci?es various parameters to control the
`animation. The marquee object exposes various methods for
`setting the parameters and issues events to notify a Web
`broWser of various conditions.
`
`BRIEF DESCRIPTION OF THE DRAWINGS
`FIGS. 1A—1F illustrate an animated marquee With the
`bounce visual effect.
`FIGS. 2A—2F illustrate an animated marquee With the
`circular visual effect.
`FIGS. 3A—3F illustrate an animated marquee With the
`bounce visual effect When the image is larger in the direction
`of scroll than the marquee WindoW.
`FIG. 4 is a block diagram illustrating a computer system
`for practicing the present invention.
`FIG. 5 is a block diagram illustrating the interrelation
`betWeen various components for generating the animated
`marquee.
`
`Apple 1106 - Page 11
`
`
`
`6,141,018
`
`3
`FIG. 6 is a How diagram of an implantation of a routine
`to handle a timer event.
`FIG. 7 is a How diagram of an implementation of a routine
`to calculate the neXt X position When the scroll style is
`bounce.
`FIG. 8 is a How diagram of an implementation of a routine
`to calculate the X position When the scroll style is circular.
`FIG. 9 is a How diagram of an implementation of a routine
`to display the image Within the marquee WindoW.
`FIG. 10 is a How diagram of an implementation of a
`routine to replicate the images horiZontally.
`FIG. 11 is a How diagram of an implementation of a
`routine to insert a URL into the list of URLs.
`FIG. 12 is a How diagram of an implementation of a
`routine to change the current URL.
`
`DETAILED DESCRIPTION OF THE
`INVENTION
`The present invention provides a method and system for
`providing an animated marquee for display of an arbitrary
`image as part of a Web page. In one embodiment, the
`hypertext document that de?nes the Web page identi?es the
`image to be displayed in a marquee WindoW, identi?es the
`siZe of the marquee WindoW, and identi?es the type of
`animation to be applied When the image is displayed. The
`image to be displayed in the marquee WindoW is identi?ed
`by a URL. The image can be animated by scrolling either in
`the vertical or horiZontal direction. The scroll style can be set
`to either a circular or a bounce visual effect. When the scroll
`style is circular one copy of the image is folloWed by another
`copy of the image in a continuous manner. When the scroll
`style is bounce and the leading edge of the image is scrolled
`so that it intersects a border of the marquee WindoW, the
`direction of the scroll is reversed so that the image appears
`to bounce off that border of the marquee WindoW. When
`scrolled in the reverse direction, the direction of the scrolling
`is again reversed When the leading edge of the image
`intersects the other border of the marquee WindoW. The
`leading edge of the image is the edge that is ?rst in the
`direction of scrolling. That is, When the image is being
`scrolled to the left, the leftmost edge of the image is the
`leading edge. The image can be of arbitrary complexity.
`Indeed, the image itself can be a hyperteXt document.
`Various parameters such as the scroll style, scroll direction,
`the number of times the image is to be bounced or scrolled,
`and the speed of the scrolling, can be set for the animated
`marquee. In addition, the parameters can be set to indicate
`Whether the URL is to be draWn immediately or
`progressively, to indicate the amount of Wide spaces
`betWeen successive copies of the image, and to indicate a
`Zoom parameter. The animated marquee can also display a
`sequence of images rather than just one image. Each image
`is identi?ed by a URL. When the scroll style is circular, each
`image is scrolled to folloW another image in a continuous
`manner. When the scroll style is bounce, the user can click
`on the marquee WindoW to select the neXt image. The neXt
`image is then displayed in the marquee WindoW to replace
`the previous image.
`FIGS. 1A—1F illustrate an animated marquee With the
`bounce visual effect. The marquee WidoW 101, Which Would
`typically be a portion of a Web page, contains borders 102
`and 103 that are perpendicular to the direction of scrolling.
`The image 104 contains edges 105 and 106. FIG. 1B shoWs
`image 104 as it is scrolling horiZontally to the left. When the
`image 104 is scrolled horiZontally to the left, the edge 105
`is referred to as the leading edge and edge 106 is referred to
`
`4
`as the trailing edge. Also, When the image is being scrolled
`horiZontally to the left, the border 102 is referred to as the
`leading border and the border 103 is referred to as the
`trailing border. As shoWn in FIG. 1C, image 104 is smaller
`than the WindoW 101 in the horiZontal direction. As shoWn
`in FIG. 1D, the leading edge of the image has intersected the
`leading border of the marquee WindoW. When the intersec
`tion occurs, the direction of scrolling is reversed as shoWn
`in FIG. 1E. That is, image 104 is then scrolled horiZontally
`from the left to the right. Since the direction of scrolling has
`been reversed, edge 106 is noW referred to as the leading
`edge and edge 105 is noW referred to as the trailing edge. As
`shoWn in FIG. IF, the leading edge 106 intersects the leading
`border 103, the direction of scroll is again reversed so the
`image is then scrolled to the left. This reversal of scrolling
`direction When the leading edge of the image intersects a
`border gives the visual effect of the image bouncing off the
`borders of the marquee WindoW. When a user clicks on the
`marquee WindoW, assuming multiple images have been
`identi?ed, the neXt image is displayed in the marquee
`WindoW.
`FIGS. 2A—2F illustrate an animated marquee With a
`circular visual effect. As shoWn in FIG. 2B, a copy 202 of
`the image is being scrolled from the right to the left. As
`shoWn in FIG. 2C, as the copy 202 of the image becomes
`fully visible Within the marquee WindoW 201, another copy
`203 of the image is scrolled from the right to the left. As
`shoWn in FIG. 2D, When copies 202 and 203 are further
`scrolled to the left, a portion of copy 204 of the image
`becomes visible. The scrolling continues to the left as shoWn
`in FIG. 2E. Eventually, copy 202 scrolls past the left border
`of the marquee WindoW and a portion of copy 205 of the
`image becomes visible to the right. In an embodiment With
`multiple images, one image is folloWed by the neXt image
`and so on. When the last image is scrolled, it is folloWed by
`another copy of the ?rst image.
`FIGS. 3A—3F illustrate an animated marquee With the
`bounce visual effect When the image is larger in the direction
`of scroll than the marquee WindoW. The image 302 is larger
`horiZontally than the marquee WindoW 301. Consequently,
`the entire image cannot be visible simultaneously Within the
`marquee WindoW. Thus, if the direction is reversed When the
`leading edge intersects the trailing edge, the entire image
`Would never be displayed. Thus, When the image is larger
`than the marquee WindoW in the direction of scroll, the
`reversal of direction occurs When the trailing edge intersects
`the trailing border. In this Way, the entire image is displayed
`before the image bounces. Alternatively, the reversal of
`direction could occur When the trailing edge of the image
`intersects the leading border of the marquee WindoW to give
`a slightly different bounce visual effect. FIG. 3B illustrates
`the start of scrolling of the image 302. In this eXample, the
`image contains the numbers 1, 2, 3, and 4 to illustrate Which
`portion of the image is currently visible. As shoWn in FIG.
`3C, the leading edge 303 of the image intersects the leading
`border 304 of the marquee WindoW. HoWever, the direction
`of scroll is not reversed at this point because the entire image
`has not been yet displayed. FIG. 3D illustrates continued
`scrolling in the left direction. FIG. 3E illustrates that the
`trailing edge 305 of the image intersects the trailing border
`306 of the marquee WindoW. At this point, the entire image
`has been displayed and the direction of scroll is reversed to
`provide the visual effect of a bounce. FIG. 3F illustrates the
`scrolling of the image in the reverse direction.
`FIG. 4 is a block diagram illustrating a computer system
`for practicing the present invention. The computer system
`401 contains a memory 401A, a central processing unit
`
`10
`
`15
`
`25
`
`35
`
`45
`
`55
`
`65
`
`Apple 1106 - Page 12
`
`
`
`6,141,018
`
`15
`
`5
`401B, and an I/O interface 401C. The memory contains a
`Web browser 401E which receives and displays hypertext
`documents on display 401D. The computer system 401 is
`connected to one or more computer systems 402. Computer
`system 402 contains a memory 402A, a central processing
`unit 402B, and an I/O interface 402C. The memory 402A
`contains a Web server 402E and various hypertext docu
`ments 402E. When the Web browser requests a document
`through connection 403, the Web server provides that docu
`ment to the Web browser. The Web browser then displays a
`Web page as de?ned by the hypertext document. The Web
`browser 401E supports the animated marquee of the present
`invention.
`In one embodiment of the present invention, the animated
`marquee is implemented as an ActiveX object (i.e., a mar
`quee object) that is identi?ed by an <object> tag in an
`HTML document. The marquee object has various attributes
`whose values can be speci?ed by the parameters of the
`<object> tag. FIG. 5 is a block diagram illustrating the
`interrelation between various components for generating the
`animated marquee via a marquee object. The Web browser
`501 invokes the HTML viewer 502 to display an HTML
`document 504. The HTML viewer is implemented as a
`dynamic link library that is loaded by the Web browser.
`When the HTML document 504 contains an <object> tag
`that identi?es the marquee object class, the HTML viewer
`instantiates the marquee object 503. The HTML viewer then
`sets the attributes of the marquee object as identi?ed by the
`parameters in the object tag using OLE Automation to
`invoke methods of the marquee object. The attributes
`include the URL of the image to be displayed in the marquee
`window. When the URL identi?es another HTML
`document, the marquee object then invokes the HTML
`viewer (as indicated by the second copy of the HTML
`viewer 502) to generate the image. The marquee object then
`applies the animation to the image and displays the animated
`image in the marquee window. The following table lists the
`attributes that can be set along with a description of the
`attributes.
`
`ATI‘RIBUTE
`
`DESCRPTION
`
`6
`around. For the ScrollStyleY parameter, “circular” indicates
`that the image will keep scrolling from either the top or
`bottom (depending on the sign of the ScrollPixelsY
`parameter), as if it were wrapping around. For both
`parameters, “bounce” indicates that the image will hit a
`border of the marquee window and change directions.
`However, there are two different interpretations of bounce
`depending on the image size. If the image is smaller than the
`marquee window, the leading edge of the image will inter
`sect the leading border of the marquee window and the
`image will change directions. If the image is bigger than the
`marquee window, however, the direction is changed when
`the trailing edge of the image comes into view.
`The ScrollDelay parameter indicates the time in millisec
`onds between each movement of the image in the marquee
`window. Once the image has stopped scrolling, this is the
`time between image refreshes. If the image is not ?nished
`loading or formatting, the image will still be refreshed every
`ScrollDelay. Also, if the hypertext document has a META
`tag with an expiry date, then the marquee object will change
`the image according to the META tag arguments.
`The LoopsX and LoopsY parameters indicate the number
`of times the image scrolls or bounces depending on the scroll
`style. If the LoopsX or LoopsY parameter is set to zero, then
`the image will “slide.” That is, the image will scroll in a
`certain direction and stop as soon as the leading edge of the
`image intersects the leading border of the marquee window.
`If the LoopsX or LoopsY parameters are greater than zero,
`then after that number of loops, the part of the image that is
`displayed depends on the scroll style. If the ScrollStyleX
`parameter is “circular,” the very left of the image is aligned
`with the left of the marquee window. If the ScrollStyleX
`parameter is “bounce,” then the image is positioned where
`the last bounce occurs. A similar effect occurs when looping
`in the vertical direction. If the LoopsX or LoopsY param
`eters are —1, the image scrolls forever.
`The ScrollPixelsX and ScrollPixelsY parameters indicate
`the number of pixels that the image is moved every Scroll
`Delay. Apositive number indicates a scroll to the right or the
`bottom, and a negative number indicates a scroll to the left
`or the top.
`If the DrawImmediately parameter is set, the image will
`scroll before the image is fully loaded (i.e., formatted). This
`gives the effect of progressive rendering.
`The Whitespace parameter indicates the number of pixels
`of whitespace between scrolling the images.
`The PageFlippingOn parameter is used to indicate
`whether the next image will be displayed, when multiple
`URLs have been identi?ed to the marquee object. If not set,
`all the speci?ed URLs will scroll right after each other (like
`one image) with the appropriate whitespace. If set, at any
`one time, only one URL will be scrolled, but when the user
`clicks the right mouse button on the marquee window, the
`next image will be scrolled. In one embodiment, only one
`URL of an image can be identi?ed in the <object> tag. The
`marquee object exposes various methods that the Web
`browser can invoke to set the other URLs.
`The Zoom parameter indicates a percentage by which the
`image being scrolled is to be reduced/enlarged. The one-to
`one aspect ration is maintained on “zoomed” pages. Avalue
`of —1 indicates the image is resized to ?t in the marquee
`window (one-to-one aspect ration not necessarily kept as a
`result).
`The WidthOfPage parameter speci?es the width in pixels
`to format image.
`The marquee object noti?es the HTML viewer when
`various events occur. These events include the start of image
`
`45
`
`55
`
`ScrollStyleX
`ScrollStyleY
`ScrollDelay
`
`LoopsX
`
`LoopsY
`
`ScrollPixelsX
`
`ScrollPixelsY
`
`Horizontal scroll style: “circular” or “bounce.”
`Vertical scroll style: “circular” or “bounce.”
`Time in milliseconds between each movement of the
`image in the marquee window.
`Number of times the image scrolls horizontally if
`ScrollStyleX is “circular,” or number of times the
`image bounces horizontally if ScrollStyleX is
`“bounce.”
`Number of times the image scrolls vertically if
`ScrollStyleY is “circular,” or number of times the
`image bounces vertically if ScrollStyleY is “bounce.”
`Number of pixels to move the image horizontally in
`the marquee window each ScrollDelay.
`Number of pixels to move the image vertically in the
`marquee window each ScrollDelay.
`URL of the image.
`URL
`DrawImmediately Flag indicating to progressiveiy render the image.
`Whitespace
`Amount of white space between images.
`PageFlippingOn
`If multiple URLs; indicates that the next image is to be
`displayed when the marquee window receives a click.
`Percentage of the original size of the image.
`Width in pixels of the image.
`
`Zoom
`WidthOffPage
`
`The ScrollStyleX and ScrollStyleY parameters have two
`possible values: “circular” and “bounce.” For the Scroll
`StyleX parameter, “circular” indicates that the image will
`keep scrolling from either the left or right (depending on the
`sign of the ScrollPixelsX parameter), as if it were wrapping
`
`65
`
`Apple 1106 - Page 13
`
`
`
`7
`display, the end of image display, an indication of the
`bounds, indication of a scroll, or an indication that the left
`mouse button has been pressed. When the Web broWser
`receives an event and the HTML document contains an
`event handler (e.g., in VB Script) for that event, the Web
`broWser invokes a scripting engine to execute the event
`handler. These events are described beloW.
`Void OnStartOfImage (void)
`This event is issued just prior to the ?rst time the image
`is displayed in the marquee WindoW.
`void OnEndO?mage (unsigned char HoriZontalOrVertical)
`This event is issued When the image has been completely
`scrolled. For eXample, it can be used to let the event handler
`change the contents of another control after the image has
`stopped moving (e.g., if LoopsX=N, it is issued When N
`loops are completed). Since the horiZontal and vertical
`scrolling could end at different times (i.e., different values
`for the parameters LoopX and LoopY), Which one has ended
`is indicated by the returned value HoriZontalOrVertical. The
`character ‘H’ indicates horiZontal and the character ‘V’
`indicates vertical. This event is issued for slides When the
`image “sticks.”
`void OnBounce (unsigned char SideBouncedOff)
`This event is issued only When the scroll style is “bounce”
`and the image bounces off a border. The border it bounces
`off is returned in SideBouncedOff (‘L’ for left, ‘R’ for right,
`‘T’ for top, and ‘B’ for bottom).
`void OnScroll (unsigned char HoriZontalOrVertical)
`This event is issued each time the marquee object is about
`to scroll the image. Once again, HoriZontalOrVertical (‘H’ or
`‘V’) indicates Whether the horiZontal or vertical scrolling is
`about to begin again. It is not issued for bounces or slides
`and the ?rst time the image is scrolled.
`void OnLMouseButtonDoWn (void)
`This event is issued When the left mouse button is pressed
`in the marquee WindoW.
`The marquee object eXposes various methods via OLE
`Automation for setting and getting each of the parameters.
`In addition, the marquee object exposes a function to
`retrieve the current height of the image being scrolled and
`the current Width of the image being scrolled. The marquee
`object maintains a list of URLs that are to be displayed in the
`marquee WindoW and provides methods for maintaining the
`list. The folloWing functions alloW an event handler to
`manage the list of URLs.
`STDMETHOD(insertURL)(THISiintiURLtoInsertAfter,
`BSTR bstrURL)
`This method inserts a neW URL, bstrURL, after the
`eXisting URL at position iURLtoInsertAfter. If iURLtoIn
`sertAfter equals 0, the method inserts the URL at the head
`of the list. If iURLtoInsertAfter is greater than the number
`of URLs in the list, the URL is added to the end of list.
`STDMETHOD(deleteURL)(THISiinti URLtoDelete)
`This method removes the URL at indeX iURLtoDelete
`from the list. If iURLtoDelete is 0 or greater than the number
`of URLs in the list, the method deletes all the URLs.
`STDMETHOD(queryURL)(THISiint iURLtoGet, BSTR
`FAR* pbstrURL)
`This method retrieves the URL at indeX iURLtoGet from
`the list and returns it in pbstrURL.
`STDMETHOD(queryURLCount)(ThisiintFAR* pcURL)
`This method returns the number of URLs in the list.
`STDMETHOD(getiCurrentURL)(THISiintFAR*
`pnCurrentURL); STDMETHOD(putiCurrentURL)
`(THISiintnCurrentURL)
`These methods set and get the current URL. The current
`URL changes When in PageFlipping mode and the user right
`clicks on the marquee Window.
`
`10
`
`15
`
`25
`
`35
`
`45
`
`55
`
`65
`
`6,141,018
`
`8
`
`IVieWObject::DraW
`The implementation of the IVieWObject::DraW function
`of the HTML vieWer renders the currently loaded HTML
`page into the display conteXt passed in using the RECT
`passed in as the bounding rectangle. The coordinates of the
`currently loaded HTML page can be retrieved using the
`IMarqueeInfo interface. The IMarqueeInfo interface is a
`private communication line betWeen the marquee object and
`HTML vieWer. The IMarqueeInfo::GetDocCoords method
`?nds the Width and height of the currently loaded HTML
`page. The method formats the teXt on the page to the piXel
`count given in parameter WidthToFormatPageTo.
`The folloWing setting of the parameters indicate hoW the
`described visual effect is speci?ed.
`Scroll From