mirror of
https://github.com/fadden/ciderpress.git
synced 2024-12-22 05:29:43 +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.
82 lines
2.3 KiB
C++
82 lines
2.3 KiB
C++
/*
|
|
* CiderPress
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
* See the file LICENSE for distribution terms.
|
|
*/
|
|
/*
|
|
* Options for converting a disk image to a file archive.
|
|
*/
|
|
#ifndef APP_CONVDISKOPTIONSDIALOG_H
|
|
#define APP_CONVDISKOPTIONSDIALOG_H
|
|
|
|
#include "UseSelectionDialog.h"
|
|
#include "resource.h"
|
|
|
|
/*
|
|
* Get some options.
|
|
*/
|
|
class ConvDiskOptionsDialog : public UseSelectionDialog {
|
|
public:
|
|
ConvDiskOptionsDialog(int selCount, CWnd* pParentWnd = NULL) :
|
|
UseSelectionDialog(selCount, pParentWnd, IDD_CONVDISK_OPTS)
|
|
{
|
|
fDiskSizeIdx = 0;
|
|
//fAllowLower = fSparseAlloc = FALSE;
|
|
fVolName = L"NEW.DISK";
|
|
fNumBlocks = -1;
|
|
}
|
|
virtual ~ConvDiskOptionsDialog(void) {}
|
|
|
|
int fDiskSizeIdx;
|
|
//BOOL fAllowLower;
|
|
//BOOL fSparseAlloc;
|
|
CString fVolName;
|
|
|
|
long fNumBlocks; // computed when DoModal finishes
|
|
|
|
private:
|
|
virtual BOOL OnInitDialog(void) override;
|
|
virtual void DoDataExchange(CDataExchange* pDX) override;
|
|
|
|
/*
|
|
* Enable all size radio buttons and reset the "size required" display.
|
|
*
|
|
* This should be invoked whenever the convert selection changes, and may be
|
|
* called at any time.
|
|
*/
|
|
afx_msg void ResetSizeControls(void);
|
|
|
|
/*
|
|
* Compute the amount of space required for the files. We use the result to
|
|
* disable the controls that can't be used.
|
|
*
|
|
* We don't need to enable controls here, because the only way to change the
|
|
* set of files is by flipping between "all" and "selected", and we can handle
|
|
* that separately.
|
|
*/
|
|
afx_msg void OnCompute(void);
|
|
|
|
/*
|
|
* When one of the radio buttons is clicked on, update the active status
|
|
* and contents of the "specify size" edit box.
|
|
*/
|
|
afx_msg void OnRadioChangeRange(UINT nID);
|
|
|
|
/*
|
|
* Display the space requirements and disable radio button controls that are
|
|
* for values that are too small.
|
|
*
|
|
* Pass in the number of blocks required on a 32MB ProDOS volume.
|
|
*/
|
|
void LimitSizeControls(long totalBlocks, long blocksUsed);
|
|
|
|
/*
|
|
* Test a ProDOS filename for validity.
|
|
*/
|
|
bool IsValidVolumeName_ProDOS(const WCHAR* name);
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
#endif /*APP_CONVDISKOPTIONSDIALOG_H*/
|