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

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  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

o  doPrint
print the contents

o  doSaveAs

o  editOperationAddAnchorHTML

o  editOperationAddImageHTML

o  editOperationEscapeSpecialCharactersHTML

o  editOperationIndentCode

o  editOperationToggleBoldHTML

o  editOperationToggleCodeHTML

o  editOperationToggleHTML: info start: whatStart end: whatEnd

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  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
self fileContentsModel value:text string.

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' "

printing
o  printOn: aStream

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  postBuildTextEditor: aWidget
I don't want any non-smalltalk code to be syntaxhighlighted!

o  postOpenWith: aBuilder
self item isNil ifTrue:[

o  release
release my resources

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?



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 23 Apr 2024 22:11:57 GMT