This file is indexed.

/usr/include/Wt/WBootstrapTheme is in libwt-dev 3.3.4+dfsg-6ubuntu1.

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
148
149
150
151
152
// 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 WT_WBOOTSTRAP_THEME_H
#define WT_WBOOTSTRAP_THEME_H

#include <Wt/WTheme>

#include <string>

namespace Wt {

/*! \class WBootstrapTheme Wt/WBootstrapTheme Wt/WBootstrapTheme
 *  \brief Theme based on the Twitter Bootstrap CSS framework.
 *
 * This theme implements support for building a %Wt web application
 * that uses Twitter Bootstrap as a theme for its (layout and)
 * styling. The theme comes with CSS from Bootstrap version 2.2.2 or
 * version 3.1. Only the CSS components of twitter bootstrap are used,
 * but not the JavaScript (i.e. the functional parts), since the
 * functionality is already built-in to the widgets from the library.
 *
 * Using this theme, various widgets provided by the library are
 * rendered using markup that is compatible with Twitter
 * Bootstrap. The bootstrap theme is also extended with a proper
 * (compatible) styling of widgets for which bootstrap does not
 * provide styling (table views, tree views, sliders, etc...).
 *
 * By default, the theme will use CSS resources that are shipped
 * together with the %Wt distribution, but since the Twitter Bootstrap
 * CSS API is a popular API for custom themes, you can easily replace the
 * CSS with custom-built CSS (by reimplementing styleSheets()).
 *
 * Although this theme facilitates the use of Twitter Bootstrap with
 * %Wt, it is still important to understand how Bootstrap expects
 * markup to be, especially related to layout using its grid system, for
 * which we refer to the official bootstrap documentation, see
 * http://getbootstrap.com
 *
 * \sa WApplication::setTheme()
 */
class WT_API WBootstrapTheme : public WTheme
{
public:
  /*!
   * \brief Enumeration to select a bootstrap version.
   *
   * \sa setVersion()
   */
  enum Version {
    Version2 = 2, //!< Bootstrap 2
    Version3 = 3  //!< Bootstrap 3
  };

  /*! \brief Constructor.
   */
  WBootstrapTheme(WObject *parent = 0);

  virtual ~WBootstrapTheme();

  /*! Enables responsive features.
   *
   * Responsive features can be enabled only at application
   * startup. For bootstrap 3, you need to use the progressive
   * bootstrap feature of %Wt (see see \ref config_general) as it
   * requires setting HTML meta flags.
   *
   * Responsive features are disabled by default.
   */
  void setResponsive(bool responsive);

  /*! \brief Returns whether responsive features are enabled.
   *
   * \sa setResponsive()
   */
  bool responsive() const { return responsive_; }

  /*! \brief Sets the bootstrap version.
   *
   * The default bootstrap version is 2 (but this may change in the
   * future and thus we recommend setting the version).
   *
   * Since Twitter Bootstrap breaks its API with a major version
   * change, the version has a big impact on how how the markup is
   * done for various widgets.
   *
   * Note that the two Bootstrap versions have a different license:
   * Apache 2.0 for Bootstrap version 2.2.2, and MIT for version
   * 3.1. See these licenses for details.
   */
  void setVersion(Version version);

  /*! \brief Returns the bootstrap version.
   *
   * \sa setVersion()
   */
  Version version() const { return version_; }

  /*! \brief Enables form-control on all applicable form widgets.
   *
   * This is relevant only for bootstrap 3.
   *
   * By applying "form-control" on form widgets, they will become
   * block level elements that take the size of the parent (which is
   * in bootstrap's philosphy a grid layout).
   *
   * The default value is \c true.
   */
  void setFormControlStyleEnabled(bool enabled);

  virtual std::string name() const;
  virtual std::vector<WCssStyleSheet> styleSheets() const;
  virtual void apply(WWidget *widget, WWidget *child, int widgetRole)
    const;
  virtual void apply(WWidget *widget, DomElement& element, int elementRole)
    const;
  virtual std::string disabledClass() const;
  virtual std::string activeClass() const;
  virtual std::string utilityCssClass(int utilityCssClassRole) const;
  virtual bool canStyleAnchorAsButton() const;
  virtual void applyValidationStyle(WWidget *widget,
				    const Wt::WValidator::Result& validation,
				    WFlags<ValidationStyleFlag> styles) const;
  virtual bool canBorderBoxElement(const DomElement& element) const;

private:
  Version version_;
  bool responsive_, formControlStyle_;

  std::string classBtn() const;
  std::string classBar() const;
  std::string classAccordion() const;
  std::string classAccordionGroup() const;
  std::string classAccordionHeading() const;
  std::string classAccordionBody() const;
  std::string classAccordionInner() const;
  std::string classNavCollapse() const;
  std::string classNavbar() const;
  std::string classBrand() const;
  std::string classNavbarSearch() const;
  std::string classNavbarLeft() const;
  std::string classNavbarRight() const;
  std::string classNavbarMenu() const;
  std::string classNavbarBtn() const;
};

}

#endif // WT_WBOOTSTRAP_THEME_H