This file is indexed.

/usr/include/ipestyle.h is in libipe-dev 7.1.4-2.

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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
// -*- C++ -*-
// --------------------------------------------------------------------
// Ipe style sheet
// --------------------------------------------------------------------
/*

    This file is part of the extensible drawing editor Ipe.
    Copyright (C) 1993-2013  Otfried Cheong

    Ipe is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    As a special exception, you have permission to link Ipe with the
    CGAL library and distribute executables, as long as you follow the
    requirements of the Gnu General Public License in regard to all of
    the software in the executable aside from CGAL.

    Ipe is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
    License for more details.

    You should have received a copy of the GNU General Public License
    along with Ipe; if not, you can find it at
    "http://www.gnu.org/copyleft/gpl.html", or write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/

#ifndef IPESTYLE_H
#define IPESTYLE_H

#include "ipeattributes.h"
#include "ipetext.h"

// --------------------------------------------------------------------

namespace ipe {

  struct Symbol {
    Symbol();
    Symbol(Object *object);
    Symbol(const Symbol &rhs);
    Symbol &operator=(const Symbol &rhs);
    ~Symbol();

    bool iXForm;
    TTransformations iTransformations;
    Object *iObject;
  };

  class StyleSheet {
  public:

    //! Style of the title on a page.
    struct TitleStyle {
      //! Has a TitleStyle been defined in the style sheet?
      bool iDefined;
      //! Position on the page (in Ipe coordinate system)
      Vector iPos;
      //! Text size.
      Attribute iSize;
      //! Text color.
      Attribute iColor;
      //! Horizontal alignment.
      THorizontalAlignment iHorizontalAlignment;
      //! Vertical alignment.
      TVerticalAlignment iVerticalAlignment;
    };

    //! How to show page numbers on the paper.
    struct PageNumberStyle {
      //! Has a PageNumberStyle been defined in the style sheet?
      bool iDefined;
      //! Position on the page
      Vector iPos;
      //! Font size.
      double iFontSize;
      //! Text color.
      Color iColor;
    };

    StyleSheet();

    static StyleSheet *standard();

    void addSymbol(Attribute name, const Symbol &symbol);
    const Symbol *findSymbol(Attribute sym) const;

    void addGradient(Attribute name, const Gradient &s);
    const Gradient *findGradient(Attribute sym) const;

    void addTiling(Attribute name, const Tiling &s);
    const Tiling *findTiling(Attribute sym) const;

    void addEffect(Attribute name, const Effect &e);
    const Effect *findEffect(Attribute sym) const;

    void add(Kind kind, Attribute name, Attribute value);
    bool has(Kind kind, Attribute sym) const;
    Attribute find(Kind, Attribute sym) const;

    void saveAsXml(Stream &stream, bool saveBitmaps = false) const;

    void allNames(Kind kind, AttributeSeq &seq) const;

    //! Return whether this is the standard style sheet built into Ipe.
    inline bool isStandard() const { return iStandard; }

    //! Return Latex preamble.
    inline String preamble() const { return iPreamble; }
    //! Set LaTeX preamble.
    inline void setPreamble(const String &str) { iPreamble = str; }
    //! Return Latex encoding.
    inline String encoding() const { return iEncoding; }
    //! Set Latex encoding
    inline void setEncoding(const String &enc) { iEncoding = enc; }

    const Layout *layout() const;
    void setLayout(const Layout &margins);

    const TextPadding *textPadding() const;
    void setTextPadding(const TextPadding &pad);

    const TitleStyle *titleStyle() const;
    void setTitleStyle(const TitleStyle &ts);

    const PageNumberStyle *pageNumberStyle();
    void setPageNumberStyle(const PageNumberStyle &pns);

    void addCMap(String s);
    void allCMaps(std::vector<String> &seq) const;

    void setLineCap(TLineCap s);
    void setLineJoin(TLineJoin s);
    void setFillRule(TFillRule s);
    //! Return line cap.
    TLineCap lineCap() const { return iLineCap; }
    //! Return line join.
    TLineJoin lineJoin() const { return iLineJoin; }
    //! Return path fill rule.
    TFillRule fillRule() const { return iFillRule; }

    //! Return name of style sheet.
    inline String name() const { return iName; }
    //! Set name of style sheet.
    inline void setName(const String &name) { iName = name; }

  private:
    typedef std::map<int, Symbol> SymbolMap;
    typedef std::map<int, Gradient> GradientMap;
    typedef std::map<int, Tiling> TilingMap;
    typedef std::map<int, Effect> EffectMap;
    typedef std::map<int, Attribute> Map;

    bool iStandard;
    String iName;
    SymbolMap iSymbols;
    GradientMap iGradients;
    TilingMap iTilings;
    EffectMap iEffects;
    Map iMap;
    String iEncoding;
    String iPreamble;
    Layout iLayout;
    TextPadding iTextPadding;
    TitleStyle iTitleStyle;
    PageNumberStyle iPageNumberStyle;

    TLineJoin iLineJoin;
    TLineCap iLineCap;
    TFillRule iFillRule;

    std::vector<String> iCMaps;
  };


  class Cascade {
  public:
    Cascade();
    Cascade(const Cascade &rhs);
    Cascade &operator=(const Cascade &rhs);
    ~Cascade();

    //! Return number of style sheets.
    inline int count() const { return iSheets.size(); }
    //! Return StyleSheet at \a index.
    inline StyleSheet *sheet(int index) { return iSheets[index]; }

    void insert(int index, StyleSheet *sheet);
    void remove(int index);

    void saveAsXml(Stream &stream) const;

    bool has(Kind kind, Attribute sym) const;
    Attribute find(Kind, Attribute sym) const;
    const Symbol *findSymbol(Attribute sym) const;
    const Gradient *findGradient(Attribute sym) const;
    const Tiling *findTiling(Attribute sym) const;
    const Effect *findEffect(Attribute sym) const;
    const Layout *findLayout() const;
    const TextPadding *findTextPadding() const;
    const StyleSheet::TitleStyle *findTitleStyle() const;
    const StyleSheet::PageNumberStyle *findPageNumberStyle() const;
    String findPreamble() const;
    String findEncoding() const;

    TLineCap lineCap() const;
    TLineJoin lineJoin() const;
    TFillRule fillRule() const;

    void allNames(Kind kind, AttributeSeq &seq) const;
    int findDefinition(Kind kind, Attribute sym) const;
    void allCMaps(std::vector<String> &seq) const;

  private:
    std::vector<StyleSheet *> iSheets;
  };

} // namespace

// --------------------------------------------------------------------
#endif