All classes moved to namespace SmallSense.
"{ Package: 'jv:smallsense' }"
"{ NameSpace: SmallSense }"
HierarchicalItem subclass:#PO
instanceVariableNames:'subject icon label name description'
classVariableNames:''
poolDictionaries:''
category:'SmallSense-Interface-PO'
!
!PO class methodsFor:'Instance Creation'!
name: name description:description
^ self new name:name; description:description.
"Created: / 04-04-2011 / 13:46:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PO class methodsFor:'Instance creation'!
subject: anObject
^self new subject: anObject
"Created: / 06-04-2011 / 21:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PO methodsFor:'accessing'!
cursorColumnAfterComplete
"Answers a cursor column after completion. The number returned
is relative to the start of the text being replaced"
^name size + 1
"Created: / 05-04-2011 / 17:05:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
description
^ description
!
description:something
description := something.
!
icon
^nil
"Created: / 04-04-2011 / 17:25:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
label
label ifNil:[label := name].
^label
"Created: / 07-04-2011 / 09:55:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
name
^ name
!
name:something
name := something.
!
stringToComplete
"Answers a string to complete"
^name
"Created: / 05-04-2011 / 16:48:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
subject
^ subject
!
subject:something
subject := something.
! !
!PO methodsFor:'displaying'!
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
| cx checkedI subjectI app |
cx := "x :=" newX.
"/ self displayCheckbox ifTrue:[
"/ app := self application.
"/ checkedI := self checked
"/ ifTrue:[MenuPanel iconIndicationOn]
"/ ifFalse:[MenuPanel iconIndicationOff].
"/ checkedI displayOn: aGC x: cx y: y + (h / 2) - (checkedI height / 2).
"/ cx := cx + 22."experimental value - this looks good"
"/ ] ifFalse:[
"/ (parent notNil and: [parent displayCheckbox]) ifTrue:[
"/ cx := cx + 22."experimental value - this looks good"
"/ ]
"/ ].
subjectI := self icon.
subjectI notNil ifTrue:[
subjectI displayOn: aGC x: cx y: y + (h / 2) - (subjectI height / 2).
].
"/ (subjectI notNil or:[parent subjectIcon notNil]) ifTrue:[
cx := cx + 16."experimental value - this looks good"
"/ ].
super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h
"Created: / 24-07-2013 / 00:22:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PO methodsFor:'new'!
name:nam description:desc
name := nam.
description := desc.
"Created: / 16-03-2011 / 16:31:13 / Jakub <zelenja7@fel.cvut.cz>"
! !
!PO methodsFor:'printing & storing'!
printOn:aStream
"append a printed representation if the receiver to the argument, aStream"
super printOn:aStream.
aStream nextPut:$(.
name printOn:aStream.
aStream nextPut:$).
"Modified: / 04-04-2011 / 12:02:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PO methodsFor:'queries'!
startsWith: prefix
^self stringToComplete startsWith: prefix
"Created: / 26-11-2011 / 19:25:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PO methodsFor:'testing'!
isSmallSenseClassPO
^ false
!
isSmallSenseConstantPO
^ false
!
isSmallSenseMethodPO
^ false
!
isSmallSenseSnippetPO
^ false
!
isSmallSenseVariablePO
^ false
! !
!PO class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
^ '$Id: SmallSenseResultItem.st 7825 2011-11-26 18:32:31Z vranyj1 $'
! !