Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: ui/views/controls/image_view.h

Issue 11068012: Add new views::LabelButton and LabelButtonBorder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove stray semicolon. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/label_button_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/image_view.h
diff --git a/ui/views/controls/image_view.h b/ui/views/controls/image_view.h
index c00d536e93d339373e57a9fe513583f129fd5321..18c4ba13241ac01afe2d2604b3e361350dd32de5 100644
--- a/ui/views/controls/image_view.h
+++ b/ui/views/controls/image_view.h
@@ -73,12 +73,15 @@ class VIEWS_EXPORT ImageView : public View {
void SetTooltipText(const string16& tooltip);
string16 GetTooltipText() const;
- // Overriden from View
+ void set_interactive(bool interactive) { interactive_ = interactive; }
+
+ // Overriden from View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
virtual bool GetTooltipText(const gfx::Point& p,
string16* tooltip) const OVERRIDE;
+ virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
private:
// Compute the image origin given the desired size and the receiver alignment
@@ -103,6 +106,9 @@ class VIEWS_EXPORT ImageView : public View {
// The current tooltip text.
string16 tooltip_text_;
+ // A flag controlling hit test handling for interactivity.
+ bool interactive_;
+
DISALLOW_COPY_AND_ASSIGN(ImageView);
};
« no previous file with comments | « ui/views/controls/button/label_button_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698