IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Control for definition of scalar functions by user defined expressions (through a script loader). More...
Public Member Functions | |
ScalarFunctionScriptControl () | |
Constructs the scalar function script control. More... | |
ScalarFunctionScriptControl (bool setTestDefinitions) | |
Constructs the scalar function script control. More... | |
void | SetTestDefinitions () |
Setts a test definition. More... | |
bool | HasParentUnsavedChanges (bool set=false) |
Get or sets a flag indicating whether the parent control has unsaved changes. More... | |
void | CopyDataFromController () |
Copies data from the internal DTO to the current control. More... | |
void | ResetFunctionDefinition () |
Resets function definition to simply "0". Gradients are redefined accordingly. More... | |
string | CreateFunctonSummary () |
Protected Member Functions | |
string | GetFunctionSignature () |
Returns function signature created from the data. More... | |
override void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
Protected Attributes | |
bool | _isGradientDefined = false |
Properties | |
IG.Lib.IReporter | Reporter [get] |
Reporter used for internal reporting. More... | |
string | FunctionNameTitleNormal [get, set] |
Normal text of the label that introduces function name input box. More... | |
string | FunctionNameTitleModified [get, set] |
Normal text of the label that introduces function name input box. More... | |
ScalarFunctionScriptController | FunctionController [get, set] |
Cotroller that holds the definition data of the scalar function entered by the current control, and also holds mechanism for compiling and loading scalar function from these definitions. More... | |
ScalarFunctionLoader | FunctionLoader [get, protected set] |
Scalar function loader that is responsible for creation of scalar function objects from data. More... | |
LoadableScalarFunctionBase | Function [get] |
Gets the function generated by the function loader. More... | |
VectorFunctionScriptControl | VectorFunctionControl [get, set] |
The parent vector function script control. When this control is embedded within the vector function script control, this property should be set such that communication back to parent is enabled (in particular, communication about unsaved changes). More... | |
bool | HasUnsavedChanges [get, set] |
Whether the current function definition has unsaved changes. More... | |
bool | IsLoaderConsistent [get, protected set] |
Whether function loader is in consistent state. More... | |
string | FunctionName [get, set] |
Name of the function. More... | |
string | FunctionDescription [get, set] |
int | Dimension [get, set] |
Gets or sets function dimension. More... | |
string[] | ParameterNames [get, set] |
Names of function parameters. More... | |
string | ValueDefinition [get, set] |
String that defines function value. More... | |
bool | IsGradientDefined [get, set] |
string[] | GradientDefinitions [get, set] |
String that defines function gradients. More... | |
InputOutputDataDefiniton | DataDefinition [get, set] |
Definition of input and output data for the represented scalar function. More... | |
FileSelector | FileSelector [get] |
GUI component for seclecting files. More... | |
Private Member Functions | |
void | CopyDataToController () |
Copies data from the current control to the internal function DTO. More... | |
void | btnSummary_Click (object sender, EventArgs e) |
void | txtName_Validated (object sender, EventArgs e) |
void | txtDescription_Validated (object sender, EventArgs e) |
void | txtParameterNames_Validated (object sender, EventArgs e) |
void | numDimension_Validated (object sender, EventArgs e) |
void | txtValue_Validated (object sender, EventArgs e) |
void | txtGradients_Validated (object sender, EventArgs e) |
void | chkGradients_CheckedChanged (object sender, EventArgs e) |
void | btnCreateFunction_Click (object sender, EventArgs e) |
Creates a function i advance (before it is eeded for any other operation). Error message is launched if creation is not successful. More... | |
void | btnValueCalculator_Click (object sender, EventArgs e) |
Launches value calculator where user can calculate functio values with the function that was defined in the current control. More... | |
void | btnPlot1d_Click (object sender, EventArgs e) |
Launches 1D parametric plots of the function defined in this control. More... | |
void | btnPlot2d_Click (object sender, EventArgs e) |
Launches 2D parametric plots of the function defined in this control. More... | |
void | btnSave_Click (object sender, EventArgs e) |
Saves the current fucntion definition to a JSON file. More... | |
void | btnLoad_Click (object sender, EventArgs e) |
Loads the current function definition from a JSON file. More... | |
void | InitializeComponent () |
Required method for Designer support - do not modify the contents of this method with the code editor. More... | |
Private Attributes | |
string | _functionNameTitleNormal = "Function Name: " |
string | _functionNameTitleModified = "Function Name: (*)" |
ScalarFunctionScriptController | _functionController |
VectorFunctionScriptControl | _parentVectorFunctionControl = null |
bool | _hasUnsavedChanges = false |
bool | _isLoaderConsistent = false |
Color | _bgDefined = Color.White |
Color | _bgUndefined = Color.LightGray |
InputOutputDataDefiniton | _dataDefinition = null |
System.ComponentModel.IContainer | components = null |
Required designer variable. More... | |
System.Windows.Forms.Label | lblTitle |
System.Windows.Forms.Label | lblDimension |
System.Windows.Forms.Label | lblName |
System.Windows.Forms.TextBox | txtName |
System.Windows.Forms.NumericUpDown | numDimension |
System.Windows.Forms.Panel | pnlOuter |
System.Windows.Forms.TextBox | txtValue |
System.Windows.Forms.Label | lblValue |
System.Windows.Forms.TextBox | txtParameterNames |
System.Windows.Forms.Label | lblParameterNames |
System.Windows.Forms.CheckBox | chkGradients |
System.Windows.Forms.Button | btnValueCalculator |
System.Windows.Forms.Button | btnCreateFunction |
System.Windows.Forms.TextBox | txtGradients |
System.Windows.Forms.Label | label1 |
System.Windows.Forms.Label | lblFunctionSignature |
System.Windows.Forms.Button | btnSummary |
System.Windows.Forms.TextBox | txtDescription |
System.Windows.Forms.Label | lblDescription |
System.Windows.Forms.Button | btnPlot1d |
System.Windows.Forms.Button | btnPlot2d |
System.Windows.Forms.Button | btnSave |
FileSelector | fileSelector1 |
System.Windows.Forms.Panel | pnlParameters |
System.Windows.Forms.Panel | pnlValues |
System.Windows.Forms.Panel | pnlGradients |
System.Windows.Forms.Panel | pnlButtons |
System.Windows.Forms.Panel | pnlPlotButtons |
System.Windows.Forms.Panel | pnlBasic |
System.Windows.Forms.Panel | pnlTop |
System.Windows.Forms.Panel | pnlBasicAndTitle |
System.Windows.Forms.Button | btnLoad |
Control for definition of scalar functions by user defined expressions (through a script loader).
$A Igor Jun14;
|
inline |
Constructs the scalar function script control.
|
inline |
Constructs the scalar function script control.
setTestDefinitions | If true then control is filled with test definitions, such that the represented function can be immediately plotted, saved, etc. |
Beside for debugging, this is convenient for testing by users who are not used to use the control.
|
inline |
Setts a test definition.
|
inline |
Get or sets a flag indicating whether the parent control has unsaved changes.
The flag may only be set to false.
If there is no parent control (such as VectorFunctionScriptControl) then getter returns false and setter has no effect.
set | If true then the "Has unsaved changes" is set on the parent. Otherwise, only the value indicating whether the parent has unsaved changes is returned. Default value is false. |
|
inlineprivate |
Copies data from the current control to the internal function DTO.
|
inline |
Copies data from the internal DTO to the current control.
|
inlineprotected |
Returns function signature created from the data.
References IG.Lib.UtilStr.GetParametersStringPlain().
|
inline |
Resets function definition to simply "0". Gradients are redefined accordingly.
|
inline |
References IG.Lib.UtilStr.GetParametersStringPlain().
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Creates a function i advance (before it is eeded for any other operation). Error message is launched if creation is not successful.
|
inlineprivate |
Launches value calculator where user can calculate functio values with the function that was defined in the current control.
References IG.Lib.Function, IG.Forms.ScalarFunctionEvaluatorControl.FunctionDefinition, IG.Forms.ScalarFunctionEvaluatorForm.MainControl, and IG.Forms.ScalarFunctionEvaluatorControl.TreatScalarAsVectorFunction.
|
inlineprivate |
Launches 1D parametric plots of the function defined in this control.
References IG.Lib.Function, IG.Forms.VectorFunctionPlotter1dForm.MainControl, IG.Forms.VectorFunctionPlotter1d.NeuralDataDefinition, and IG.Forms.VectorFunctionPlotter1d.ScalarFunction.
|
inlineprivate |
Launches 2D parametric plots of the function defined in this control.
References IG.Lib.Function, IG.Forms.VectorFunctionPlotter2dForm.MainControl, IG.Forms.VectorFunctionPlotter2d.NeuralDataDefinition, and IG.Forms.VectorFunctionPlotter2d.ScalarFunction.
|
inlineprivate |
Saves the current fucntion definition to a JSON file.
References IG.Num.ScalarFunctionScriptControllerBase< ScalarFunctionType >.SaveJson().
|
inlineprivate |
Loads the current function definition from a JSON file.
References IG.Num.ScalarFunctionScriptControllerBase< ScalarFunctionType >.LoadJson().
|
inlineprotected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
|
inlineprivate |
Required method for Designer support - do not modify the contents of this method with the code editor.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
Required designer variable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
getprotected |
Reporter used for internal reporting.
|
getsetprotected |
Normal text of the label that introduces function name input box.
|
getsetprotected |
Normal text of the label that introduces function name input box.
|
getset |
Cotroller that holds the definition data of the scalar function entered by the current control, and also holds mechanism for compiling and loading scalar function from these definitions.
|
getprotected set |
Scalar function loader that is responsible for creation of scalar function objects from data.
|
get |
Gets the function generated by the function loader.
Function loader from the FunctionController is used.
|
getset |
The parent vector function script control. When this control is embedded within the vector function script control, this property should be set such that communication back to parent is enabled (in particular, communication about unsaved changes).
|
getset |
Whether the current function definition has unsaved changes.
|
getprotected set |
Whether function loader is in consistent state.
This method shoulld be elaborated or dropped.
|
getset |
Name of the function.
|
getset |
|
getset |
Gets or sets function dimension.
|
getset |
Names of function parameters.
|
getset |
String that defines function value.
|
getset |
|
getset |
String that defines function gradients.
|
getsetprivate |
Definition of input and output data for the represented scalar function.
|
get |
GUI component for seclecting files.