# Path: webalchemy/server.py
# def _generate_session_id():
# def async_delay(secs):
# def _dreload(module, dreload_blacklist_starting_with, just_visit=False):
#     def __dreload(mdl):
#     def initialize(self, **kwargs):
#     def get(self, *varargs):
# def async_delay(secs):
#     def on_open(self, info):
#     def handle_binary_message(self, message):
#     def on_close(self):
#     def on_message(self, message):
#     def send_data(self, text, data):
#     def flush_dom(self):
#     def please_reload(self):
#     def msg_to_sessions(self, msg, send_to_self=False, to_session_ids=None):
#     def prepare_session_for_general_reload(self):
#     def handle_binary_message(self, message):
#     def send_heartbeat(self):
#     def init_localdocument(self, message):
#     def handle_js_to_py_rpc_message(self, msg):
#     def rpc(self, f, *varargs, send_to_self=False, to_session_ids=None, **kwargs):
#     def __init__(self, app, kwa, router, cls, shared_wshandlers, dreload_blacklist_starting_with, shared_data,
#                  additional_monitored_files):
#     def set_additional_monitored_files(self, fns):
#     def update_app(self):
#     def __init__(self):
#     def get_store(self, uid):
#     def remove_store(self, uid):
# def run(app=None, **kwargs):
# def generate_static(app):
# class _MainHandler(tornado.web.RequestHandler):
# class WebSocketHandler(SockJSConnection):
# class _AppUpdater:
# class PrivateDataStore:
# 
# Path: webalchemy/widgets/basic/menu.py
# class Menu:
# 
#     def __init__(self, rdoc, on_add=None):
#         self.rdoc = rdoc
#         self.element = rdoc.element('nav')
#         vn = '#' + self.element.varname
#         self.rule_menu = rdoc.stylesheet.rule(vn)
#         self.rule_item = rdoc.stylesheet.rule(vn + ' > li')
#         self.rule_item_hover = rdoc.stylesheet.rule(vn + ' > li:hover')
#         self.rule_item_selected = rdoc.stylesheet.rule(vn + ' > li.selected')
#         self.rule_item_selected_hover = rdoc.stylesheet.rule(vn + ' > li.selected:hover')
#         self.on_add = on_add
#         self.id_dict = {}
# 
#     def add_item(self, *varargs):
#         for text in varargs:
#             i = self.rdoc.element('li', text)
#             self.id_dict[i.att.varname] = i
#             self.element.append(i)
#             if self.on_add:
#                 self.on_add(i)


from webalchemy import server
from webalchemy.widgets.basic.menu import Menu
    from colors_meteor_example import ColorsMeteorApp
        m.rule_item.style(
            color='#000000',
            fontSize='1.5em',
            textTransform='uppercase',
            fontFamily='Arial, Verdana, Sans-serif',
            float='bottom',
            padding='10px',
            listStyle='none',
            cursor='pointer',
            webkitTransition='all 0.3s linear',
            webkitUserSelect='none'
        )
        m.rule_item_hover.style(
            color='#ffffff',
            background='#000000',
            paddingLeft='20px',
        )
        m.rule_item_selected.style(
            padding='10px',
            background='#FF0000',
            color='#000000',
            webkitTransform='rotate(3deg)'
        )
        # populate the menu with shared colors dict
        m.add_item(*self.sdata.keys())
        m.sort()
        return m

if __name__ == '__main__':
    # this self import is needed to do live-editing. Everything else works without it

# Path: webalchemy/server.py
# def _generate_session_id():
# def async_delay(secs):
# def _dreload(module, dreload_blacklist_starting_with, just_visit=False):
#     def __dreload(mdl):
#     def initialize(self, **kwargs):
#     def get(self, *varargs):
# def async_delay(secs):
#     def on_open(self, info):
#     def handle_binary_message(self, message):
#     def on_close(self):
#     def on_message(self, message):
#     def send_data(self, text, data):
#     def flush_dom(self):
#     def please_reload(self):
#     def msg_to_sessions(self, msg, send_to_self=False, to_session_ids=None):
#     def prepare_session_for_general_reload(self):
#     def handle_binary_message(self, message):
#     def send_heartbeat(self):
#     def init_localdocument(self, message):
#     def handle_js_to_py_rpc_message(self, msg):
#     def rpc(self, f, *varargs, send_to_self=False, to_session_ids=None, **kwargs):
#     def __init__(self, app, kwa, router, cls, shared_wshandlers, dreload_blacklist_starting_with, shared_data,
#                  additional_monitored_files):
#     def set_additional_monitored_files(self, fns):
#     def update_app(self):
#     def __init__(self):
#     def get_store(self, uid):
#     def remove_store(self, uid):
# def run(app=None, **kwargs):
# def generate_static(app):
# class _MainHandler(tornado.web.RequestHandler):
# class WebSocketHandler(SockJSConnection):
# class _AppUpdater:
# class PrivateDataStore:
# 
# Path: webalchemy/widgets/basic/menu.py
# class Menu:
# 
#     def __init__(self, rdoc, on_add=None):
#         self.rdoc = rdoc
#         self.element = rdoc.element('nav')
#         vn = '#' + self.element.varname
#         self.rule_menu = rdoc.stylesheet.rule(vn)
#         self.rule_item = rdoc.stylesheet.rule(vn + ' > li')
#         self.rule_item_hover = rdoc.stylesheet.rule(vn + ' > li:hover')
#         self.rule_item_selected = rdoc.stylesheet.rule(vn + ' > li.selected')
#         self.rule_item_selected_hover = rdoc.stylesheet.rule(vn + ' > li.selected:hover')
#         self.on_add = on_add
#         self.id_dict = {}
# 
#     def add_item(self, *varargs):
#         for text in varargs:
#             i = self.rdoc.element('li', text)
#             self.id_dict[i.att.varname] = i
#             self.element.append(i)
#             if self.on_add:
#                 self.on_add(i)


# Path: examples/colors_meteor/colors_meteor_example.py
from webalchemy import server
from webalchemy.widgets.basic.menu import Menu
    from colors_meteor_example import ColorsMeteorApp

        m.rule_item.style(
            color='#000000',
            fontSize='1.5em',
            textTransform='uppercase',
            fontFamily='Arial, Verdana, Sans-serif',
            float='bottom',
            padding='10px',
            listStyle='none',
            cursor='pointer',
            webkitTransition='all 0.3s linear',
            webkitUserSelect='none'
        )
        m.rule_item_hover.style(
            color='#ffffff',
            background='#000000',
            paddingLeft='20px',
        )
        m.rule_item_selected.style(
            padding='10px',
            background='#FF0000',
            color='#000000',
            webkitTransform='rotate(3deg)'
        )
        # populate the menu with shared colors dict
        m.add_item(*self.sdata.keys())
        m.sort()
        return m

if __name__ == '__main__':
    # this self import is needed to do live-editing. Everything else works without it

    server.run(ColorsMeteorApp)