Reference for .Net version of SpaceVIL  0.3.5.8
SpaceVIL (Space of Visual Items Layout) is a cross-platform and multilingual framework for creating GUI client applications for .NET Standard, .NET Core and JVM. SpaceVIL is based on OpenGL graphic technology and GLFW. Using this framework in conjunction with .Net Core or with a JVM, you can work and create graphical client applications on Linux, Mac OS X and Windows.
SpaceVIL.CustomShape Class Reference

CustomShape is a subclass that extends from SpaceVIL.Primitive and can be any type of shapes. You must provide the correct 2D vertices (triangles) of your figure to wark with this class. More...

Inherits SpaceVIL.Primitive.

Public Member Functions

 CustomShape ()
 Default CustomShape constructor. More...
 
 CustomShape (List< float[]> shape)
 Constructs a CustomShape with the specified shape. More...
 
override void MakeShape ()
 Overridden method for stretching the shape of the current item relative to the current size. Use in conjunction with GetTriangles() and SetTriangles() methods. Notice: This method is mainly for overriding only. SpaceVIL calls this method if necessary and no need to call it manually. More...
 
- Public Member Functions inherited from SpaceVIL.Primitive
 Primitive ()
 Default constructor of Primitive class. More...
 
 Primitive (string name)
 Constructs a Primitive with the specified name. More...
 
void SetPosition (int x, int y)
 Setting item position. More...
 
override void SetStyle (Style style)
 Setting a style that describes the appearance of an item. More...
 
override Style GetCoreStyle ()
 Getting the core (only appearance properties without inner styles) style of an item. More...
 
- Public Member Functions inherited from SpaceVIL.BaseItem
void SetHandler (CoreWindow handler)
 Setting the window to which the item will belong. More...
 
CoreWindow GetHandler ()
 Getting the window to which the item will belong. More...
 
Prototype GetParent ()
 Getting the parent of the item. More...
 
void SetParent (Prototype parent)
 Setting the parent of the item. More...
 
virtual void InitElements ()
 Initializing children if this BaseItem is container (SpaceVIL.Prototype). Notice: This method is mainly for overriding only. SpaceVIL calls this method if necessary and no need to call it manually. More...
 
Indents GetMargin ()
 Getting the indents of an item to offset itself relative to its container. More...
 
void SetMargin (Indents margin)
 Setting the indents of an item to offset itself relative to its container. More...
 
void SetMargin (int left=0, int top=0, int right=0, int bottom=0)
 Setting the indents of an item to offset itself relative to its container. More...
 
List< float[]> GetTriangles ()
 Getting triangles of item's shape. More...
 
virtual void SetTriangles (List< float[]> triangles)
 Setting triangles as item's shape. More...
 
virtual void SetBackground (Color color)
 Setting background color of an item's shape. More...
 
virtual void SetBackground (int r, int g, int b)
 Setting background color of an item's shape in byte RGB format. More...
 
virtual void SetBackground (int r, int g, int b, int a)
 Setting background color of an item in byte RGBA format. More...
 
virtual void SetBackground (float r, float g, float b)
 Setting background color of an item in float RGB format. More...
 
virtual void SetBackground (float r, float g, float b, float a)
 Setting background color of an item in float RGBA format. More...
 
virtual Color GetBackground ()
 Getting background color of an item. More...
 
void SetItemName (string name)
 Setting the name of the item. More...
 
string GetItemName ()
 Getting the name of the item. More...
 
virtual bool IsDrawable ()
 Getting the drawable (visibility) status of an item. This property used in conjunction with the IsVisible() property. Explanation: an item can be visible and invisible, in some cases the item can be located outside the container (example: SpaceVIL.ListBox), and it must be invisible so as not to waste CPU / GPU resources, but in some cases you must control the visibility of elements that are inside container and should be invisible (example: SpaceVIL.TreeView). More...
 
virtual void SetDrawable (bool value)
 Setting the drawable (visibility) status of an item. This property used in conjunction with the IsVisible() property. Explanation: an item can be visible and invisible, in some cases the item can be located outside the container (example: SpaceVIL.ListBox), and it must be invisible so as not to waste CPU / GPU resources, but in some cases you must control the visibility of elements that are inside container and should be invisible (example: SpaceVIL.TreeView). More...
 
virtual bool IsVisible ()
 Getting the visibility status of an item. This property may used in conjunction with the IsDrawable() property. More...
 
virtual void SetVisible (bool value)
 Setting the visibility status of an item. This property may used in conjunction with the IsDrawable() property. More...
 
void SetMinWidth (int width)
 Setting the minimum width limit. Actual width cannot be less than this limit. More...
 
virtual void SetWidth (int width)
 Setting item width. If the value is greater/less than the maximum/minimum value of the width, then the width becomes equal to the maximum/minimum value. More...
 
void SetMaxWidth (int width)
 Setting the maximum width limit. Actual width cannot be greater than this limit. More...
 
int GetMinWidth ()
 Getting the minimum width limit. More...
 
virtual int GetWidth ()
 Getting item width. More...
 
int GetMaxWidth ()
 Getting the maximum width limit. More...
 
void SetMinHeight (int height)
 Setting the minimum height limit. Actual height cannot be less than this limit. More...
 
virtual void SetHeight (int height)
 Setting item height. If the value is greater/less than the maximum/minimum value of the height, then the height becomes equal to the maximum/minimum value. More...
 
void SetMaxHeight (int height)
 Setting the maximum height limit. Actual height cannot be greater than this limit. More...
 
int GetMinHeight ()
 Getting the minimum height limit. More...
 
virtual int GetHeight ()
 Getting item height. More...
 
int GetMaxHeight ()
 Getting the maximum height limit. More...
 
void SetSize (int width, int height)
 Setting item size (width and height). More...
 
void SetMinSize (int width, int height)
 Setting minimum item size limit (width and height limits). More...
 
void SetMaxSize (int width, int height)
 Setting maximum item size limit (width and height limits). More...
 
Core.Size GetSize ()
 Getting current item size. More...
 
Core.Size GetMinSize ()
 Getting current item minimum size limit. More...
 
Core.Size GetMaxSize ()
 Getting current item maximum size limit. More...
 
void SetAlignment (ItemAlignment alignment)
 Setting an alignment of an item's shape relative to its container. Combines with alignment by vertically (Top, VCenter, Bottom) and horizontally (Left, HCenter, Right). More...
 
void SetAlignment (params ItemAlignment[] alignment)
 Setting an alignment of an item's shape relative to its container. Combines with alignment by vertically (Top, VCenter, Bottom) and horizontally (Left, HCenter, Right). More...
 
ItemAlignment GetAlignment ()
 Getting an alignment of an item's shape relative to its container. More...
 
void SetSizePolicy (SizePolicy width, SizePolicy height)
 Setting the size policy of an item's shape. Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). More...
 
void SetWidthPolicy (SizePolicy policy)
 Setting width policy of an item's shape. Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). More...
 
SizePolicy GetWidthPolicy ()
 Getting width policy of an item's shape.Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). More...
 
void SetHeightPolicy (SizePolicy policy)
 Setting height policy of an item's shape. Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). More...
 
SizePolicy GetHeightPolicy ()
 Getting height policy of an item's shape.Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). More...
 
virtual void SetX (int x)
 Setting X coordinate of the left-top corner of a shape. More...
 
virtual int GetX ()
 Getting X coordinate of the left-top corner of a shape. More...
 
virtual void SetY (int y)
 Setting Y coordinate of the left-top corner of a shape. More...
 
virtual int GetY ()
 Getting Y coordinate of the left-top corner of a shape. More...
 
void Update (GeometryEventType type, int value=0)
 Updating an item size or/and position. More...
 
bool IsShadowDrop ()
 Getting the shadow visibility status of an item. More...
 
void SetShadowDrop (bool value)
 Setting the shadow visibility status of an item. More...
 
void SetShadowRadius (int radius)
 Setting the specified blur radius of the shadow. Default: 0. More...
 
int GetShadowRadius ()
 Getting the shadow blur raduis. More...
 
Color GetShadowColor ()
 Getting shadow color. More...
 
void SetShadowColor (Color color)
 Setting shadow color. More...
 
Position GetShadowPos ()
 Getting the offset of the shadow relative to the position of the item. More...
 
int[] GetShadowExtension ()
 Getting the values of shadow extensions in pixels. More...
 
void SetShadowExtension (int wExtension, int hExtension)
 Setting the values of shadow extensions in pixels. More...
 
void SetShadow (int radius, int x, int y, Color color)
 Setting the shadow with specified blur radius, axis shifts, shadow color. More...
 
void SetShadow (Shadow shadow)
 Setting the shadow of an item. More...
 
virtual void SetConfines ()
 Setting the confines of the item relative to its parent's size and position. Example: items can be partially (or completely) outside the container (example: ListBox), in which case the part that is outside the container should not be visible and should not interact with the user. More...
 
void SetConfines (int x0, int x1, int y0, int y1)
 Setting the confines of the item relative to specified bounds. Example: items can be partially (or completely) outside the container (example: ListBox), in which case the part that is outside the container should not be visible and should not interact with the user. More...
 
virtual void Release ()
 Method to describe disposing item's resources if the item was removed. More...
 

Additional Inherited Members

- Public Attributes inherited from SpaceVIL.BaseItem
ItemHoverRule HoverRule = ItemHoverRule.Lazy
 Hovering rule propetry of this item. Can be ItemHoverRule.Lazy or ItemHoverRule.Strict (see SpaceVIL.Core.ItemHoverRule). More...
 

Detailed Description

CustomShape is a subclass that extends from SpaceVIL.Primitive and can be any type of shapes.

You must provide the correct 2D vertices (triangles) of your figure to wark with this class.

Constructor & Destructor Documentation

◆ CustomShape() [1/2]

SpaceVIL.CustomShape.CustomShape ( )

Default CustomShape constructor.

◆ CustomShape() [2/2]

SpaceVIL.CustomShape.CustomShape ( List< float[]>  shape)

Constructs a CustomShape with the specified shape.

Parameters
shapeShape as list of tringles (points list of the shape as List of float[2] array).

Member Function Documentation

◆ MakeShape()

override void SpaceVIL.CustomShape.MakeShape ( )
virtual

Overridden method for stretching the shape of the current item relative to the current size. Use in conjunction with GetTriangles() and SetTriangles() methods. Notice: This method is mainly for overriding only. SpaceVIL calls this method if necessary and no need to call it manually.

Reimplemented from SpaceVIL.BaseItem.


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