2007-03-27 17:47:10 +00:00
|
|
|
/*
|
|
|
|
* CiderPress
|
|
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
|
|
* See the file LICENSE for distribution terms.
|
|
|
|
*/
|
|
|
|
/*
|
2014-11-21 21:18:20 +00:00
|
|
|
* Declarations for a list control showing archive contents.
|
2007-03-27 17:47:10 +00:00
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
#ifndef APP_CONTENTLIST_H
|
|
|
|
#define APP_CONTENTLIST_H
|
2007-03-27 17:47:10 +00:00
|
|
|
|
|
|
|
#include "GenericArchive.h"
|
|
|
|
#include "Preferences.h"
|
|
|
|
#include "Resource.h"
|
|
|
|
#include <afxwin.h>
|
|
|
|
#include <afxcmn.h>
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A ListCtrl with headers appropriate for viewing archive contents.
|
|
|
|
*
|
|
|
|
* NOTE: this class performs auto-cleanup, and must be allocated on the heap.
|
|
|
|
*
|
|
|
|
* We currently use the underlying GenericArchive as our storage for the stuff
|
|
|
|
* we display. This works great until we change or delete entries from
|
|
|
|
* GenericArchive. At that point we run the risk of displaying bad pointers.
|
|
|
|
*
|
|
|
|
* The GenericArchive has local copies of everything interesting, so the only
|
|
|
|
* time things go badly for us is when somebody inside GenericArchive calls
|
|
|
|
* Reload. That frees and reallocates the storage we're pointing to. So,
|
|
|
|
* GenericArchive maintains a "I have reloaded" flag that we test before we
|
|
|
|
* draw.
|
|
|
|
*/
|
|
|
|
class ContentList: public CListCtrl
|
|
|
|
{
|
|
|
|
public:
|
2014-11-04 00:26:53 +00:00
|
|
|
ContentList(GenericArchive* pArchive, ColumnLayout* pLayout) {
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pArchive != NULL);
|
|
|
|
ASSERT(pLayout != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
fpArchive = pArchive;
|
|
|
|
fpLayout = pLayout;
|
|
|
|
// fInvalid = false;
|
|
|
|
//fRightClickItem = -1;
|
|
|
|
|
|
|
|
fpArchive->ClearReloadFlag();
|
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* The archive contents have changed. Reload the list from the
|
|
|
|
* GenericArchive.
|
|
|
|
*
|
|
|
|
* Reloading causes the current selection and view position to be lost. This
|
|
|
|
* is sort of annoying if all we did is add a comment, so we try to save the
|
|
|
|
* selection and reapply it. To do this correctly we need some sort of
|
|
|
|
* unique identifier so we can spot the records that have come back.
|
|
|
|
*
|
|
|
|
* Nothing in GenericArchive should be considered valid at this point.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void Reload(bool saveSelection = false);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Call this when the sort order changes.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void NewSortOrder(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Call this when the column widths are changed programmatically (e.g. by
|
|
|
|
* the preferences page enabling or disabling columns).
|
|
|
|
*
|
|
|
|
* We want to set any defaulted entries to actual values so that, if the
|
|
|
|
* font properties change, column A doesn't resize when column B is tweaked
|
|
|
|
* in the Preferences dialog. (If it's still set to "default", then when
|
|
|
|
* we say "update all widths" the defaultedness will be re-evaluated.)
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void NewColumnWidths(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copy the current column widths out to the Preferences object.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void ExportColumnWidths(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Mark everything as selected.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void SelectAll(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Toggle the "selected" state flag.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void InvertSelection(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Mark all items as unselected.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void ClearSelection(void);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Select the contents of any selected subdirs.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void SelectSubdirContents(void);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Find the next matching entry. We start after the first selected item.
|
|
|
|
* If we find a matching entry, we clear the current selection and select it.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
void FindNext(const WCHAR* str, bool down, bool matchCase, bool wholeWord);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Compare "str" against the contents of entry "num".
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
bool CompareFindString(int num, const WCHAR* str, bool matchCase,
|
2014-11-04 00:26:53 +00:00
|
|
|
bool wholeWord);
|
|
|
|
|
|
|
|
//int GetRightClickItem(void) const { return fRightClickItem; }
|
|
|
|
//void ClearRightClickItem(void) { fRightClickItem = -1; }
|
|
|
|
|
|
|
|
enum { kFileTypeBufLen = 5, kAuxTypeBufLen = 6 };
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the file type display string.
|
|
|
|
*
|
|
|
|
* "buf" must be able to hold at least 4 characters plus the NUL (i.e. 5).
|
|
|
|
* Use kFileTypeBufLen.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
static void MakeFileTypeDisplayString(const GenericEntry* pEntry,
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
WCHAR* buf);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the aux type display string.
|
|
|
|
*
|
|
|
|
* "buf" must be able to hold at least 5 characters plus the NUL (i.e. 6).
|
2014-12-19 01:25:46 +00:00
|
|
|
* Use kAuxTypeBufLen.
|
2014-11-21 21:18:20 +00:00
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
static void MakeAuxTypeDisplayString(const GenericEntry* pEntry,
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
WCHAR* buf);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
|
|
|
protected:
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Puts the window into "report" mode, and add a client edge since we're not
|
|
|
|
* using one on the frame window.
|
|
|
|
*/
|
|
|
|
virtual BOOL PreCreateWindow(CREATESTRUCT& cs) override;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
// Destroy "this".
|
|
|
|
virtual void PostNcDestroy(void) override;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create and populate list control.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
afx_msg int OnCreate(LPCREATESTRUCT);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* When being shut down, save off the column width info before the window
|
|
|
|
* gets destroyed.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
afx_msg void OnDestroy(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The system colors are changing; delete the image list and re-load it.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
afx_msg void OnSysColorChange(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* They've clicked on a header. Figure out what kind of sort order we want
|
|
|
|
* to use.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
afx_msg void OnColumnClick(NMHDR*, LRESULT*);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return the value for a particular row and column.
|
|
|
|
*
|
|
|
|
* This gets called *a lot* while the list is being drawn, scrolled, etc.
|
|
|
|
* Don't do anything too expensive.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
afx_msg void OnGetDispInfo(NMHDR* pnmh, LRESULT* pResult);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
|
|
|
private:
|
2014-11-04 00:26:53 +00:00
|
|
|
// Load the header images. Must do this every time the syscolors change.
|
|
|
|
// (Ideally this would re-map all 3dface colors. Note the current
|
|
|
|
// implementation relies on the top left pixel color.)
|
|
|
|
void LoadHeaderImages(void) {
|
|
|
|
if (!fHdrImageList.Create(IDB_HDRBAR, 16, 1, CLR_DEFAULT))
|
2014-12-19 01:25:46 +00:00
|
|
|
LOGW("GLITCH: header list create failed");
|
2014-11-04 00:26:53 +00:00
|
|
|
fHdrImageList.SetBkColor(::GetSysColor(COLOR_BTNFACE));
|
|
|
|
}
|
|
|
|
void LoadListImages(void) {
|
|
|
|
if (!fListImageList.Create(IDB_LIST_PICS, 16, 1, CLR_DEFAULT))
|
2014-12-19 01:25:46 +00:00
|
|
|
LOGW("GLITCH: list image create failed");
|
2014-11-04 00:26:53 +00:00
|
|
|
fListImageList.SetBkColor(::GetSysColor(COLOR_WINDOW));
|
|
|
|
}
|
|
|
|
enum { // defs for IDB_LIST_PICS
|
|
|
|
kListIconNone = 0,
|
|
|
|
kListIconComment = 1,
|
|
|
|
kListIconNonEmptyComment = 2,
|
|
|
|
kListIconDamaged = 3,
|
|
|
|
kListIconSuspicious = 4,
|
|
|
|
};
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fill the columns with data from the archive entries. We use a "virtual"
|
|
|
|
* list control to avoid storing everything multiple times. However, we
|
|
|
|
* still create one item per entry so that the list control will do most
|
|
|
|
* of the sorting for us (otherwise we have to do the sorting ourselves).
|
|
|
|
*
|
|
|
|
* Someday we should probably move to a wholly virtual list view.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
int LoadData(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the "selection serials" from the list of selected items.
|
|
|
|
*
|
|
|
|
* The caller is responsible for delete[]ing the return value.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
long* GetSelectionSerials(long* pSelCount);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Restore the selection from the "savedSel" list.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void RestoreSelection(const long* savedSel, long selCount);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Return the default width for the specified column.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
int GetDefaultWidth(int col);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Convert an HFS file/creator type into a string.
|
|
|
|
*
|
|
|
|
* "buf" must be able to hold at least 4 characters plus the NUL. Use
|
|
|
|
* kFileTypeBufLen.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
static void MakeMacTypeString(unsigned long val, WCHAR* buf);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Generate the funky ratio display string. While we're at it, return a
|
|
|
|
* numeric value that we can sort on.
|
|
|
|
*
|
|
|
|
* "buf" must be able to hold at least 6 chars plus the NULL.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
static void MakeRatioDisplayString(const GenericEntry* pEntry, WCHAR* buf,
|
2014-11-04 00:26:53 +00:00
|
|
|
int* pPerc);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Set the up/down sorting arrow as appropriate.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void SetSortIcon(void);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Static comparison function for list sorting.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2,
|
|
|
|
LPARAM lParamSort);
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
/*
|
|
|
|
* Handle a double-click on an item.
|
|
|
|
*
|
|
|
|
* The double-click should single-select the item, so we can throw it
|
|
|
|
* straight into the viewer. However, there are some uses for bulk
|
|
|
|
* double-clicking.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void OnDoubleClick(NMHDR* pnmh, LRESULT* pResult);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Handle a right-click on an item.
|
|
|
|
*/
|
2014-11-04 00:26:53 +00:00
|
|
|
void OnRightClick(NMHDR* pnmh, LRESULT* pResult);
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Select every entry whose display name has "displayPrefix" as a prefix.
|
|
|
|
*/
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
void SelectSubdir(const WCHAR* displayPrefix);
|
2014-11-04 00:26:53 +00:00
|
|
|
|
|
|
|
CImageList fHdrImageList;
|
|
|
|
CImageList fListImageList;
|
|
|
|
GenericArchive* fpArchive; // data we're expected to display
|
|
|
|
ColumnLayout* fpLayout;
|
|
|
|
// int fRightClickItem;
|
|
|
|
// bool fInvalid;
|
|
|
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
2007-03-27 17:47:10 +00:00
|
|
|
};
|
|
|
|
|
Large set of changes to restore CiderPress build.
CiderPress and MDC now compile, and execute far enough to open
their respective "about" boxes, but I doubt they'll do much
more than that.
* Switch from MBCS to UNICODE APIs
Microsoft switched to UTF-16 (by way of UCS-2) a long time ago,
and the support for MBCS seems to be getting phased out. So it's
time to switch to wide strings.
This is a bit awkward for CiderPress because it works with disk
and file archives with 8-bit filenames, and I want NufxLib and
DiskImgLib to continue to work on Linux (which has largely taken
the UTF-8 approach to Unicode). The libraries will continue to
work with 8-bit filenames, with CiderPress/MDC doing the
conversion at the appropriate point.
There were a couple of places where strings from a structure
handed back by one of the libraries were used directly in the UI,
or vice-versa, which is a problem because we have nowhere to
store the result of the conversion. These currently have fixed
place-holder "xyzzy" strings.
All UI strings are now wide.
Various format strings now use "%ls" and "%hs" to explicitly
specify wide and narrow. This doesn't play well with gcc, so
only the Windows-specific parts use those.
* Various updates to vcxproj files
The project-file conversion had some cruft that is now largely
gone. The build now has a common output directory for the EXEs
and libraries, avoiding the old post-build copy steps.
* Added zlib 1.2.8 and nufxlib 2.2.2 source snapshots
The old "prebuilts" directory is now gone. The libraries are now
built as part of building the apps.
I added a minimal set of files for zlib, and a full set for nufxlib.
The Linux-specific nufxlib goodies are included for the benefit of
the Linux utilities, which are currently broken (don't build).
* Replace symbols used for include guards
Symbols with a leading "__" are reserved.
2014-11-10 23:32:55 +00:00
|
|
|
#endif /*APP_CONTENTLIST_H*/
|