Jump to content

wpclsQueryDefaultView

From EDM2
Revision as of 23:12, 24 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpclsQueryDefaultView}} This class method is called to allow the class object to specify the default open view for its instances. ==Syntax== <PRE> ulView = wpclsQueryDefaultView(somSelf); </PRE> ==Parameters== ;''somSelf'' (M_WPObject *) - input :Pointer to the WPObject class object. ==Returns== ;''ulView'' (ULONG) - returns :Default open view. :{| class="wikitable" ! Value !! Description |- | OPEN_CONTENTS || Open contents view. |- | OPEN_D...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This class method is called to allow the class object to specify the default open view for its instances.

Syntax

ulView = wpclsQueryDefaultView(somSelf);

Parameters

somSelf (M_WPObject *) - input
Pointer to the WPObject class object.

Returns

ulView (ULONG) - returns
Default open view.
Value Description
OPEN_CONTENTS Open contents view.
OPEN_DEFAULT Open default view (same as double-click).
OPEN_DETAILS Open details view.
OPEN_HELP Display HelpPanel.
OPEN_RUNNING Execute object.
OPEN_SETTINGS Open Settings notebook.
OPEN_TREE Open tree view.
OPEN_UNKNOWN Unknown view.
OPEN_USER Class-specific views have a greater value than this.
0 Error occurred.

Usage

This method can be called at any time in order to query the default open view for instances of this class.

How to Override

All classes should override this method, so that new objects in their class will always have a sensible default view (device objects typically have a default view of OPEN_SETTINGS). The default view is used for both the conditional Open cascade menu and double-clicking on the object.

Example Code

This example demonstrates how to change the default open view of the instances of this class by overriding this method:

SOM_Scope ULONG   SOMLINK MyObjectM_wpclsQueryDefaultView(M_MyObject *somSelf)
{
    /* M_MyObjectData *somThis = M_MyObjectGetData(somSelf); */
    M_MyObjectMethodDebug("M_MyObject","MtObjectM_wpclsQueryDefaultView");

    /* Make the default open view the ICON view */
    return ( OPEN_ICON );
}

Related Methods