DatePickerClient.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser 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. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef DatePickerClient_h
  19. #define DatePickerClient_h
  20. #include "PagePopupClient.h"
  21. #include <BlackBerryPlatformInputEvents.h>
  22. #include <unicode/udat.h>
  23. namespace WebCore {
  24. class HTMLInputElement;
  25. }
  26. namespace BlackBerry {
  27. namespace Platform {
  28. class String;
  29. }
  30. namespace WebKit {
  31. class WebPagePrivate;
  32. class DatePickerClient : public PagePopupClient {
  33. public:
  34. DatePickerClient(BlackBerry::Platform::BlackBerryInputType, const BlackBerry::Platform::String& value, const BlackBerry::Platform::String& min, const BlackBerry::Platform::String& max, double step, WebPagePrivate*, WebCore::HTMLInputElement*);
  35. ~DatePickerClient();
  36. void setValueAndClosePopup(const String&);
  37. void didClosePopup();
  38. private:
  39. void generateHTML(BlackBerry::Platform::BlackBerryInputType, const BlackBerry::Platform::String& value, const BlackBerry::Platform::String& min, const BlackBerry::Platform::String& max, double step);
  40. static const String generateDateLabels(UDateFormatSymbolType);
  41. BlackBerry::Platform::BlackBerryInputType m_type;
  42. RefPtr<WebCore::HTMLInputElement> m_element;
  43. };
  44. }
  45. }
  46. #endif