ViewWithAcceptAndCancelBar.st
author Patrik Svestka <patrik.svestka@gmail.com>
Fri, 05 Nov 2021 14:28:53 +0100
branchjv
changeset 19617 96a62e7ef902
parent 19614 0d756d4c5298
permissions -rw-r--r--
Tools::LintHighlighter warning blue color to support dark skin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2006 by eXept Software AG
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
     3
 COPYRIGHT (c) 2021 LabWare
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
              All Rights Reserved
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 This software is furnished under a license and may be used
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 only in accordance with the terms of that license and with the
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 inclusion of the above copyright notice.   This software may not
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 be provided or otherwise made available to, or used by, any
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 other person.  No title to or ownership of the software is
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
 hereby transferred.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libtool' }"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
15360
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
    15
"{ NameSpace: Smalltalk }"
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
    16
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
SimpleView subclass:#ViewWithAcceptAndCancelBar
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
    18
	instanceVariableNames:'slaveView bar reallyModifiedHolder acceptAction cancelAction
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
    19
		compareAction'
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	classVariableNames:''
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	category:'Views-Basic'
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
SimpleView subclass:#AcceptAndCancelBar
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
    26
	instanceVariableNames:'acceptButton cancelButton compareButton acceptColor cancelColor
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
    27
		compareColor'
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	classVariableNames:''
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
	poolDictionaries:''
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
	privateIn:ViewWithAcceptAndCancelBar
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    33
Button subclass:#ButtonWithHelpText
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    34
	instanceVariableNames:'helpText'
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    35
	classVariableNames:''
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    36
	poolDictionaries:''
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    37
	privateIn:ViewWithAcceptAndCancelBar::AcceptAndCancelBar
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    38
!
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
    39
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
!ViewWithAcceptAndCancelBar class methodsFor:'documentation'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
copyright
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
 COPYRIGHT (c) 2006 by eXept Software AG
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
    45
 COPYRIGHT (c) 2021 LabWare
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
              All Rights Reserved
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
 This software is furnished under a license and may be used
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
 only in accordance with the terms of that license and with the
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
 inclusion of the above copyright notice.   This software may not
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
 be provided or otherwise made available to, or used by, any
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
 other person.  No title to or ownership of the software is
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
 hereby transferred.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
documentation
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    experimental - self like accept/cancel bar in the browsers
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    code view.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    Enable with:
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
         UserPreferences current showAcceptCancelBarInBrowser:true
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
"
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
! !
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
!ViewWithAcceptAndCancelBar methodsFor:'accessing'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
acceptAction:something
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    69
    "define the action to be performed when the green accept button is pressed"
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    70
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    acceptAction := something.
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    72
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    73
    "Modified (comment): / 29-11-2011 / 12:59:18 / cg"
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
cancelAction:something
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    77
    "define the action to be performed when the red cancel button is pressed"
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    78
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    cancelAction := something.
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    80
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    81
    "Modified (comment): / 29-11-2011 / 12:59:24 / cg"
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    84
compareAction:aBlock
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    85
    "define the action to be performed when the yellow compare button is pressed"
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    86
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    87
    compareAction := aBlock.
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    88
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    89
    "Modified (comment): / 29-11-2011 / 12:59:01 / cg"
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
    90
!
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
    91
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
reallyModifiedHolder:aValueHolder
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    93
    "set the holder which keeps track of the real modified state;
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    94
     the modified state of the view is set with every user-input,
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    95
     but cleared by the master (in order to trigger future modified events).
14434
a99f61cbb975 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14429
diff changeset
    96
     With every modified change, the state of the reallyModified is updated"
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    97
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    98
    reallyModifiedHolder notNil ifTrue:[
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
    99
        reallyModifiedHolder removeDependent:self.
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   100
    ].
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    reallyModifiedHolder := aValueHolder.
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   102
    reallyModifiedHolder notNil ifTrue:[
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   103
        reallyModifiedHolder addDependent:self.
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   104
    ]
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   105
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   106
    "Modified: / 29-11-2011 / 13:01:02 / cg"
8842
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   107
!
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   108
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   109
scrolledView
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   110
    "for protocol compatibility"
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   111
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   112
    ^ slaveView scrolledView
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
! !
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   115
!ViewWithAcceptAndCancelBar methodsFor:'action'!
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   116
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   117
accept
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   118
    acceptAction value
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   119
!
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   120
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   121
cancel
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   122
    cancelAction notNil ifTrue:[
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   123
        cancelAction value
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   124
    ]
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   125
!
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   126
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   127
compare
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   128
    compareAction notNil ifTrue:[
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   129
        compareAction value
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   130
    ]
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   131
! !
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   132
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
!ViewWithAcceptAndCancelBar methodsFor:'change & update'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
hideBar
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    bar unmap.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
    bar hiddenOnRealize:true.
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   138
    slaveView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
showBar
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   142
    slaveView origin:(20 @ 0.0) corner:(1.0 @ 1.0).
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    bar hiddenOnRealize:false.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
    bar realize.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
update:something with:aParameter from:changedObject
7309
691b97b5b79e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6775
diff changeset
   148
    |app|
691b97b5b79e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6775
diff changeset
   149
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    slaveView notNil ifTrue:[
13518
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   151
        (changedObject == reallyModifiedHolder 
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   152
        or:[ changedObject == slaveView modifiedChannel ]) ifTrue:[
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   153
            (app := self application) notNil ifTrue:[
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   154
                "/ not sure if we really need to send it through the application
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   155
                app enqueueMessage:#updateBarVisibility for:self arguments:#().
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   156
            ] ifFalse:[
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   157
                self sensor pushUserEvent:#updateBarVisibility for:self withArguments:#()
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   158
            ]
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
        ].
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
    ].
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    super update:something with:aParameter from:changedObject
7309
691b97b5b79e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6775
diff changeset
   162
10919
5b83c014a5ae comments
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
   163
    "Modified: / 29-11-2011 / 12:57:55 / cg"
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
updateBarVisibility
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    |modified|
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
10920
9228a3108da8 comment/format in: #updateBarVisibility
Claus Gittinger <cg@exept.de>
parents: 10919
diff changeset
   169
    modified := reallyModifiedHolder notNil 
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
                ifTrue:[ reallyModifiedHolder value ]
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
                ifFalse:[ slaveView modifiedChannel value ].
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    modified ifTrue:[
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
        self showBar
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    ] ifFalse:[
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
        self hideBar
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    ].
10920
9228a3108da8 comment/format in: #updateBarVisibility
Claus Gittinger <cg@exept.de>
parents: 10919
diff changeset
   178
9228a3108da8 comment/format in: #updateBarVisibility
Claus Gittinger <cg@exept.de>
parents: 10919
diff changeset
   179
    "Modified (format): / 29-11-2011 / 14:05:04 / cg"
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
! !
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
!ViewWithAcceptAndCancelBar methodsFor:'initialization'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
initialize
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
    super initialize.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    bar := AcceptAndCancelBar in:self.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    bar origin:(0.0 @ 0.0) corner:(20 @ 1.0).
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
    bar hiddenOnRealize:true.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
    bar acceptButton action:[ self accept ].
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
    bar cancelButton action:[ self cancel ].
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   193
    bar compareButton action:[ self compare ].
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
    acceptAction := [ slaveView notNil ifTrue:[ slaveView accept ] ].
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
    cancelAction := [  ].
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
    "
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
     self new open
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    "
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
14429
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   203
setSlaveView:aView
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
    slaveView := aView.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
    aView origin:(0.0@0.0) corner:(1.0@1.0).
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
    aView modifiedChannel addDependent:self.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
    "
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
     |v|
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
     v := self new.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
     v slaveView:CodeView new.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
     v open
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
    "
14429
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   215
!
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   216
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   217
slaveView:aView
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   218
    self add:aView.
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   219
    self setSlaveView:aView.
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   220
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   221
    "
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   222
     |v|
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   223
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   224
     v := self new.
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   225
     v slaveView:CodeView new.
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   226
     v open
3fb66a972ee5 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 13518
diff changeset
   227
    "
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
! !
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar methodsFor:'accessing'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
acceptButton
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
    ^ acceptButton
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
cancelButton
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
    ^ cancelButton
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   238
!
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   239
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   240
compareButton
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   241
    ^ compareButton
7761
e9d62468e172 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
   242
! !
e9d62468e172 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
   243
e9d62468e172 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
   244
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar methodsFor:'help'!
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   245
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   246
flyByHelpTextAt:srcPoint
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   247
    "return the helpText for aPoint (i.e. when mouse-pointer is moved over an item)."
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   248
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   249
    (acceptButton bounds containsPoint:srcPoint) ifTrue:[
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   250
        ^ resources string:'Accept'
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   251
    ].
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   252
    (cancelButton bounds containsPoint:srcPoint) ifTrue:[
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   253
        ^ resources string:'Cancel'
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   254
    ].
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   255
    (compareButton bounds containsPoint:srcPoint) ifTrue:[
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   256
        ^ resources string:'Compare against Original'
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   257
    ].
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   258
    ^ nil
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   259
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   260
    "Modified: / 26-09-2012 / 14:26:14 / cg"
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
! !
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar methodsFor:'initialization'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   265
initStyle
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   266
    "this method sets up all style dependent things"
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   267
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   268
    <resource: #style (#'acceptAndCancelBar.acceptBackgroundColor'
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   269
                       #'acceptAndCancelBar.cancelBackgroundColor'
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   270
                       #'acceptAndCancelBar.compareBackgroundColor')>
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   271
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   272
    super initStyle.
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   273
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   274
    acceptColor := styleSheet colorAt: 'acceptAndCancelBar.acceptBackgroundColor' 
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   275
                              default: [ UserPreferences current useColorsForColorBlindness 
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   276
                                            ifTrue:[ Color blue onDevice:device ]
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   277
                                            ifFalse:[ Color green onDevice:device ] ].
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   278
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   279
    cancelColor := styleSheet colorAt: 'acceptAndCancelBar.cancelBackgroundColor' 
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   280
                              default: [ Color red onDevice:device ].
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   281
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   282
    compareColor := styleSheet colorAt: 'acceptAndCancelBar.compareBackgroundColor' 
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   283
                              default: [ Color yellow onDevice:device ].
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   284
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   285
    "Created: / 14-10-2021 / 11:49:04 / Jan Vrany <jan.vrany@labware.com>"
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   286
!
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   287
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
initialize
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   289
    | order|
15360
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   290
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
    super initialize.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
16612
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   293
    order := UserPreferences current acceptCancelBarOrder.
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   294
    
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   295
    acceptButton := ButtonWithHelpText new.
8336
e37d5992d9e4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8332
diff changeset
   296
    acceptButton origin:0.0 @ 0.0 corner:1.0@0.7.
15360
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   297
    acceptButton backgroundColor:acceptColor.
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   298
    acceptButton enteredBackgroundColor:acceptColor lightened.
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   299
    acceptButton activeBackgroundColor:acceptColor darkened.
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   300
    acceptButton flyByHelpText:(resources string:'Accept').
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    self add:acceptButton.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   303
    cancelButton := ButtonWithHelpText new.
16612
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   304
    order == #acceptCompareCancel ifTrue:[
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   305
        cancelButton origin:0.0 @ 0.9 corner:1.0@1.0.
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   306
    ] ifFalse:[
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   307
        cancelButton origin:0.0 @ 0.7 corner:1.0@0.9.
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   308
    ].
15360
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   309
    cancelButton backgroundColor:cancelColor.
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   310
    cancelButton enteredBackgroundColor:cancelColor lightened.
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   311
    cancelButton activeBackgroundColor:cancelColor darkened.
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   312
    cancelButton flyByHelpText:(resources string:'Cancel').
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
    self add:cancelButton.
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   315
    compareButton := ButtonWithHelpText new.
16612
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   316
    order == #acceptCompareCancel ifTrue:[
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   317
        compareButton origin:0.0 @ 0.7 corner:1.0@0.9.
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   318
    ] ifFalse:[
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   319
        compareButton origin:0.0 @ 0.9 corner:1.0@1.0.
7ef54262119a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16305
diff changeset
   320
    ].
15360
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   321
    compareButton backgroundColor:compareColor.
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   322
    compareButton enteredBackgroundColor:compareColor lightened lightened.
480e3544af43 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 14648
diff changeset
   323
    compareButton activeBackgroundColor:compareColor darkened.
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   324
    compareButton flyByHelpText:(resources string:'Compare against Original').
8332
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   325
    compareButton label:'?'.
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   326
    self add:compareButton.
fd3728983e3c +compareButton
Claus Gittinger <cg@exept.de>
parents: 8240
diff changeset
   327
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
    "
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
     AcceptAndCancelBar new open
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    "
11816
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   331
4fd3ddf4f2ff language strings
Claus Gittinger <cg@exept.de>
parents: 10920
diff changeset
   332
    "Modified: / 26-09-2012 / 14:44:18 / cg"
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   333
    "Modified: / 14-10-2021 / 11:49:58 / Jan Vrany <jan.vrany@labware.com>"
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
! !
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
6775
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   336
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar::ButtonWithHelpText methodsFor:'accessing'!
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   337
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   338
flyByHelpText
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   339
    ^ helpText
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   340
!
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   341
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   342
flyByHelpText:something
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   343
    helpText := something.
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   344
! !
08d41de35293 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6772
diff changeset
   345
16305
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   346
!ViewWithAcceptAndCancelBar::AcceptAndCancelBar::ButtonWithHelpText methodsFor:'initialization'!
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   347
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   348
reinitStyle
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   349
    "do nothing, especially keep the background color"
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   350
! !
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   351
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
!ViewWithAcceptAndCancelBar class methodsFor:'documentation'!
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
version
16305
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   355
    ^ '$Header$'
8842
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   356
!
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   357
a2fc5fdbd5ae added: #scrolledView
Claus Gittinger <cg@exept.de>
parents: 8336
diff changeset
   358
version_CVS
16305
c8759e745b82 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 15360
diff changeset
   359
    ^ '$Header$'
19614
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   360
!
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   361
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   362
version_HG
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   363
0d756d4c5298 Themes: use stylesheet to define colors for accept-cancel bars
Jan Vrany <jan.vrany@labware.com>
parents: 16617
diff changeset
   364
    ^ '$Changeset: <not expanded> $'
6772
07a067c578d5 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
! !
13518
049393762925 class: ViewWithAcceptAndCancelBar
Claus Gittinger <cg@exept.de>
parents: 11816
diff changeset
   366