2012-10-16 17:44:34 +00:00
|
|
|
#:kivy 1.4
|
2012-10-23 19:24:59 +00:00
|
|
|
#:import KivyLexer kivy.extras.highlight.KivyLexer
|
2012-10-16 17:44:34 +00:00
|
|
|
|
2012-10-18 03:48:34 +00:00
|
|
|
[ContainerToggle@ToggleButton]:
|
|
|
|
group: "container_toggle"
|
|
|
|
text: ctx.text
|
|
|
|
on_press: root.parent.parent.parent.show_kv(*args)
|
|
|
|
state: ctx.state if hasattr(ctx, "state") else "normal"
|
2012-10-16 17:44:34 +00:00
|
|
|
|
2013-03-31 09:59:37 +00:00
|
|
|
<Container>:
|
|
|
|
canvas.before:
|
|
|
|
Color:
|
|
|
|
rgb: 0, 0, 0
|
|
|
|
Rectangle:
|
|
|
|
pos: self.pos
|
|
|
|
size: self.size
|
|
|
|
|
2012-10-16 17:44:34 +00:00
|
|
|
<Catalog>:
|
|
|
|
language_box: language_box
|
2012-10-18 03:48:34 +00:00
|
|
|
screen_manager: screen_manager
|
2012-10-23 19:24:59 +00:00
|
|
|
auto_reload: chkbx.active
|
|
|
|
info_label: info_lbl
|
|
|
|
orientation: 'vertical'
|
2012-10-16 17:44:34 +00:00
|
|
|
BoxLayout:
|
2012-10-18 03:48:34 +00:00
|
|
|
BoxLayout:
|
|
|
|
size_hint: None, 1
|
|
|
|
orientation: "vertical"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Welcome"
|
|
|
|
state: "down"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Float Layout"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Box Layout"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Anchor Layout"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Grid Layout"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Stack Layout"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Buttons"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Labels"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Booleans"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Progress Bar"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Media"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Text"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Popups"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Selectors"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "File Choosers"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "Scatter"
|
|
|
|
ContainerToggle:
|
|
|
|
text: "ReST"
|
|
|
|
ScreenManager:
|
|
|
|
id: screen_manager
|
|
|
|
Screen:
|
|
|
|
name: "Welcome"
|
|
|
|
PlaygroundContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Float Layout"
|
|
|
|
FloatLayoutContainer
|
|
|
|
Screen:
|
|
|
|
name: "Box Layout"
|
|
|
|
BoxLayoutContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Anchor Layout"
|
|
|
|
AnchorLayoutContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Grid Layout"
|
|
|
|
GridLayoutContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Stack Layout"
|
|
|
|
StackLayoutContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Buttons"
|
|
|
|
ButtonContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Labels"
|
|
|
|
LabelContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Booleans"
|
|
|
|
CheckBoxContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Progress Bar"
|
|
|
|
ProgressBarContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Media"
|
|
|
|
MediaContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Text"
|
|
|
|
TextContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Popups"
|
|
|
|
PopupContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Selectors"
|
|
|
|
SelectorsContainer:
|
|
|
|
Screen:
|
|
|
|
name: "File Choosers"
|
|
|
|
FileChooserContainer:
|
|
|
|
Screen:
|
|
|
|
name: "Scatter"
|
|
|
|
ScatterContainer:
|
|
|
|
Screen:
|
|
|
|
name: "ReST"
|
|
|
|
RestContainer:
|
2012-10-16 17:44:34 +00:00
|
|
|
|
2012-12-09 15:54:42 +00:00
|
|
|
Splitter:
|
|
|
|
sizable_from: 'left'
|
2012-10-18 03:58:11 +00:00
|
|
|
size_hint: None, 1
|
|
|
|
width: 400
|
2012-10-23 19:24:59 +00:00
|
|
|
BoxLayout:
|
2012-12-09 15:54:42 +00:00
|
|
|
id: bl
|
|
|
|
orientation: "vertical"
|
|
|
|
ScrollView:
|
|
|
|
id: kr_scroll
|
|
|
|
KivyRenderTextInput:
|
2012-12-15 03:41:20 +00:00
|
|
|
catalog: root
|
2012-12-09 15:54:42 +00:00
|
|
|
id: language_box
|
|
|
|
lexer: KivyLexer()
|
|
|
|
size_hint: 1, None
|
|
|
|
height: max( (len(self._lines)+1) * (self.line_height + self._line_spacing), kr_scroll.height)
|
|
|
|
font_name: "data/fonts/DroidSansMono.ttf"
|
|
|
|
valign: "top"
|
|
|
|
text: "This box will display the kivy language for whatever has been selected"
|
|
|
|
on_text: root.schedule_reload()
|
2012-10-23 19:24:59 +00:00
|
|
|
BoxLayout:
|
2012-12-09 15:54:42 +00:00
|
|
|
size_hint: 1, None
|
|
|
|
height: '30pt'
|
|
|
|
BoxLayout:
|
|
|
|
CheckBox:
|
|
|
|
id: chkbx
|
|
|
|
active: True
|
|
|
|
Label:
|
|
|
|
text: "Auto Reload"
|
|
|
|
Button:
|
|
|
|
text: 'Render Now'
|
|
|
|
on_release: root.change_kv(*args)
|
2012-10-23 19:24:59 +00:00
|
|
|
FloatLayout:
|
|
|
|
size_hint: 1, None
|
|
|
|
height: 0
|
|
|
|
TextInput:
|
|
|
|
id:info_lbl
|
|
|
|
readonly: True
|
2012-11-03 21:18:35 +00:00
|
|
|
font_size: '14sp'
|
2012-10-23 19:24:59 +00:00
|
|
|
background_color: (0, 0, 0, 1)
|
|
|
|
foreground_color: (1, 1, 1, 1)
|
|
|
|
opacity:0
|
|
|
|
size_hint: 1, None
|
|
|
|
text_size: self.size
|
|
|
|
height: '150pt'
|
2012-11-02 15:35:25 +00:00
|
|
|
top: 0
|