StyleHolder::StyleHolder

Description

Copy Constructor: The new StyleHolder object created is attached to the internal graphic object shOriginal was attached to. If shOriginal was invalid (not attached) so will be the new object.

Syntax

StyleHolder( )

StyleHolder( StyleHolder & shOriginal )

Parameters

shOriginal
[output]the object of StyleHolder

Return

Examples

EX1

void StyleHolder_StyleHolder_ex1()
{
    GraphLayer gl = Project.ActiveLayer();
    if(gl)                                        // If layer is valid...
    {
        StyleHolder sh = gl.StyleHolders(0);      // Get first style holder in layer 
        out_int("Plot type is ", sh.GetPlotId()); // Get plot id 
    }
}


EX2

void StyleHolder_StyleHolder_ex2()
{
    GraphLayer     gl = Project.ActiveLayer();
    
    StyleHolder shOriginal;
    shOriginal = gl.StyleHolders(0);
    if(shOriginal)
    {
        printf("The name of original StyleHolder is %s\n", shOriginal.GetName());
        
        StyleHolder shNew(shOriginal);    // copy construct from     shOriginal        
        if (shNew)
        {
            printf("The name of copied StyleHolder is %s\n", shNew.GetName());
        }
    }
}

Remark

See Also

header to Include

origin.h