EditTextView.st
branchjv
changeset 5552 58ac0bd34b7b
parent 5550 d1911247fdf8
parent 5529 0b33c7ac879d
child 5562 0219152fb99f
equal deleted inserted replaced
5551:692afe1918ed 5552:58ac0bd34b7b
  1887     "move cursor to start of next line; scroll if at end of visible text"
  1887     "move cursor to start of next line; scroll if at end of visible text"
  1888 
  1888 
  1889     self basicCursorReturn
  1889     self basicCursorReturn
  1890 !
  1890 !
  1891 
  1891 
       
  1892 cursorReturn:withPossibleAutoIndent
       
  1893     "move cursor to start of next line; scroll if at end of visible text"
       
  1894 
       
  1895     self basicCursorReturn
       
  1896 !
       
  1897 
  1892 cursorRight
  1898 cursorRight
  1893     "move cursor to right"
  1899     "move cursor to right"
  1894 
  1900 
  1895     |l|
  1901     |l|
  1896 
  1902 
  1897     self st80EditMode ifTrue:[
  1903     self st80EditMode ifTrue:[
  1898         l := (self listAt:cursorLine).
  1904         l := (self listAt:cursorLine).
  1899         cursorCol >= (l size + 1) ifTrue:[
  1905         cursorCol >= (l size + 1) ifTrue:[
  1900             cursorLine < list size ifTrue:[
  1906             cursorLine <= list size ifTrue:[
  1901                 self cursorReturn.
  1907                 self cursorReturn:false. "/ no autoindent
  1902             ].
  1908             ].
  1903             ^ self
  1909             ^ self
  1904         ]
  1910         ]
  1905     ].
  1911     ].
  1906     self cursorCol:(cursorCol + 1)
  1912     self cursorCol:(cursorCol + 1)
  5317         self isReadOnly ifTrue:[
  5323         self isReadOnly ifTrue:[
  5318             self unselect; makeCursorVisible.
  5324             self unselect; makeCursorVisible.
  5319             self cursorReturn
  5325             self cursorReturn
  5320         ] ifFalse:[
  5326         ] ifFalse:[
  5321             self isInInsertMode ifFalse:[
  5327             self isInInsertMode ifFalse:[
  5322                 self cursorReturn.
  5328                 self cursorReturn:true.
  5323                 autoIndent == true ifTrue:[
  5329                 autoIndent == true ifTrue:[
  5324                     i := self leftIndentForLine:(cursorLine + 1).
  5330                     i := self leftIndentForLine:(cursorLine + 1).
  5325                     (self listAt:cursorLine) isEmptyOrNil ifTrue:[
  5331                     (self listAt:cursorLine) isEmptyOrNil ifTrue:[
  5326                         self cursorCol:(i+1 max:1)
  5332                         self cursorCol:(i+1 max:1)
  5327                     ]
  5333                     ]
  6343                     ('-'                                        )
  6349                     ('-'                                        )
  6344                     ('Search...'        search         Find     )
  6350                     ('Search...'        search         Find     )
  6345                     ('Goto Line...'     gotoLine       GotoLine )
  6351                     ('Goto Line...'     gotoLine       GotoLine )
  6346                     ('-'                                        )
  6352                     ('-'                                        )
  6347                     ('Tools'            tools                   )
  6353                     ('Tools'            tools                   )
       
  6354                     ('Font...'           changeFont             )
  6348                     ('Insert Unicode...' insertUnicode )
  6355                     ('Insert Unicode...' insertUnicode )
  6349             ).
  6356             ).
  6350     CharacterSetView notNil ifTrue:[
  6357     CharacterSetView notNil ifTrue:[
  6351         items := items ,
  6358         items := items ,
  6352                     #(
  6359                     #(
  6376                     ('Insert new UUID'      insertUUID          )
  6383                     ('Insert new UUID'      insertUUID          )
  6377                     ('Insert Date && Time'  insertDateAndTime   )
  6384                     ('Insert Date && Time'  insertDateAndTime   )
  6378                     ('-'                                        )
  6385                     ('-'                                        )
  6379                     ('Insert File as String Literal...' insertFileAsStringLiteral  )
  6386                     ('Insert File as String Literal...' insertFileAsStringLiteral  )
  6380                     ('Paste as String Literal'          pasteAsStringLiteral       )
  6387                     ('Paste as String Literal'          pasteAsStringLiteral       )
  6381                     ('-'                                        )
       
  6382                 ).
  6388                 ).
  6383 "/    CharacterSetView notNil ifTrue:[
  6389 "/    CharacterSetView notNil ifTrue:[
  6384 "/        miscItems := miscItems ,
  6390 "/        miscItems := miscItems ,
  6385 "/                    #(
  6391 "/                    #(
       
  6392 "/                        ('-'                                        )
  6386 "/                        ('Special Characters...'    specialCharacters  OpenSpecialCharacterWindow )
  6393 "/                        ('Special Characters...'    specialCharacters  OpenSpecialCharacterWindow )
       
  6394 "/                        ('Font...'                  changeFont              )
  6387 "/                    ).
  6395 "/                    ).
  6388 "/    ].
  6396 "/    ] ifFalse:[
  6389     miscItems := miscItems ,
  6397 "/        miscItems := miscItems ,
  6390                 #(
  6398 "/                #(
  6391                     ('Font...'                  changeFont              )
  6399 "/                    ('Font...'                  changeFont              )
  6392 "/                    ('Encoding...'      changeEncoding          )
  6400 "/"/                    ('Encoding...'      changeEncoding          )
  6393                 ).
  6401 "/                ).
       
  6402 "/    ]. 
  6394 
  6403 
  6395     translateItems := #(
  6404     translateItems := #(
  6396                     ('English -> German'      (babelFishTranslate: 'en_de')   )
  6405                     ('English -> German'      (babelFishTranslate: 'en_de')   )
  6397                     ('English -> French'      (babelFishTranslate: 'en_fr')   )
  6406                     ('English -> French'      (babelFishTranslate: 'en_fr')   )
  6398                     ('English -> Italian'     (babelFishTranslate: 'en_it')   )
  6407                     ('English -> Italian'     (babelFishTranslate: 'en_it')   )