carbonkivy.uix.codesnippet.codesnippet

Classes

CodeSnippet

CodeInput class, used for displaying highlighted code.

CodeSnippetLayout

CodeSnippetLayout class.

CodeSnippetCopyButton

This mixin class provides

Module Contents

class carbonkivy.uix.codesnippet.codesnippet.CodeSnippet(**kwargs)[source]

Bases: carbonkivy.behaviors.AdaptiveBehavior, kivy.uix.codeinput.CodeInput, carbonkivy.behaviors.DeclarativeBehavior

CodeInput class, used for displaying highlighted code.

lexer[source]

This holds the selected Lexer used by pygments to highlight the code.

lexer is an ObjectProperty and defaults to PythonLexer.

on_parent(*args) None[source]
on_style(*args) None[source]
on_style_name(*args) None[source]
class carbonkivy.uix.codesnippet.codesnippet.CodeSnippetLayout(**kwargs)[source]

Bases: carbonkivy.behaviors.AdaptiveBehavior, carbonkivy.behaviors.BackgroundColorBehaviorRectangular, carbonkivy.behaviors.StateFocusBehavior, carbonkivy.behaviors.DeclarativeBehavior, carbonkivy.behaviors.HoverBehavior, kivy.uix.relativelayout.RelativeLayout

CodeSnippetLayout class.

For more information, see in the AdaptiveBehavior, BackgroundColorBehaviorRectangular, DeclarativeBehavior, HoverBehavior, RelativeLayout and StateFocusBehavior classes documentation.

codesnippet_area[source]
set_colors(*args) None[source]
on_copy(text: str = '', *args) None[source]

Fired when the copy button is pressed.

For more information, see in the Clipboard class documentation.

on_kv_post(*args)[source]
update_specs(*args) None[source]
class carbonkivy.uix.codesnippet.codesnippet.CodeSnippetCopyButton(**kwargs)[source]

Bases: carbonkivy.uix.button.CButtonGhost

This mixin class provides Button behavior. Please see the button behaviors module documentation for more information.

Events:
on_press

Fired when the button is pressed.

on_release

Fired when the button is released (i.e. the touch/click that pressed the button goes away).