OriginObject

 

Name

OriginObject

Remark

OriginObject is the Origin C base class for all Origin objects and provides member functions and data members common to all Origin objects.

Hierarchy

Examples

EX1

// This example assumes that a workbook window is active in Origin
int OriginObject_ex1()
{
    // Worksheet and WorksheetPage objects are OriginObjects and IsValid,
    // GetName, GetIndex, GetParent, GetLongName, GetComments, and GetIndex
    // are OriginObject member functions
    Worksheet wks; // Worksheet is an OriginObject and inherits its members
    wks = (Worksheet) Project.ActiveLayer();
    if( wks.IsValid() )
    {
        printf("Worksheet is Valid!\n");
        printf("The Worksheet's (Short) Name is %s.\n", wks.GetName());
        printf("The Worksheet's index is %d.\n", wks.GetIndex());
        WorksheetPage wp; // WorksheetPage is an OriginObject and inherits its members
        wks.GetParent(wp);
        if( wp.IsValid() )
        {
            printf("WorksheetPage is Valid!\n");
            printf("The WorksheetPage's (Short) Name is %s.\n", wp.GetName());
            printf("The WorksheetPage's Long Name is %s.\n", wp.GetLongName());
            printf("The WorksheetPage's Comments are %s.\n", wp.GetComments());
        }
    }
    else
        out_str("Worksheet is not Valid!");
    return 0;
}

header to Include

origin.h

Reference

Members

Name Brief Example
AddInternalMenu Adds an internal menu to the main menu created from resource. Examples
ApplyFormat Apply format stored in theme file to object. Examples
AttachXFunction Attach an X-Function to the graphic object. Examples
AutoSize Use for autosizing origin objects. Examples
CheckShowActivate If object is not active then activise it. Examples
ConnectTo Connect one object to another object. Examples
CopyFormat Copy object format into Clipboard. Format from clipboard maybe saved to theme file. Examples
DoMethod Execute object LabTalk Methods Examples
Destroy Destroy (delete) the OriginObject. Examples
Detach Remove origin object which has been attached before. Examples
FindIncomingOperations Find UIDs where this object is an output. Examples
FindOutgoingOperations Find UIDs where this object is an input. Examples
GetBinaryStorage Get a binary storage as a tree. Examples
GetComments Retrieve the comments from an object that supports Comments. Examples
GetConnectedObjects Retrieve the UIDs of all the objects that are connected to this object. Examples
GetEventHandler Get the event handler class name if present Examples
GetFormat Get object format into Tree. Examples
GetGrid Worked on grid frame window like Worksheet, MatrixLayer to set the grid related format. Examples
GetIncomingOperation Get the operation that is using this object as its output. Examples
GetIndex Get the index of an object in an Origin C Collection. Examples
GetLock Get data access bits. Examples
GetLongName Get the long name of an object. Examples
GetMemory Get named binary storage into vector of bytes. Examples
GetMenuID Given a selection type, this command depending upon the supplied screen co-ordinates, will supply a the resource ID and popup position of the most suitable popup menu. Examples
GetName The short name of the Origin object, which can be a Column, a Layer, or a Page Examples
GetParent Get the parent object of this Origin object. Examples
GetProp Get object property via LabTalk property name Examples
GetRangeString Get the range string to represent this object. Examples
GetSelection Get current worksheet, matrix or graph layer selection as a DataRange object. Examples
GetSrcOperation To find the operation object that generate this report. Examples
GetStorage Access storage areas. Examples
GetStorageNames Get names of storage class objects. Examples
GetUID Gets internal Unique IDentification number of Origin object. Examples
Invalidate Invalidate an OriginObject. Examples
IsValid Checks the validity of this Origin object. Examples
Load Load a Layer from a OGW/OGM file in an existing WorksheetPage object only. Examples
Lock Locks a particular object from read/write data access (Implemented only for WorksheetLayer, WorksheetPage, and Project Objects) Examples
OriginObject Default constructor for OriginObject. Examples
ProcessCommand Processes internal menu/button commands. Examples
PutBinaryStorage Add/Update a binary storage using a Tree. Examples
SaveAs Saves (Serializes) an OriginObject into an Orgin recognized file type. Examples
SetComments Sets the comments with a text string to an object that supports Comments. Examples
SetEventHandler Install an Event Handler to the object. Examples
SetIndex Set the index of an object in a collection. Examples
SetLongName Sets the long name of an object Examples
SetMemory Set/Create named binary storage Examples
SetName Rename a Page. Examples
SetProp Set object property via LabTalk property name Examples
Unlock Unlocks a locked object for read/write data access. Unlock will remove protection completely, regardless of the type of locking. (Implemented only for WorksheetLayer, WorksheetPage, and Project Objects) Examples
UpdateThemeIDs Update IDs in trNode acording to theme rules Examples

Property

Name Brief Example
Show Read/Write the Show/Hide property of any Origin object Examples