PageBase

 

Name

PageBase

Remark

The PageBase class provides methods and properties common to all internal Origin pages (windows). One use of this class is to write general functions that accept a PageBase object rather than a Page object of specific type. Another use is to attach a PageBase object to an active page whose page type is unknown. These uses facilitate writing general code that can then branch to handle specific page types.

In general, however, the Origin C PageBase class is intended to be an abstract base class to be used for polymorphic handling of derived page types. Derived classes, such as Note, GraphPage, WorksheetPage, LayoutPage, and MatrixPage inherit PageBase class methods and should be used instead.

Origin project files (files of type *.OPJ) contain collections of pages (windows) of different types. Within Origin project files, windows can be further arranged in Project Explorer folders accessed using the Folder class. The PageBase class is further derived into the Note class (the only Origin window type not containing layers) and the Page class which is further derived into the GraphPage, WorksheetPage, MatrixPage, and LayoutPage classes (window types containing layers). Use collections of different page types in the Project or Folder class like the Pages or GraphPages collections to locate and access pages in Origin. Once accessed, the Page derived classes can be used to locate and access layers within the page (i.e. use the Layers collection of the Page class or the GraphLayers collection of the GraphPage class) which can in turn be used to access such things as DataPlots and GraphicObjects in the layer.

Hierarchy

Examples

EX1

int PageBase_ex1()
{
    PageBase pbTemp; // Defualt construction, object is not valid at this point
    pbTemp = Project.Pages(); // Get the project's active page
    if( pbTemp.IsValid() )
        printf("Active page is of type %d\n", pbTemp.GetType());
    else
        printf("Active page is invalid\n");
    return 0;
}

header to Include

origin.h

Reference

Members

Name Brief Example
Detach Detach a Page object from an Origin page. Examples
GetEmbeddingInfo Returns the status of the PageBase object if embedded in a Datasheet. Examples
GetExportRect Retrieve the Graph Export or Copy Page bounding box Examples
GetFolder Get the Project Explorer folder where the page is located. Examples
GetName Get the name of a Page object by argument. Examples
GetOrder Get the order of the page in a slide show of the folder Examples
GetPageInfo Get page property info. Examples
GetPageSystemInfo Get page system information. Examples
GetShow Get the show state of the page. Examples
GetSplitterInfo Retrieve configuration information for the current splitter. Examples
GetStatus Returns the status of the PageBase in the Folder. Examples
GetType Get the page type of a Page object. Examples
GetWindow Get the Window object associated with a page object. Examples
IsInManager Tests if a particular page is in the page manager. Examples
MarginOffsets Export margin offset access Examples
PageBase Default constructor for a PageBase object. Examples
Print Print the page. Examples
Rename Rename a Page. Examples
SaveBitmap Save a Project page to a bitmap. Default size is 200. Examples
SaveEMF Save a Project page to an enhanced meta file (EMF). Examples
SaveToFile Saves the page to a file. Examples
SetShow Shows a hidden page or opens a minimized window. Examples
SetSplitters Set splitters in the window based on the given configuration string. Examples
SaveTemplate Save project as template. Examples
SetOrder Set the order of the page in a slide show of the folder Examples

Property

Name Brief Example
Label Page label. Examples
TitleShow Show state of page label. Examples