#ifndef RenderMenuList_H
#define RenderMenuList_H
#include "RenderFlexibleBox.h"
namespace WebCore {
class HTMLSelectElement;
class RenderMenuList : public RenderFlexibleBox {
public:
RenderMenuList(HTMLSelectElement*);
~RenderMenuList();
virtual bool isMenuList() const { return true; }
virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0);
virtual void removeChild(RenderObject*);
virtual bool createsAnonymousWrapper() const { return true; }
virtual bool canHaveChildren() const { return false; }
virtual void setStyle(RenderStyle*);
virtual void updateFromElement();
virtual const char* renderName() const { return "RenderMenuList"; }
virtual void calcMinMaxWidth();
bool popupIsVisible() const { return m_popupIsVisible; }
void showPopup();
void hidePopup();
void setOptionsChanged(bool c) { m_optionsChanged = c; }
void valueChanged(unsigned listIndex, bool fireOnChange = true);
String text();
void setTextFromOption(int optionIndex);
bool multiple() const;
protected:
virtual bool hasLineIfEmpty() const { return true; }
private:
void createInnerBlock();
RenderStyle * createInnerStyle();
void setText(const String&);
RenderText* m_buttonText;
RenderBlock* m_innerBlock;
bool m_optionsChanged;
int m_optionsWidth;
bool m_popupIsVisible;
};
}
#endif