This file is indexed.

/usr/include/Wt/WDateEdit is in libwt-dev 3.3.3+dfsg-4.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
// This may look like C code, but it's really -*- C++ -*-
/*
 * Copyright (C) 2012 Emweb bvba, Kessel-Lo, Belgium.
 *
 * See the LICENSE file for terms of use.
 */
#ifndef WDATE_EDIT_H_
#define WDATE_EDIT_H_

#include <Wt/WDateValidator>
#include <Wt/WLineEdit>

namespace Wt {

/*! \class WDateEdit Wt/WDateEdit Wt/WDateEdit
 *  \brief A date edit.
 *
 * A date picker is a line edit with support for date entry (using an
 * icon and a calendar).
 *
 * A WDateValidator is used to validate date entry.
 *
 * In many cases, it provides a more convenient implementation of a
 * date picker compared to WDatePicker since it is implemented as a
 * line edit. This also makes the implementation ready for a native
 * HTML5 control.
 */
class WT_API WDateEdit : public WLineEdit
{
public:
  /*! \brief Creates a new date edit.
   */
  WDateEdit(WContainerWidget *parent = 0);

  /*! \brief Sets the date.
   *
   * Does nothing if the current date is \p Null.
   *
   * \sa date()
   */
  void setDate(const WDate& date);

  /*! \brief Returns the date.
   *
   * Reads the current date.
   *
   * \if cpp
   * Returns an invalid date (for which WDate::isValid() returns
   * \c false) if the date could not be parsed using the current
   * format(). <br>
   * \elseif java
   * Returns \c null if the date could not be parsed using the current
   * format(). <br>
   * \endif
   *
   * \sa setDate(), WDate::fromString(), WLineEdit::text()
   */
  WDate date() const;

  /*! \brief Returns the validator.
   *
   * Most of the configuration of the date edit is stored in the
   * validator.
   */
  virtual WDateValidator *validator() const;

  /*! \brief Sets the format used for representing the date.
   *
   * This sets the format in the validator.
   *
   * The default format is <tt>'dd/MM/yyyy'</tt>.
   *
   * \sa WDateValidator::setFormat()
   */
  void setFormat(const WT_USTRING& format);

  /*! \brief Returns the format.
   *
   * \sa setFormat()
   */
  WT_USTRING format() const;

  /*! \brief Sets the lower limit of the valid date range.
   *
   * This sets the lower limit of the valid date range in the
   * validator.
   *
   * \sa WDateValidator::setBottom()
   */
  void setBottom(const WDate& bottom);

  /*! \brief Returns the lower limit of the valid date range.
   *
   * \sa setBottom()
   */
  WDate bottom() const;
  
  /*! \brief Sets the upper limit of the valid date range.
   *
   * This sets the upper limit of the valid date range in the
   * validator.
   *
   * \sa WDateValidator::setTop()
   */
  void setTop(const WDate& top);

  /*! \brief Returns the upper limit of the valid range.
   *
   * \sa setTop()
   */
  WDate top() const;

  /*! \brief Returns the calendar widget.
   *
   * The calendar may be 0 (e.g. when using a native date entry
   * widget).
   */
  WCalendar *calendar() const { return calendar_; }

  /*! \brief Hide/unhide the widget.
   */
  virtual void setHidden(bool hidden,
			 const WAnimation& animation = WAnimation());

protected:
  virtual void render(WFlags<RenderFlag> flags);
  virtual void propagateSetEnabled(bool enabled);

  /*! \brief Sets the value from the calendar to the line edit.
   */
  virtual void setFromCalendar();

  /*! \brief Sets the value from the line edit to the calendar.
   */
  virtual void setFromLineEdit();

private:
  WPopupWidget *popup_;
  WCalendar *calendar_;

  void defineJavaScript();
  void connectJavaScript(Wt::EventSignalBase& s, const std::string& methodName);
};

}

#endif // WDATE_EDIT_H_