eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FileApplicationNoteBook::TextEditor':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: TextEditor (private in FileApplicationNoteBook

This class is only visible from within FileApplicationNoteBook.

Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--AbstractFileApplicationNoteBookComponent
            |
            +--FileApplicationNoteBook::TextEditor

Package:
stx:libtool
Category:
Interface-Tools-File
Owner:
FileApplicationNoteBook

Description:


a previewer-plugin for plain text
Offers edit, hex-display and diff functions.


Class protocol:

defaults
o  checkModifiedDelayTime
seconds

o  defaultTagsBrowserVisible

o  tabStringFor: aApplicationType
the formatString shown in a tab (language translated)

o  wantNewApplicationAnyway
does the subapp want separate new app tabs,
or reuse any already open isntance of it?

help specs
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

image specs
o  hideToolBarIcon

interface specs
o  windowSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:FileApplicationNoteBook::TextEditor andSelector:#windowSpec
     FileApplicationNoteBook::TextEditor new openInterface:#windowSpec
     FileApplicationNoteBook::TextEditor open

o  xwindowSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

menu specs
o  menu
This resource specification was automatically generated
by the MenuEditor of ST/X.

Usage example(s):

     MenuEditor new openOnClass:FileApplicationNoteBook::TextEditor andSelector:#menu
     (Menu new fromLiteralArrayEncoding:(FileApplicationNoteBook::TextEditor menu)) startUp

o  menuEditorOperationsForHTML
This resource specification was automatically generated
by the MenuEditor of ST/X.

Usage example(s):

     MenuEditor new openOnClass:FileApplicationNoteBook::TextEditor andSelector:#menuEditorOperationsForHTML
     (Menu new fromLiteralArrayEncoding:(FileApplicationNoteBook::TextEditor menuEditorOperationsForHTML)) startUp

o  menuEditorOperationsForNormalText
This resource specification was automatically generated
by the MenuEditor of ST/X.

Usage example(s):

     MenuEditor new openOnClass:FileApplicationNoteBook::TextEditor andSelector:#menuEditorOperationsForNormalText
     (Menu new fromLiteralArrayEncoding:(FileApplicationNoteBook::TextEditor menuEditorOperationsForNormalText)) startUp

o  menuEditorOperationsForOther
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  menuEditorOperationsForSourceCode
This resource specification was automatically generated
by the MenuEditor of ST/X.

Usage example(s):

     MenuEditor new openOnClass:FileApplicationNoteBook::TextEditor andSelector:#menuEditorOperationsForSourceCode
     (Menu new fromLiteralArrayEncoding:(FileApplicationNoteBook::TextEditor menuEditorOperationsForSourceCode)) startUp


Instance protocol:

accessing
o  compressTabsOnSave: aBoolean
some files should never be written with spaces replaced by
tabs (eg: python source code, if it did not originally have tabs)

o  fileEncoding

o  fileEncoding: newEncoding

o  item: aDirContentsItem
true

o  lockFileEncoding: aBoolean

o  presentation
return the current presentation (either #hexDump or #asText)

o  presentation: aSymbol
change the presentation (either #hexDump or #asText)

o  semaChangeItem

o  type: aType

actions
o  accept

o  askForChangeWithReload: doReload
ask for save changes;
if modified and answered true, the current contents is written back (accepted)

o  askForChangeWithReload: doReload forClose: forClose
ask for save changes;
if modified and answered true, the current contents is written back (accepted)

o  changeInformation

o  changeInformationForModified: aSymbol

o  characterEncodingInDump: anEencodingSymbol

o  doClose
(comment from inherited method)
tell the NoteBookApplication to close me

o  doPrint
print the contents

o  doSaveAs

o  editOperationAddAnchorHTML

o  editOperationAddImageHTML

o  editOperationEscapeSpecialCharactersHTML
withSpecialHTMLCharactersEscaped:sel.

o  editOperationIndentCode

o  editOperationToggleBoldHTML

o  editOperationToggleCodeHTML

o  editOperationToggleHTML: info start: whatStart end: whatEnd
whatStart and whatEnd are the brackets to search for

o  editOperationToggleItalicHTML

o  editOperationUndentCode

o  getContents
old

o  getContentsAsTextWithSizeLimit: sizeLimitOrNil
returns the contents as unicode

o  getContentsAsTextWithSizeLimit: sizeLimitOrNilArg lastPart: showLastPartOrNil
returns the contents as unicode

o  getHashForContents: contents

o  hideEditorOperationsToolBar

o  openDiffView
asText

o  radixInDump: radix

o  readStream: aStream lineDelimiter: aCharacter encoding: fileEncodingArg
read from aStream, answer its contents as StringCollection.
The file's lines are delimited by aCharacter.
If encoding is nonNil, the file is assumed to be coded according to
that symbol, and #decodeString: should be able to convert it into unicode.
Always returns a unicode string.

o  readStream: aStream lineDelimiter: lineDelimiter sizeLimit: sizeLimitOrNil encoding: fileEncodingArg
read from aStream, answer its contents as StringCollection.
The file's lines are delimited by aCharacter.
If encoding is nonNil, the file is assumed to be coded according to
that symbol, and #decodeString: should be able to convert it into unicode.
Always returns a unicode string.

o  reload
self withWaitCursorDo:[

o  saveFileAs

o  saveWithAskForFilename: ask

o  searchForPattern: aContentsPattern ignoreCase: ign
is that a good idea ?

o  selectInBrowser

o  setContents

o  setContentsFor: aUnicodeText

o  showEditorOperationsToolBar

o  tagSelected: aTag
otherwise, it might jump back to show the selection

o  updateSameFilesFor: aFilename
here force reload for other applications

o  validateEditViewsFontEncoding

aspects
o  canEdit

o  compressTabsOnSaveHolder
some files should never be written with spaces replaced by
tabs (eg: python source code, if it did not originally have tabs)

o  cursorColLabelHolder

o  cursorLineAndColumnLabelHolder

o  cursorLineLabelHolder

o  editModeInsert

o  editModeInsertAndSelect

o  editModeOverwrite

o  editView

o  editorOperationsMenuSpecHolder

o  editorOperationsToolBarNotVisibleHolder

o  editorOperationsToolBarVisibleHolder

o  enableHexToggle

o  enableReload

o  enableSave

o  enableSaveAs

o  enableSelectInBrowser

o  fileContentsModel

o  fileEncodingHolder

o  itemChanged

o  itemRemoved

o  lockFileEncodingHolder

o  modeLabelHolder

o  modeLabelMenu

o  modifiedChannel

o  presentationHolder

o  printAsHexDump

o  viewModifiedChannel

aspects-visibility
o  closeButtonShown
^ self isEmbeddedApplication.

o  diffTextButtonVisible
true

o  doItMenuButtonVisible

o  inspectItMenuButtonVisible

o  printItMenuButtonVisible

o  saveAsButtonVisible

o  saveButtonVisible
true

o  selectInBrowserButtonVisible

o  tagsBrowserVisibleHolder

change & update
o  changeTextColorForChanged
indicate (by changing the text's color) that the text was changed by someone else
(usually a browinsh red color)

o  editorOperationsToolBarVisibilityChanged

o  itemModified

o  postBuildTagsBrowser: aTagsBrowserCanvas

o  tagsBrowserVisibilityChanged

o  update: something with: aParameter from: changedObject
(comment from inherited method)
dependent is notified of some change -
Default is to try update:with:

o  updateTagsBrowser

initialization
o  initialize
nil defaults to 'iso8859-1' "

o  postBuildTextEditor: aWidget
I don't want any non-smalltalk code to be syntaxhighlighted!

o  setUpTextView
care for any contents specific settings for the editor
For example:
- change the parenthesis-spec of the editor to include $< .. $> if the
shown document is an html- or xml document,
- change the editorOperationsMenu

o  setupEditorOperationsMenuForMimeType: mimeType
does not work - why?

printing
o  printOn: aStream
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.

private-process
o  checkItemForChanges
file contents has been changed by someone else

o  checkItemForChangesWithNewSetup

o  releaseCheckModify

o  setupCheckModify

queries
o  additionalInfo

o  hasMD5

o  isModified

o  isShowingHexDumpHolder

o  isTextEditor

startup & release
o  closeRequest
asks for permission before closing

o  editorOperationsMenuSpecForMimeType: mimeType

o  getEditorClass

o  hideEditorOperationsToolBarButtonCreated: aButton

o  postOpenWith: aBuilder
self item isNil ifTrue:[

o  release
release my resources



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 15:09:08 GMT