CodeCompletionHelpMenuView.st
author Claus Gittinger <cg@exept.de>
Thu, 21 Jan 2016 01:54:39 +0100
changeset 16051 65b2ad2b4723
parent 13669 bb9278273984
child 16078 d79040785999
permissions -rw-r--r--
#FEATURE class: CodeCompletionHelpMenuView class definition added: #infoPerEntry: #setSelection: #showInfoForSelection: changed: #initStyle

"
 COPYRIGHT (c) 2013 by Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libtool' }"

"{ NameSpace: Smalltalk }"

MenuView subclass:#CodeCompletionHelpMenuView
	instanceVariableNames:'infoPerEntry'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Help'
!

!CodeCompletionHelpMenuView class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2013 by Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    used with code completion suggestions

    [author:]
        Claus Gittinger

    [See also:]
        Workspace::CodeCompletionService
"
! !

!CodeCompletionHelpMenuView methodsFor:'accessing'!

infoPerEntry:something
    infoPerEntry := something.
! !

!CodeCompletionHelpMenuView methodsFor:'initialization'!

initStyle
    |defaultFont|

    super initStyle.
    defaultFont := StyleSheet fontAt:#'activeHelp.font' default:nil.
    defaultFont notNil ifTrue:[
        self font:defaultFont
    ].
    self viewBackground:Color orange lightened lightened lightened.
! !

!CodeCompletionHelpMenuView methodsFor:'queries'!

wantsFocusWithPointerEnter
    "DEFINITELY not, because if we do so,
     the editView looses focus on entry, and sends me to hell in its lost focus handling!!
     So I will be terminated by a motion"

    ^ false
! !

!CodeCompletionHelpMenuView methodsFor:'selections'!

setSelection:newSelection
    super setSelection:newSelection.
    self showInfoForSelection:newSelection.
!

showInfoForSelection:newSelection
    |selector|
    
    Transcript showCR:newSelection.
    newSelection notNil ifTrue:[
        selector := self listAt:newSelection.
        Transcript showCR:selector.
    ].
! !

!CodeCompletionHelpMenuView class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !