This file is indexed.

/usr/include/wx-3.0/wx/wxPython/i_files/_statusbar.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-4.

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
/////////////////////////////////////////////////////////////////////////////
// Name:        _statusbar.i
// Purpose:     SWIG interface defs for wxStatusBar
//
// Author:      Robin Dunn
//
// Created:     24-Aug-1998
// RCS-ID:      $Id$
// Copyright:   (c) 2003 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

// Not a %module


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

%{
%}

//---------------------------------------------------------------------------
%newgroup;

// wxStatusBar styles
enum {
    wxSTB_SIZEGRIP,
    wxSTB_SHOW_TIPS,

    wxSTB_ELLIPSIZE_START,
    wxSTB_ELLIPSIZE_MIDDLE,
    wxSTB_ELLIPSIZE_END,

    wxSTB_DEFAULT_STYLE,

    wxST_SIZEGRIP,
};

enum {
    wxSB_NORMAL,
    wxSB_FLAT,
    wxSB_RAISED
};

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


class wxStatusBarPane
{
public:
    wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0);

    int GetWidth() const;
    int GetStyle() const;
    wxString GetText() const;

    bool IsEllipsized() const;
    void SetIsEllipsized(bool isEllipsized);

    void SetWidth(int width);
    void SetStyle(int style);

    // set text, return true if it changed or false if it was already set to
    // this value
    bool SetText(const wxString& text);

    // save the existing text on top of our stack and make the new text
    // current; return true if the text really changed
    bool PushText(const wxString& text);

    // restore the message saved by the last call to Push() (unless it was
    // changed by an intervening call to SetText()) and return true if we
    // really restored anything
    bool PopText();
};

//---------------------------------------------------------------------------
      
// wxStatusBar: a window near the bottom of the frame used for status info
MustHaveApp(wxStatusBar);
class wxStatusBar : public wxWindow
{
public:
    %pythonAppend wxStatusBar         "self._setOORInfo(self)"
    %pythonAppend wxStatusBar()       ""
    %typemap(out) wxStatusBar*;    // turn off this typemap
    
    wxStatusBar(wxWindow* parent, wxWindowID id = -1,
                long style = wxDEFAULT_STATUSBAR_STYLE,
                const wxString& name = wxPyStatusLineNameStr);
    %RenameCtor(PreStatusBar, wxStatusBar());

    // Turn it back on again
    %typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); }

    bool Create(wxWindow* parent, wxWindowID id=-1,
                long style = wxST_SIZEGRIP,
                const wxString& name = wxPyStatusLineNameStr);

    // set the number of fields and call SetStatusWidths(widths) if widths are
    // given
    virtual void SetFieldsCount(int number = 1 /*, const int *widths = NULL*/);
    int GetFieldsCount() const;

    virtual void SetStatusText(const wxString& text, int number = 0);
    virtual wxString GetStatusText(int number = 0) const;

    void PushStatusText(const wxString& text, int number = 0);
    void PopStatusText(int number = 0);


    // set status field widths as absolute numbers: positive widths mean that
    // the field has the specified absolute width, negative widths are
    // interpreted as the sizer options, i.e. the extra space (total space
    // minus the sum of fixed width fields) is divided between the fields with
    // negative width according to the abs value of the width (field with width
    // -2 grows twice as much as one with width -1 &c)
    virtual void SetStatusWidths(int widths, const int* widths_field); 
    int GetStatusWidth(int n) const;
    

    // Set the field style. Use either wxSB_NORMAL (default) for a standard 3D 
    // border around a field, wxSB_FLAT for no border around a field, so that it 
    // appears flat or wxSB_POPOUT to make the field appear raised.
    // Setting field styles only works on wxMSW
    virtual void SetStatusStyles(int styles, const int* styles_field);
    int GetStatusStyle(int n) const;    
    
    // Get the position and size of the field's internal bounding rectangle
    %extend {
        wxRect GetFieldRect(int i) {
            wxRect r;
            self->GetFieldRect(i, r);
            return r;
        }
    }
    
    // sets the minimal vertical size of the status bar
    virtual void SetMinHeight(int height);

    // get the dimensions of the horizontal and vertical borders
    virtual int GetBorderX() const;
    virtual int GetBorderY() const;
    wxSize GetBorders() const;

    const wxStatusBarPane& GetField(int n) const;

    static wxVisualAttributes
    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

    %pythoncode {
        def GetFields(self):
            """Return a list of field values in the status bar. """
            return [self.GetStatusText(i) for i in range(self.GetFieldsCount())]
            
        def SetFields(self, items):
            """Set the values of the statusbar fields from a list of strings. """
            self.SetFieldsCount(len(items))
            for i in range(len(items)):
                self.SetStatusText(items[i], i)
    }
    
    %property(BorderX, GetBorderX, doc="See `GetBorderX`");
    %property(BorderY, GetBorderY, doc="See `GetBorderY`");
    %property(FieldRect, GetFieldRect, doc="See `GetFieldRect`");
    %property(Fields, GetFields, SetFields, doc="See `GetFields` and `SetFields`");
    %property(FieldsCount, GetFieldsCount, SetFieldsCount, doc="See `GetFieldsCount` and `SetFieldsCount`");
    %property(StatusText, GetStatusText, SetStatusText, doc="See `GetStatusText` and `SetStatusText`");
};


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