LayerData::prevState is now called fPreviousState and is now private. Added new method

PopState() to make this possible.
When a new layer is created, the font state of the desktop will now be set: this fixes
a bug I introduced when separating the font manager's default font and the desktop's
default font.
The scaling stuff looks pretty broken to me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14675 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-04 09:52:56 +00:00
parent 7490bd32f1
commit 5abd5613d6
4 changed files with 82 additions and 79 deletions
+17 -30
View File
@@ -1,34 +1,16 @@
//------------------------------------------------------------------------------
// Copyright (c) 2001-2005, Haiku, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: LayerData.h
// Author: DarkWyrm <[email protected]>
// Adi Oanca <[email protected]>
// Stephan Aßmus <[email protected]>
// Description: Data classes for working with BView states and draw parameters
//
//------------------------------------------------------------------------------
/*
* Copyright 2001-2005, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm <[email protected]>
* Adi Oanca <[email protected]>
* Stephan Aßmus <[email protected]>
*/
#ifndef LAYER_DATA_H_
#define LAYER_DATA_H_
#include <GraphicsDefs.h>
#include <InterfaceDefs.h>
#include <Point.h>
@@ -40,11 +22,13 @@
#include "PatternHandler.h"
class BRegion;
namespace BPrivate {
class LinkReceiver;
class LinkSender;
};
class DrawData {
public:
DrawData();
@@ -199,9 +183,12 @@ class LayerData : public DrawData {
void ReadFromLink(BPrivate::LinkReceiver& link);
void WriteToLink(BPrivate::LinkSender& link) const;
public:
LayerData* PreviousState() const { return fPreviousState; }
LayerData* PopState();
private:
// used for the state stack
LayerData* prevState;
LayerData* fPreviousState;
};
// inline implementations