Squeak Class Documentation category index | class index  
 
StringHolderView
  category: ST80-Support
  superclass: View
  subclasses: FillInTheBlankView PluggableTextView

I am a View of a String that is an aspect of a more structured object. This String should not be changed by any editing unless the user issues the accept command. Thus my instances provide a working copy of the String. This copy is edited. When the user issues the accept command, the String is copied from the working version; or if the user issues the cancel command, the working version is restored from the String. StringHolderController is my default controller. It is initialized specially by passing the string viewed which is then converted to a Paragraph for editing.

instance methods
  controller access
  defaultController
defaultControllerClass
displayContents

  deEmphasizing
  deEmphasizeView

  displaying
  display
displayView
lock
positionDisplayContents

  initialize-release
  initialize

  model access
  editString:
getMenu:
model:

  updating
  askBeforeDiscardingEdits:
canDiscardEdits
hasUnacceptedEdits
hasUnacceptedEdits:
promptForCancel
update:
updateDisplayContents

class methods
  instance creation
  container
container:
open
open:
open:label:

instance methods
  controller access top  
 

defaultController

Refer to the comment in View|defaultController.


 

defaultControllerClass

Refer to the comment in View|defaultControllerClass.


 

displayContents


  deEmphasizing top  
 

deEmphasizeView

Refer to the comment in View|deEmphasizeView.


  displaying top  
 

display

Refer to the comment in View.display.


 

displayView

Refer to the comment in View|displayView.


 

lock

Refer to the comment in view|lock. Must do at least what display would do to lock the view.


 

positionDisplayContents

Presumably the text being displayed changed so that the wrapping box
and clipping box should be reset.


  initialize-release top  
 

initialize

Refer to the comment in View|initialize.


  model access top  
 

editString:

The paragraph to be displayed is created from the characters in aString.


 

getMenu:


 

model:

Refer to the comment in View|model:.


  updating top  
 

askBeforeDiscardingEdits:

Set the flag that determines whether the user should be asked before discarding unaccepted edits.


 

canDiscardEdits

Return true if this view either has no text changes or does not care.


 

hasUnacceptedEdits

Return true if this view has unaccepted edits.


 

hasUnacceptedEdits:

Set the hasUnacceptedEdits flag to the given value.


 

promptForCancel

Ask if it is OK to cancel changes to text


 

update:

Refer to the comment in View|update:.


 

updateDisplayContents

Make the text that is displayed be the contents of the receiver's model.


class methods
  instance creation top  
 

container

Answer an instance of me with a new instance of StringHolder as the
model.


 

container:

Answer an instance of me whose model is aContainer. Give it a 2-dot
border.


 

open

Create a standard system view of a workspace on the screen.


 

open:

Create a standard system view of the argument, aStringHolder, as viewed
by an instance of me. The view has label 'StringHolder'.


 

open:label:

NOTE this should be in the model class, and all senders so redirected,
in order that the view class can be discarded in a morphic world.