mirror of
https://github.com/fadden/ciderpress.git
synced 2024-11-05 16:05:02 +00:00
d8223dbcfd
This moves method comments from the .cpp file to the .h file, where users of the methods can find them. This also makes it possible for the IDE to show the comments when you mouse-hover over the method name, though Visual Studio is a bit weak in this regard. Also, added "override" keywords on overridden methods. Reasonably current versions of popular compilers seem to support this. Also, don't have the return type on a separate line in the .cpp file. The motivation for the practice -- quickly finding a method definition with "^name" -- is less useful in C++ than C, and modern IDEs provide more convenient ways to do the same thing. Also, do some more conversion from unsigned types to uintXX_t. This commit is primarily for the "app" directory.
132 lines
3.2 KiB
C++
132 lines
3.2 KiB
C++
/*
|
|
* CiderPress
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
* See the file LICENSE for distribution terms.
|
|
*/
|
|
/*
|
|
* Definitions for the ArchiveInfo set of dialog classes.
|
|
*/
|
|
#ifndef APP_ARCHIVEINFODIALOG_H
|
|
#define APP_ARCHIVEINFODIALOG_H
|
|
|
|
#include "resource.h"
|
|
#include "GenericArchive.h"
|
|
#include "NufxArchive.h"
|
|
#include "DiskArchive.h"
|
|
#include "BnyArchive.h"
|
|
#include "AcuArchive.h"
|
|
|
|
/*
|
|
* This is an abstract base class for the archive info dialogs. There is
|
|
* one dialog for each kind of archive (i.e. each GenericArchive sub-class).
|
|
*/
|
|
class ArchiveInfoDialog : public CDialog {
|
|
public:
|
|
ArchiveInfoDialog(UINT dialogID, CWnd* pParentWnd = NULL) :
|
|
CDialog(dialogID, pParentWnd)
|
|
{}
|
|
virtual ~ArchiveInfoDialog(void) {}
|
|
|
|
private:
|
|
/*
|
|
* Show general help for the archive info dialogs.
|
|
*/
|
|
afx_msg void OnHelp(void);
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/*
|
|
* NuFX archive info.
|
|
*/
|
|
class NufxArchiveInfoDialog : public ArchiveInfoDialog {
|
|
public:
|
|
NufxArchiveInfoDialog(NufxArchive* pArchive, CWnd* pParentWnd = NULL) :
|
|
fpArchive(pArchive),
|
|
ArchiveInfoDialog(IDD_ARCHIVEINFO_NUFX, pParentWnd)
|
|
{}
|
|
virtual ~NufxArchiveInfoDialog(void) {}
|
|
|
|
private:
|
|
virtual BOOL OnInitDialog(void) override;
|
|
|
|
NufxArchive* fpArchive;
|
|
};
|
|
|
|
/*
|
|
* Disk image info.
|
|
*/
|
|
class DiskArchiveInfoDialog : public ArchiveInfoDialog {
|
|
public:
|
|
DiskArchiveInfoDialog(DiskArchive* pArchive, CWnd* pParentWnd = NULL) :
|
|
fpArchive(pArchive),
|
|
ArchiveInfoDialog(IDD_ARCHIVEINFO_DISK, pParentWnd)
|
|
{}
|
|
virtual ~DiskArchiveInfoDialog(void) {}
|
|
|
|
private:
|
|
virtual BOOL OnInitDialog(void) override;
|
|
|
|
/*
|
|
* The user has changed their selection in the sub-volume pulldown menu.
|
|
*/
|
|
afx_msg void OnSubVolSelChange(void);
|
|
|
|
/*
|
|
* Fill in the volume-specific info fields.
|
|
*/
|
|
void FillInVolumeInfo(const DiskFS* pDiskFS);
|
|
|
|
/*
|
|
* Recursively add sub-volumes to the list.
|
|
*/
|
|
void AddSubVolumes(const DiskFS* pDiskFS, const WCHAR* prefix,
|
|
int* pIdx);
|
|
|
|
/*
|
|
* Reduce a size to something meaningful (KB, MB, GB).
|
|
*/
|
|
void GetReducedSize(long numUnits, int unitSize,
|
|
CString* pOut) const;
|
|
|
|
DiskArchive* fpArchive;
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/*
|
|
* Binary II archive info.
|
|
*/
|
|
class BnyArchiveInfoDialog : public ArchiveInfoDialog {
|
|
public:
|
|
BnyArchiveInfoDialog(BnyArchive* pArchive, CWnd* pParentWnd = NULL) :
|
|
fpArchive(pArchive),
|
|
ArchiveInfoDialog(IDD_ARCHIVEINFO_BNY, pParentWnd)
|
|
{}
|
|
virtual ~BnyArchiveInfoDialog(void) {}
|
|
|
|
private:
|
|
virtual BOOL OnInitDialog(void) override;
|
|
|
|
BnyArchive* fpArchive;
|
|
};
|
|
|
|
/*
|
|
* ACU archive info.
|
|
*/
|
|
class AcuArchiveInfoDialog : public ArchiveInfoDialog {
|
|
public:
|
|
AcuArchiveInfoDialog(AcuArchive* pArchive, CWnd* pParentWnd = NULL) :
|
|
fpArchive(pArchive),
|
|
ArchiveInfoDialog(IDD_ARCHIVEINFO_ACU, pParentWnd)
|
|
{}
|
|
virtual ~AcuArchiveInfoDialog(void) {}
|
|
|
|
private:
|
|
virtual BOOL OnInitDialog(void) override;
|
|
|
|
AcuArchive* fpArchive;
|
|
};
|
|
|
|
#endif /*APP_ARCHIVEINFODIALOG_H*/
|