console-menu
stable
  • Installation
  • Usage
  • API Reference
    • ConsoleMenu — Standard menu class
    • SelectionMenu — Quickly get a selection
    • MultiSelectMenu — Make multiple selections at one prompt
    • Items
    • Functions
    • Screen
    • Menu Components
    • Formatting
      • MenuBorderStyle
      • MenuBorderStyleType
      • MenuBorderStyleFactory
      • Menu Borders
      • MenuMargins
      • MenuPadding
      • MenuStyle
    • Prompts
console-menu
  • Docs »
  • API Reference »
  • Formatting »
  • MenuBorderStyleFactory
  • Edit on GitHub

MenuBorderStyleFactory¶

class consolemenu.format.MenuBorderStyleFactory[source]¶

Factory class for creating MenuBorderStyle instances.

create_ascii_border()[source]¶

Create an ASCII border style.

Returns:a new instance of AsciiBorderStyle.
Return type:AsciiBorderStyle
create_border(border_style_type)[source]¶

Create a new MenuBorderStyle instance based on the given border style type.

Parameters:border_style_type (int) – an integer value from MenuBorderStyleType.
Returns:a new MenuBorderStyle instance of the specified style.
Return type:MenuBorderStyle
create_doubleline_border()[source]¶

Create a border style using “double-line” box drawing characters.

Returns:a new instance of DoubleLineBorderStyle.
Return type:DoubleLineBorderStyle
create_doubleline_outer_light_inner_border()[source]¶

Create a border style using “double-line” box drawing characters for outer border elements, and “light” box drawing characters for inner border elements.

Returns:a new instance of DoubleLineOuterLightInnerBorderStyle
Return type:DoubleLineOuterLightInnerBorderStyle
create_heavy_border()[source]¶

Create a border style using “heavy” box drawing characters.

NOTE: The Heavy border style will work on Windows ONLY when using Python 3.6 or later. If on Windows and using an earlier version of Python, the heavy border will be substituted with the DOUBLE_LINE_BORDER.

Returns:a new instance of HeavyBorderStyle, unless on Windows and pre-Python 3.5, in which case a new instance of DoubleLineBorderStyle will be returned.
Return type:HeavyBorderStyle or DoubleLineBorderStyle
create_heavy_outer_light_inner_border()[source]¶

Create a border style using “heavy” box drawing characters for outer border elements, and “light” box drawing characters for inner border elements.

NOTE: The Heavy border style will work on Windows ONLY when using Python 3.6 or later. If on Windows and using an earlier version of Python, the heavy border will be substituted with the DOUBLE_LINE_BORDER.

Returns:a new instance of HeavyOuterLightInnerBorderStyle, unless on Windows and pre-Python 3.5, in which case a new instance of DoubleLineOuterLightInnerBorderStyle will be returned.
Return type:HeavyOuterLightInnerBorderStyle or DoubleLineOuterLightInnerBorderStyle
create_light_border()[source]¶

Create a border style using “light” box drawing characters.

Returns:a new instance of LightBorderStyle
Return type:LightBorderStyle
static is_win_python35_or_earlier()[source]¶

Convenience method to determine if the current platform is Windows and Python version 3.5 or earlier.

Returns:True if the current platform is Windows and the Python interpreter is 3.5 or earlier; False otherwise.
Return type:bool
Next Previous

© Copyright 2018, Aegir Hall, 2015, Paul Barrett Revision f6b00890.

Built with Sphinx using a theme provided by Read the Docs.