mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Remove more obsolete API
This commit is contained in:
@@ -16,6 +16,7 @@ namespace PortabilityLayer
|
|||||||
class ResourceArchive;
|
class ResourceArchive;
|
||||||
class ScanlineMask;
|
class ScanlineMask;
|
||||||
class ResTypeID;
|
class ResTypeID;
|
||||||
|
struct RGBAColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define kPreferredDepth 8
|
#define kPreferredDepth 8
|
||||||
@@ -222,7 +223,7 @@ void GetLocalWindowRect (WindowPtr, Rect *);
|
|||||||
//void FlagWindowFloating (WindowPtr);
|
//void FlagWindowFloating (WindowPtr);
|
||||||
//Boolean IsWindowFloating (WindowPtr);
|
//Boolean IsWindowFloating (WindowPtr);
|
||||||
void OpenMessageWindow (const PLPasStr&);
|
void OpenMessageWindow (const PLPasStr&);
|
||||||
void SetMessageWindowMessage (StringPtr);
|
void SetMessageWindowMessage (StringPtr msg, const PortabilityLayer::RGBAColor &color);
|
||||||
void CloseMessageWindow (void);
|
void CloseMessageWindow (void);
|
||||||
void CloseThisWindow (WindowPtr *);
|
void CloseThisWindow (WindowPtr *);
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "FileManager.h"
|
#include "FileManager.h"
|
||||||
#include "HostFileSystem.h"
|
#include "HostFileSystem.h"
|
||||||
#include "House.h"
|
#include "House.h"
|
||||||
|
#include "PLStandardColors.h"
|
||||||
#include "PLTimeTaggedVOSEvent.h"
|
#include "PLTimeTaggedVOSEvent.h"
|
||||||
#include "RectUtils.h"
|
#include "RectUtils.h"
|
||||||
#include "ResourceManager.h"
|
#include "ResourceManager.h"
|
||||||
@@ -730,7 +731,7 @@ void ConvertHouseVer1To2 (void)
|
|||||||
NumToString((long)i, roomStr);
|
NumToString((long)i, roomStr);
|
||||||
GetLocalizedString(14, message);
|
GetLocalizedString(14, message);
|
||||||
PasStringConcat(message, roomStr);
|
PasStringConcat(message, roomStr);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Black());
|
||||||
SpinCursor(1);
|
SpinCursor(1);
|
||||||
|
|
||||||
ForceThisRoom(i);
|
ForceThisRoom(i);
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
|
|
||||||
#include "PLNumberFormatting.h"
|
#include "PLNumberFormatting.h"
|
||||||
#include "PLStringCompare.h"
|
#include "PLStringCompare.h"
|
||||||
|
#include "PLStandardColors.h"
|
||||||
#include "Externs.h"
|
#include "Externs.h"
|
||||||
#include "ObjectEdit.h"
|
#include "ObjectEdit.h"
|
||||||
|
#include "PLStandardColors.h"
|
||||||
#include "RectUtils.h"
|
#include "RectUtils.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -739,9 +741,8 @@ void LopOffExtraRooms (void)
|
|||||||
newSize = sizeof(houseType) + (sizeof(roomType) * (long)r);
|
newSize = sizeof(houseType) + (sizeof(roomType) * (long)r);
|
||||||
if (SetHandleSize(thisHouse.StaticCast<void>(), newSize) != PLErrors::kNone) // resize house handle (shrink)
|
if (SetHandleSize(thisHouse.StaticCast<void>(), newSize) != PLErrors::kNone) // resize house handle (shrink)
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(16, message);
|
GetLocalizedString(16, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
}
|
}
|
||||||
(*thisHouse)->nRooms -= count;
|
(*thisHouse)->nRooms -= count;
|
||||||
numberRooms = (*thisHouse)->nRooms;
|
numberRooms = (*thisHouse)->nRooms;
|
||||||
@@ -772,21 +773,17 @@ void ValidateRoomNumbers (void)
|
|||||||
((*thisHouse)->rooms[i].floor < -7))
|
((*thisHouse)->rooms[i].floor < -7))
|
||||||
{
|
{
|
||||||
(*thisHouse)->rooms[i].suite = kRoomIsEmpty;
|
(*thisHouse)->rooms[i].suite = kRoomIsEmpty;
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(17, message);
|
GetLocalizedString(17, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
houseErrors++;
|
houseErrors++;
|
||||||
ForeColor(blackColor);
|
|
||||||
}
|
}
|
||||||
if (((*thisHouse)->rooms[i].suite >= 128) ||
|
if (((*thisHouse)->rooms[i].suite >= 128) ||
|
||||||
((*thisHouse)->rooms[i].suite < 0))
|
((*thisHouse)->rooms[i].suite < 0))
|
||||||
{
|
{
|
||||||
(*thisHouse)->rooms[i].suite = kRoomIsEmpty;
|
(*thisHouse)->rooms[i].suite = kRoomIsEmpty;
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(18, message);
|
GetLocalizedString(18, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
houseErrors++;
|
houseErrors++;
|
||||||
ForeColor(blackColor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -885,11 +882,9 @@ void KeepAllObjectsLegal (void)
|
|||||||
{
|
{
|
||||||
if (!KeepObjectLegal())
|
if (!KeepObjectLegal())
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(19, message);
|
GetLocalizedString(19, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
houseErrors++;
|
houseErrors++;
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -923,10 +918,8 @@ void CheckForStaircasePairs (void)
|
|||||||
neighbor = GetNeighborRoomNumber(kNorthRoom);
|
neighbor = GetNeighborRoomNumber(kNorthRoom);
|
||||||
if (neighbor == kRoomIsEmpty)
|
if (neighbor == kRoomIsEmpty)
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(20, message);
|
GetLocalizedString(20, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -940,10 +933,8 @@ void CheckForStaircasePairs (void)
|
|||||||
}
|
}
|
||||||
if (!hasStairs)
|
if (!hasStairs)
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(21, message);
|
GetLocalizedString(21, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -954,10 +945,8 @@ void CheckForStaircasePairs (void)
|
|||||||
neighbor = GetNeighborRoomNumber(kSouthRoom);
|
neighbor = GetNeighborRoomNumber(kSouthRoom);
|
||||||
if (neighbor == kRoomIsEmpty)
|
if (neighbor == kRoomIsEmpty)
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(22, message);
|
GetLocalizedString(22, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -971,10 +960,8 @@ void CheckForStaircasePairs (void)
|
|||||||
}
|
}
|
||||||
if (!hasStairs)
|
if (!hasStairs)
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(23, message);
|
GetLocalizedString(23, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1004,19 +991,19 @@ void CheckHouseForProblems (void)
|
|||||||
|
|
||||||
SpinCursor(3);
|
SpinCursor(3);
|
||||||
GetLocalizedString(25, message);
|
GetLocalizedString(25, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Black());
|
||||||
WrapBannerAndTrailer();
|
WrapBannerAndTrailer();
|
||||||
|
|
||||||
if (isHouseChecks)
|
if (isHouseChecks)
|
||||||
{
|
{
|
||||||
SpinCursor(3);
|
SpinCursor(3);
|
||||||
GetLocalizedString(26, message);
|
GetLocalizedString(26, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Black());
|
||||||
ValidateNumberOfRooms();
|
ValidateNumberOfRooms();
|
||||||
if (houseErrors != 0)
|
if (houseErrors != 0)
|
||||||
{
|
{
|
||||||
GetLocalizedString(27, message);
|
GetLocalizedString(27, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Black());
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
houseErrors = 0;
|
houseErrors = 0;
|
||||||
}
|
}
|
||||||
@@ -1032,9 +1019,7 @@ void CheckHouseForProblems (void)
|
|||||||
NumToString((long)houseErrors, message);
|
NumToString((long)houseErrors, message);
|
||||||
GetLocalizedString(28, message2);
|
GetLocalizedString(28, message2);
|
||||||
PasStringConcat(message, message2);
|
PasStringConcat(message, message2);
|
||||||
ForeColor(redColor);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
SetMessageWindowMessage(message);
|
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(45);
|
DelayTicks(45);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1053,9 +1038,7 @@ void CheckHouseForProblems (void)
|
|||||||
NumToString((long)houseErrors, message);
|
NumToString((long)houseErrors, message);
|
||||||
GetLocalizedString(29, message2);
|
GetLocalizedString(29, message2);
|
||||||
PasStringConcat(message, message2);
|
PasStringConcat(message, message2);
|
||||||
ForeColor(redColor);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
SetMessageWindowMessage(message);
|
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1070,9 +1053,7 @@ void CheckHouseForProblems (void)
|
|||||||
NumToString((long)houseErrors, message);
|
NumToString((long)houseErrors, message);
|
||||||
GetLocalizedString(30, message2);
|
GetLocalizedString(30, message2);
|
||||||
PasStringConcat(message, message2);
|
PasStringConcat(message, message2);
|
||||||
ForeColor(blueColor);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
SetMessageWindowMessage(message);
|
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(45);
|
DelayTicks(45);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1087,9 +1068,7 @@ void CheckHouseForProblems (void)
|
|||||||
NumToString((long)houseErrors, message);
|
NumToString((long)houseErrors, message);
|
||||||
GetLocalizedString(31, message2);
|
GetLocalizedString(31, message2);
|
||||||
PasStringConcat(message, message2);
|
PasStringConcat(message, message2);
|
||||||
ForeColor(blueColor);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
SetMessageWindowMessage(message);
|
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(45);
|
DelayTicks(45);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1104,9 +1083,7 @@ void CheckHouseForProblems (void)
|
|||||||
NumToString((long)houseErrors, message);
|
NumToString((long)houseErrors, message);
|
||||||
GetLocalizedString(32, message2);
|
GetLocalizedString(32, message2);
|
||||||
PasStringConcat(message, message2);
|
PasStringConcat(message, message2);
|
||||||
ForeColor(redColor);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
SetMessageWindowMessage(message);
|
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1116,16 +1093,14 @@ void CheckHouseForProblems (void)
|
|||||||
SpinCursor(3);
|
SpinCursor(3);
|
||||||
houseErrors = 0;
|
houseErrors = 0;
|
||||||
GetLocalizedString(33, message);
|
GetLocalizedString(33, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Black());
|
||||||
KeepAllObjectsLegal();
|
KeepAllObjectsLegal();
|
||||||
if (houseErrors != 0)
|
if (houseErrors != 0)
|
||||||
{
|
{
|
||||||
NumToString((long)houseErrors, message);
|
NumToString((long)houseErrors, message);
|
||||||
GetLocalizedString(34, message2);
|
GetLocalizedString(34, message2);
|
||||||
PasStringConcat(message, message2);
|
PasStringConcat(message, message2);
|
||||||
ForeColor(redColor);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
SetMessageWindowMessage(message);
|
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1142,10 +1117,8 @@ void CheckHouseForProblems (void)
|
|||||||
SpinCursor(3);
|
SpinCursor(3);
|
||||||
if (CountStarsInHouse() < 1)
|
if (CountStarsInHouse() < 1)
|
||||||
{
|
{
|
||||||
ForeColor(redColor);
|
|
||||||
GetLocalizedString(35, message);
|
GetLocalizedString(35, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Red());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "ObjectEdit.h"
|
#include "ObjectEdit.h"
|
||||||
#include "Objects.h"
|
#include "Objects.h"
|
||||||
#include "Play.h"
|
#include "Play.h"
|
||||||
|
#include "PLStandardColors.h"
|
||||||
#include "RectUtils.h"
|
#include "RectUtils.h"
|
||||||
#include "ResourceManager.h"
|
#include "ResourceManager.h"
|
||||||
#include "Room.h"
|
#include "Room.h"
|
||||||
@@ -812,10 +813,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(46, message);
|
GetLocalizedString(46, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -843,10 +842,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(46, message);
|
GetLocalizedString(46, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -874,10 +871,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(47, message);
|
GetLocalizedString(47, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -905,10 +900,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(47, message);
|
GetLocalizedString(47, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -936,10 +929,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(48, message);
|
GetLocalizedString(48, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -967,10 +958,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(48, message);
|
GetLocalizedString(48, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -998,10 +987,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(49, message);
|
GetLocalizedString(49, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -1029,10 +1016,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(49, message);
|
GetLocalizedString(49, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -1061,10 +1046,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(50, message);
|
GetLocalizedString(50, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
@@ -1093,10 +1076,8 @@ void AddObjectPairing (void)
|
|||||||
|
|
||||||
GetLocalizedString(45, message);
|
GetLocalizedString(45, message);
|
||||||
OpenMessageWindow(message);
|
OpenMessageWindow(message);
|
||||||
ForeColor(blueColor);
|
|
||||||
GetLocalizedString(51, message);
|
GetLocalizedString(51, message);
|
||||||
SetMessageWindowMessage(message);
|
SetMessageWindowMessage(message, StdColors::Blue());
|
||||||
ForeColor(blackColor);
|
|
||||||
DelayTicks(60);
|
DelayTicks(60);
|
||||||
CloseMessageWindow();
|
CloseMessageWindow();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -888,6 +888,8 @@ void FrameDisplayIcon (Dialog *theDialog, const PortabilityLayer::RGBAColor &col
|
|||||||
surface->FrameRect(theRect);
|
surface->FrameRect(theRect);
|
||||||
InsetRect(&theRect, 1, 1);
|
InsetRect(&theRect, 1, 1);
|
||||||
surface->FrameRect(theRect);
|
surface->FrameRect(theRect);
|
||||||
|
|
||||||
|
surface->SetForeColor(StdColors::Black());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- DisplayUpdate
|
//-------------------------------------------------------------- DisplayUpdate
|
||||||
@@ -898,9 +900,7 @@ void DisplayUpdate (Dialog *theDialog)
|
|||||||
|
|
||||||
SetDialogItemValue(theDialog, kDoColorFadeItem, (short)wasFade);
|
SetDialogItemValue(theDialog, kDoColorFadeItem, (short)wasFade);
|
||||||
|
|
||||||
ForeColor(redColor);
|
|
||||||
FrameDisplayIcon(theDialog, StdColors::Red());
|
FrameDisplayIcon(theDialog, StdColors::Red());
|
||||||
ForeColor(blackColor);
|
|
||||||
FrameDialogItemC(theDialog, kBorder1Item, kRedOrangeColor8);
|
FrameDialogItemC(theDialog, kBorder1Item, kRedOrangeColor8);
|
||||||
FrameDialogItemC(theDialog, kBorder2Item, kRedOrangeColor8);
|
FrameDialogItemC(theDialog, kBorder2Item, kRedOrangeColor8);
|
||||||
FrameDialogItemC(theDialog, kBorder3Item, kRedOrangeColor8);
|
FrameDialogItemC(theDialog, kBorder3Item, kRedOrangeColor8);
|
||||||
@@ -1055,7 +1055,6 @@ void DoDisplayPrefs (void)
|
|||||||
|
|
||||||
case kDispDefault:
|
case kDispDefault:
|
||||||
FrameDisplayIcon(prefDlg, StdColors::White());
|
FrameDisplayIcon(prefDlg, StdColors::White());
|
||||||
ForeColor(blackColor);
|
|
||||||
DisplayDefaults();
|
DisplayDefaults();
|
||||||
DisplayUpdate(prefDlg);
|
DisplayUpdate(prefDlg);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ void FrameSelectedTool (DrawSurface *surface)
|
|||||||
InsetRect(&theRect, 1, 1);
|
InsetRect(&theRect, 1, 1);
|
||||||
surface->FrameRect(theRect);
|
surface->FrameRect(theRect);
|
||||||
|
|
||||||
ForeColor(blackColor);
|
surface->SetForeColor(StdColors::Black());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ void OpenMessageWindow (const PLPasStr &title)
|
|||||||
// For the above message window, this function displays a string of text<78>
|
// For the above message window, this function displays a string of text<78>
|
||||||
// in the center of the window.
|
// in the center of the window.
|
||||||
|
|
||||||
void SetMessageWindowMessage (StringPtr message)
|
void SetMessageWindowMessage (StringPtr message, const PortabilityLayer::RGBAColor &color)
|
||||||
{
|
{
|
||||||
Rect mssgWindowRect;
|
Rect mssgWindowRect;
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ void SetMessageWindowMessage (StringPtr message)
|
|||||||
surface->FillRect(mssgWindowRect);
|
surface->FillRect(mssgWindowRect);
|
||||||
|
|
||||||
const Point textPoint = Point::Create(mssgWindowRect.left, mssgWindowRect.bottom - 6);
|
const Point textPoint = Point::Create(mssgWindowRect.left, mssgWindowRect.bottom - 6);
|
||||||
surface->SetForeColor(StdColors::Black());
|
surface->SetForeColor(color);
|
||||||
surface->DrawString(textPoint, message, true);
|
surface->DrawString(textPoint, message, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,18 +54,6 @@ void EndUpdate(WindowPtr graf)
|
|||||||
graf->m_surface.m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
graf->m_surface.m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
PLError_t GetIconSuite(Handle *suite, short resID, IconSuiteFlags flags)
|
|
||||||
{
|
|
||||||
PL_NotYetImplemented();
|
|
||||||
return PLErrors::kNone;
|
|
||||||
}
|
|
||||||
|
|
||||||
PLError_t PlotIconSuite(Rect *rect, Handle iconSuite)
|
|
||||||
{
|
|
||||||
PL_NotYetImplemented();
|
|
||||||
return PLErrors::kNone;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetRect(Rect *rect, short left, short top, short right, short bottom)
|
void SetRect(Rect *rect, short left, short top, short right, short bottom)
|
||||||
{
|
{
|
||||||
rect->left = left;
|
rect->left = left;
|
||||||
@@ -218,71 +206,6 @@ static void PlotLine(PortabilityLayer::QDState *qdState, DrawSurface *surface, c
|
|||||||
surface->m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
surface->m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
static bool SystemColorToRGBAColor(SystemColorID color, PortabilityLayer::RGBAColor &rgbaColor)
|
|
||||||
{
|
|
||||||
switch (color)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
case whiteColor:
|
|
||||||
rgbaColor.r = rgbaColor.g = rgbaColor.b = 255;
|
|
||||||
break;
|
|
||||||
case blackColor:
|
|
||||||
rgbaColor.r = rgbaColor.g = rgbaColor.b = 0;
|
|
||||||
break;
|
|
||||||
case yellowColor:
|
|
||||||
rgbaColor.r = rgbaColor.g = 255;
|
|
||||||
rgbaColor.b = 0;
|
|
||||||
break;
|
|
||||||
case magentaColor:
|
|
||||||
rgbaColor.r = rgbaColor.b = 255;
|
|
||||||
rgbaColor.g = 0;
|
|
||||||
break;
|
|
||||||
case redColor:
|
|
||||||
rgbaColor.r = 255;
|
|
||||||
rgbaColor.g = rgbaColor.b = 0;
|
|
||||||
break;
|
|
||||||
case cyanColor:
|
|
||||||
rgbaColor.g = rgbaColor.b = 255;
|
|
||||||
rgbaColor.r = 0;
|
|
||||||
break;
|
|
||||||
case greenColor:
|
|
||||||
rgbaColor.g = 255;
|
|
||||||
rgbaColor.r = rgbaColor.b = 0;
|
|
||||||
break;
|
|
||||||
case blueColor:
|
|
||||||
rgbaColor.b = 255;
|
|
||||||
rgbaColor.r = rgbaColor.g = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
rgbaColor.a = 255;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ForeColor(SystemColorID color)
|
|
||||||
{
|
|
||||||
PortabilityLayer::RGBAColor rgbaColor;
|
|
||||||
if (SystemColorToRGBAColor(color, rgbaColor))
|
|
||||||
{
|
|
||||||
PortabilityLayer::QDState *qdState = PortabilityLayer::QDManager::GetInstance()->GetState();
|
|
||||||
qdState->SetForeColor(rgbaColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BackColor(SystemColorID color)
|
|
||||||
{
|
|
||||||
PortabilityLayer::RGBAColor rgbaColor;
|
|
||||||
if (SystemColorToRGBAColor(color, rgbaColor))
|
|
||||||
{
|
|
||||||
PortabilityLayer::QDState *qdState = PortabilityLayer::QDManager::GetInstance()->GetState();
|
|
||||||
qdState->SetBackColor(rgbaColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetForeColor(RGBColor *color)
|
void GetForeColor(RGBColor *color)
|
||||||
{
|
{
|
||||||
const PortabilityLayer::RGBAColor foreColor = PortabilityLayer::QDManager::GetInstance()->GetState()->GetForeColor();
|
const PortabilityLayer::RGBAColor foreColor = PortabilityLayer::QDManager::GetInstance()->GetState()->GetForeColor();
|
||||||
|
|||||||
@@ -11,35 +11,6 @@ namespace PortabilityLayer
|
|||||||
|
|
||||||
struct Dialog;
|
struct Dialog;
|
||||||
|
|
||||||
|
|
||||||
enum IconSuiteFlags
|
|
||||||
{
|
|
||||||
svAllLargeData = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum TextFlags
|
|
||||||
{
|
|
||||||
bold = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SystemFontID
|
|
||||||
{
|
|
||||||
systemFont = 0, // System font
|
|
||||||
applFont = 1, // Application font
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SystemColorID
|
|
||||||
{
|
|
||||||
whiteColor = 1,
|
|
||||||
blackColor,
|
|
||||||
yellowColor,
|
|
||||||
magentaColor,
|
|
||||||
redColor,
|
|
||||||
cyanColor,
|
|
||||||
greenColor,
|
|
||||||
blueColor,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum CopyBitsMode
|
enum CopyBitsMode
|
||||||
{
|
{
|
||||||
srcCopy,
|
srcCopy,
|
||||||
@@ -99,14 +70,9 @@ void SetPortDialogPort(Dialog *dialog);
|
|||||||
|
|
||||||
void EndUpdate(WindowPtr graf);
|
void EndUpdate(WindowPtr graf);
|
||||||
|
|
||||||
PLError_t GetIconSuite(Handle *suite, short resID, IconSuiteFlags flags);
|
|
||||||
PLError_t PlotIconSuite(Rect *rect, Handle iconSuite);
|
|
||||||
|
|
||||||
void SetRect(Rect *rect, short left, short top, short right, short bottom);
|
void SetRect(Rect *rect, short left, short top, short right, short bottom);
|
||||||
|
|
||||||
int TextWidth(const PLPasStr &str, int firstChar1Based, int length);
|
int TextWidth(const PLPasStr &str, int firstChar1Based, int length);
|
||||||
void ForeColor(SystemColorID color);
|
|
||||||
void BackColor(SystemColorID color);
|
|
||||||
void GetForeColor(RGBColor *color);
|
void GetForeColor(RGBColor *color);
|
||||||
|
|
||||||
void ClipRect(const Rect *rect);
|
void ClipRect(const Rect *rect);
|
||||||
|
|||||||
Reference in New Issue
Block a user