Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
59a222b9
Commit
59a222b9
authored
Oct 01, 1998
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added options to visible window
parent
4bd9c8cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
Tools/pynche/StripViewer.py
Tools/pynche/StripViewer.py
+16
-11
No files found.
Tools/pynche/StripViewer.py
View file @
59a222b9
...
...
@@ -126,13 +126,14 @@ class StripWidget:
numchips
=
_NUMCHIPS
,
generator
=
None
,
axis
=
None
,
label
=
''
):
label
=
''
,
uwdvar
=
None
):
# instance variables
self
.
__generator
=
generator
self
.
__axis
=
axis
self
.
__numchips
=
numchips
assert
self
.
__axis
in
(
0
,
1
,
2
)
self
.
__u
pdate_while_dragging
=
0
self
.
__u
wd
=
uwdvar
# the last chip selected
self
.
__lastchip
=
None
self
.
__sb
=
switchboard
...
...
@@ -202,7 +203,7 @@ class StripWidget:
color
=
self
.
__chips
[
chip
[
0
]
-
1
]
red
,
green
,
blue
=
ColorDB
.
rrggbb_to_triplet
(
color
)
etype
=
int
(
event
.
type
)
if
(
etype
==
BTNUP
or
self
.
__u
pdate_while_dragging
):
if
(
etype
==
BTNUP
or
self
.
__u
wd
.
get
()
):
# update everyone
self
.
__sb
.
update_views
(
red
,
green
,
blue
)
else
:
...
...
@@ -259,31 +260,35 @@ class StripWidget:
# move the arrows around
self
.
__trackarrow
(
chip
,
(
red
,
green
,
blue
))
def
set_update_while_dragging
(
self
,
flag
):
self
.
__update_while_dragging
=
flag
class
StripViewer
:
def
__init__
(
self
,
switchboard
,
parent
=
None
):
self
.
__sb
=
switchboard
# create a frame inside the parent
self
.
__frame
=
Frame
(
parent
)
self
.
__frame
=
Frame
(
parent
,
relief
=
GROOVE
,
borderwidth
=
2
)
self
.
__frame
.
pack
()
uwd
=
BooleanVar
()
self
.
__reds
=
StripWidget
(
switchboard
,
self
.
__frame
,
generator
=
constant_cyan_generator
,
axis
=
0
,
label
=
'Red Variations'
)
label
=
'Red Variations'
,
uwdvar
=
uwd
)
self
.
__greens
=
StripWidget
(
switchboard
,
self
.
__frame
,
generator
=
constant_magenta_generator
,
axis
=
1
,
label
=
'Green Variations'
)
label
=
'Green Variations'
,
uwdvar
=
uwd
)
self
.
__blues
=
StripWidget
(
switchboard
,
self
.
__frame
,
generator
=
constant_yellow_generator
,
axis
=
2
,
label
=
'Blue Variations'
)
label
=
'Blue Variations'
,
uwdvar
=
uwd
)
self
.
__uwd
=
Checkbutton
(
self
.
__frame
,
text
=
'Update while dragging'
,
variable
=
uwd
)
self
.
__uwd
.
pack
()
def
update_yourself
(
self
,
red
,
green
,
blue
):
self
.
__reds
.
update_yourself
(
red
,
green
,
blue
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment