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