
/*
 * xfdataf.idl:
 *      SOM interface description file for the following
 *      XFolder classes (in this order):
 *          XFldDataFile
 *      and the respective metaclasses.
 *
 *      Check the other files starting with xf* for the
 *      other XFolder classes.
 *
 *      XFldDataFile is responsible for menu manipulation
 *      and default icon replacements for data files.
 *      Since we should not override WPFileSystem to implement
 *      this functionality for folders and data files altogether,
 *      we must add this to WPDataFile separately.
 *
 *      Installation of this class is optional.
 *
 *      Copyright (C) 1997-99 Ulrich M”ller.
 *      This file is part of the XFolder source package.
 *      XFolder is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published
 *      by the Free Software Foundation, in version 2 as it comes in the
 *      "COPYING" file of the XFolder main distribution.
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 */

#include <wpdataf.idl>          // this is SOM for WPDataFile

/*
   CLASS: XFldDataFile

   CLASS HIERARCHY:

       SOMObject
         ÀÄÄ WPObject = XFldObject
               ÀÄÄ WPFileSystem
                     ÀÄÄ WPDataFile
                           ÀÄÄ  XFldDataFile
*/

interface M_XFldDataFile;            // Forward Reference to XFolder metaclass

interface XFldDataFile : WPDataFile
{

    /*
     * New instance methods for XFldDataFile:
     *
     */

#ifdef __SOMIDL__
  implementation {

    releaseorder: xfAddXFldDataFilePages;

    /*
     * Class Modifiers:
     *
     */

    externalprefix = xfdataf_;
    externalstem = xfdataf;
    majorversion = 1;
    minorversion = 1;
    filestem = xfdataf;           //# specifies the filestem for sc-generated files
    metaclass = M_XFldDataFile;
    dllname = "xfldr.dll";
    callstyle = oidl;           //# forget CORBA stuff (*ev and such)

    /*
     * WPDataFile methods overridden by XFldDataFile:
     *
     */

    wpFilterPopupMenu: override;
        /*@@ wpFilterPopupMenu:
           remove default entries according to Global Settings;
           even though XFldObject does this already, we need to
           override this for XFldDataFile again, because the
           WPS does it too for WPDataFile */

    wpModifyPopupMenu: override;
        /*@@ wpModifyPopupMenu:
           add datafile object popup menu entries. We don't
           need a wpMenuItemSelected method for data files,
           because the new menu items are completely handled
           by the subclassed folder frame window procedure
           by calling the functions in menus.c. */

    wpMenuItemHelpSelected: override;
        /*@@ wpMenuItemHelpSelected:
           display help for a context menu item */

#ifdef __PRIVATE__

#endif

  }; // implementation
#endif /* __SOMIDL__ */
};

//#
//#
//# Now define Metaclass.
//# ---------------------
//#

interface M_XFldDataFile : M_WPDataFile
{

#ifdef __SOMIDL__
  implementation {

    /*
     * Class Modifiers:
     *
     */

    externalprefix = xfdatafM_;
    externalstem = xfdatafM;
    functionprefix = xfdatafM_;
    majorversion = 1;
    minorversion = 1;
    filestem = xfdataf;           //# specifies the filestem for sc-generated files
    dllname = "xfldr.dll";
    callstyle = oidl;

    /*
     * Internal class variables for M_XFldDataFile:
     *
     */

    CHAR    szTitle[100];

    /*
     * M_WPDataFile methods overridden by M_XFldDataFile:
     *
     */

    wpclsInitData: override;
        /*@@ wpclsInitData:
           initialize class instance data */

    wpclsCreateDefaultTemplates: override;
        /*@@ wpclsCreateDefaultTemplates:
           this is called by the system to allow a class to
           create its default templates. The default WPS
           behavior is to create new templates if the class
           default title is different from the existing
           templates, but since we are replacing the class,
           we will have to suppress this in order not to
           crowd the Templates folder. */

    wpclsQueryIconData: override;
        /*@@ wpclsQueryIconData:
           give data files a new default icon, if the
           global settings allow this.
           This is loaded from /ICONS/ICONS.DLL. */

  };
#endif /* __SOMIDL__ */
};


