This file is indexed.

/usr/include/wx-2.8/wx/fl/rowdragpl.h is in wx2.8-headers 2.8.12.1-6ubuntu2.

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
226
/////////////////////////////////////////////////////////////////////////////
// Name:        rowdragpl.h
// Purpose:     cbRowDragPlugin class header.
// Author:      Aleksandras Gluchovas
// Modified by:
// Created:     06/10/98
// RCS-ID:      $Id: rowdragpl.h 38927 2006-04-26 16:27:20Z PC $
// Copyright:   (c) Aleksandras Gluchovas
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef __ROWDRAGPL_G__
#define __ROWDRAGPL_G__

#include "wx/fl/controlbar.h"

/*
This plugin adds row-dragging functionality to the pane.
It handles mouse movement and pane background-erasing plugin events.
The behaviour and appearance resembles drag and drop positioning
of the toolbar rows in Netscape Communicator 4.xx.
*/

class WXDLLIMPEXP_FL cbRowDragPlugin : public cbPluginBase
{
    DECLARE_DYNAMIC_CLASS( cbRowDragPlugin )
public:
    // background colours for the highlighted/unhighlighted icons

    wxColour mHightColor;      // light-blue for NC-look
    wxColour mLowColor;        // light-gray -/-
    wxColour mTrianInnerColor; // blue       -/-
    wxPen    mTrianInnerPen;   // black      -/-

protected:
    friend class cbRowDragPluginSerializer;

    // drag & drop state variables
    bool    mDragStarted;
    bool    mDecisionMode;
    wxPoint mDragOrigin;
    int     mCurDragOfs;
    bool    mCaptureIsOn;

    // saved margins of the pane
    int mSvTopMargin;
    int mSvBottomMargin;
    int mSvLeftMargin;
    int mSvRightMargin;

    // on-screen drawing state variables
    wxBitmap* mpPaneImage;
    wxBitmap* mpRowImage;
    wxBitmap* mpCombinedImage;

    wxScreenDC* mpScrDc;
    wxRect    mCombRect;
    wxSize    mRowImgDim;
    int       mInitialRowOfs;

    // NOTE:: if mpRowInFocus is not NULL, then mCollapsedIconInFocus is -1,
    //        and v.v. (two different items cannot be in focus at the same time)

    cbRowInfo* mpRowInFocus;
    int        mCollapsedIconInFocus;

    cbDockPane* mpPane; // is set up temorarely, while handling event

    wxList      mHiddenBars;

        // Helper for drag and drop.
    wxBitmap* CaptureDCArea( wxDC& dc, wxRect& area );

        // Helper for drag and drop.
    int GetHRowsCountForPane( cbDockPane* pPane );

        // Helper for drag and drop.
    void SetMouseCapture( bool captureOn );

        // Helper for drag and drop.
    void PrepareForRowDrag();

        // Helper for drag and drop.
    void ShowDraggedRow( int offset );

        // Helper for drag and drop.
    void ShowPaneImage();

        // Helper for drag and drop.
    void FinishOnScreenDraw();

        // Helper for drag and drop.
    void CollapseRow( cbRowInfo* pRow );

        // Helper for drag and drop.
    void ExpandRow( int collapsedIconIdx );

        // Helper for drag and drop.
    void InsertDraggedRowBefore( cbRowInfo* pBeforeRow );

        // Helper for drag and drop.
    bool ItemIsInFocus();

        // Helper for drag and drop.
    void CheckPrevItemInFocus( cbRowInfo* pRow, int iconIdx );

        // Helper for drag and drop.
    void UnhighlightItemInFocus();

        // Helper for drag and drop.
    cbRowInfo* GetFirstRow();

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawTrianUp( wxRect& inRect, wxDC& dc );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawTrianDown( wxRect& inRect, wxDC& dc );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawTrianRight( wxRect& inRect, wxDC& dc );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void Draw3DPattern( wxRect& inRect, wxDC& dc );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawRombShades( wxPoint& p1, wxPoint& p2, wxPoint& p3, wxPoint& p4, wxDC& dc );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawOrtoRomb( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawRomb( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void Draw3DRect( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush );

        // Implements 'hard-coded metafile' for Netscape Navigator look.
    virtual void DrawRectShade( wxRect& inRect, wxDC& dc,
                                int level, const wxPen& upperPen, const wxPen& lowerPen );

        // Helper for drag and drop.
    virtual void GetRowHintRect( cbRowInfo* pRow, wxRect& rect );

        // Helper for drag and drop.
    virtual void GetCollapsedInconRect( int iconIdx, wxRect& rect );

        // Helper for drag and drop.
    virtual int GetCollapsedIconsPos();

public:

        // Default constructor.
    cbRowDragPlugin();

        // Constructor, taking paren layout frame and pane mask.
    cbRowDragPlugin( wxFrameLayout* pLayout, int paneMask = wxALL_PANES );

        // Destructor.
    virtual ~cbRowDragPlugin();

        // Clone function, returning a new instance of this class.
    virtual cbPluginBase* Clone() { return new cbRowDragPlugin(NULL,0); }

        // Called to initialize this plugin.
    virtual void OnInitPlugin();

        // Handles mouse move plugin events (appearance-independent logic).
    void OnMouseMove  ( cbMotionEvent& event );

        // Handles left button down plugin events (appearance-independent logic).
    void OnLButtonDown( cbLeftDownEvent& event );

        // Handles left button up plugin events (appearance-independent logic).
    void OnLButtonUp  ( cbLeftUpEvent& event );

        // Handles pane drawing plugin events (appearance-independent logic).
    void OnDrawPaneBackground( cbDrawPaneDecorEvent& event );

        // Draws collapsed row icon (appearance-dependent).
    virtual void DrawCollapsedRowIcon( int index, wxDC& dc, bool isHighlighted );

        // Draws collapsed rows border (appearance-dependent).
    virtual void DrawCollapsedRowsBorder( wxDC& dc );

        // Draws rows drag hints border (appearance-dependent).
    virtual void DrawRowsDragHintsBorder( wxDC& dc );

        // Draws row drag hint (appearance-dependent).
    virtual void DrawRowDragHint( cbRowInfo* pRow, wxDC& dc, bool isHighlighted );

        // Draws empty row (appearance-dependent).
    virtual void DrawEmptyRow( wxDC& dc, wxRect& rowBounds );

        // Gets the collapsed row icon height.
    virtual int GetCollapsedRowIconHeight();

        // Gets the row drag hint width.
    virtual int GetRowDragHintWidth();

        // Sets the pane margins.
    virtual void SetPaneMargins();

        // Test for the collapsed row icon position.
    virtual bool HitTestCollapsedRowIcon( int iconIdx, const wxPoint& pos );

        // Test for the row drag hint position.
    virtual bool HitTestRowDragHint( cbRowInfo* pRow, const wxPoint& pos );

    DECLARE_EVENT_TABLE()
};

/*
Internal helper class.
*/

class WXDLLIMPEXP_FL cbHiddenBarInfo : public wxObject
{
    DECLARE_DYNAMIC_CLASS( cbHiddenBarInfo )
public:
    cbBarInfo* mpBar;
    int        mRowNo;
    int        mIconNo;
    int        mAlignment;
};

#endif /* __ROWDRAGPL_G__ */