Squeak Class Documentation category index | class index  
 
Scamper
  category: Network-Web Browser
  superclass: Model
  subclasses:

a basic web browser.

It downloads things in a background thread; the background thread puts downloaded objects onto downloadQueue as they arrive. The queue is checked in the step method.

A custom start page is provided for. It's not as convenient as bookmarks are, but it does have a lot of flexibility--the user can put anything on the start page that is desired.

There is a hook for displaying the "lint" of a page; currently it's not a very effective linter.

instance methods
  access
  backgroundColor
bookmark:
currentUrl
defaultBackgroundColor
document
formattedPage
formattedPageSelection
labelString
status
status:

  browser urls
  aboutScamperHTML
browserUrlContents:

  button text
  backButtonText
forwardButtonText
historyButtonText
homeButtonText
reloadButtonText
stopButtonText

  change/update
  changeAll:
invalidateLayout

  changing page
  jumpToAbsoluteUrl:
jumpToNewUrl
jumpToUrl:
startDownloadingMorphState:
startDownloadingStateIn:url:
stopEverything
submitFormWithInputs:url:method:
submitFormWithInputs:url:method:encoding:

  creation
  openAsMorph

  document handling
  displayDocument:
displayFlashPage:
displayImagePage:
displayPlainTextPage:
displayTextHtmlPage:
processMidiPage:
processUnhandledPage:

  initialization
  initialize

  lint
  hasLint
lint
showLint

  menus
  addNewSubMenu:
addToBookmark
back
bookmark
createBookmarkFiles:dict:dirname:
displayHistory
editStartPage
forward
importBookmark
importUrl:
inspectParseTree
menu:shifted:
perform:orSendTo:
reload
viewSource
visitStartPage

  not yet categorized
  doItContext
doItReceiver
release

  start page
  startPage
startPage:

  stepping
  step
wantsSteps

  testing
  isWebBrowser

  user interface
  loadBookmark
makeBookmark:
readUrlFromFile:

  window definition
  buttonRowPane
morphicWindow
simpleButtonNamed:action:text:
statusPane
urlEditPane
webContentsPane

class methods
  initialization
  StartUrl:
initialize

  instance creation
  new
newInstancePointingAt:
newOpenableMorph
newOrExistingOn:
open
openAsMorph
openOnUrl:

instance methods
  access top  
 

backgroundColor


 

bookmark:


 

currentUrl


 

defaultBackgroundColor

Answer the color to be used as the base window color for a window whose model is an object of the receiver's class


 

document

return the current parsed HTML document, or nil if we aren't viewing a page


 

formattedPage

format the current page and return it as a Text


 

formattedPageSelection


 

labelString

return the title of the current page, or nil if there is none


 

status


 

status:


  browser urls top  
 

aboutScamperHTML

return a string of HTML which introduces Scamper


 

browserUrlContents:


  button text top  
 

backButtonText


 

forwardButtonText


 

historyButtonText


 

homeButtonText


 

reloadButtonText


 

stopButtonText


  change/update top  
 

changeAll:

We have changed all of the aspects in the given array


 

invalidateLayout


  changing page top  
 

jumpToAbsoluteUrl:

start downloading a new page. The page source is downloaded in a background thread


 

jumpToNewUrl

change to a new, user-specified page


 

jumpToUrl:

start downloading a new page. The page source is downloaded in a background thread


 

startDownloadingMorphState:


 

startDownloadingStateIn:url:

download the state for the given document in a background thread. signal the foreground when the data has arrived


 

stopEverything

stop all background threads and empty queues for communicating with them; bring this Scamper to a sane state before embarking on something new


 

submitFormWithInputs:url:method:

Submit the current form with the given arguments


 

submitFormWithInputs:url:method:encoding:

Submit the given form with the provided inputs, url, method, and encoding


  creation top  
 

openAsMorph


  document handling top  
 

displayDocument:

switch to viewing the given MIMEDocument


 

displayFlashPage:

A shockwave flash document -- embed it in a text


 

displayImagePage:

an image--embed it in a text


 

displayPlainTextPage:

treat as plain text


 

displayTextHtmlPage:

HTML page--format it


 

processMidiPage:


 

processUnhandledPage:

offer to save it to a file


  initialization top  
 

initialize


  lint top  
 

hasLint

whether the current page has any questionable HTML in it


 

lint

return a string describing any questionable HTML that was noticed in the current page


 

showLint


  menus top  
 

addNewSubMenu:


 

addToBookmark


 

back

this method is added to Scamper: Aibek 4/18/99


 

bookmark


 

createBookmarkFiles:dict:dirname:


 

displayHistory

Let the user selecet a previous page to view.


 

editStartPage


 

forward

this method is added to Scamper: Aibek 4/18/99


 

importBookmark


 

importUrl:


 

inspectParseTree

inspect a parse tree of the current page's source


 

menu:shifted:

added 'back' and 'forward' menu options: Aibek 4/18/99


 

perform:orSendTo:

Selector was just chosen from a menu by a user. If can respond, then
perform it on myself. If not, send it to otherTarget, presumably the
editPane from which the menu was invoked.


 

reload


 

viewSource

view the source HTML of this page


 

visitStartPage


  not yet categorized top  
 

doItContext


 

doItReceiver


 

release

Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.


  start page top  
 

startPage

return the contents of the user's personal start page


 

startPage:

fill in the contents of the user's personal start page


  stepping top  
 

step

check if a new document has arrived


 

wantsSteps

Overridden by morphic classes whose instances want to be stepped,
or by model classes who want their morphic views to be stepped.


  testing top  
 

isWebBrowser

whether this object is a web browser. See class: Scamper


  user interface top  
 

loadBookmark


 

makeBookmark:


 

readUrlFromFile:


  window definition top  
 

buttonRowPane

Create and return a pane of navigation buttons.


 

morphicWindow

Create and return a Morphic window for Scamper.


 

simpleButtonNamed:action:text:

Create and return a simple button with Scamper as the target.


 

statusPane

Create and return the browser status pane.


 

urlEditPane

Create and return the URL edit pane.


 

webContentsPane

Create and return the web page pane.


class methods
  initialization top  
 

StartUrl:

Specify the default URL to start from.


 

initialize

Object initialize


  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


 

newInstancePointingAt:

Answer a Scamper browser on specified url.
Scamper newInstancePointingAt: 'www.squeak.org'
Scamper newInstancePointingAt: 'file://C%3A/test.htm'


 

newOpenableMorph

Answer a morph that bears the receiver, but don't blast it onto the screen


 

newOrExistingOn:

If a Scamper is open on the same site, return its SystemWindow, else return a new Scamper.


 

open

Scamper open


 

openAsMorph

Deprecated. Use open instead.


 

openOnUrl:

Open Scamper browser on specified url.
Scamper openOnUrl: 'www.squeak.org'
Scamper openOnUrl: 'file://C%3A/test.htm'