kivy-catalog / kivycatalog.kv

#:kivy 1.4


<Catalog>:
    language_box: language_box
    BoxLayout:
        spacing: 5
        TabbedPanel:
            size_hint: .6, 1
            tab_pos: "left_top"
            default_tab_text: "Introduction"
            default_tab_content: introduction_tab

            Accordion:
                id: introduction_tab
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "Playground"
                    kv_container: playground
                    PlaygroundContainer:
                        id: playground
                AccordionItem:
                    title: "Welcome"
                    Label:
                        text_size: self.width-60, self.height-60
                        valign: "middle"
                        text: "The Kivy Catalog is an interactive showcase of Kivy Widgets defined in the Kivy language. For each widget you see, you can directly edit the .kv language syntax to see what effects your changes have on the widget.\n\nThis code is still in pretty alpha state. Most widgets haven't been represented yet. But it does seem to work. If you feel like adding widgets to the showcase, pull requests are welcome!"

            TabbedPanelHeader:
                text: 'Layouts'
                content: layout_tab

            TabbedPanelHeader:
                text: 'UX Widgets'
                content: basic_widgets

            Accordion:
                id: layout_tab
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "FloatLayout"
                    kv_container: floatlayoutcontainer
                    FloatLayoutContainer:
                        id: floatlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "BoxLayout"
                    kv_container: boxlayoutcontainer
                    BoxLayoutContainer:
                        id: boxlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "AnchorLayout"
                    kv_container: anchorlayoutcontainer
                    AnchorLayoutContainer:
                        id: anchorlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "GridLayout"
                    kv_container: gridlayoutcontainer
                    GridLayoutContainer:
                        id: gridlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "StackLayout"
                    kv_container: stacklayoutcontainer
                    StackLayoutContainer:
                        id: stacklayoutcontainer
                AccordionItem:
                    title: "Introduction"
                    Label:
                        text_size: self.width-200, None
                        markup: True
                        text: '''Layouts are containers that automatically position their child widgets according to certain layout rules.\n\n[b]Anchor Layout[/b] aligns children to a border\n[b]Box Layout[/b] arranges children in a vertical or horizontal box.\n[b]Float layout[/b] places boxes according to their pos and size hints\n[b]Grid layout[/b] arranges the children in a matrix\n[b]Stack layout[/b] arranges children vertically or horizontally as far as they will fit.'''
            Accordion:
                id: basic_widgets
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "Buttons"
                    kv_container: buttoncontainer
                    ButtonContainer:
                        id: buttoncontainer

        BoxLayout:
            id: bl
            orientation: "vertical"
            size_hint: .4, 1
            TextInput:
                text_size: self.width-20, self.height-20
                font_name: "DroidSansMono.ttf"
                valign: "top"
                id: language_box
                text: "This box will display the kivy language for whatever has been selected"
            Button:
                size_hint: 1, None
                height: 50
                text: "Render"
                on_press: root.change_kv(*args)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.