# Path: albow/dialogs.py
# def wrapped_label(text, wrap_width, **kwds):
#     paras = text.split("\n")
#     text = "\n".join([textwrap.fill(para, wrap_width) for para in paras])
#     return Label(text, **kwds)


import sys
import pygame
import widget
import logging
        import music
from pygame.locals import *
from pygame.event import Event
from glbackground import *
from widget import Widget
from controls import Label
from datetime import datetime, timedelta
from albow.dialogs import wrapped_label
        from OpenGL import GL
        from weakref import ref
        from weakref import ref
        from OpenGL import GL
from time import time
from bisect import insort
    K_LSHIFT: 'shift', K_RSHIFT: 'shift',
    K_LCTRL:  'ctrl', K_RCTRL:  'ctrl',
    K_LALT:   'alt', K_RALT:   'alt',
    K_LMETA:  'meta', K_RMETA:  'meta',
}

MUSIC_END_EVENT = USEREVENT + 1

last_mouse_event = Event(0, pos=(0, 0), local=(0, 0))
last_mouse_event_handler = None
root_widget = None     # Root of the containment hierarchy
top_widget = None      # Initial dispatch target
clicked_widget = None  # Target of mouse_drag and mouse_up events

#---------------------------------------------------------------------------


class Cancel(Exception):
    pass

#---------------------------------------------------------------------------


def set_modifier(key, value):
    attr = modkeys.get(key)
    if attr:
        modifiers[attr] = value


def add_modifiers(event):

# Path: albow/dialogs.py
# def wrapped_label(text, wrap_width, **kwds):
#     paras = text.split("\n")
#     text = "\n".join([textwrap.fill(para, wrap_width) for para in paras])
#     return Label(text, **kwds)


# Path: albow/root.py
import sys
import pygame
import widget
import logging
        import music
from pygame.locals import *
from pygame.event import Event
from glbackground import *
from widget import Widget
from controls import Label
from datetime import datetime, timedelta
from albow.dialogs import wrapped_label
        from OpenGL import GL
        from weakref import ref
        from weakref import ref
        from OpenGL import GL
from time import time
from bisect import insort

    K_LSHIFT: 'shift', K_RSHIFT: 'shift',
    K_LCTRL:  'ctrl', K_RCTRL:  'ctrl',
    K_LALT:   'alt', K_RALT:   'alt',
    K_LMETA:  'meta', K_RMETA:  'meta',
}

MUSIC_END_EVENT = USEREVENT + 1

last_mouse_event = Event(0, pos=(0, 0), local=(0, 0))
last_mouse_event_handler = None
root_widget = None     # Root of the containment hierarchy
top_widget = None      # Initial dispatch target
clicked_widget = None  # Target of mouse_drag and mouse_up events

#---------------------------------------------------------------------------


class Cancel(Exception):
    pass

#---------------------------------------------------------------------------


def set_modifier(key, value):
    attr = modkeys.get(key)
    if attr:
        modifiers[attr] = value


def add_modifiers(event):

    d = event.dict