2024.8.23
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 17 of file class.tpl.app.python.php.

Member Function Documentation

◆ getMenuPython()

static TplAppPython::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 44 of file class.tpl.app.python.php.

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

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

◆ process()

static TplAppPython::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 29 of file class.tpl.app.python.php.

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

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

Referenced by TplAppTools\getMenuTools().

+ Here is the caller graph for this function:

Field Documentation

◆ MENU

const TplAppPython::MENU = 'python'

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


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