跳转至

maliang.core.configs

字数 9 个   阅读时间不到 1 分钟   访问量

源代码:maliang/core/configs.py

All global configuration options.

Some options are read-only, but most of them can be changed, and once changed, they will take effect globally for the program. Some changes take effect immediately, but some need to take effect when the relevant option is invoked.

类:

  • Env

    Configurations for default environment values.

  • Font

    Configurations for default font.

  • Constant

    All Constants.

函数:

  • reset

    Reset all configuration options.

Env

Configurations for default environment values.

方法:

reset classmethod

reset() -> None

Reset all configuration options.

get_default_system staticmethod

get_default_system() -> str

Get the system of environment.

Font

Configurations for default font.

方法:

reset classmethod

reset() -> None

Reset all configuration options.

get_default_family staticmethod

get_default_family() -> str

Get the default font family.

Constant

All Constants.

属性:

GOLDEN_RATIO class-attribute instance-attribute

GOLDEN_RATIO: typing.Final[float] = math.sqrt(5) - 1 / 2

The golden ratio, which is needed to automatically calculate the color of widget on "disabled" state. It is READ-ONLY.

PREDEFINED_EVENTS class-attribute instance-attribute

PREDEFINED_EVENTS: typing.Final[tuple[str, ...]] = (
    "<KeyPress>",
    "<KeyRelease>",
    "<Button-1>",
    "<Button-2>",
    "<Button-3>",
    "<Button-4>",
    "<Button-5>",
    "<ButtonRelease-1>",
    "<ButtonRelease-2>",
    "<ButtonRelease-3>",
    "<MouseWheel>",
    "<Motion>",
    "<B1-Motion>",
    "<B2-Motion>",
    "<B3-Motion>",
    "<Configure>",
)

Predefined events that can be used directly without registration. It is READ-ONLY.

PREDEFINED_VIRTUAL_EVENTS class-attribute instance-attribute

PREDEFINED_VIRTUAL_EVENTS: typing.Final[tuple[str, ...]] = (
    "<<Copy>>",
    "<<Paste>>",
    "<<Cut>>",
    "<<SelectAll>>",
    "<<Redo>>",
    "<<Undo>>",
)

Predefined virtual events that can be used directly without registration. It is READ-ONLY.

reset

reset() -> None

Reset all configuration options.