]> git.saurik.com Git - iphone-api.git/blob - WebCore/PopupMenuClient.h
Add support for new WinterBoard Settings features.
[iphone-api.git] / WebCore / PopupMenuClient.h
1 /*
2 * Copyright (C) 2006 Apple Computer, Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 *
19 */
20
21 #ifndef PopupMenuClient_h
22 #define PopupMenuClient_h
23
24 #include "PopupMenuStyle.h"
25 #include "ScrollTypes.h"
26
27 namespace WebCore {
28
29 class Color;
30 class FontSelector;
31 class HostWindow;
32 class Scrollbar;
33 class ScrollbarClient;
34 class String;
35
36 class PopupMenuClient {
37 public:
38 virtual ~PopupMenuClient() {}
39 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) = 0;
40
41 virtual String itemText(unsigned listIndex) const = 0;
42 virtual bool itemIsEnabled(unsigned listIndex) const = 0;
43 virtual PopupMenuStyle itemStyle(unsigned listIndex) const = 0;
44 virtual PopupMenuStyle menuStyle() const = 0;
45 virtual int clientInsetLeft() const = 0;
46 virtual int clientInsetRight() const = 0;
47 virtual int clientPaddingLeft() const = 0;
48 virtual int clientPaddingRight() const = 0;
49 virtual int listSize() const = 0;
50 virtual int selectedIndex() const = 0;
51 virtual void hidePopup() = 0;
52 virtual bool itemIsSeparator(unsigned listIndex) const = 0;
53 virtual bool itemIsLabel(unsigned listIndex) const = 0;
54 virtual bool itemIsSelected(unsigned listIndex) const = 0;
55 virtual bool shouldPopOver() const = 0;
56 virtual bool valueShouldChangeOnHotTrack() const = 0;
57 virtual void setTextFromItem(unsigned listIndex) = 0;
58
59 virtual FontSelector* fontSelector() const = 0;
60 virtual HostWindow* hostWindow() const = 0;
61
62 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize) = 0;
63 };
64
65 }
66
67 #endif