campo-sirio/al/h/pmmon.h
alex 714dd74636 Archive Library versione 2.00
git-svn-id: svn://10.65.10.50/trunk@5350 c028cbd2-c16b-5b4b-a496-9718f37d4682
1997-10-09 16:09:54 +00:00

129 lines
4.1 KiB
C++
Executable File

/*
* PMMON.H
*
* Header file for ArchiveLib 1.0
*
* Copyright (c) 1994 Greenleaf Software, Inc.
* All Rights Reserved
*
* DESCRIPTION
*
* This header file contains the declaration for ALOs2Message,
* a monitor class used under OS/2 Presentation Manage.
*
* CLASS DEFINITIONS:
*
* ALOs2Message
*
* REVISION HISTORY
*
* February 14, 1996 2.0A : New release
*
*/
#if !defined( _PMMON_H )
#define _PMMON_H
#include "arclib.h"
#include "pmutil.h"
#if defined( __cplusplus )
/*
* class ALOs2Message
*
* DESCRIPTION
*
* This class is used to provide user feedback when operating under
* PM. It can be constructed to send messages to windows from
* YieldTime(), allowing you to easily update progress bars, text
* boxes, or whatever.
*
* DATA MEMBERS
*
* mhMessageWindowHandle : The handle of the window that is going to
* get the text messages generated by the
* ArchiveOperation() procedure. If this
* member is set to 0, no messages are sent.
*
* mhNumberWindowHandle : The handle of the window that is going to
* get either the byte count or the percent
* complete figure. If miMessage is 0, it
* is formatted as ASCII and sent using a
* WinSetWindowText() call. O/W, it is sent
* using WinSendMsg(), in both parameters.
*
* mMessageType : AL_SEND_BYTE_COUNT or AL_SEND_RATIO.
*
* miMessage : The message that gets sent with with the
* byte count or ratio.
*
* miSliderLength : If the monitor is sending messages to a
* slider, this member has the length of
* the slider shaft in pixels.
*
* MEMBER FUNCTIONS
*
* ALOs2Message() : The one and only constructor.
* ~ALOs2Message() : The destructor.
* operator new() : The memory allocation operator, only used
* when the library is in a DLL.
* Progress() : The virtual function that gets called to
* update progress through the file/job.
* ArchiveOperation() : The virtual function that gets called
* at key points in the archiving process.
*
* REVISION HISTORY
*
* May 26, 1994 1.0A : First release
*
*/
class AL_CLASS_TYPE ALOs2Message : public ALMonitor {
/*
* Constructors, destructors, and friends
*/
public :
AL_PROTO ALOs2Message( ALMonitorType monitor_type,
HWND progress_text_window,
ALWindowsMessageType message_type,
HWND progress_number_window,
UINT pm_message = 0 );
virtual AL_PROTO ~ALOs2Message();
#if defined( AL_USING_DLL ) || defined( AL_BUILDING_DLL )
void AL_DLL_FAR * AL_PROTO operator new( size_t size );
#endif
protected :
virtual void AL_PROTO Progress( long mlObjectSoFar,
ALStorage AL_DLL_FAR & object );
virtual void AL_PROTO
ArchiveOperation( ALArchiveOperation operation,
ALArchive AL_DLL_FAR *archive,
ALEntry AL_DLL_FAR *job );
/*
* Data members
*/
protected :
HWND mhMessageWindowHandle;
HWND mhNumberWindowHandle;
ALWindowsMessageType mMessageType;
ULONG miMessage;
int miSliderLength; /* The length of the shaft in pixels */
public :
AL_CLASS_TAG( _ALOs2MessageTag );
};
#else /* #if defined( __cplusplus ) ... */
AL_LINKAGE hALMonitor AL_FUNCTION
newALOs2Message( ALMonitorType monitor_type,
HWND progress_text_window,
ALWindowsMessageType message_type,
HWND progress_number_window,
UINT pm_message );
#endif /* #if defined( __cplusplus ) ... #else ... */
#endif