Mercurial > fife-parpg
annotate engine/swigwrappers/python/extensions.i.templ @ 697:ecaa4d98f05f tip
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
* Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring.
* GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass.
* The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class.
* The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged.
* Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Sat, 18 Jun 2011 00:28:40 -1000 |
parents | c0c3f64bfc2d |
children |
rev | line source |
---|---|
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
1 namespace FIFE { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
2 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
3 %extend PointType2D<int> { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
4 int getX() { return $self->x; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
5 int getY() { return $self->y; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
6 void setX(int _x) { $self->x = _x; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
7 void setY(int _y) { $self->y = _y; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
8 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
9 std::string __str__() { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
10 std::stringstream str; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
11 str << "Point" << *$self; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
12 return str.str(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
13 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
14 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
15 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
16 %extend PointType2D<double> { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
17 double getX() { return $self->x; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
18 double getY() { return $self->y; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
19 void setX(double _x) { $self->x = _x; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
20 void setY(double _y) { $self->y = _y; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
21 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
22 std::string __str__() { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
23 std::stringstream str; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
24 str << "DoublePoint" << *$self; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
25 return str.str(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
26 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
27 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
28 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
29 %extend PointType3D<int> { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
30 std::string __str__() { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
31 std::stringstream str; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
32 str << "Point3D" << *$self; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
33 return str.str(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
34 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
35 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
36 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
37 %extend PointType3D<double> { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
38 std::string __str__() { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
39 std::stringstream str; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
40 str << "DoublePoint3D" << *$self; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
41 return str.str(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
42 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
43 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
44 |
622
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
45 %extend RectType<int> { |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
46 int getX() { return $self->x; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
47 int getY() { return $self->y; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
48 void setX(int _x) { $self->x = _x; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
49 void setY(int _y) { $self->y = _y; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
50 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
51 int getW() { return $self->w; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
52 int getH() { return $self->h; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
53 void setW(int _w) { $self->w = _w; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
54 void setH(int _h) { $self->h = _h; } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
55 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
56 std::string __str__() { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
57 std::stringstream str; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
58 str << "Rect" << *$self; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
59 return str.str(); |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
60 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
61 }; |
622
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
62 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
63 %extend RectType<float> { |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
64 float getX() { return $self->x; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
65 float getY() { return $self->y; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
66 void setX(float _x) { $self->x = _x; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
67 void setY(float _y) { $self->y = _y; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
68 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
69 float getW() { return $self->w; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
70 float getH() { return $self->h; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
71 void setW(float _w) { $self->w = _w; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
72 void setH(float _h) { $self->h = _h; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
73 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
74 std::string __str__() { |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
75 std::stringstream str; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
76 str << "FloatRect" << *$self; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
77 return str.str(); |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
78 } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
79 }; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
80 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
81 %extend RectType<double> { |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
82 double getX() { return $self->x; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
83 double getY() { return $self->y; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
84 void setX(double _x) { $self->x = _x; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
85 void setY(double _y) { $self->y = _y; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
86 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
87 double getW() { return $self->w; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
88 double getH() { return $self->h; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
89 void setW(double _w) { $self->w = _w; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
90 void setH(double _h) { $self->h = _h; } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
91 |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
92 std::string __str__() { |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
93 std::stringstream str; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
94 str << "DoubleRect" << *$self; |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
95 return str.str(); |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
96 } |
c0c3f64bfc2d
* Templatized Rect to extend it's functionality beyond integers
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
97 }; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
98 } |