Source code for tagit.view.sidebar
"""Sidebar.
Where the information flows from.
The *VSidebar* holds the sideboxes together, adds and removes them.
Part of the tagit module.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2016
"""
# IMPORTS
from os.path import join, dirname
from kivy.lang import Builder
from kivy.uix.gridlayout import GridLayout
from kivy.logger import Logger
from kivy.uix.splitter import Splitter
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.image import Image
#from kivy.uix.scrollview import ScrollView # FIXME: Provokes segfault
# INNER-MODULE IMPORTS
from sidebox.sidebox import VSidebox
# EXPORTS
__all__ = ('VSidebar', 'VBoxSplit')
# LOAD KV
Builder.load_file(join(dirname(__file__), 'sidebar.kv'))
# CLASSES
class VSidebox_Button(ButtonBehavior, Image): pass
class VBoxSplit(Splitter, VSidebox):
def on_widget_change(self, instance, widget):
self.children[-1].on_widget_change(instance, widget)
#class VBoxScroll(ScrollView, VSidebox):
# def on_widget_change(self, instance, widget):
# self.children[-1].on_widget_change(instance, widget)
## EOF ##