Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class date_picker

boost::ui::date_picker — Date picker widget.

Synopsis

// In header: <boost/ui/datetime.hpp>


class date_picker : public boost::ui::widget {
public:
  // construct/copy/destruct
  explicit date_picker(widget &);
  date_picker();

  // public member functions
  std::time_t get_time_t() const;
  date_picker & set_time_t(std::time_t);
  std::tm get_tm() const;
  date_picker & set_tm(const std::tm &);
  boost::gregorian::date gregorian_date() const;
  date_picker & gregorian_date(const boost::gregorian::date &);
  std::chrono::system_clock::time_point system_clock_time_point() const;
  date_picker & 
  system_clock_time_point(const std::chrono::system_clock::time_point &);
  boost::chrono::system_clock::time_point 
  boost_system_clock_time_point() const;
  date_picker & 
  system_clock_time_point(const boost::chrono::system_clock::time_point &);
  template<typename F, class ... Args> 
    date_picker & on_change(F &&, Args &&...);
};

Description

See Also:

Calendar date (Wikipedia)

date_picker public construct/copy/destruct

  1. explicit date_picker(widget & parent);
    Creates widget.
  2. date_picker();

date_picker public member functions

  1. std::time_t get_time_t() const;
    Returns date in std::time_t format.

    Throws:

    std::out_of_range If selected date is not compatible with std::time_t format
  2. date_picker & set_time_t(std::time_t t);
    Sets date in std::time_t format.

    Throws:

    std::out_of_range If requested date is invalid
  3. std::tm get_tm() const;
    Returns local date in std::tm format.

    Throws:

    std::out_of_range If selected date is not compatible with std::tm format
  4. date_picker & set_tm(const std::tm & t);
    Sets local date in std::tm format.

    Throws:

    std::out_of_range If requested date is invalid
  5. boost::gregorian::date gregorian_date() const;
    Returns boost::gregorian::date.

    See Also:

    BOOST_UI_USE_DATE_TIME

    Throws:

    std::out_of_range If date is out of range
  6. date_picker & gregorian_date(const boost::gregorian::date & d);
    Sets boost::gregorian::date.

    See Also:

    BOOST_UI_USE_DATE_TIME

    Throws:

    std::out_of_range If requested date is invalid
  7. std::chrono::system_clock::time_point system_clock_time_point() const;
    Returns std::chrono::system_clock::time_point.

    Throws:

    std::out_of_range If date is out of range
  8. date_picker & 
    system_clock_time_point(const std::chrono::system_clock::time_point & d);
    Sets std::chrono::system_clock::time_point.

    Throws:

    std::out_of_range If requested date is invalid
  9. boost::chrono::system_clock::time_point boost_system_clock_time_point() const;
    Returns boost::chrono::system_clock::time_point.

    See Also:

    BOOST_UI_USE_CHRONO

    Throws:

    std::out_of_range If date is out of range
  10. date_picker & 
    system_clock_time_point(const boost::chrono::system_clock::time_point & d);
    Sets boost::chrono::system_clock::time_point.

    See Also:

    BOOST_UI_USE_CHRONO

    Throws:

    std::out_of_range If requested date is invalid
  11. template<typename F, class ... Args> 
      date_picker & on_change(F && f, Args &&... args);
    Connects data change handler.

PrevUpHomeNext