PageBase
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.
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; }
origin.h