Tools__Inspector2.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 30 Jan 2013 11:15:09 +0000
branchjv
changeset 12401 4714b9640528
parent 12308 5d9291c0fc27
parent 11928 df7cfea75d78
child 12406 1fbd331e4489
permissions -rw-r--r--
Merged 235b77901045 and 8332590c5a41 (branch default)

"
 COPYRIGHT (c) 2006 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:#Inspector2
	instanceVariableNames:'tabViewAspect navigationHistoryHolder navigationStateAspect
		browser currentObjectHolder colorProfileHolder
		toolbarBackgroundHolder'
	classVariableNames:'LastExtent ColorProfiles'
	poolDictionaries:''
	category:'Interface-Inspector2'
!

Model subclass:#NavigationState
	instanceVariableNames:'theObject index tabs selectionIndex displayString'
	classVariableNames:''
	poolDictionaries:''
	privateIn:Inspector2
!

!Inspector2 class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 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.
"
!

documentation
"
    an application for a multitab inspector
    extendable by the inspected object itself, by providing additional
    tabs via the inspector2XXX methods

    [author:]
        Jan Vrani
"
! !


!Inspector2 class methodsFor:'initialization'!

initialize
    "Invoked at system start or when the class is dynamically loaded."

    "/ please change as required (and remove this comment)


    ColorProfiles := Dictionary new.
    ColorProfiles 
        at: #default put: nil; "default color"
        at: #red put: Color red lighter lighter;
        at: #green put: Color green lighter;
        at: #blue put: Color blue lighter;
        at: #yellow put: Color yellow lighter;
        at: #gray put: Color gray;
        yourself.

    "Modified: / 17-01-2012 / 12:57:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !


!Inspector2 class methodsFor:'help specs'!

flyByHelpSpec
    "This resource specification was automatically generated
     by the UIHelpTool of ST/X."

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

    "
     UIHelpTool openOnClass:Tools::Inspector2    
    "

    <resource: #help>

    ^ super flyByHelpSpec addPairsFrom:#(

#backwardInVisitingHistory
'Move backward in the history of previously visited objects'

#browseClassOfShownObject
'Open a SystemBrowser on the shown object''s class'

#browseFile
'Open a FileBrowser on the file represented by the shown object'

#editImage
'Open an ImageEditor on the bitmap/image represented by the shown object'

#forwardInVisitingHistory
'Move forward in the history of previously visited objects'

#colorProfile
'Change the color profile'

#refresh
'Refresh for changed object'

)

    "Created: / 19-08-2011 / 08:52:33 / cg"
!

helpSpec
    "This resource specification was automatically generated
     by the UIHelpTool of ST/X."

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

    "
     UIHelpTool openOnClass:Tools::Inspector2    
    "

    <resource: #help>

    ^ super helpSpec addPairsFrom:#(

#colorProfile
''

)
! !


!Inspector2 class methodsFor:'image specs'!

settingsIcon

    <resource: #image>

    ^self settingsIcon6

    "Modified: / 19-01-2012 / 14:00:35 / cg"
    "Modified: / 28-02-2012 / 21:59:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

settingsIcon1
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self settingsIcon inspect
     ImageEditor openOnClass:self andSelector:#settingsIcon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'Tools::Inspector2 class settingsIcon'
        ifAbsentPut:[(Depth24Image new) width: 24; height: 24; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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7^UW7^UW7^UW7^UW7^UW7^UW7^UW7^UXF:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself]

    "Created: / 17-01-2012 / 12:45:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

settingsIcon2
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self settingsIcon2 inspect
     ImageEditor openOnClass:self andSelector:#settingsIcon2
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'Tools::Inspector2 class settingsIcon2'
        ifAbsentPut:[(Depth24Image new) width: 24; height: 24; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU"9J["IR#"IR#"IR#"IR#"IR#"IR#"IR#"IR#"IN#
!!9N"!!9J"!!)J!!!!)J!!!!)J!!!!)J!!!!)J!!!!9J"!!9N""9J[UU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UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
UUUUUUUUUUUUUUUUUUUUUUUU') ; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself]
!

settingsIcon3
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self settingsIcon3 inspect
     ImageEditor openOnClass:self andSelector:#settingsIcon3
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'Tools::Inspector2 class settingsIcon3'
        ifAbsentPut:[(Depth24Image new) width: 24; height: 24; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@TZC?V*_?V*_?V*_?V*_?V*_?V*_?V*_?V*_?V*S?
VJ[?UZO?TJK?TI??TI??TI??TJK?UZO?VJ[?TZC?@@@@@@@@@@@@@@@@VJ[?,]_?,]_?,]_?-]7?/NC?/>C?0=??1^C?0^K?-=7?*-G?&L+?"<W?!!<G?!!LO?
"\W?$<+?(]C?UZO?@@@@@@@@@@@@@@@@VJ[?)]''?+]S?-M_?-=7?/M/?/M/?/NC?/-3?-=7?+MK?7OC?7OC?7OC?7OC?7OC?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?Y,;?O<_?SJK?@@@@@@@@@@@@@@@@SJK?VZ7?4^+???S4
??S4??S4??S4??S4XLO?]-K?_=S?_=S?_=S?_=S?_=S?_=S?_=S?_=S?O,??SJK?@@@@@@@@@@@@@@@@RI3?YKG?3>''???K2??K2??K2??K2V;/? =K?$]#?
$]#?$]#?$]#?$]#?$]#?$]#?$]#?#=_?O]O?RI3?@@@@@@@@@@@@@@@@RI3?ZK[?3>''???K2??K2??K2??K2??K2]L#?%]_?&-7?&-7?&-7?&-7?&-7?&-7?
&-+?&-+?P<7?RI3?@@@@@@@@@@@@@@@@RI3?[[+?3>''???K2??K2??K2??K2??K2??K2"=K?&-7?&-7?&-7?&-7?&-7?%=+?%=+?%=+?U<''?RI3?@@@@@@@@
@@@@@@@@QY3?\[7?[+''?Z;''?[K/?[K/?[+''?\[3?]+7?!!,W?"<#?",W?",W?!!<S?_,S?]<K?\+;?[K;?Z[/?QY3?@@@@@@@@@@@@@@@@M8;?QY3?QY3?QY3?
QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?K(;?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself]
!

settingsIcon4
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self settingsIcon4 inspect
     ImageEditor openOnClass:self andSelector:#settingsIcon4
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'Tools::Inspector2 class settingsIcon4'
        ifAbsentPut:[(Depth24Image new) width: 24; height: 24; photometric:(#rgb); bitsPerSample:(#[8 8 8]); samplesPerPixel:(3); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@TZC?V*_?V*_?V*_?V*_?V*_?V*_?V*_?V*_?V*S?
VJ[?UZO?TJK?TI??TI??TI??TJK?UZO?VJ[?TZC?@@@@@@@@@@@@@@@@VJ[???>1??>1??>1??>5??><??>????C???E???A??>7??>*??>X??>J??>F??>C
??>H??>S??> UZO?@@@@@@@@@@@@@@@@VJ[???>%??>-??>4??>7??><??><??><??>>??>7??>*??>*??>J??>J??>J??>J??>J??>J??>JTI??@@@@@@@@
@@@@@@@@VJ[???> ??>)??>+??>+??>+??>+??>+??>+??>)??>\??>D??>D??>D??>D??>D??=-??=-??=-S:G?@@@@@@@@@@@@@@@@UZO???>U??>S??>Q
?/:N?/:N?/:N?/:N?/:N?/:N?/:N??=&??=&??=&??=&??=_??=_??=_??=_SI??@@@@@@@@@@@@@@@@UZO???=;??=8??=1??=6??=6?/:N?/:N?/:N?/:N
??=#?/=P?/=P?/=P?/=P??=U??=U??=U??=USI??@@@@@@@@@@@@@@@@TJK?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?
Y[[?Y[[?Y[[?RI3?@@@@@@@@@@@@@@@@TJK?Y[[?Y[[?Y[[?Y[[?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[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?
Y[[?Y[[?Y[[?RI3?@@@@@@@@@@@@@@@@RI3?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?RI3?@@@@@@@@
@@@@@@@@QY3?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?Y[[?QY3?@@@@@@@@@@@@@@@@M8;?QY3?QY3?QY3?
QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?QY3?K(;?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@') ; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<O??<@@@@@@@@') ; yourself); yourself]
!

settingsIcon5

    <resource: #image>

    ^ GenericToolbarIconLibrary palette16x16Icon

    "Created: / 19-01-2012 / 14:00:24 / cg"
    "Modified: / 18-02-2012 / 16:28:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

settingsIcon6
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self settingsIcon6 inspect
     ImageEditor openOnClass:self andSelector:#settingsIcon6
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'Tools::Inspector2 class settingsIcon6'
        ifAbsentPut:[(Depth8Image new) width: 25; height: 25; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
(:N#(:N#(:N#(:N#(:N#(:N#(:N#(:N#(:IWY&Y&Y&Y1(!!8*J"4*J#""JCX6M3X6PJJ"YG]7]7]7]:H$O#8>O#8>(#MBP$IBP$J"(FA5]WU5]WV G3(:N#(:
N*@+PTEAPTEA(I=X[7A/\F=/''1X1LSD1LSF_H34=OC0<OI>^T6-+Z6-+Z98QI2\''I2\''''!!,5MST5MSV^''T=''Y6]''Y6^]B2D!!HRD!!HY4TLC@0LB<0''Y1VX&I"
X&I"''@<XFA XFA"\FRX&I"X&I)2[&9.[&9.[&9.[&9.[&9.[&9.[&9.[&9.[&V9;^7-;^8NY_(2L#H2L&I$]KB0.KB09&Y!!8#8>O#8>O&H&!!(ZF!!(ZFXIS<?
O3<?O9"V](.K"8.K"9ZF''Y6]''Y6]%"@;N3,;N3.V%WRD!!XRD!!HRU_9&Y&Y&Y&YTWL#P2L#H2%YQ- HB@ HB@%G6U%YVU%YVTD"$)JR$)JYRSZW1<_G1<_IM9
$YFQ$YFQ$00"H"H"H"JS$WI:^''):^''*Q X:N#(:N#)DPF!!(ZF!!(Z$YBP$IBP$IBP$IBP$IBP$IBP$IBP$IBP$IBNTU=_W5=_Z(9FTEAPTEA]# \JB 4JB!!VN
#U-3\7M3\7NMSFU%YVU%YX4IGA0\GA0\#X)U[F1,[F1,"$%!!XVE!!XVFJA!!LSD1LSD8*IT&!!(ZF!!(ZH%GVU1YWE%Y"PPNC 8NC :I"D-#X6M#X6NHQEQTUEQT
UH BB@ HB@ H"H]HW%9^W%9^!!4MNS$9NS$:G@@TEAPTEAX^BSU)ZV%)ZV(IER$)JR$)J  DC@0LC@0NB (JB (JB (JB (JB (JB (JB (JB (JB  @a') ; colorMapFromArray:#[88 88 211 89 89 220 91 91 215 94 94 231 96 96 219 97 97 234 99 99 224 100 100 217 101 101 239 103 103 227 105 105 229 211 88 88 170 88 211 105 106 229 106 106 243 220 89 89 176 89 220 215 91 91 174 91 215 110 110 248 211 88 170 111 111 242 219 96 96 178 96 219 231 94 94 220 89 176 185 94 231 215 91 174 114 114 252 177 100 217 217 100 100 224 99 99 182 99 224 234 97 97 189 97 234 219 96 178 227 103 103 186 103 227 231 94 185 239 101 101 217 100 177 193 101 239 229 105 105 224 99 182 188 105 229 229 106 105 188 106 229 234 97 188 234 97 189 243 106 106 197 106 243 227 103 186 198 106 243 239 101 193 229 105 188 229 106 188 242 111 111 198 111 242 248 110 110 202 110 248 243 106 197 243 106 198 252 114 114 206 114 252 242 111 198 248 110 202 252 114 206 88 170 211 91 174 215 89 176 220 100 177 217 96 178 219 88 197 88 99 182 224 94 185 231 91 201 91 103 186 227 89 205 89 97 189 234 211 170 88 105 188 229 100 204 100 96 206 96 215 174 91 101 193 239 99 209 99 220 176 89 217 177 100 219 178 96 106 197 243 94 216 94 103 213 103 106 198 243 111 198 242 97 219 97 105 216 105 224 182 99 110 202 248 231 185 94 101 223 101 227 186 103 114 206 252 229 188 105 234 189 97 106 228 106 170 211 88 111 228 111 239 193 101 110 232 110 174 215 91 177 217 100 243 197 106 243 198 106 242 198 111 176 220 89 114 236 114 178 219 96 248 202 110 182 224 99 252 206 114 186 227 103 211 211 211 185 231 94 188 229 105 189 234 97 215 215 215 217 217 217 219 219 219 193 239 101 220 220 220 223 223 223 198 242 111 197 243 106 198 243 106 224 224 224 225 225 225 226 226 226 227 227 227 228 228 228 202 248 110 229 229 229 230 230 230 231 231 231 206 252 114 233 233 233 234 234 234 235 235 235 236 236 236 237 237 237 239 239 239 240 240 240 241 241 241 242 242 242 243 243 243 244 244 244 245 245 245 246 246 246 248 248 248 249 249 249 250 250 250 251 251 251 252 252 252 253 253 253 254 254 254]; mask:((Depth1Image new) width: 25; height: 25; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???? O???8C???>@???? O???8C???>@???? O???8C???>@???? O???8C???>@???? O???8C???>@???? O???8C???>@???? O???8C???>@???? O??
?8C???>@???? @@a') ; yourself); yourself]
! !


!Inspector2 class methodsFor:'interface specs'!

windowSpec
    "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::Inspector2 andSelector:#windowSpec
     Tools::Inspector2 new openInterface:#windowSpec
     Tools::Inspector2 open
    "

    <resource: #canvas>

    ^ 
     #(FullSpec
        name: windowSpec
        window: 
       (WindowSpec
          label: 'Inspector2'
          name: 'Inspector2'
          labelChannel: windowTitleAspect
          min: (Point 0 0)
          bounds: (Rectangle 0 0 388 421)
          menu: mainMenu
        )
        component: 
       (SpecCollection
          collection: (
           (MenuPanelSpec
              name: 'ToolBar'
              layout: (LayoutFrame 0 0 0 0 0 1 40 0)
              backgroundChannel: toolbarBackgroundHolder
              menu: toolbarMenu
              textDefault: true
            )
           (NoteBookViewSpec
              name: 'NoteBook'
              layout: (LayoutFrame 0 0 40 0 0 1 0 1)
              model: tabSelectionIndexAspect
              menu: tabLabelsAspect
              useIndex: true
              fitLastRow: false
              canvas: tabViewAspect
              keepCanvasAlive: true
            )
           )
         
        )
      )
! !


!Inspector2 class methodsFor:'menu specs'!

mainMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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


    "
     MenuEditor new openOnClass:Tools::Inspector2 andSelector:#mainMenu
     (Menu new fromLiteralArrayEncoding:(Tools::Inspector2 mainMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(Menu
        (
         (MenuItem
            label: 'File'
            translateLabel: true
            submenu: 
           (Menu
              (
               (MenuItem
                  label: 'Exit'
                  itemValue: closeRequest
                  translateLabel: true
                )
               )
              nil
              nil
            )
          )
         (MenuItem
            label: 'View'
            translateLabel: true
            submenu: 
           (Menu
              (
               (MenuItem
                  label: 'Expand Arrays in All-List'
                  itemValue: expandArraysInAllList:
                  translateLabel: true
                  indication: expandArraysInAllList
                )
               (MenuItem
                  label: '-'
                )
               (MenuItem
                  label: 'Color Setting'
                  translateLabel: true
                  submenuChannel: settingsMenu
                )
               )
              nil
              nil
            )
          )
         )
        nil
        nil
      )
!

settingsMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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


    "
     MenuEditor new openOnClass:Tools::Inspector2 andSelector:#settingsMenu
     (Menu new fromLiteralArrayEncoding:(Tools::Inspector2 settingsMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(Menu
        (
         (MenuItem
            label: 'Default'
            nameKey: #'Default'
            translateLabel: true
            choice: colorProfileHolder
            choiceValue: default
          )
         (MenuItem
            label: 'Red'
            nameKey: #'Red'
            translateLabel: true
            choice: colorProfileHolder
            choiceValue: red
          )
         (MenuItem
            label: 'Green'
            nameKey: #'Green'
            translateLabel: true
            choiceValue: green
            choice: colorProfileHolder
          )
         (MenuItem
            label: 'Blue'
            nameKey: #'Blue'
            translateLabel: true
            choiceValue: blue
            choice: colorProfileHolder
          )
         (MenuItem
            label: 'Yellow'
            nameKey: #'Yellow'
            translateLabel: true
            choiceValue: yellow
            choice: colorProfileHolder
          )
         (MenuItem
            label: 'Gray'
            nameKey: #'Gray'
            translateLabel: true
            choiceValue: gray
            choice: colorProfileHolder
          )
         )
        nil
        nil
      )

    "Modified: / 17-01-2012 / 13:00:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

toolbarMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

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


    "
     MenuEditor new openOnClass:Tools::Inspector2 andSelector:#toolbarMenu
     (Menu new fromLiteralArrayEncoding:(Tools::Inspector2 toolbarMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(Menu
        (
         (MenuItem
            activeHelpKey: backwardInVisitingHistory
            enabled: backButtonEnabledHolder
            label: 'Back'
            itemValue: backButtonAction
            translateLabel: true
            isButton: true
            hideMenuOnActivated: false
            submenuChannel: backButtonMenuChannel
            labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon)
          )
         (MenuItem
            activeHelpKey: forwardInVisitingHistory
            enabled: forwardButtonEnabledHolder
            label: 'Forward'
            itemValue: forwardButtonAction
            translateLabel: true
            isButton: true
            hideMenuOnActivated: false
            submenuChannel: forwardButtonMenuChannel
            labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon)
          )
         (MenuItem
            label: '-'
          )
         (MenuItem
            activeHelpKey: browseClassOfShownObject
            enabled: browseButtonEnabledHolder
            label: 'Browse'
            itemValue: browseClassAction
            translateLabel: true
            isButton: true
            hideMenuOnActivated: false
            labelImage: (ResourceRetriever ToolbarIconLibrary startNewSystemBrowserIcon)
          )
         (MenuItem
            activeHelpKey: browseFile
            label: 'Browse File'
            itemValue: browseFileAction
            translateLabel: true
            isButton: true
            isVisible: currentObjectIsFilename
            hideMenuOnActivated: false
            labelImage: (ResourceRetriever ToolbarIconLibrary startNewFileBrowserIcon)
          )
         (MenuItem
            activeHelpKey: editImage
            label: 'Edit the Image'
            itemValue: editImageAction
            translateLabel: true
            isButton: true
            isVisible: currentObjectIsImage
            hideMenuOnActivated: false
            labelImage: (ResourceRetriever ToolbarIconLibrary startImageEditorIcon)
          )
         (MenuItem
            activeHelpKey: refresh
            label: 'Refresh for Changed Object'
            itemValue: refreshTabs
            translateLabel: true
            isButton: true
            startGroup: right
            labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon)
          )
         (MenuItem
            activeHelpKey: colorProfile
            label: 'Settings'
            translateLabel: true
            isButton: true
            isVisible: false
            submenuChannel: settingsMenu
            labelImage: (ResourceRetriever #'Tools::Inspector2' settingsIcon)
          )
         )
        nil
        nil
      )
! !


!Inspector2 class methodsFor:'startup'!

openOn: anObject

    self new 
        openOn: anObject.

    "Modified: / 17-02-2008 / 10:29:45 / janfrog"
    "Modified (format): / 11-07-2011 / 22:28:03 / cg"
! !


!Inspector2 class methodsFor:'testing'!

testSimpleShow
    |ins|

    ins := Inspector2 openOn:4.
    ins inspect:10.
    ins inspect:42.
    ins inspect:'dead one'.
    ins inspect:'rolled back'.
    
    "/ins inspectItem: (ins history at: 3).  "/ Rollback history, zustanou jen prvni 3
    
    ins inspect:'xFuj'.

    "Modified: / 11-01-2008 / 20:36:37 / janfrog"
! !


!Inspector2 methodsFor:'accessing'!

backButtonEnabled:value 
    ^ self backButtonEnabledHolder value:value

    "Created: / 12-01-2008 / 19:14:35 / janfrog"
    "Modified (format): / 19-08-2011 / 08:59:41 / cg"
!

currentObject
    ^ self navigationState theObject

    "Created: / 13-01-2008 / 10:14:47 / janfrog"
    "Modified: / 17-02-2008 / 09:49:01 / janfrog"
!

currentState
    ^ self navigationHistoryHolder currentItem

    "Created: / 21-02-2008 / 19:39:45 / janfrog"
    "Modified: / 27-02-2008 / 11:56:55 / janfrog"
!

forwardButtonEnabled:value 
    ^ self forwardButtonEnabledHolder value:value

    "Created: / 12-01-2008 / 19:14:48 / janfrog"
    "Modified (format): / 19-08-2011 / 08:59:45 / cg"
!

navigationState
    ^ self navigationHistoryHolder value currentItem

    "Created: / 17-02-2008 / 09:49:01 / janfrog"
    "Modified: / 21-02-2008 / 19:34:14 / janfrog"
    "Modified: / 22-07-2011 / 19:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

navigationState:historyItem 
    self navigationHistoryHolder "subjectChannel:" value currentItem:historyItem.

    "/self fixNavigation. "Nevola se kvuli problemu s prekreslovanim"
    "/self updateTabs.

    "Created: / 17-02-2008 / 09:49:11 / janfrog"
    "Modified: / 21-02-2008 / 19:47:26 / janfrog"
    "Modified: / 22-07-2011 / 19:13:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 19-08-2011 / 09:16:38 / cg"
! !


!Inspector2 methodsFor:'aspects'!

backButtonEnabledHolder
    "return/create the 'backButtonEnabledHolder' value holder (automatically generated)"

    ^(AspectAdaptor forAspect:#canGoBack)
        subjectChannel: self navigationHistoryHolder

    "Created: / 12-01-2008 / 19:13:49 / janfrog"
    "Modified: / 27-02-2008 / 12:11:30 / janfrog"
!

browseButtonEnabledHolder
    ^ BlockValue
        with:[:m | m notNil]
        argument:self navigationStateAspect

    "Created: / 19-08-2011 / 09:22:47 / cg"
!

colorProfileHolder
    "return/create the 'colorProfileHolder' value holder (automatically generated)"

    colorProfileHolder isNil ifTrue:[
        colorProfileHolder := ValueHolder with: #default.
    ].
    ^ colorProfileHolder

    "Modified: / 17-01-2012 / 12:54:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

currentObjectHolder
    currentObjectHolder isNil ifTrue:[
        currentObjectHolder := ValueHolder new
    ].
    ^ currentObjectHolder

    "Created: / 27-02-2008 / 12:05:22 / janfrog"
    "Created: / 19-08-2011 / 08:58:48 / cg"
!

currentObjectIsFilename
    ^ BlockValue
        with:[:o | o isFilename ]
        argument:self currentObjectHolder

    "Created: / 19-08-2011 / 08:56:27 / cg"
!

currentObjectIsImage
    ^ BlockValue
        with:[:o | o isImageOrForm ]
        argument:self currentObjectHolder

    "Created: / 15-01-2012 / 10:06:28 / cg"
!

expandArraysInAllList
    ^ InspectorView expandArraysInAllLists

    "Created: / 30-01-2012 / 16:52:46 / cg"
!

expandArraysInAllList:aBoolean
    InspectorView expandArraysInAllLists:aBoolean

    "Created: / 30-01-2012 / 16:53:15 / cg"
!

forwardButtonEnabledHolder
    "return/create the 'backButtonEnabledHolder' value holder (automatically generated)"

    ^(AspectAdaptor forAspect:#canGoForward)
        subjectChannel: self navigationHistoryHolder

    "Created: / 12-01-2008 / 19:13:49 / janfrog"
    "Modified: / 27-02-2008 / 12:11:26 / janfrog"
!

navigationHistoryHolder
    "return/create the 'currentItemHolder' value holder (automatically generated)"
    
    navigationHistoryHolder isNil ifTrue:[
        navigationHistoryHolder := Tools::NavigationHistory new.
    ].
    ^ navigationHistoryHolder

    "Created: / 21-02-2008 / 19:34:14 / janfrog"
!

navigationStateAspect
    navigationStateAspect isNil ifTrue:[
        navigationStateAspect := (AspectAdaptor forAspect:#currentItem) 
                    subjectChannel:self navigationHistoryHolder
    ].
    ^ navigationStateAspect

    "Created: / 27-02-2008 / 12:05:22 / janfrog"
    "Modified (format): / 19-08-2011 / 08:59:10 / cg"
!

tabLabelsAspect
    ^ (AspectAdaptor forAspect:#tabLabels) 
        subjectChannel:self navigationStateAspect

    "Created: / 16-01-2008 / 17:29:52 / janfrog"
    "Modified: / 27-02-2008 / 12:05:32 / janfrog"
    "Modified (format): / 19-08-2011 / 08:59:21 / cg"
!

tabSelectionIndexAspect
    ^ ((AspectAdaptor forAspect:#selectionIndex) 
        subjectChannel:self navigationStateAspect)
        onChangeEvaluate:[ self tabViewAspect changed ];
        yourself

    "Created: / 16-01-2008 / 17:29:29 / janfrog"
    "Modified: / 27-02-2008 / 12:06:05 / janfrog"
!

tabViewAspect
    tabViewAspect isNil ifTrue:[
        tabViewAspect := (AspectAdaptor forAspect:#selectionView) 
                    subjectChannel:self navigationStateAspect
    ].
    ^ tabViewAspect

    "Created: / 16-01-2008 / 17:30:05 / janfrog"
    "Modified: / 27-02-2008 / 12:05:46 / janfrog"
    "Modified (format): / 19-08-2011 / 08:59:35 / cg"
!

toolbarBackgroundHolder
    "return/create the 'toolbarBackgroundHolder' value holder (automatically generated)"

    toolbarBackgroundHolder isNil ifTrue:[
        toolbarBackgroundHolder := BlockValue
            with: [:profile| 
                | clr |    

                clr := ColorProfiles at: profile value.
                clr isNil ifTrue:[
                    clr := MenuPanel defaultBackgroundColor
                ].
                clr.            
            ] argument: self colorProfileHolder            
    ].
    ^ toolbarBackgroundHolder

    "Modified: / 17-01-2012 / 13:04:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

windowTitleAspect
    ^ (AspectAdaptor forAspect:#displayString) 
        subjectChannel:self navigationStateAspect

    "Created: / 17-02-2008 / 08:42:21 / janfrog"
    "Modified: / 27-02-2008 / 12:05:56 / janfrog"
! !


!Inspector2 methodsFor:'menu'!

backButtonMenuChannel
    ^ [ self navigationHistoryHolder goBackMenu ]

    "Created: / 12-01-2008 / 18:57:08 / janfrog"
    "Modified: / 22-02-2008 / 16:57:46 / janfrog"
!

forwardButtonMenuChannel
    ^ [ self navigationHistoryHolder goForwardMenu ]

    "Created: / 12-01-2008 / 18:57:30 / janfrog"
    "Modified: / 22-02-2008 / 16:58:11 / janfrog"
! !


!Inspector2 methodsFor:'menu actions'!

backButtonAction
    self navigationHistoryHolder goBack.
    self updateWindowLabel

    "Modified: / 21-02-2008 / 19:40:23 / janfrog"
    "Modified: / 15-07-2011 / 16:26:28 / cg"
!

browseClassAction
    "open a class browser, or try to add a tab to the previously opened class browser"

    | class |

    class := self currentObject class.

    browser notNil ifTrue:[
        "/ try to add a tab to the already opened browser
        (browser isKindOf:Tools::NewSystemBrowser) ifTrue:[
            browser spawnClassBrowserFor:(Array with:class) in:#newBuffer.
            "/ browser spawnSingleClassBrowserFor:class in:#newBuffer.
            browser window raise.
            ^ self.
        ].
    ].
    "/ if that fails, open a new one

    browser := UserPreferences current systemBrowserClass 
                    openInClass:class selector:nil "/ browseSingleClass: class

    "Modified: / 23-07-2011 / 11:28:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified (format): / 05-03-2012 / 13:03:55 / cg"
!

browseFileAction
    "open a filebrowser on the file represented by the current object"

    | fn |

    fn := self currentObject asFilename.
    UserPreferences current fileBrowserClass openOn:fn

    "Created: / 19-08-2011 / 09:29:44 / cg"
!

changeColorAction: color

    self toolbarBackgroundHolder value: (Color perform: color asSymbol)

    "Created: / 17-01-2012 / 01:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

editImageAction
    "open an imageEditor on the current object"

    | img |

    img := self currentObject.
    ImageEditor openOnImage:img.

    "Created: / 15-01-2012 / 10:08:29 / cg"
!

forwardButtonAction
    self navigationHistoryHolder goForward.
    self updateWindowLabel

    "Created: / 21-02-2008 / 19:52:03 / janfrog"
    "Modified: / 15-07-2011 / 16:26:33 / cg"
!

refreshTabs
    self navigationHistoryHolder currentItem refreshTabs.
    self tabViewAspect changed.

"/    sel := selectionIndex.
"/    self selectionIndex:nil.
"/    self selectionIndex:sel.

    "Created: / 21-08-2011 / 08:23:00 / cg"
! !


!Inspector2 methodsFor:'opening'!

closeDownViews
    LastExtent := self window extent.
    super closeDownViews.

    "Created: / 11-07-2011 / 22:33:47 / cg"
!

historyTryPush: anObject
    <resource: #obsolete>

  "/ Pokud uz na anObject byl tak tam skocit, jinak pridat na konec
  self history do: [:item |
    item theObject == anObject ifTrue:[ ^item ]
  ].

  ^ self history push:anObject.

    "Modified: / 16-01-2008 / 14:25:30 / janfrog"
!

inspect:anObject 
    self navigationHistoryHolder currentItem:(NavigationState for:anObject).
    self window notNil ifTrue:[
        self updateWindowLabel
    ].

    "Modified: / 27-02-2008 / 12:06:52 / janfrog"
    "Modified: / 15-07-2011 / 16:26:03 / cg"
    "Modified (format): / 19-08-2011 / 09:01:20 / cg"
!

openOn: anObject
    self inspect: anObject.    
    self openWithExtent:(LastExtent ? nil).

    "Modified: / 13-01-2008 / 13:55:27 / janfrog"
    "Modified: / 11-07-2011 / 22:31:42 / cg"
!

postBuildWith:aBuilder
    super postBuildWith:aBuilder.

    self updateWindowLabel

    "Created: / 15-07-2011 / 16:25:36 / cg"
!

updateWindowLabel
    |currentItem object|

    (currentItem := self navigationHistoryHolder currentItem) notNil ifTrue:[
        object := currentItem theObject.
    ].
    self currentObjectHolder value:object.
    self window label:(InspectorView commonLabelFor:object).

    "Created: / 15-07-2011 / 16:25:42 / cg"
! !


!Inspector2::NavigationState class methodsFor:'creating classes'!

for:anObject 
    |item|

    item := self new.
    item theObject:anObject.
    ^ item.

    "Modified (format): / 19-08-2011 / 09:24:40 / cg"
! !


!Inspector2::NavigationState class methodsFor:'documentation'!

version
    ^'$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.32 2012-10-24 13:04:30 cg Exp $'
!

version_SVN
    ^'§Id: Tools__Inspector2.st 115 2009-04-16 12:47:07Z vranyj1 §'
! !


!Inspector2::NavigationState methodsFor:'accessing'!

index
    ^ index
!

index:something
    index := something.
!

selectionIndex
    selectionIndex isNil ifTrue:[^1].
    selectionIndex < 1 ifTrue:[^1].
    selectionIndex > tabs size ifTrue:[^tabs size].
    ^selectionIndex

    "Created: / 16-01-2008 / 17:24:27 / janfrog"
    "Modified: / 17-02-2008 / 10:20:35 / janfrog"
    "Modified: / 18-11-2011 / 15:00:01 / cg"
!

selectionIndex: anInteger
    selectionIndex := anInteger.
    self changed:#selectionIndex

    "Created: / 16-01-2008 / 17:27:52 / janfrog"
    "Modified: / 17-02-2008 / 09:46:45 / janfrog"
!

selectionView

    |tab|

    tab := self tabs at: self selectionIndex.
    ^tab 
        ifNil:[nil]
        ifNotNil:[tab view].

    "Created: / 16-01-2008 / 17:31:19 / janfrog"
!

tabLabels

    ^self tabs collect:[:tab | tab label]

    "Created: / 16-01-2008 / 17:14:07 / janfrog"
!

tabViews

    ^self tabs collect:[:tab | tab view]

    "Created: / 16-01-2008 / 17:14:13 / janfrog"
!

tabs

    tabs isNil ifTrue:[self initializeTabs].
    ^tabs

    "Created: / 16-01-2008 / 16:51:53 / janfrog"
    "Modified: / 18-11-2011 / 15:00:05 / cg"
!

theObject
    ^ theObject
!

theObject:anObject
    theObject := anObject.
    self changed

    "Modified: / 17-02-2008 / 08:38:44 / janfrog"
    "Modified: / 19-08-2011 / 09:16:25 / cg"
! !


!Inspector2::NavigationState methodsFor:'comparing'!

= anotherState

    ^self class == anotherState class 
        and:[self theObject == anotherState theObject]

    "Created: / 21-02-2008 / 19:39:01 / janfrog"
!

hash

    ^theObject hash

    "Created: / 21-02-2008 / 19:38:08 / janfrog"
! !


!Inspector2::NavigationState methodsFor:'displaying'!

displayString

    displayString isNil ifTrue:[
        Error handle:[:ex |
            displayString := '*ERROR*'
        ] do:[
            displayString := theObject printString contractAtEndTo:15.
        ].
        displayString := displayString , ' [', (theObject class name ? '???')  , ']'
    ].
    ^ displayString

    "Created: / 21-02-2008 / 19:53:07 / janfrog"
    "Modified: / 13-06-2012 / 14:40:34 / cg"
! !


!Inspector2::NavigationState methodsFor:'initialization'!

initializeClassBrowserTab
    | browser spec cls canvas makeView view|

    cls := theObject class theNonMetaclass.

    "/ spec := #singleClassBrowserSpec.
    spec := #multipleClassBrowserSpec.

    makeView := [
        view isNil ifTrue:[
            browser := Tools::NewSystemBrowser new.
            browser isEmbeddedBrowser:true.
            browser createBuilder.
            browser navigationState canvasType:spec.
            browser browserCanvasType:spec.
            canvas := browser browserCanvas value.
            canvas builder:(browser builder).
            browser navigationState canvas:canvas.
            "/ browser switchToClassHierarchyView.
            "/ browser showInheritedMethods.
            browser classListGenerator value:(cls withAllSuperclasses).
            browser sortByNameAndInheritance value:true.
            browser selectClass: cls.

            view := ApplicationSubView new client: browser spec: spec.
        ].
        view
    ].

    tabs add:
        (Tools::Inspector2Tab new
            priority: 0;
            label:'Class';
            viewHolder: makeView)

    "Created: / 22-07-2011 / 18:48:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 13-06-2012 / 14:58:01 / cg"
!

initializeCommonTabs

    "Unfinished code"
"/    JV@2012-04-20: Don't add class tab, only takes time and nobody uses it anyway
"/    self initializeClassBrowserTab

"/    tabs add:
"/        (Tools::Inspector2Tab new
"/            priority: 50;
"/            label:'Object';
"/            view: ((theObject inspectorClass new inspect:theObject)
"/                        yourself))

    "Created: / 16-01-2008 / 16:56:48 / janfrog"
    "Modified: / 17-02-2008 / 10:29:54 / janfrog"
    "Modified (comment): / 20-04-2012 / 20:23:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

initializeExtraTabs

    "/ cg: I prefer using explicit getter - so I find them in the browser
    theObject inspector2Tabs do: [:selector|
            | tab |
            tab := [ theObject perform: selector ] 
                        on: Error do:[:ex|
                            "/ for debugging:  ex reject.
                            Tools::Inspector2Tab new 
                                label: selector;
                                text:
                                    (ex description, Character cr, Character cr,
                                     ex suspendedContext fullPrintAllString)].
            (tab notNil and:[tab isKindOf: Tools::Inspector2Tab])
                ifTrue:[tabs add: tab]].

    "Created: / 16-01-2008 / 17:25:24 / janfrog"
    "Modified: / 17-02-2008 / 10:30:43 / janfrog"
    "Modified: / 07-11-2008 / 08:40:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
    "Modified (format): / 21-08-2011 / 08:01:34 / cg"
!

initializeTabs

    tabs := OrderedCollection new.
    self initializeCommonTabs.
    self initializeExtraTabs.
    tabs := tabs asSortedCollection:[:a :b|a priority > b priority].

    "Created: / 16-01-2008 / 16:54:28 / janfrog"
    "Modified: / 17-02-2008 / 10:08:04 / janfrog"
!

refreshTabs
    tabs := nil.
    self initializeTabs.

    "Created: / 21-08-2011 / 08:23:11 / cg"
! !


!Inspector2 class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.32 2012-10-24 13:04:30 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.32 2012-10-24 13:04:30 cg Exp $'
!

version_CVS_jvrany
    ^ '§Header: /opt/data/cvs/stx/goodies/libtool3/Inspector2.st,v 1.6 2008-02-27 13:45:23 vranyj1 Exp §'
!

version_SVN
    ^ '§Id: Tools__Inspector2.st 7486 2009-10-26 22:06:24Z vranyj1 §'
! !


Inspector2 initialize!