OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 #include "core/CoreExport.h" | 25 #include "core/CoreExport.h" |
26 #include "platform/LayoutUnit.h" | 26 #include "platform/LayoutUnit.h" |
27 #include "platform/PlatformExport.h" | 27 #include "platform/PlatformExport.h" |
28 #include "platform/PopupMenuStyle.h" | 28 #include "platform/PopupMenuStyle.h" |
29 #include "wtf/Forward.h" | 29 #include "wtf/Forward.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 class Element; | 33 class Element; |
34 class LayoutStyle; | 34 class ComputedStyle; |
35 | 35 |
36 class CORE_EXPORT PopupMenuClient { | 36 class CORE_EXPORT PopupMenuClient { |
37 public: | 37 public: |
38 virtual ~PopupMenuClient() { } | 38 virtual ~PopupMenuClient() { } |
39 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) = 0; | 39 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) = 0; |
40 virtual void selectionChanged(unsigned listIndex, bool fireEvents = true) =
0; | 40 virtual void selectionChanged(unsigned listIndex, bool fireEvents = true) =
0; |
41 virtual void selectionCleared() = 0; | 41 virtual void selectionCleared() = 0; |
42 | 42 |
43 virtual String itemText(unsigned listIndex) const = 0; | 43 virtual String itemText(unsigned listIndex) const = 0; |
44 virtual String itemToolTip(unsigned listIndex) const = 0; | 44 virtual String itemToolTip(unsigned listIndex) const = 0; |
45 virtual String itemAccessibilityText(unsigned listIndex) const = 0; | 45 virtual String itemAccessibilityText(unsigned listIndex) const = 0; |
46 virtual bool itemIsEnabled(unsigned listIndex) const = 0; | 46 virtual bool itemIsEnabled(unsigned listIndex) const = 0; |
47 virtual PopupMenuStyle itemStyle(unsigned listIndex) const = 0; | 47 virtual PopupMenuStyle itemStyle(unsigned listIndex) const = 0; |
48 virtual PopupMenuStyle menuStyle() const = 0; | 48 virtual PopupMenuStyle menuStyle() const = 0; |
49 virtual LayoutUnit clientPaddingLeft() const = 0; | 49 virtual LayoutUnit clientPaddingLeft() const = 0; |
50 virtual LayoutUnit clientPaddingRight() const = 0; | 50 virtual LayoutUnit clientPaddingRight() const = 0; |
51 virtual int listSize() const = 0; | 51 virtual int listSize() const = 0; |
52 virtual int selectedIndex() const = 0; | 52 virtual int selectedIndex() const = 0; |
53 virtual void popupDidHide() = 0; | 53 virtual void popupDidHide() = 0; |
54 virtual bool itemIsSeparator(unsigned listIndex) const = 0; | 54 virtual bool itemIsSeparator(unsigned listIndex) const = 0; |
55 virtual bool itemIsLabel(unsigned listIndex) const = 0; | 55 virtual bool itemIsLabel(unsigned listIndex) const = 0; |
56 virtual bool itemIsSelected(unsigned listIndex) const = 0; | 56 virtual bool itemIsSelected(unsigned listIndex) const = 0; |
57 virtual void setTextFromItem(unsigned listIndex) = 0; | 57 virtual void setTextFromItem(unsigned listIndex) = 0; |
58 virtual IntRect elementRectRelativeToViewport() const = 0; | 58 virtual IntRect elementRectRelativeToViewport() const = 0; |
59 virtual Element& ownerElement() const = 0; | 59 virtual Element& ownerElement() const = 0; |
60 virtual const LayoutStyle* layoutStyleForItem(Element&) const = 0; | 60 virtual const ComputedStyle* computedStyleForItem(Element&) const = 0; |
61 | 61 |
62 virtual void listBoxSelectItem(int /*listIndex*/, bool /*allowMultiplySelect
ions*/, bool /*shift*/, bool /*fireOnChangeNow*/ = true) { ASSERT_NOT_REACHED();
} | 62 virtual void listBoxSelectItem(int /*listIndex*/, bool /*allowMultiplySelect
ions*/, bool /*shift*/, bool /*fireOnChangeNow*/ = true) { ASSERT_NOT_REACHED();
} |
63 virtual bool multiple() const | 63 virtual bool multiple() const |
64 { | 64 { |
65 ASSERT_NOT_REACHED(); | 65 ASSERT_NOT_REACHED(); |
66 return false; | 66 return false; |
67 } | 67 } |
68 }; | 68 }; |
69 | 69 |
70 } | 70 } |
71 | 71 |
72 #endif | 72 #endif |
OLD | NEW |