Skip to content

Asp

Summary

Represents the active symbol panel.

Signature

1
public abstract interface Asp

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 using cAlgo.API;
 namespace cAlgo.Plugins
 {
     [Plugin(AccessRights = AccessRights.None)]
     public class Test : Plugin
     {
         protected override void OnStart()
         {
             var aspTab = Asp.AddTab("Test Tab");
             var panel = new StackPanel {Orientation = Orientation.Vertical};
             var textBlock = new TextBlock {Text = "Show anything"};
             panel.AddChild(textBlock);
             var removeTabButton = new Button {Text = "Remove Tab"};
             removeTabButton.Click += args => Asp.RemoveTab(aspTab);
             panel.AddChild(removeTabButton);
             aspTab.Child = panel;
         }
     }        
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 import clr
 clr.AddReference("cAlgo.API")
 from cAlgo.API import *
 class Test():
     def on_start(self):
         aspTab = api.Asp.AddTab("Test Tab")
         panel = StackPanel()
         panel.Orientation = Orientation.Vertical
         textBlock = TextBlock()
         textBlock.Text = "Show anything"
         panel.AddChild(textBlock)
         removeTabButton = Button()
         removeTabButton.Text = "Remove Tab"
         removeTabButton.Click += lambda _: api.Asp.RemoveTab(aspTab)
         panel.AddChild(removeTabButton)
         aspTab.Child = panel

Methods

AddTab

Summary

Adds a new tab to active symbol panel.

Signature

1
public abstract AspTab AddTab(string title)

Parameters

Name Type Description
title string Tab title

Return Value

AspTab

RemoveTab (2)

RemoveTab (1 of 2)

Summary

Removes a tab from active symbol panel.

Signature

1
public abstract bool RemoveTab(string id)

Parameters

Name Type Description
id string Tab Id

Return Value

bool

RemoveTab (2 of 2)

Summary

Removes a tab from active symbol panel.

Signature

1
public abstract bool RemoveTab(AspTab tab)

Parameters

Name Type Description
tab AspTab Tab

Return Value

bool

Properties

SymbolTab

Summary

Symbol tab in active symbol panel.

Signature

1
public abstract AspSymbolTab SymbolTab {get;}

Return Value

AspSymbolTab