GH_ScriptEditor

References
public class GH_ScriptEditor

Constructors

GH_ScriptEditor

#
public GH_ScriptEditor(GH_ScriptLanguage language, IGH_DocumentObject owner)
language (GH_ScriptLanguage)
owner (IGH_DocumentObject)

GH_ScriptEditor

#
public GH_ScriptEditor(GH_ScriptLanguage language)
language (GH_ScriptLanguage)

Fields

CacheLimit

#
public const int CacheLimit = 200

InstanceTable

#
public static readonly List<GH_ScriptEditor> InstanceTable

Properties

AutoSolveEnabled

#
public static bool AutoSolveEnabled { get; set; }

Cache_AppDataDirectory

#
public static string Cache_AppDataDirectory { get; }
Gets the directory in windows ApplicationData that contains the source code caches
A directory path.

CurrentPosition

#
public Point CurrentPosition { get; }
Gets the current caret position.

EditorFont

#
public Font EditorFont { get; set; }
Gets or sets the font to use for the editor

Language

#
public GH_ScriptLanguage Language { get; }
Gets the language used in this Script editor.

Owner

#
public object Owner { get; set; }

Visible

#
public bool Visible { get; set; }

Methods

AddButton

#
public void AddButton(GH_ScriptEditorButton button)
Adds another button to the toolbar. Buttons should be added before the form is shown.
button (GH_ScriptEditorButton)Button to add.

AppendSourceCode

#
public void AppendSourceCode(List<string> code)
code (List<string>)

CacheCurrentScript

#
public bool CacheCurrentScript()
obsoleteUse CacheCurrentScriptAsync instead

CacheCurrentScriptAsync

#
public Task<bool> CacheCurrentScriptAsync()

CenterFormOnCursor

#
public void CenterFormOnCursor(bool limitToScreen)
limitToScreen (bool)

Close

#
public void Close()

CodeEditor_TextChanged

#
public void CodeEditor_TextChanged()

CompileTimerTick

#
public void CompileTimerTick(object sender, EventArgs args)
sender (object)
args (EventArgs)

DefaultAssemblies

#
public static List<Assembly> DefaultAssemblies()
obsoleteUse DefaultAssemblyLocations() instead
Get a list of all the assemblies that are included by default for Scripts. This list excludes mscorlib.dll as that one is considered non-omittable.

DefaultAssemblyLocations

#
public static List<string> DefaultAssemblyLocations()
Get a list of all the assembly locations that are included by default for Scripts.

FindScriptEditor

#
public static GH_ScriptEditor FindScriptEditor(IGH_DocumentObject owner)
Find the editor that is already associated with an object.
owner (IGH_DocumentObject)

FocusOnSource

#
public void FocusOnSource()
Collapses all code blocks except the one containing the mutable sections.

GetAllCacheFiles

#
public static List<GH_MRU_Entry> GetAllCacheFiles()
Gets a collection of all the cache files.
Sorted list of all cache files.

GetSourceCode

#
public GH_CodeBlocks GetSourceCode()
obsoleteUse GetSourceCodeAsync instead

GetSourceCodeAsync

#
public Task<GH_CodeBlocks> GetSourceCodeAsync()

Initialize

#
public void Initialize(GH_ScriptLanguage language, IGH_DocumentObject owner)
language (GH_ScriptLanguage)
owner (IGH_DocumentObject)

RegisterAssemblies

#
public void RegisterAssemblies(List<GH_CustomReference> customReferences = null)
customReferences (List<GH_CustomReference> = null)

RestoreScriptCache

#
public void RestoreScriptCache(string path)
path (string)

SetCurrentPosition

#
public void SetCurrentPosition(Point position)
Set the current caret position.
position (Point)Position to set.

SetSourceCode

#
public void SetSourceCode(GH_CodeBlocks code)
code (GH_CodeBlocks)

Show

#
public void Show()

Show

#
public void Show(GH_DocumentEditor documentEditor)
documentEditor (GH_DocumentEditor)

Events

Closed

#
public event EventHandler Closed

CompileCodeRequest

#
public event GH_ScriptEditor.CompileCodeRequestEventHandler CompileCodeRequest

HandleDestroyed

#
public event EventHandler HandleDestroyed

SourceCodeChanged

#
public event GH_ScriptEditor.SourceCodeChangedEventHandler SourceCodeChanged