Programming Reference


ODSettingsExtension

     

Class Definition File

Settings.idl

Class C++ Binding

Settings.xh

Class Hierarchy

SOMObject
   ODObject
      ODExtension
         ODSettingsExtension

Description

An object of the ODSettingsExtension class represents a Properties notebook that a part editor can create and display.  

The Properties notebook provides access only to the standard information properties that all OpenDoc parts have. To allow the user to access properties specific to your parts, you can create a settings extension object to add additional pages to the notebook.

You can use ODSettingsExtension to create and insert additional pages into the Properties notebook. Once you implement it, OpenDoc accesses your settings extension object by calling your part's AcquireExtension method, which returns a reference to the extension object.

On the Windows platform, an additional page is inserted into the Properties notebook with the AddNotebookSheet method; on the OS/2 platform, with the GetSheetHandles method; on the AIX platform, with the AddPages method.

For more information related to extension objects, see the class description for ODExtension.

Methods

The methods defined by the ODSettingsExtension class include:

Overridden Methods

There are no methods overridden by the ODSettingsExtension class.

   

AddNotebookSheet (OS/2)

This method inserts an additional sheet into the property page notebook for an application part.

Signature
void AddNotebookSheet (PFNWP dlgproc,
                       HMODULE hmod,
                       ULONG id)

Parameters

dlgproc  (PFNWP)  -  input 

A pointer to the part's dialog procedure.

hmod  (HMODULE)  -  input 

A handle to the resource module that contains dialog templates.

id  (ULONG)  -  input 

A dialog template identity within the resource files.

Remarks

A part developer uses this method to insert additional sheets into the property page notebook. For each sheet added, the part is required to pass the dialog procedure and resource handle. ODInfo should display the new sheets to fit into the Info property notebook.    


AddPages (AIX)

This method provides the interface for the part developer to add additional pages to the property notebook.

Signature
void AddPages (ODNotebook notebook)

Parameters

notebook  (ODNotebook)  -  input 

A handle to the property page notebook.

Remarks

A part developer can add additional pages to the property page notebook as follows:

   

GetSheetHandles (Windows)

This method returns a pointer to array of property sheet handles.

Signature
HPROPSHEETPAGE *GetSheetHandles (ODULong *count)

Parameters

count  (ODULong *)  -  output 

A reference to the number of additional notebook sheets needed to display setting extensions.

Returns

rv  (HPROPSHEETPAGE *)  -  returns 

A pointer to array of property page handlers.

Remarks

A part developer uses this method to get an array of handles of dummy dialog. The part developer then can subclass from the dummy dialog to ensure that the new dialog page fits into the Info dialog notebook.      


InitSettingsExtension

This method should initialize this settings extension object.

Signature
void InitSettingsExtension (ODPart *owner
                            ODULong count
                            ODFacet facet)

Parameters

owner  (ODPart *)  -  input 

A reference to this settings extension's base object.

count  (ODULong)  -  input 

The number of additional notebook sheets needed to display setting extensions.

facet  (ODFacet)  -  input 

A reference to a facet that indicates the window in which to display the property notebook.

Returns

None.

Remarks

This method is not called directly to initialize this settings extension object, but is called by a subclass-specific initialization method. By convention, every subclass of ODSettingsExtension should have an override method that is called when an instance of that subclass is created. The override method may have additional parameters beyond those of the inherited InitSettingsExtension method. The override method should call the inherited InitSettingsExtension method at the beginning of its implementation. The inherited InitSettingsExtension method in turn calls the InitExtension method associated with this settings extension's base object (ODExtension) to prepare this settings extension for use.

If you subclass ODSettingsExtension, your subclass-specific initialization method, rather than its somInit method, should handle any initialization code that can potentially fail. For example, your initialization method may attempt to allocate memory for your settings extension.

Override Policy

If you subclass ODSettingsExtension, you must override this method. Your override method must call its inherited method at the beginning of your implementation.

Related Methods


[ Top | Previous | Next | Contents | Index | Documentation Homepage ]