VDBAbstractContentsApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 10 Jun 2019 15:22:49 +0100
changeset 166 d55f55ac977b
parent 154 26937faa5a97
child 188 7080f4698aec
permissions -rw-r--r--
plugins/bee: add symbol filter to quickly search through (possibly long) list of symbols.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
jv:vdb - Visual / VM Debugger
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
"{ Package: 'jv:vdb' }"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
"{ NameSpace: Smalltalk }"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
VDBAbstractApplication subclass:#VDBAbstractContentsApplication
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
	instanceVariableNames:'contentsValid'
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
	classVariableNames:''
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	poolDictionaries:''
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	category:'VDB-UI-Abstract'
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
!VDBAbstractContentsApplication class methodsFor:'documentation'!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
copyright
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
jv:vdb - Visual / VM Debugger
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
Copyright (C) 2015-now Jan Vrany
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
! !
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
!VDBAbstractContentsApplication class methodsFor:'queries'!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
isAbstract
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
    "Return if this class is an abstract class.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
     True is returned here for myself only; false for subclasses.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
     Abstract subclasses must redefine this again."
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
    ^ self == VDBAbstractContentsApplication.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
! !
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
!VDBAbstractContentsApplication methodsFor:'change & update'!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
enqueueDelayedUpdateContents
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
    contentsValid := false.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
    windowVisible ifTrue:[
154
26937faa5a97 Use standard `#enqueueMessage:` mechanism to enqueue delayed updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    48
        self enqueueMessage:#delayedUpdateContentsInternal
151
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
    ]
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
    "Created: / 01-10-2018 / 12:56:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
    "Modified: / 14-02-2019 / 16:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
updateAfterWindowVisibilityChanged
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
    contentsValid ifFalse:[ 
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
        self enqueueDelayedUpdateContents  
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    ].
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    "Created: / 14-02-2019 / 16:17:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
! !
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
!VDBAbstractContentsApplication methodsFor:'change & update-delayed'!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
delayedUpdateContents
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
    self subclassResponsibility
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
    "Created: / 14-02-2019 / 16:16:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
delayedUpdateContentsInternal
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
    "/ For internal use, do not override!!"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
    contentsValid := false.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
    windowVisible ifTrue:[ 
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
        self delayedUpdateContents.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
        contentsValid := true.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
    ].
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
    "Created: / 14-02-2019 / 16:09:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
! !
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
!VDBAbstractContentsApplication methodsFor:'initialization'!
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
initialize
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
    super initialize.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
    contentsValid := false.
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
    "Created: / 14-02-2019 / 16:18:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
! !
bc7626f46210 Performance: do not update contents of windows when not needed
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90