aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/views
diff options
context:
space:
mode:
authorGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-16 17:30:07 +0000
committerGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-16 17:30:07 +0000
commit3fe16908349ba6b8240a3ba0febf1088f476df73 (patch)
tree20ec030492237944b60dbb37d984972c17474b1b /include/views
parenta3970ff4be91283742bc009985eebd655a6be165 (diff)
Delete three class declarations that we don't provide implementations anymore.
This can be removed now that https://codereview.appspot.com/6650055/ was landed in r5942. R=epoger@google.com,reed@google.com Review URL: https://codereview.appspot.com/6677044 git-svn-id: http://skia.googlecode.com/svn/trunk@5967 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/views')
-rw-r--r--include/views/SkWidget.h123
1 files changed, 33 insertions, 90 deletions
diff --git a/include/views/SkWidget.h b/include/views/SkWidget.h
index c3b4530c45..3b68e7bc1c 100644
--- a/include/views/SkWidget.h
+++ b/include/views/SkWidget.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,18 +5,22 @@
* found in the LICENSE file.
*/
-
#ifndef SkWidget_DEFINED
#define SkWidget_DEFINED
-#include "SkView.h"
#include "SkBitmap.h"
#include "SkDOM.h"
#include "SkPaint.h"
#include "SkString.h"
#include "SkTDArray.h"
+#include "SkTextBox.h"
+#include "SkView.h"
+
+class SkEvent;
+class SkInterpolator;
+class SkShader;
-//////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
class SkWidget : public SkView {
public:
@@ -41,6 +44,8 @@ private:
typedef SkView INHERITED;
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkHasLabelWidget : public SkWidget {
public:
SkHasLabelWidget(uint32_t flags = 0) : SkWidget(flags) {}
@@ -63,6 +68,8 @@ private:
typedef SkWidget INHERITED;
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkButtonWidget : public SkHasLabelWidget {
public:
SkButtonWidget(uint32_t flags = 0) : SkHasLabelWidget(flags), fState(kOff_State) {}
@@ -87,6 +94,8 @@ private:
typedef SkHasLabelWidget INHERITED;
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkPushButtonWidget : public SkButtonWidget {
public:
SkPushButtonWidget(uint32_t flags = 0) : SkButtonWidget(flags) {}
@@ -101,6 +110,8 @@ private:
typedef SkButtonWidget INHERITED;
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkCheckBoxWidget : public SkButtonWidget {
public:
SkCheckBoxWidget(uint32_t flags = 0);
@@ -114,7 +125,7 @@ private:
typedef SkButtonWidget INHERITED;
};
-#include "SkTextBox.h"
+////////////////////////////////////////////////////////////////////////////////
class SkStaticTextView : public SkView {
public:
@@ -163,6 +174,8 @@ private:
typedef SkView INHERITED;
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkBitmapView : public SkView {
public:
SkBitmapView(uint32_t flags = 0);
@@ -181,41 +194,7 @@ private:
typedef SkView INHERITED;
};
-/////////////////////////////////////////////////////////////////////////////
-
-class SkShader;
-class SkInterpolator;
-
-class SkWidgetView : public SkView {
-public:
- SkWidgetView(uint32_t flags = 0);
- virtual ~SkWidgetView();
-
- static const char* GetEventType();
-};
-
-class SkSliderView : public SkWidgetView {
-public:
- SkSliderView(uint32_t flags = 0);
-
- uint16_t getValue() const { return fValue; }
- uint16_t getMax() const { return fMax; }
-
- void setMax(U16CPU max);
- void setValue(U16CPU value);
-
-protected:
- virtual void onDraw(SkCanvas*);
- virtual Click* onFindClickHandler(SkScalar x, SkScalar y);
- virtual bool onClick(Click*);
-
-private:
- uint16_t fValue, fMax;
-
- typedef SkWidgetView INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
class SkHasLabelView : public SkView {
public:
@@ -233,6 +212,8 @@ protected:
virtual void onInflate(const SkDOM& dom, const SkDOM::Node*);
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkPushButtonView : public SkHasLabelView {
public:
SkPushButtonView(uint32_t flags = 0);
@@ -242,6 +223,8 @@ protected:
virtual void onInflate(const SkDOM& dom, const SkDOM::Node*);
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkCheckBoxView : public SkHasLabelView {
public:
SkCheckBoxView(uint32_t flags = 0);
@@ -262,6 +245,8 @@ private:
State fState;
};
+////////////////////////////////////////////////////////////////////////////////
+
class SkProgressView : public SkView {
public:
SkProgressView(uint32_t flags = 0);
@@ -286,50 +271,7 @@ private:
typedef SkView INHERITED;
};
-class SkTextView : public SkView {
-public:
- SkTextView(uint32_t flags = 0);
- virtual ~SkTextView();
-
- enum AnimaDir {
- kNeutral_AnimDir,
- kForward_AnimDir,
- kBackward_AnimDir,
- kAnimDirCount
- };
-
- void getText(SkString*) const;
- void setText(const SkString&, AnimaDir dir = kNeutral_AnimDir);
- void setText(const char text[], AnimaDir dir = kNeutral_AnimDir);
- void setText(const char text[], size_t len, AnimaDir dir = kNeutral_AnimDir);
-
- void getMargin(SkPoint* margin) const;
- void setMargin(const SkPoint&);
-
- SkPaint& paint() { return fPaint; }
-
-protected:
- virtual void onDraw(SkCanvas*);
- virtual void onInflate(const SkDOM& dom, const SkDOM::Node* node);
-
-private:
- SkString fText;
- SkPaint fPaint;
- SkPoint fMargin;
-
- class Interp;
- Interp* fInterp;
- bool fDoInterp;
- // called by the other setText methods. This guy does not check for !=
- // before doing the assign, so the caller must check for us
- void privSetText(const SkString&, AnimaDir dir);
-
- typedef SkView INHERITED;
-};
-
-//////////////////////////////////////////////////////////
-
-class SkEvent;
+////////////////////////////////////////////////////////////////////////////////
class SkListSource : public SkEventSink {
public:
@@ -342,7 +284,9 @@ public:
static SkListSource* CreateFromDOM(const SkDOM& dom, const SkDOM::Node* node);
};
-class SkListView : public SkWidgetView {
+////////////////////////////////////////////////////////////////////////////////
+
+class SkListView : public SkView {
public:
SkListView(uint32_t flags = 0);
virtual ~SkListView();
@@ -409,12 +353,12 @@ private:
bool getRowRect(int index, SkRect*) const;
void ensureSelectionIsVisible();
- typedef SkWidgetView INHERITED;
+ typedef SkView INHERITED;
};
-//////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
-class SkGridView : public SkWidgetView {
+class SkGridView : public SkView {
public:
SkGridView(uint32_t flags = 0);
virtual ~SkGridView();
@@ -462,8 +406,7 @@ private:
bool getCellRect(int index, SkRect*) const;
void ensureSelectionIsVisible();
- typedef SkWidgetView INHERITED;
+ typedef SkView INHERITED;
};
#endif
-