This file is indexed.

/usr/include/wx-2.6/wx/deprecated/treelay.h is in wx2.6-headers 2.6.3.2.2-5ubuntu4.

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
///////////////////////////////////////////////////////////////////////////////
// Name:        treelay.h
// Purpose:     wxTreeLayout class
// Author:      Julian Smart
// Modified by:
// Created:     7/4/98
// RCS-ID:      $Id: treelay.h,v 1.4 2004/09/27 19:24:30 ABX Exp $
// Copyright:   (c) 1998 Julian Smart
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

#ifndef _WX_TREELAY_H_
#define _WX_TREELAY_H_

#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "wxtree.h"
#endif

#ifndef WX_PRECOMP
#include "wx/object.h"
class wxList;
class wxDC;
class wxMouseEvent;
#endif

#include "wx/deprecated/setup.h"
#include "wx/string.h"

#if wxUSE_TREELAYOUT

class WXDLLIMPEXP_DEPRECATED wxTreeLayout: public wxObject
{
public:
    wxTreeLayout();
    virtual ~wxTreeLayout() { }

    // Redefine these
    virtual void GetChildren(long id, wxList& list) = 0;
    virtual long GetNextNode(long id) = 0;
    virtual long GetNodeParent(long id) = 0;
    virtual long GetNodeX(long id) = 0;
    virtual long GetNodeY(long id) = 0;
    virtual void SetNodeX(long id, long x) = 0;
    virtual void SetNodeY(long id, long y) = 0;
    virtual void ActivateNode(long id, bool active) = 0;
    virtual bool NodeActive(long id) = 0;

    // Optional redefinition
    void Initialize(void);
    inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
    inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(wxT("")); }
    virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
    virtual void Draw(wxDC& dc);
    virtual void DrawNodes(wxDC& dc);
    virtual void DrawBranches(wxDC& dc);
    virtual void DrawNode(long id, wxDC& dc);
    virtual void DrawBranch(long from, long to, wxDC& dc);

    // Don't redefine
    virtual void DoLayout(wxDC& dc, long topNode = -1);

    // Accessors -- don't redefine
    inline void SetTopNode(long id) { m_parentNode = id; }
    inline long GetTopNode(void) const { return m_parentNode; }
    inline void SetSpacing(long x, long y) { m_xSpacing = x; m_ySpacing = y; }
    inline long GetXSpacing(void) const { return m_xSpacing; }
    inline long GetYSpacing(void) const { return m_ySpacing; }
    inline void SetMargins(long x, long y) { m_leftMargin = x; m_topMargin = y; }
    inline long GetTopMargin(void) const { return m_topMargin; }
    inline long GetLeftMargin(void) const { return m_leftMargin; }

    inline bool GetOrientation(void) const { return m_orientation; }
    inline void SetOrientation(bool orient) { m_orientation = orient; }

private:
    void CalcLayout(long node_id, int level, wxDC& dc);

protected:
    long          m_parentNode;
    long          m_lastY;
    long          m_lastX;
    long          m_xSpacing;
    long          m_ySpacing;
    long          m_topMargin;
    long          m_leftMargin;
    bool          m_orientation; // true for top-to-bottom, false for left-to-right

private:
    DECLARE_ABSTRACT_CLASS(wxTreeLayout)
};

class WXDLLIMPEXP_DEPRECATED wxStoredNode
{
public:
    wxString      m_name;
    long          m_x, m_y;
    long          m_parentId;
    bool          m_active;
    long          m_clientData;
};

/*
 * A version of wxTreeLayout with storage for nodes
 */

class WXDLLIMPEXP_DEPRECATED wxTreeLayoutStored: public wxTreeLayout
{
public:
    wxTreeLayoutStored(int noNodes = 200);
    virtual ~wxTreeLayoutStored(void);
    void Initialize(int n);

    wxString HitTest(wxMouseEvent& event, wxDC& dc);
    wxStoredNode* GetNode(long id) const;
    inline int GetNumNodes() const { return m_maxNodes; };
    inline int GetNodeCount() const { return m_num; };

    virtual void GetChildren(long id, wxList& list);
    virtual long GetNextNode(long id);
    virtual long GetNodeParent(long id);
    virtual long GetNodeX(long id);
    virtual long GetNodeY(long id);
    virtual void SetNodeX(long id, long x);
    virtual void SetNodeY(long id, long y);
    virtual void SetNodeName(long id, const wxString& name);
    virtual wxString GetNodeName(long id);
    virtual void ActivateNode(long id, bool active);
    virtual bool NodeActive(long id);
    virtual void SetClientData(long id, long clientData);
    virtual long GetClientData(long id) const;

    virtual long AddChild(const wxString& name, const wxString& parent = wxT(""));
    virtual long AddChild(const wxString& name, long parent);
    virtual long NameToId(const wxString& name);

    // Data members
private:
    wxStoredNode*     m_nodes;
    int               m_num;
    int               m_maxNodes;

private:
    DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
    DECLARE_NO_COPY_CLASS(wxTreeLayoutStored)
};

// For backward compatibility
#define wxStoredTree wxTreeLayoutStored

#endif
    // wxUSE_TREELAYOUT

#endif
 // _WX_TREELAY_H_