This plugin generates a scripted class with variables for widgets and code to find widgets by their name.
More...
|
static void | BuildWidgetArray (notnull BaseContainer ws, notnull array< BaseContainer > pathToThis, notnull out array< BaseContainer > outArray, notnull out array< ref array< BaseContainer > > outArrayPaths) |
| Converts a widget tree into a widget array.
|
|
static string | GetStringPathToWidget (notnull array< BaseContainer > path) |
| Returns path to widget separated with dots First widget is omitted.
|
|
static string | GetWidgetName (BaseContainer ws) |
|
static void | _print (string str, LogLevel logLevel=LogLevel.NORMAL) |
| Prefixes Print() calls with "[SCR_GenerateLayoutClassPlugin] ".
|
|
This plugin generates a scripted class with variables for widgets and code to find widgets by their name.
It also generates code to find all widget components.
◆ _print()
static void SCR_GenerateLayoutClassPlugin._print |
( |
string |
str, |
|
|
LogLevel |
logLevel = LogLevel::NORMAL |
|
) |
| |
|
staticprotected |
Prefixes Print() calls with "[SCR_GenerateLayoutClassPlugin] ".
◆ BuildWidgetArray()
static void SCR_GenerateLayoutClassPlugin.BuildWidgetArray |
( |
notnull BaseContainer |
ws, |
|
|
notnull array< BaseContainer > |
pathToThis, |
|
|
notnull out array< BaseContainer > |
outArray, |
|
|
notnull out array< ref array< BaseContainer > > |
outArrayPaths |
|
) |
| |
|
staticprotected |
Converts a widget tree into a widget array.
- Parameters
-
[in] | ws | |
[in] | pathToThis | |
[out] | outArray | - each element will contain a WidgetSource |
[out] | outArrayPaths | - each element will contain a path to this widget, including this widget |
◆ ButtonCancel()
bool SCR_GenerateLayoutClassPlugin.ButtonCancel |
( |
| ) |
|
|
protected |
◆ ButtonOK()
bool SCR_GenerateLayoutClassPlugin.ButtonOK |
( |
| ) |
|
|
protected |
◆ Generate()
void SCR_GenerateLayoutClassPlugin.Generate |
( |
BaseContainer |
widgetSource, |
|
|
string |
scriptClassName, |
|
|
string |
fileOutName |
|
) |
| |
|
protected |
Generates the class name for the generated class.
◆ GenerateScriptClassName()
string SCR_GenerateLayoutClassPlugin.GenerateScriptClassName |
( |
string |
path | ) |
|
|
protected |
◆ GetStringPathToWidget()
static string SCR_GenerateLayoutClassPlugin.GetStringPathToWidget |
( |
notnull array< BaseContainer > |
path | ) |
|
|
staticprotected |
Returns path to widget separated with dots First widget is omitted.
- Parameters
-
[in] | path | array of base containers |
- Returns
- path compliant with Widget.FindWidget() or "_error_" if path is empty
◆ GetWidgetName()
static string SCR_GenerateLayoutClassPlugin.GetWidgetName |
( |
BaseContainer |
ws | ) |
|
|
staticprotected |
- Returns
- widget's Name property, or empty string in case of no Name property
◆ IsWidgetExportRequired()
bool SCR_GenerateLayoutClassPlugin.IsWidgetExportRequired |
( |
BaseContainer |
ws, |
|
|
notnull array< BaseContainer > |
path |
|
) |
| |
|
protected |
Checks if conditions for widget export are satisfied.
◆ ResolveDestinationPath()
string SCR_GenerateLayoutClassPlugin.ResolveDestinationPath |
( |
string |
fileOutName | ) |
|
|
protected |
Resolves the target directory where the file must be saved.
◆ ResolveWidgetComponentsForExport()
array< BaseContainer > SCR_GenerateLayoutClassPlugin.ResolveWidgetComponentsForExport |
( |
WidgetSource |
ws | ) |
|
|
protected |
Generates an array of components which will be exported for this widget.
◆ ResolveWidgetVariableName()
string SCR_GenerateLayoutClassPlugin.ResolveWidgetVariableName |
( |
BaseContainer |
ws | ) |
|
|
protected |
Resolves variable name for widget.
◆ Run()
override void SCR_GenerateLayoutClassPlugin.Run |
( |
| ) |
|
◆ ValidateWidget()
bool SCR_GenerateLayoutClassPlugin.ValidateWidget |
( |
BaseContainer |
ws | ) |
|
|
protected |
Performs various validations related to exporting of this widget.
- Returns
- widget export validity
◆ m_bInitSuccess
bool SCR_GenerateLayoutClassPlugin.m_bInitSuccess |
|
protected |
◆ m_RootExportRule
BaseContainer SCR_GenerateLayoutClassPlugin.m_RootExportRule |
|
protected |
◆ m_sDestinationPath
string SCR_GenerateLayoutClassPlugin.m_sDestinationPath |
|
protected |
◆ m_sFileOutName
string SCR_GenerateLayoutClassPlugin.m_sFileOutName |
|
protected |
◆ m_sScriptClassName
string SCR_GenerateLayoutClassPlugin.m_sScriptClassName |
|
protected |
◆ PLUGIN_VERSION
const string SCR_GenerateLayoutClassPlugin.PLUGIN_VERSION = "0.5.0" |
|
staticprotected |
The documentation for this interface was generated from the following file:
- WorkbenchGame/ResourceManager/SCR_GenerateLayoutClassPlugin.c