mirror of
https://github.com/aaronsgiles/JPEGView.git
synced 2024-06-13 21:29:28 +00:00
92bdb55672
These are the sources for the final official release of JPEGView for the Mac, back in 1994.
1 line
1.6 KiB
C
1 line
1.6 KiB
C
/*********************************************************/
|
|
/* This source code copyright (c) 1991-2001, Aaron Giles */
|
|
/* See the Read Me file for licensing information. */
|
|
/* Contact email: mac@aarongiles.com */
|
|
/*********************************************************/
|
|
|
|
#if THINK_C
|
|
#include "THINK.Header"
|
|
#elif applec
|
|
#pragma load ":Headers:MPW.Header"
|
|
#elif __MWERKS__
|
|
//#include "MW.Header"
|
|
#else
|
|
#include "JPEGView.h"
|
|
#endif
|
|
|
|
/*
|
|
* HandleWindowChoice(theItem)
|
|
*
|
|
* Purpose: Accepts menu events from the Window menu
|
|
* Inputs: theItem = the menu item number
|
|
* Returns: nothing
|
|
*
|
|
*/
|
|
|
|
void HandleWindowChoice(short theItem)
|
|
{
|
|
ImageHandle theImage;
|
|
|
|
switch (theItem) {
|
|
case windowStatItem:
|
|
if (GetStatWindow()) SendCloseWindow(GetStatWindow());
|
|
else SendCreateWindow(kStatWindowID);
|
|
break;
|
|
case windowCommentsItem:
|
|
if (GetCommentsWindow())
|
|
gCommentsOpen = false, SendCloseWindow(GetCommentsWindow());
|
|
else gCommentsOpen = true, SendCreateWindow(kCommentsWindowID);
|
|
break;
|
|
case windowColorsItem:
|
|
if (GetColorsWindow()) SendCloseWindow(GetColorsWindow());
|
|
else SendCreateWindow(kColorsWindowID);
|
|
break;
|
|
case windowPreviousItem:
|
|
theImage = FrontImage();
|
|
if (theImage) theImage = PreviousImage(theImage);
|
|
if (!theImage) theImage = LastImage();
|
|
SendMoveToFront((*theImage)->window);
|
|
break;
|
|
case windowNextItem:
|
|
theImage = FrontImage();
|
|
if (theImage) theImage = (*theImage)->next;
|
|
if (!theImage) theImage = gImageRoot;
|
|
SendMoveToFront((*theImage)->window);
|
|
break;
|
|
default:
|
|
SendMoveToFront(IndexedDocument(theItem - windowFirstItem + 1));
|
|
break;
|
|
}
|
|
}
|