Tools_NavigatorModel.st
author Claus Gittinger <cg@exept.de>
Tue, 08 Feb 2011 09:12:12 +0100
changeset 9738 7dd722970a40
parent 9130 e46e456da73a
child 10248 3237dc7fbfb8
permissions -rw-r--r--
changed: #readAspects:from: no need for change messages when reading aspect values

"
 COPYRIGHT (c) 2000 by eXept Software AG
	      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: Tools }"

ApplicationModel subclass:#NavigatorModel
	instanceVariableNames:''
	classVariableNames:'AllEntry SuperSendEntry UncommentedEntry'
	poolDictionaries:''
	category:'Interface-Browsers-New'
!

!NavigatorModel class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2000 by eXept Software AG
	      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.
"
! !

!NavigatorModel class methodsFor:'initialization'!

initialize
    AllEntry := '* all *'.

    "Created: / 24.2.2000 / 13:41:29 / cg"
! !

!NavigatorModel class methodsFor:'defaults'!

isPseudoCategory:cat
    ^ cat = self nameListEntryForChanged
    or:[ cat = self nameListEntryForUndocumented
    or:[ cat = self nameListEntryForUnloaded
    or:[ cat = self nameListEntryForALL ]]]
!

isPseudoProtocol:protocol
    ^ protocol = self nameListEntryForObsolete
    or:[ protocol = self nameListEntryForSuperSend
    or:[ protocol = self nameListEntryForUncommented ]]
!

markForBeingInChangeList
    ^ ' *'

    "Created: / 29-08-2006 / 10:26:05 / cg"
!

nameListEntryForALL
    ^ AllEntry ? '* all *'

    "Created: / 24.2.2000 / 13:39:10 / cg"
    "Modified: / 25.2.2000 / 21:18:30 / cg"
!

nameListEntryForALLWithCount
    ^ '* all (%1) *'
!

nameListEntryForBookmarked
    ^ '* bookmarked (%1) *'
!

nameListEntryForChanged
    ^ '* changed *'
!

nameListEntryForChangedWithCount
    ^ '* changed (%1) *'
!

nameListEntryForDocumentation
    ^ '* documentation (%1) *'
!

nameListEntryForExtensions
    ^ '* extensions (%1) *'
!

nameListEntryForLong
    ^ '* long (%1) *'
!

nameListEntryForMustBeRedefinedInSubclass
    ^ '* must be redefined (%1) *'
!

nameListEntryForNILCategory
    ^ '* no category *'
!

nameListEntryForNonStatic
    ^ '* instance *'
!

nameListEntryForObsolete
    ^ '* obsolete (%1) *'
!

nameListEntryForOverride
    ^ '* override (%1) *'
!

nameListEntryForRedefined
    ^ '* redefined (%1) *'
!

nameListEntryForRequired
    ^ '* required (%1) *'
!

nameListEntryForStatic
    ^ '* static *'
!

nameListEntryForSuperSend
    ^ '* super (%1) *'
!

nameListEntryForUncommented
    ^ '* uncommented (%1) *'
!

nameListEntryForUndocumented
    ^ '* undocumented *'
!

nameListEntryForUndocumentedWithCount
    ^ '* undocumented (%1) *'
!

nameListEntryForUnloaded
    ^ '* unloaded *'
!

nameListEntryForUnloadedWithCount
    ^ '* unloaded (%1) *'
!

nameListEntryForVisited
    ^ '* visited (%1) *'
!

pseudoEntryForegroundColor
    |bg|

    bg := SelectionInListView defaultBackgroundColor ? View defaultBackgroundColor.
    bg isNil ifTrue:[ bg := View defaultBackgroundColor ].
    (Color grey brightness - (bg brightness)) abs < 0.3 ifTrue:[
        (bg brightness) > 0.7 ifTrue:[
            ^ Color grey:20.
        ].
        ^ Color grey:80.
    ].
    ^ Color grey
! !

!NavigatorModel class methodsFor:'interface specs'!

metaSpec
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:Tools::NavigatorModel andSelector:#metaSpec
     Tools::NavigatorModel new openInterface:#metaSpec
    "

    <resource: #canvas>

    ^ 
     #(FullSpec
        name: metaSpec
        window: 
       (WindowSpec
          label: 'MetaToggles'
          name: 'MetaToggles'
          min: (Point 0 0)
          max: (Point 1024 721)
          bounds: (Rectangle 0 0 300 28)
        )
        component: 
       (SpecCollection
          collection: (
           (RadioButtonSpec
              label: 'Instance'
              name: 'InstanceToggle'
              layout: (LayoutFrame 0 0.0 0 0.0 0 0.5 25 0)
              translateLabel: true
              tabable: true
              model: notMetaToggle
              isTriggerOnDown: true
              select: true
              isToggle: true
            )
           (RadioButtonSpec
              label: 'Class'
              name: 'ClassToggle'
              layout: (LayoutFrame 0 0.5 0 0 0 1.0 25 0)
              translateLabel: true
              labelChannel: metaToggleLabelHolder
              tabable: false
              model: metaToggle
              isTriggerOnDown: true
              select: true
              isToggle: true
            )
           )
         
        )
      )
! !

!NavigatorModel class methodsFor:'misc'!

classResources
    ^ NewSystemBrowser classResources
! !

!NavigatorModel methodsFor:'misc'!

resources
    "answer the resources of my masterApp, if there is one"

    |m|

    (m := self masterApplication) notNil ifTrue:[
        ^ m resources
    ].
    ^ super resources
! !

!NavigatorModel class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.16 2009-10-29 18:10:38 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.16 2009-10-29 18:10:38 cg Exp $'
! !

NavigatorModel initialize!