home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wpdsc093.zip
/
dscrlst.idl
< prev
next >
Wrap
Text File
|
1995-11-06
|
5KB
|
199 lines
#ifndef DSCRFileList_idl
#define DSCRFileList_idl
#include <somcls.idl>
#include <wpfolder.idl>
interface M_DSCRFileList;
interface DSCRFileList: WPFolder {
struct file_entry {
string filename;
string description;
};
attribute sequence<file_entry> file_list;
// This attribute containes the digestible file list representation.
// It is initialized by InitAttrs method.
attribute string name_of_file_list;
// This attribute containes the name of the file list for
// this folder.
long file_list_len();
// Returns file_list._length
BOOL InitAttrs();
// This method initializes attributes of this object.
string File2Descr(in string fname);
// This method retrieves file description from this file list.
// If file was not found in this file list then "No description"
// is returned.
string GetFileDescr(in string fname);
// This is an alias for File2Descr
BOOL SetFileDescr(in string fname, in string dscr);
// This method sets the description for the given file
void ApplyFileListSettingsToSubfolders();
// This method applies this's folder settings to it's subfolders
#ifdef __SOMIDL__
implementation {
releaseorder: File2Descr, _get_file_list, _set_file_list,
InitAttrs, file_list_len,
_get_name_of_file_list, _set_name_of_file_list,_get_useEA,_set_useEA,
_get_lines_treshold, _set_lines_treshold,
_get_changed_name_of_file_list,
_set_changed_name_of_file_list,
ParseLine,
FileListHasBeenTouched,
GetFileDescr,
SetFileDescr,
LoadFilelist,
SaveFilelist,
ApplyFileListSettingsToSubfolders,
CopySettingsFrom;
externalstem = DSCRlst;
externalprefix = DSCRlst_;
filestem = DSCRlst;
local;
callstyle=oidl;
majorversion = 1;
minorversion = 2;
metaclass = M_DSCRFileList;
name_of_file_list: noget,noset ;
useEA: noget;
passthru C_xh = ""
" #include <somtypes.h>"
" #define INCL_WIN"
" #define INCL_DOS"
" #define INCL_GPIBITMAPS"
" #define INCL_DOSERRORS"
" #define INCL_DOSNMPIPES"
" #include <os2.h>"
" #include <wpsdebug.h>"
""
" #define INCL_WPCLASS"
" #define INCL_WPFOLDER"
""
" #include <pmwp.h>"
""
" #define DSCR_MAX_LINE 200 /* maximum length of file list line */"
" #define ID_ICON1 101"
" #define ID_ICON2 102"
""
" "
" /*"
" * Keys for save-restore methods"
" */"
" #define IDKEY_FILELISTNAME 1"
" #define IDKEY_USEEAFLAG 2"
""
"/* Settings notebook dialog box IDs */ "
" #include <dscrfl.h>"
" typedef struct _DSCRFLSET_DLGDATA"
" {"
" USHORT cb; /* size of this structure */"
" DSCRFileList *somSelf; /* pointer to this instance */"
" PSZ FileListName;"
" BOOL useEA;"
" } DSCRFLSET_DLGDATA;"
" typedef DSCRFLSET_DLGDATA *PDSCRFLSET_DLGDATA;"
""
" /* Adding popup menu item */"
""
" #define ID_MOREITEMS (WPMENUID_USER+1)"
" #define ID_MENU_FILELIST (WPMENUID_USER+2)"
" #define ID_SUBMENU_APPLY (WPMENUID_USER+3)"
" ";
passthru C_xh_after = ""
"";
wpInitData: override;
wpUnInitData: override;
wpPopulate: override;
wpSetup: override;
wpSaveState: override;
wpRestoreState: override;
wpAddSettingsPages: override;
wpModifyPopupMenu: override;
wpMenuItemSelected: override;
};
#endif //__SOMIDL__
};
interface M_DSCRFileList: M_WPFolder {
HMODULE clsQueryModuleHandle();
//
// METHOD: clsQueryModuleHandle ( ) PRIVATE
// (X) PUBLIC
// DESCRIPTION:
//
// Gets the module handle.
//
// RETURN:
// NULLHANDLE - an error occured.
// Not NULLHANDLE - The handle for DLL containing the DSCRFileList
// class.
//
string GetDefault_file_list_name();
// this method returns the default file name for this class
DSCRFileList GetDefaultTemplate();
// this method returns template object of this class located in <WP_TEMPS> folder
#ifdef __SOMIDL__
implementation {
releaseorder: clsQueryModuleHandle,GetDefault_file_list_name, GetDefaultTemplate ;
externalstem = DSCRlst;
externalprefix = DSCRlstM_;
functionprefix = DSCRlstM_;
filestem = DSCRlst;
local;
callstyle=oidl;
majorversion = 1;
minorversion = 2;
wpclsInitData: override;
wpclsUnInitData: override;
wpclsQueryTitle: override;
wpclsQueryIconData: override;
wpclsQueryIconDataN: override;
wpclsCreateDefaultTemplates: override;
};
#endif
};
#endif