Janitorial work and minor ServerWindow tweaks

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-06-11 14:47:36 +00:00
parent 768ec791c9
commit 70e337a0b4
4 changed files with 702 additions and 809 deletions
+79 -70
View File
@@ -53,34 +53,35 @@
//#define DISPLAYDRIVER_TEST_HACK
//---------------------------------------------------------------------------
RootLayer::RootLayer(const char *name, int32 workspaceCount,
Desktop *desktop, DisplayDriver *driver)
: Layer(BRect(0,0,0,0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver)
Desktop *desktop, DisplayDriver *driver)
: Layer(BRect(0,0,0,0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver)
{
fDesktop = desktop;
//NOTE: be careful about this one.
fRootLayer = this;
fActiveWorkspace = NULL;
fRows = 0;
fColumns = 0;
fDesktop = desktop;
//NOTE: be careful about this one.
fRootLayer = this;
fActiveWorkspace = NULL;
fRows = 0;
fColumns = 0;
// TODO: read these 3 from a configuration file.
fScreenXResolution = 0;
fScreenYResolution = 0;
fColorSpace = B_RGB32;
fScreenXResolution = 0;
fScreenYResolution = 0;
fColorSpace = B_RGB32;
_view_token = 0; // is this used for WinBorders?
_hidden = false;
_view_token = 0; // is this used for WinBorders?
_hidden = false;
SetWorkspaceCount(workspaceCount);
}
//---------------------------------------------------------------------------
RootLayer::~RootLayer()
{
// RootLayer object just uses Screen objects, it is not allowed to delete them.
}
//---------------------------------------------------------------------------
void RootLayer::Draw(const BRect &r)
{
// REMOVEME: This method is here because of DisplayDriver testing ONLY.
@@ -154,39 +155,40 @@ void RootLayer::Draw(const BRect &r)
_driver->FillRoundRect(BRect(800,1000,1200,1090),30,40,_layerdata,pattern2);
_driver->FillPolygon(polygon,6,polygonRect,_layerdata,pattern);
// _driver->FillTriangle(triangle,triangleRect,_layerdata,pattern);
#endif
#endif // end DISPLAYDRIVER_TEST_HACK
}
//---------------------------------------------------------------------------
void RootLayer::MoveBy(float x, float y)
{
}
//---------------------------------------------------------------------------
void RootLayer::ResizeBy(float x, float y)
{
// TODO: implement
}
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualTopChild() const
{
return fActiveWorkspace->GoToTopItem();
}
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualLowerSibling() const
{
return fActiveWorkspace->GoToLowerItem();
}
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualUpperSibling() const
{
return fActiveWorkspace->GoToUpperItem();
}
//---------------------------------------------------------------------------
Layer* RootLayer::VirtualBottomChild() const
{
return fActiveWorkspace->GoToBottomItem();
}
//---------------------------------------------------------------------------
void RootLayer::AddWinBorderToWorkspaces(WinBorder* winBorder, uint32 wks)
{
if (!(fMainLock.IsLocked()))
@@ -204,7 +206,7 @@ void RootLayer::AddWinBorderToWorkspaces(WinBorder* winBorder, uint32 wks)
WorkspaceAt(i+1)->AddLayerPtr(winBorder);
}
}
//---------------------------------------------------------------------------
void RootLayer::AddWinBorder(WinBorder* winBorder)
{
// The main job of this function, besides adding winBorder as a child, is to determine
@@ -235,7 +237,6 @@ void RootLayer::AddWinBorder(WinBorder* winBorder)
// will be called.
break;
}
case B_MODAL_APP_WINDOW_FEEL:
{
// add to app's list of Floating/Modal windows (as opposed to the system's)
@@ -317,7 +318,6 @@ void RootLayer::AddWinBorder(WinBorder* winBorder)
AddWinBorderToWorkspaces(winBorder, winBorder->Window()->Workspaces());
break;
}
case B_SYSTEM_LAST:
case B_SYSTEM_FIRST:
{
@@ -338,44 +338,46 @@ void RootLayer::AddWinBorder(WinBorder* winBorder)
STRACE(("#RootLayer::AddWinBorder(%s)\n", winBorder->GetName()));
}
//---------------------------------------------------------------------------
void RootLayer::RemoveWinBorder(WinBorder* winBorder)
{
// This method does 3 things:
// 1) Removes MODAL/SUBSET windows from system/app/window subset list.
// 2) Removes this window from any workspace it appears in.
// 3) Removes this window from RootLayer's list of chilren.
// This method does 3 things:
// 1) Removes MODAL/SUBSET windows from system/app/window subset list.
// 2) Removes this window from any workspace it appears in.
// 3) Removes this window from RootLayer's list of children.
desktop->fGeneralLock.Lock();
fMainLock.Lock();
int32 feel = winBorder->Window()->Feel();
int32 feel = winBorder->Window()->Feel();
if(feel == B_MODAL_SUBSET_WINDOW_FEEL || feel == B_FLOATING_SUBSET_WINDOW_FEEL)
{
desktop->RemoveSubsetWindow(winBorder);
}
else if (feel == B_MODAL_APP_WINDOW_FEEL || feel == B_FLOATING_APP_WINDOW_FEEL)
else
if (feel == B_MODAL_APP_WINDOW_FEEL || feel == B_FLOATING_APP_WINDOW_FEEL)
{
RemoveAppWindow(winBorder);
}
else if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL
else
if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL
|| feel == B_SYSTEM_FIRST || feel == B_SYSTEM_LAST)
{
if(feel == B_MODAL_ALL_WINDOW_FEEL || feel == B_FLOATING_ALL_WINDOW_FEEL)
fMainFMWList.RemoveItem(winBorder);
int32 count = WorkspaceCount();
int32 count = WorkspaceCount();
for(int32 i=0; i < count; i++)
WorkspaceAt(i+1)->RemoveLayerPtr(winBorder);
}
else
{ // for B_NORMAL_WINDOW_FEEL
uint32 workspaces = winBorder->Window()->Workspaces();
int32 count = WorkspaceCount();
uint32 workspaces = winBorder->Window()->Workspaces();
int32 count = WorkspaceCount();
for( int32 i=0; i < 32 && i < count; i++)
{
if( workspaces & (0x00000001UL << i))
WorkspaceAt(i+1)->RemoveLayerPtr(winBorder);
}
}
RemoveChild(winBorder);
@@ -383,31 +385,33 @@ void RootLayer::RemoveWinBorder(WinBorder* winBorder)
fMainLock.Unlock();
desktop->fGeneralLock.Unlock();
}
//---------------------------------------------------------------------------
void RootLayer::ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces)
{
// only normal windows are affected by this change
if(!winBorder->_level != B_NORMAL_FEEL)
return;
uint32 oldWorkspaces = winBorder->Window()->Workspaces();
uint32 oldWorkspaces = winBorder->Window()->Workspaces();
for(int32 i=0; i < WorkspaceCount(); i++)
{
if ((oldWorkspaces & (0x00000001 << i)) && (newWorkspaces & (0x00000001 << i)))
{
// do nothing.
}
else if(oldWorkspaces & (0x00000001 << i))
else
if(oldWorkspaces & (0x00000001 << i))
{
WorkspaceAt(i+1)->RemoveLayerPtr(winBorder);
}
else if (newWorkspaces & (0x00000001 << i))
else
if (newWorkspaces & (0x00000001 << i))
{
WorkspaceAt(i+1)->AddLayerPtr(winBorder);
}
}
}
//---------------------------------------------------------------------------
bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
{
if(!winBorder)
@@ -436,11 +440,13 @@ bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
{
int32 i;
for( i = 0; i < 32 && i < count; i++)
{
if( workspaces & (0x00000001UL << i))
{
newWorkspace = i+1;
break;
}
}
if (i == count || i == 32)
newWorkspace = ActiveWorkspaceIndex();
@@ -451,7 +457,8 @@ bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
WorkspaceAt(newWorkspace)->SetFrontLayer(winBorder);
SetActiveWorkspaceByIndex(newWorkspace);
}
else{
else
{
ActiveWorkspace()->SetFrontLayer(winBorder);
}
@@ -460,7 +467,7 @@ bool RootLayer::SetFrontWinBorder(WinBorder* winBorder)
STRACE(("#RootLayer::SetFrontWinBorder(%s)\n", winBorder? winBorder->GetName():"NULL"));
return true;
}
//---------------------------------------------------------------------------
void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns)
{
// NOTE: All screens *must* have the same resolution
@@ -469,31 +476,34 @@ void RootLayer::SetScreens(Screen *screen[], int32 rows, int32 columns)
for (int32 i=0; i < rows; i++)
{
if (i==0)
{
for(int32 j=0; j < columns; j++)
{
fScreenPtrList.AddItem(screen[i*rows + j]);
newFrame.right += screen[i*rows + j]->Resolution().x;
newFrame.right += screen[i*rows + j]->Resolution().x;
}
}
newFrame.bottom += screen[i*rows]->Resolution().y;
}
newFrame.right -= 1;
newFrame.bottom -= 1;
_frame = newFrame;
fRows = rows;
fColumns = columns;
fScreenXResolution = (int32)(screen[0]->Resolution().x);
fScreenYResolution = (int32)(screen[0]->Resolution().y);
_frame = newFrame;
fRows = rows;
fColumns = columns;
fScreenXResolution = (int32)(screen[0]->Resolution().x);
fScreenYResolution = (int32)(screen[0]->Resolution().y);
// NOTE: a RebuildFullRegion() followed by FullInvalidate() are required after calling this method!
// NOTE: a RebuildFullRegion() followed by FullInvalidate() are required after calling
// this method!
}
//---------------------------------------------------------------------------
Screen** RootLayer::Screens()
Screen **RootLayer::Screens()
{
return (Screen**)fScreenPtrList.Items();
}
//---------------------------------------------------------------------------
bool RootLayer::SetScreenResolution(int32 width, int32 height, uint32 colorspace)
{
if (fScreenXResolution == width && fScreenYResolution == height &&
@@ -521,7 +531,7 @@ bool RootLayer::SetScreenResolution(int32 width, int32 height, uint32 colorspace
screen->SetResolution(BPoint(width, height), colorspace);
}
Screen **screens = (Screen**)fScreenPtrList.Items();
Screen **screens = (Screen**)fScreenPtrList.Items();
SetScreens(screens, fRows, fColumns);
return true;
@@ -529,7 +539,7 @@ bool RootLayer::SetScreenResolution(int32 width, int32 height, uint32 colorspace
return false;
}
//---------------------------------------------------------------------------
void RootLayer::SetWorkspaceCount(const int32 count)
{
STRACE(("*RootLayer::SetWorkspaceCount(%ld)\n", count));
@@ -586,12 +596,12 @@ void RootLayer::SetWorkspaceCount(const int32 count)
STRACE(("#RootLayer::SetWorkspaceCount(%ld)\n", count));
}
//---------------------------------------------------------------------------
int32 RootLayer::WorkspaceCount() const
{
return fWSPtrList.CountItems();
}
//---------------------------------------------------------------------------
Workspace* RootLayer::WorkspaceAt(const int32 index) const
{
Workspace *ws = NULL;
@@ -599,7 +609,7 @@ Workspace* RootLayer::WorkspaceAt(const int32 index) const
return ws;
}
//---------------------------------------------------------------------------
void RootLayer::SetActiveWorkspaceByIndex(const int32 index)
{
Workspace *ws = NULL;
@@ -607,7 +617,7 @@ void RootLayer::SetActiveWorkspaceByIndex(const int32 index)
if (ws)
SetActiveWorkspace(ws);
}
//---------------------------------------------------------------------------
void RootLayer::SetActiveWorkspace(Workspace *ws)
{
if (fActiveWorkspace == ws || !ws)
@@ -618,19 +628,19 @@ void RootLayer::SetActiveWorkspace(Workspace *ws)
// RebuildRegions(Frame());
// Invalidate(Frame());
}
//---------------------------------------------------------------------------
int32 RootLayer::ActiveWorkspaceIndex() const{
if (fActiveWorkspace)
return fActiveWorkspace->ID();
else
return -1;
}
//---------------------------------------------------------------------------
Workspace* RootLayer::ActiveWorkspace() const
{
return fActiveWorkspace;
}
//---------------------------------------------------------------------------
void RootLayer::SetBGColor(const RGBColor &col)
{
ActiveWorkspace()->SetBGColor(col);
@@ -639,21 +649,21 @@ void RootLayer::SetBGColor(const RGBColor &col)
// Invalidate(Frame());
}
//---------------------------------------------------------------------------
RGBColor RootLayer::BGColor(void) const
{
return _layerdata->viewcolor;
}
//---------------------------------------------------------------------------
void RootLayer::RemoveAppWindow(WinBorder *wb)
{
wb->Window()->App()->fAppFMWList.RemoveItem(wb);
int32 count = WorkspaceCount();
int32 count = WorkspaceCount();
for(int32 i=0; i < count; i++)
WorkspaceAt(i+1)->RemoveLayerPtr(wb);
}
//---------------------------------------------------------------------------
void RootLayer::PrintToStream()
{
printf("\nRootLayer '%s' internals:\n", GetName());
@@ -671,5 +681,4 @@ void RootLayer::PrintToStream()
printf("~~~~~~~~\n");
}
printf("Active Workspace: %ld\n", fActiveWorkspace? fActiveWorkspace->ID(): -1);
}
+46 -45
View File
@@ -52,63 +52,64 @@ class DisplayDriver;
class RootLayer : public Layer
{
public:
RootLayer(const char *name,
int32 workspaceCount, Desktop *desktop, DisplayDriver *driver);
virtual ~RootLayer();
RootLayer(const char *name, int32 workspaceCount, Desktop *desktop,
DisplayDriver *driver);
virtual ~RootLayer(void);
virtual void Draw(const BRect &r);
virtual void MoveBy(float x, float y);
virtual void ResizeBy(float x, float y);
virtual void Draw(const BRect &r);
virtual void MoveBy(float x, float y);
virtual void ResizeBy(float x, float y);
virtual Layer* VirtualTopChild() const; //
virtual Layer* VirtualLowerSibling() const; // ... for the active workspace
virtual Layer* VirtualUpperSibling() const; //
virtual Layer* VirtualBottomChild() const; //
// For the active workspaces
virtual Layer *VirtualTopChild(void) const;
virtual Layer *VirtualLowerSibling(void) const;
virtual Layer *VirtualUpperSibling(void) const;
virtual Layer *VirtualBottomChild(void) const;
void AddWinBorder(WinBorder* winBorder);
void RemoveWinBorder(WinBorder* winBorder);
void ChangeWorkspacesFor(WinBorder* winBorder, uint32 newWorkspaces);
bool SetFrontWinBorder(WinBorder* winBorder);
void AddWinBorder(WinBorder *winBorder);
void RemoveWinBorder(WinBorder *winBorder);
void ChangeWorkspacesFor(WinBorder *winBorder, uint32 newWorkspaces);
bool SetFrontWinBorder(WinBorder *winBorder);
void SetScreens(Screen *screen[], int32 rows, int32 columns);
Screen** Screens();
bool SetScreenResolution(int32 width, int32 height, uint32 colorspace);
int32 ScreenRows() const { return fRows; }
int32 ScreenColumns() const { return fColumns; }
void SetScreens(Screen *screen[], int32 rows, int32 columns);
Screen **Screens(void);
bool SetScreenResolution(int32 width, int32 height, uint32 colorspace);
int32 ScreenRows(void) const { return fRows; }
int32 ScreenColumns(void) const { return fColumns; }
void SetWorkspaceCount(const int32 count);
int32 WorkspaceCount(void) const;
Workspace* WorkspaceAt(const int32 index) const;
void SetActiveWorkspaceByIndex(const int32 index);
void SetActiveWorkspace(Workspace *ws);
int32 ActiveWorkspaceIndex(void) const;
Workspace* ActiveWorkspace(void) const;
void SetWorkspaceCount(const int32 count);
int32 WorkspaceCount(void) const;
Workspace *WorkspaceAt(const int32 index) const;
void SetActiveWorkspaceByIndex(const int32 index);
void SetActiveWorkspace(Workspace *ws);
int32 ActiveWorkspaceIndex(void) const;
Workspace *ActiveWorkspace(void) const;
void SetBGColor(const RGBColor &col);
RGBColor BGColor(void) const;
void SetBGColor(const RGBColor &col);
RGBColor BGColor(void) const;
void AddWinBorderToWorkspaces(WinBorder* winBorder,
uint32 wks);
void AddWinBorderToWorkspaces(WinBorder *winBorder, uint32 wks);
// ------- debugging methods -------
void PrintToStream();
// "Private" to app_server :-) - they should not be used
void RemoveAppWindow(WinBorder *wb);
void PrintToStream(void);
// "Private" to app_server :-) - they should not be used
void RemoveAppWindow(WinBorder *wb);
FMWList fMainFMWList;
BLocker fMainLock;
FMWList fMainFMWList;
BLocker fMainLock;
private:
Desktop *fDesktop;
Desktop *fDesktop;
BList fScreenPtrList;
int32 fRows;
int32 fColumns;
int32 fScreenXResolution;
int32 fScreenYResolution;
uint32 fColorSpace;
BList fScreenPtrList;
int32 fRows;
int32 fColumns;
int32 fScreenXResolution;
int32 fScreenYResolution;
uint32 fColorSpace;
BList fWSPtrList;
Workspace *fActiveWorkspace;
BList fWSPtrList;
Workspace *fActiveWorkspace;
};
#endif
File diff suppressed because it is too large Load Diff
+81 -101
View File
@@ -65,127 +65,107 @@ class Layer;
class ServerWindow
{
public:
ServerWindow( BRect rect,
const char *string,
uint32 wlook,
uint32 wfeel,
uint32 wflags,
ServerApp *winapp,
port_id winport,
port_id looperPort,
port_id replyport,
uint32 index,
int32 handlerID);
virtual ~ServerWindow(void);
ServerWindow(BRect rect, const char *string, uint32 wlook, uint32 wfeel, uint32 wflags,
ServerApp *winapp, port_id winport, port_id looperPort, port_id replyport,
uint32 index,int32 handlerID);
virtual ~ServerWindow(void);
void Init();
void Init();
void ReplaceDecorator(void);
void Quit(void);
void Show(void);
void Hide(void);
bool IsHidden(void);
void Minimize(bool status);
void Zoom(void);
void SetFocus(bool value);
bool HasFocus(void);
void RequestDraw(BRect rect);
void RequestDraw(void);
void ReplaceDecorator(void);
void Quit(void);
void Show(void);
void Hide(void);
bool IsHidden(void);
void Minimize(bool status);
void Zoom(void);
void SetFocus(bool value);
bool HasFocus(void);
void RequestDraw(BRect rect);
void RequestDraw(void);
void WorkspaceActivated(int32 workspace, bool active);
void WorkspacesChanged(int32 oldone,int32 newone);
void WindowActivated(bool active);
void ScreenModeChanged(const BRect frame, const color_space cspace);
void WorkspaceActivated(int32 workspace, bool active);
void WorkspacesChanged(int32 oldone,int32 newone);
void WindowActivated(bool active);
void ScreenModeChanged(const BRect frame, const color_space cspace);
void SetFrame(const BRect &rect);
BRect Frame(void);
void SetFrame(const BRect &rect);
BRect Frame(void);
status_t Lock(void);
void Unlock(void);
bool IsLocked(void);
thread_id ThreadID(void) const
{ return fMonitorThreadID;}
status_t Lock(void);
void Unlock(void);
bool IsLocked(void);
thread_id ThreadID(void) const { return fMonitorThreadID;}
void DispatchMessage(int32 code);
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
static int32 MonitorWin(void *data);
static void HandleMouseEvent(PortMessage *msg);
static void HandleKeyEvent(int32 code, int8 *buffer);
void PostMessage(int32 code, size_t size=0, int8 *buffer=NULL);
void DispatchMessage(int32 code);
void DispatchGraphicsMessage(int32 msgsize, int8 *msgbuffer);
static int32 MonitorWin(void *data);
void PostMessage(int32 code, size_t size=0, int8 *buffer=NULL);
//! Returns the index of the workspaces to which it belongs
int32 GetWorkspaceIndex(void)
{ return fWorkspaces; }
Workspace* GetWorkspace(void);
void SetWorkspace(Workspace *wkspc);
//! Returns the index of the workspaces to which it belongs
int32 GetWorkspaceIndex(void) { return fWorkspaces; }
Workspace *GetWorkspace(void);
void SetWorkspace(Workspace *wkspc);
//! Returns the window's title
const char* Title(void)
{ return fTitle.String(); }
//! Returns the window's title
const char *Title(void) { return fTitle.String(); }
Layer* CreateLayerTree(Layer *localRoot);
void SetLayerState(Layer *layer);
void SetLayerFontState(Layer *layer);
Layer *CreateLayerTree(Layer *localRoot);
void SetLayerState(Layer *layer);
void SetLayerFontState(Layer *layer);
Layer* FindLayer(const Layer* start, int32 token) const;
void SendMessageToClient( const BMessage* msg ) const;
Layer *FindLayer(const Layer *start, int32 token) const;
void SendMessageToClient( const BMessage *msg ) const;
int32 Look(void) const
{ return fLook; }
int32 Feel(void) const
{ return fFeel; }
uint32 Flags(void) const
{ return fFlags; }
team_id ClientTeamID(void) const
{ return fClientTeamID; }
ServerApp* App(void) const
{ return fServerApp; }
uint32 Workspaces(void) const
{ return fWorkspaces; }
WinBorder* GetWinBorder(void) const
{ return fWinBorder; }
int32 Look(void) const { return fLook; }
int32 Feel(void) const { return fFeel; }
uint32 Flags(void) const { return fFlags; }
team_id ClientTeamID(void) const { return fClientTeamID; }
ServerApp *App(void) const { return fServerApp; }
uint32 Workspaces(void) const { return fWorkspaces; }
WinBorder *GetWinBorder(void) const { return fWinBorder; }
// server "private" - try not to use
void QuietlySetWorkspaces(uint32 wks)
{ fWorkspaces = wks; }
void QuietlySetFeel(int32 feel)
{ fFeel = feel; }
int32 ClientToken(void) const
{ return fHandlerToken; }
// server "private" - try not to use
void QuietlySetWorkspaces(uint32 wks) { fWorkspaces = wks; }
void QuietlySetFeel(int32 feel) { fFeel = feel; }
int32 ClientToken(void) const { return fHandlerToken; }
FMWList fWinFMWList;
FMWList fWinFMWList;
protected:
friend class ServerApp;
friend class WinBorder;
friend class Screen;
friend class Layer;
friend class ServerApp;
friend class WinBorder;
friend class Screen;
friend class Layer;
BString fTitle;
int32 fLook,
fFeel,
fFlags;
uint32 fWorkspaces;
Workspace* fWorkspace;
bool fIsActive;
BString fTitle;
int32 fLook;
int32 fFeel;
int32 fFlags;
uint32 fWorkspaces;
Workspace *fWorkspace;
bool fIsActive;
ServerApp* fServerApp;
WinBorder* fWinBorder;
ServerApp *fServerApp;
WinBorder *fWinBorder;
team_id fClientTeamID;
thread_id fMonitorThreadID;
team_id fClientTeamID;
thread_id fMonitorThreadID;
port_id fMessagePort;
port_id fClientWinPort;
port_id fClientLooperPort;
port_id fMessagePort;
port_id fClientWinPort;
port_id fClientLooperPort;
BLocker fLocker;
BRect fFrame;
uint32 fToken;
int32 fHandlerToken;
BLocker fLocker;
BRect fFrame;
uint32 fToken;
int32 fHandlerToken;
BSession* fSession;
Layer* fTopLayer;
Layer* cl; // short for currentLayer. We'll use it a lot, that's why it's short :-)
BSession *fSession;
Layer *fTopLayer;
// cl is short for currentLayer. We'll use it a lot, that's why it's short :-)
Layer *cl;
};
#endif