Bearsampp 2025.8.29
Loading...
Searching...
No Matches
TplAppPython Class Reference

Static Public Member Functions

static getMenuPython ()
static process ()

Data Fields

const MENU = 'python'

Detailed Description

Class TplAppPython

This class provides methods to generate menu items and actions for managing Python tools within the Bearsampp application. It includes functionalities for accessing Python console, IDLE, and other Python-related executables.

Definition at line 18 of file class.tpl.app.python.php.

Member Function Documentation

◆ getMenuPython()

getMenuPython ( )
static

Generates the Python menu with options for accessing the Python console, IDLE, and other tools.

@global object $bearsamppLang Provides language support for retrieving language-specific values. @global object $bearsamppTools Provides access to various tools and their configurations.

Returns
string The generated menu items and actions for Python tools.

Definition at line 45 of file class.tpl.app.python.php.

46 {
47 global $bearsamppLang, $bearsamppTools;
48
49 // Generate menu item for Python console
50 $resultItems = TplAestan::getItemConsoleZ(
53 $bearsamppTools->getConsoleZ()->getTabTitlePython()
54 ) . PHP_EOL;
55
56 // Generate menu item for Python IDLE
57 $resultItems .= TplAestan::getItemExe(
58 $bearsamppLang->getValue(Lang::PYTHON) . ' IDLE',
59 $bearsamppTools->getPython()->getIdleExe(),
61 ) . PHP_EOL;
62
63 return $resultItems;
64 }
global $bearsamppLang
const PYTHON_CONSOLE
const PYTHON
static getItemExe($caption, $exe, $glyph, $params=null)
static getItemConsoleZ($caption, $glyph, $id=null, $title=null, $initDir=null, $command=null)

References $bearsamppLang, TplAestan\getItemConsoleZ(), TplAestan\getItemExe(), TplAestan\GLYPH_PYTHON, Lang\PYTHON, and Lang\PYTHON_CONSOLE.

◆ process()

process ( )
static

Generates the main Python menu with options to access Python tools.

@global object $bearsamppLang Provides language support for retrieving language-specific values.

Returns
string The generated menu items and actions for Python.

Definition at line 30 of file class.tpl.app.python.php.

31 {
32 global $bearsamppLang;
33
34 return TplApp::getMenu($bearsamppLang->getValue(Lang::PYTHON), self::MENU, get_called_class());
35 }
static getMenu($caption, $menu, $class)

References $bearsamppLang, TplApp\getMenu(), and Lang\PYTHON.

Referenced by TplAppTools\getMenuTools().

Field Documentation

◆ MENU

const MENU = 'python'

Definition at line 21 of file class.tpl.app.python.php.


The documentation for this class was generated from the following file: