/usr/include/wx-3.0/wx/wxPython/i_files/_stockobjs.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 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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | /////////////////////////////////////////////////////////////////////////////
// Name: _stockobjs.i
// Purpose: SWIG interface defining "stock" GDI objects
//
// Author: Robin Dunn
//
// Created: 13-Sept-2003
// RCS-ID: $Id$
// Copyright: (c) 2003 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
%newgroup
class wxStockGDI
{
public:
enum Item {
BRUSH_BLACK,
BRUSH_BLUE,
BRUSH_CYAN,
BRUSH_GREEN,
BRUSH_YELLOW,
BRUSH_GREY,
BRUSH_LIGHTGREY,
BRUSH_MEDIUMGREY,
BRUSH_RED,
BRUSH_TRANSPARENT,
BRUSH_WHITE,
COLOUR_BLACK,
COLOUR_BLUE,
COLOUR_CYAN,
COLOUR_GREEN,
COLOUR_YELLOW,
COLOUR_LIGHTGREY,
COLOUR_RED,
COLOUR_WHITE,
CURSOR_CROSS,
CURSOR_HOURGLASS,
CURSOR_STANDARD,
FONT_ITALIC,
FONT_NORMAL,
FONT_SMALL,
FONT_SWISS,
PEN_BLACK,
PEN_BLACKDASHED,
PEN_BLUE,
PEN_CYAN,
PEN_GREEN,
PEN_YELLOW,
PEN_GREY,
PEN_LIGHTGREY,
PEN_MEDIUMGREY,
PEN_RED,
PEN_TRANSPARENT,
PEN_WHITE,
ITEMCOUNT
};
wxStockGDI();
virtual ~wxStockGDI();
static void DeleteAll();
static wxStockGDI& instance();
static const wxBrush* GetBrush(Item item);
static const wxColour* GetColour(Item item);
static const wxCursor* GetCursor(Item item);
static const wxPen* GetPen(Item item);
virtual const wxFont* GetFont(Item item);
%pythoncode {
def _initStockObjects():
import wx
wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this
wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this
wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this
wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this
wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this
wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this
wx.BLUE_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLUE).this
wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this
wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this
wx.YELLOW_PEN.this = StockGDI.GetPen(StockGDI.PEN_YELLOW).this
wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this
wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this
wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this
wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this
wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this
wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this
wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this
wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this
wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this
wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this
wx.YELLOW_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_YELLOW).this
wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this
wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this
wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this
wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this
wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this
wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this
wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this
wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this
wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this
wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this
wx.YELLOW.this = StockGDI.GetColour(StockGDI.COLOUR_YELLOW).this
wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this
wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this
wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this
wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this
wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this
wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this
wx.TheFontList.this = _wxPyInitTheFontList().this
wx.ThePenList.this = _wxPyInitThePenList().this
wx.TheBrushList.this = _wxPyInitTheBrushList().this
wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this
_initStockObjects = staticmethod(_initStockObjects)
}
};
%pythoncode {
%# Create an uninitialized instance for the stock objects, they will
%# be initialized later when the wx.App object is created.
ITALIC_FONT = Font.__new__(Font)
NORMAL_FONT = Font.__new__(Font)
SMALL_FONT = Font.__new__(Font)
SWISS_FONT = Font.__new__(Font)
BLACK_DASHED_PEN = Pen.__new__(Pen)
BLACK_PEN = Pen.__new__(Pen)
BLUE_PEN = Pen.__new__(Pen)
CYAN_PEN = Pen.__new__(Pen)
GREEN_PEN = Pen.__new__(Pen)
YELLOW_PEN = Pen.__new__(Pen)
GREY_PEN = Pen.__new__(Pen)
LIGHT_GREY_PEN = Pen.__new__(Pen)
MEDIUM_GREY_PEN = Pen.__new__(Pen)
RED_PEN = Pen.__new__(Pen)
TRANSPARENT_PEN = Pen.__new__(Pen)
WHITE_PEN = Pen.__new__(Pen)
BLACK_BRUSH = Brush.__new__(Brush)
BLUE_BRUSH = Brush.__new__(Brush)
CYAN_BRUSH = Brush.__new__(Brush)
GREEN_BRUSH = Brush.__new__(Brush)
YELLOW_BRUSH = Brush.__new__(Brush)
GREY_BRUSH = Brush.__new__(Brush)
LIGHT_GREY_BRUSH = Brush.__new__(Brush)
MEDIUM_GREY_BRUSH = Brush.__new__(Brush)
RED_BRUSH = Brush.__new__(Brush)
TRANSPARENT_BRUSH = Brush.__new__(Brush)
WHITE_BRUSH = Brush.__new__(Brush)
BLACK = Colour.__new__(Colour)
BLUE = Colour.__new__(Colour)
CYAN = Colour.__new__(Colour)
GREEN = Colour.__new__(Colour)
YELLOW = Colour.__new__(Colour)
LIGHT_GREY = Colour.__new__(Colour)
RED = Colour.__new__(Colour)
WHITE = Colour.__new__(Colour)
CROSS_CURSOR = Cursor.__new__(Cursor)
HOURGLASS_CURSOR = Cursor.__new__(Cursor)
STANDARD_CURSOR = Cursor.__new__(Cursor)
}
%immutable;
%threadWrapperOff;
const wxBitmap wxNullBitmap;
const wxIcon wxNullIcon;
const wxCursor wxNullCursor;
const wxPen wxNullPen;
const wxBrush wxNullBrush;
const wxPalette wxNullPalette;
const wxFont wxNullFont;
const wxColour wxNullColour;
const wxIconBundle wxNullIconBundle;
%threadWrapperOn;
%mutable;
%pythoncode {
TransparentColour = Colour(0,0,0,ALPHA_TRANSPARENT)
}
//---------------------------------------------------------------------------
class wxGDIObjListBase {
public:
wxGDIObjListBase();
~wxGDIObjListBase();
};
class wxPenList : public wxGDIObjListBase {
public:
wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
};
class wxBrushList : public wxGDIObjListBase {
public:
wxBrush * FindOrCreateBrush(const wxColour& colour, int style=wxSOLID);
};
class wxFontList : public wxGDIObjListBase {
public:
wxFont * FindOrCreateFont(int point_size, wxFontFamily family, wxFontStyle style,
wxFontWeight weight, bool underline = false,
const wxString& facename = wxPyEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
};
//---------------------------------------------------------------------------
MustHaveApp(wxColourDatabase);
class wxColourDatabase {
public:
wxColourDatabase();
~wxColourDatabase();
// find colour by name or name for the given colour
wxColour Find(const wxString& name) const;
wxString FindName(const wxColour& colour) const;
%pythoncode { FindColour = Find }
// add a new colour to the database
void AddColour(const wxString& name, const wxColour& colour);
%extend {
void Append(const wxString& name, int red, int green, int blue) {
self->AddColour(name, wxColour(red, green, blue));
}
}
};
//---------------------------------------------------------------------------
%newgroup
%inline {
wxFontList* _wxPyInitTheFontList() { return wxTheFontList; }
wxPenList* _wxPyInitThePenList() { return wxThePenList; }
wxBrushList* _wxPyInitTheBrushList() { return wxTheBrushList; }
wxColourDatabase* _wxPyInitTheColourDatabase() { return wxTheColourDatabase; }
}
%pythoncode {
%# Create an uninitialized instance for the stock objects, they will
%# be initialized later when the wx.App object is created.
TheFontList = FontList.__new__(FontList)
ThePenList = PenList.__new__(PenList)
TheBrushList = BrushList.__new__(BrushList)
TheColourDatabase = ColourDatabase.__new__(ColourDatabase)
}
//---------------------------------------------------------------------------
|