mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Fix constant IDs, remove ZoomWindow
This commit is contained in:
@@ -75,12 +75,12 @@ void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
|
|||||||
|
|
||||||
switch (thePart)
|
switch (thePart)
|
||||||
{
|
{
|
||||||
case inMenuBar:
|
case RegionIDs::kMenuBar:
|
||||||
menuChoice = MenuSelect(evtPoint);
|
menuChoice = MenuSelect(evtPoint);
|
||||||
DoMenuChoice(menuChoice);
|
DoMenuChoice(menuChoice);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case inDrag:
|
case RegionIDs::kTitleBar:
|
||||||
PortabilityLayer::WindowManager::GetInstance()->DragWindow(whichWindow, evtPoint, thisMac.screen);
|
PortabilityLayer::WindowManager::GetInstance()->DragWindow(whichWindow, evtPoint, thisMac.screen);
|
||||||
if (whichWindow == mainWindow)
|
if (whichWindow == mainWindow)
|
||||||
GetWindowLeftTop(whichWindow, &isEditH, &isEditV);
|
GetWindowLeftTop(whichWindow, &isEditH, &isEditV);
|
||||||
@@ -95,7 +95,7 @@ void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
|
|||||||
HiliteAllWindows();
|
HiliteAllWindows();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case inGoAway:
|
case RegionIDs::kClose:
|
||||||
if (TrackGoAway(whichWindow, evtPoint))
|
if (TrackGoAway(whichWindow, evtPoint))
|
||||||
{
|
{
|
||||||
if (whichWindow == mapWindow)
|
if (whichWindow == mapWindow)
|
||||||
@@ -109,7 +109,7 @@ void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case inGrow:
|
case RegionIDs::kExpand:
|
||||||
if (whichWindow == mapWindow)
|
if (whichWindow == mapWindow)
|
||||||
{
|
{
|
||||||
newSize = GrowWindow(mapWindow, evtPoint, &thisMac.gray);
|
newSize = GrowWindow(mapWindow, evtPoint, &thisMac.gray);
|
||||||
@@ -117,13 +117,7 @@ void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case inZoomIn:
|
case RegionIDs::kContent:
|
||||||
case inZoomOut:
|
|
||||||
if (TrackBox(whichWindow, evtPoint, thePart))
|
|
||||||
ZoomWindow(whichWindow, thePart, true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case inContent:
|
|
||||||
if (whichWindow == mainWindow)
|
if (whichWindow == mainWindow)
|
||||||
{
|
{
|
||||||
hDelta = evtPoint.h - lastWhere.h;
|
hDelta = evtPoint.h - lastWhere.h;
|
||||||
|
|||||||
@@ -131,11 +131,6 @@ bool TrackBox(WindowPtr window, Point point, int part)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoomWindow(WindowPtr window, int part, bool bringToFront)
|
|
||||||
{
|
|
||||||
PL_NotYetImplemented();
|
|
||||||
}
|
|
||||||
|
|
||||||
void HiliteWindow(WindowPtr window, bool highlighted)
|
void HiliteWindow(WindowPtr window, bool highlighted)
|
||||||
{
|
{
|
||||||
PL_NotYetImplemented();
|
PL_NotYetImplemented();
|
||||||
|
|||||||
@@ -197,16 +197,21 @@ typedef WindowPtr WindowRef; // wtf?
|
|||||||
|
|
||||||
struct KeyDownStates;
|
struct KeyDownStates;
|
||||||
|
|
||||||
enum RegionID
|
namespace RegionIDs
|
||||||
{
|
{
|
||||||
inMenuBar = 1,
|
enum RegionID
|
||||||
inContent,
|
{
|
||||||
inDrag,
|
kNone,
|
||||||
inGrow,
|
|
||||||
inGoAway,
|
kMenuBar = 1,
|
||||||
inZoomIn,
|
kContent,
|
||||||
inZoomOut,
|
kTitleBar,
|
||||||
};
|
kClose,
|
||||||
|
kExpand,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef RegionIDs::RegionID RegionID_t;
|
||||||
|
|
||||||
enum WindowRegionType
|
enum WindowRegionType
|
||||||
{
|
{
|
||||||
@@ -251,7 +256,6 @@ void BringToFront(WindowPtr window);
|
|||||||
bool TrackGoAway(WindowPtr window, Point point); // Returns true if the close box was actually clicked (?)
|
bool TrackGoAway(WindowPtr window, Point point); // Returns true if the close box was actually clicked (?)
|
||||||
Int32 GrowWindow(WindowPtr window, Point start, Rect *size);
|
Int32 GrowWindow(WindowPtr window, Point start, Rect *size);
|
||||||
bool TrackBox(WindowPtr window, Point point, int part); // Returns true if grow/shrink box was clicked (part corresponds to type)
|
bool TrackBox(WindowPtr window, Point point, int part); // Returns true if grow/shrink box was clicked (part corresponds to type)
|
||||||
void ZoomWindow(WindowPtr window, int part, bool bringToFront);
|
|
||||||
void HiliteWindow(WindowPtr window, bool highlighted);
|
void HiliteWindow(WindowPtr window, bool highlighted);
|
||||||
void DisposeWindow(WindowPtr window);
|
void DisposeWindow(WindowPtr window);
|
||||||
void GetWindowBounds(WindowPtr window, WindowRegionType windowRegion, Rect *rect);
|
void GetWindowBounds(WindowPtr window, WindowRegionType windowRegion, Rect *rect);
|
||||||
|
|||||||
Reference in New Issue
Block a user