# Path: pvviewer/command.py
# class Command:
#     """
#     Simple object for holding the receiver, method and arguments of a method
#     call that can be translated to JS.
#     """
# 
#     def __init__(self, receiver, command, args, kwargs, terminate=False):
#         self._receiver = receiver
#         self._command = command
#         self._args = args
#         self._kwargs = kwargs
#         self._terminate = terminate
# 
#     def to_js(self):
#         all_args = [', '.join(encode(arg) for arg in self._args)]
#         if self._kwargs:
#             all_args.append(encode(self._kwargs))
# 
#         args_string = ', '.join(all_args)
#         t = self._terminate and ';' or ''
#         if not self._receiver:
#             call = self._command
#         else:
#             call = '%s.%s' % (self._receiver, self._command)
#         return '%s(%s)%s' % (call, args_string, t)


import uuid
from .command import Command
"""
Defines the main protein viewer interface to be used with ipython/jupyter
notebooks.
"""


_VIEWER_SCAFFOLD_BEGIN = """
<div id="%(id)s" style="width: %(width)dpx; height: %(height)dpx"><div>

# Path: pvviewer/command.py
# class Command:
#     """
#     Simple object for holding the receiver, method and arguments of a method
#     call that can be translated to JS.
#     """
# 
#     def __init__(self, receiver, command, args, kwargs, terminate=False):
#         self._receiver = receiver
#         self._command = command
#         self._args = args
#         self._kwargs = kwargs
#         self._terminate = terminate
# 
#     def to_js(self):
#         all_args = [', '.join(encode(arg) for arg in self._args)]
#         if self._kwargs:
#             all_args.append(encode(self._kwargs))
# 
#         args_string = ', '.join(all_args)
#         t = self._terminate and ';' or ''
#         if not self._receiver:
#             call = self._command
#         else:
#             call = '%s.%s' % (self._receiver, self._command)
#         return '%s(%s)%s' % (call, args_string, t)


# Path: pvviewer/viewer.py
import uuid
from .command import Command

"""
Defines the main protein viewer interface to be used with ipython/jupyter
notebooks.
"""


_VIEWER_SCAFFOLD_BEGIN = """
<div id="%(id)s" style="width: %(width)dpx; height: %(height)dpx"><div>

<script>