RenderFileUploadControl.h [plain text]
#ifndef RenderFileUploadControl_h
#define RenderFileUploadControl_h
#include "FileChooser.h"
#include "RenderBlock.h"
namespace WebCore {
class HTMLInputElement;
class RenderFileUploadControl : public RenderBlock, private FileChooserClient {
public:
RenderFileUploadControl(HTMLInputElement*);
~RenderFileUploadControl();
virtual const char* renderName() const { return "RenderFileUploadControl"; }
virtual void updateFromElement();
virtual void calcPrefWidths();
virtual void paintObject(PaintInfo&, int tx, int ty);
void click();
void valueChanged();
void receiveDroppedFiles(const Vector<String>&);
String buttonValue();
String fileTextValue();
bool allowsMultipleFiles();
protected:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
private:
int maxFilenameWidth() const;
PassRefPtr<RenderStyle> createButtonStyle(const RenderStyle* parentStyle) const;
RefPtr<HTMLInputElement> m_button;
RefPtr<FileChooser> m_fileChooser;
};
}
#endif // RenderFileUploadControl_h