michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #ifndef SkBorderView_DEFINED michael@0: #define SkBorderView_DEFINED michael@0: michael@0: #include "SkView.h" michael@0: #include "SkWidgetViews.h" michael@0: #include "SkAnimator.h" michael@0: michael@0: class SkBorderView : public SkWidgetView { michael@0: public: michael@0: SkBorderView(); michael@0: ~SkBorderView(); michael@0: void setSkin(const char skin[]); michael@0: SkScalar getLeft() const { return fLeft; } michael@0: SkScalar getRight() const { return fRight; } michael@0: SkScalar getTop() const { return fTop; } michael@0: SkScalar getBottom() const { return fBottom; } michael@0: protected: michael@0: //overrides michael@0: virtual void onInflate(const SkDOM& dom, const SkDOM::Node* node); michael@0: virtual void onSizeChange(); michael@0: virtual void onDraw(SkCanvas* canvas); michael@0: virtual bool onEvent(const SkEvent& evt); michael@0: private: michael@0: SkAnimator fAnim; michael@0: SkScalar fLeft, fRight, fTop, fBottom; //margin on each side michael@0: SkRect fMargin; michael@0: michael@0: typedef SkWidgetView INHERITED; michael@0: }; michael@0: michael@0: #endif