reflexion 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.doc/ext/reflex/application.cpp +9 -5
- data/.doc/ext/reflex/capture_event.cpp +0 -4
- data/.doc/ext/reflex/contact_event.cpp +17 -10
- data/.doc/ext/reflex/draw_event.cpp +1 -5
- data/.doc/ext/reflex/ellipse_shape.cpp +51 -24
- data/.doc/ext/reflex/event.cpp +0 -4
- data/.doc/ext/reflex/filter.cpp +81 -0
- data/.doc/ext/reflex/focus_event.cpp +9 -13
- data/.doc/ext/reflex/frame_event.cpp +40 -6
- data/.doc/ext/reflex/image_view.cpp +1 -10
- data/.doc/ext/reflex/key_event.cpp +2 -6
- data/.doc/ext/reflex/line_shape.cpp +99 -0
- data/.doc/ext/reflex/motion_event.cpp +75 -0
- data/.doc/ext/reflex/native.cpp +18 -18
- data/.doc/ext/reflex/pointer_event.cpp +5 -11
- data/.doc/ext/reflex/polygon_shape.cpp +65 -0
- data/.doc/ext/reflex/rect_shape.cpp +102 -23
- data/.doc/ext/reflex/reflex.cpp +21 -2
- data/.doc/ext/reflex/scroll_event.cpp +0 -6
- data/.doc/ext/reflex/selector.cpp +43 -15
- data/.doc/ext/reflex/shape.cpp +211 -0
- data/.doc/ext/reflex/style.cpp +359 -185
- data/.doc/ext/reflex/style_length.cpp +163 -35
- data/.doc/ext/reflex/timer.cpp +101 -0
- data/.doc/ext/reflex/timer_event.cpp +123 -0
- data/.doc/ext/reflex/update_event.cpp +11 -6
- data/.doc/ext/reflex/view.cpp +548 -144
- data/.doc/ext/reflex/wheel_event.cpp +0 -22
- data/.doc/ext/reflex/window.cpp +7 -15
- data/README.md +1 -1
- data/Rakefile +14 -12
- data/VERSION +1 -1
- data/ext/reflex/application.cpp +10 -5
- data/ext/reflex/capture_event.cpp +1 -5
- data/ext/reflex/contact_event.cpp +19 -11
- data/ext/reflex/defs.h +5 -2
- data/ext/reflex/draw_event.cpp +2 -6
- data/ext/reflex/ellipse_shape.cpp +56 -25
- data/ext/reflex/event.cpp +0 -4
- data/ext/reflex/extconf.rb +1 -2
- data/ext/reflex/filter.cpp +86 -0
- data/ext/reflex/focus_event.cpp +11 -15
- data/ext/reflex/frame_event.cpp +46 -7
- data/ext/reflex/image_view.cpp +1 -10
- data/ext/reflex/key_event.cpp +3 -7
- data/ext/reflex/line_shape.cpp +104 -0
- data/ext/reflex/motion_event.cpp +79 -0
- data/ext/reflex/native.cpp +18 -18
- data/ext/reflex/pointer_event.cpp +6 -12
- data/ext/reflex/polygon_shape.cpp +68 -0
- data/ext/reflex/rect_shape.cpp +113 -24
- data/ext/reflex/reflex.cpp +21 -2
- data/ext/reflex/scroll_event.cpp +1 -7
- data/ext/reflex/selector.cpp +46 -16
- data/ext/reflex/selector.h +130 -0
- data/ext/reflex/shape.cpp +231 -0
- data/ext/reflex/style.cpp +363 -192
- data/ext/reflex/style_length.cpp +164 -37
- data/ext/reflex/timer.cpp +108 -0
- data/ext/reflex/timer_event.cpp +133 -0
- data/ext/reflex/update_event.cpp +13 -7
- data/ext/reflex/view.cpp +594 -150
- data/ext/reflex/wheel_event.cpp +1 -25
- data/ext/reflex/window.cpp +7 -15
- data/include/reflex/application.h +2 -0
- data/include/reflex/debug.h +22 -0
- data/include/reflex/defs.h +45 -0
- data/include/reflex/event.h +60 -16
- data/include/reflex/exception.h +9 -0
- data/include/reflex/filter.h +56 -0
- data/include/reflex/image_view.h +1 -1
- data/include/reflex/ruby/application.h +17 -9
- data/include/reflex/ruby/event.h +22 -0
- data/include/reflex/ruby/filter.h +69 -0
- data/include/reflex/ruby/selector.h +1 -1
- data/include/reflex/ruby/shape.h +140 -0
- data/include/reflex/ruby/style.h +1 -1
- data/include/reflex/ruby/timer.h +69 -0
- data/include/reflex/ruby/view.h +43 -76
- data/include/reflex/ruby/window.h +17 -32
- data/include/reflex/ruby.h +6 -4
- data/include/reflex/selector.h +54 -2
- data/include/reflex/shape.h +211 -0
- data/include/reflex/style.h +111 -77
- data/include/reflex/timer.h +73 -0
- data/include/reflex/view.h +181 -59
- data/include/reflex/window.h +4 -3
- data/include/reflex.h +5 -4
- data/lib/reflex/application.rb +6 -3
- data/lib/reflex/button.rb +2 -2
- data/lib/reflex/capture_event.rb +7 -6
- data/lib/reflex/contact_event.rb +10 -12
- data/lib/reflex/draw_event.rb +6 -1
- data/lib/reflex/ellipse_shape.rb +27 -0
- data/lib/reflex/filter.rb +18 -0
- data/lib/reflex/fixture.rb +4 -0
- data/lib/reflex/focus_event.rb +10 -12
- data/lib/reflex/frame_event.rb +1 -1
- data/lib/reflex/helper.rb +17 -29
- data/lib/reflex/key_event.rb +13 -11
- data/lib/reflex/line_shape.rb +18 -0
- data/lib/reflex/{texture.rb → matrix.rb} +2 -2
- data/lib/reflex/module.rb +4 -19
- data/lib/reflex/pointer_event.rb +26 -37
- data/lib/reflex/polygon.rb +14 -0
- data/lib/reflex/polygon_shape.rb +23 -0
- data/lib/reflex/polyline.rb +13 -0
- data/lib/reflex/rect_shape.rb +20 -0
- data/lib/reflex/reflex.rb +1 -3
- data/lib/reflex/scroll_event.rb +1 -1
- data/lib/reflex/selector.rb +2 -2
- data/lib/reflex/shape.rb +62 -0
- data/lib/reflex/style.rb +78 -11
- data/lib/reflex/style_length.rb +0 -11
- data/lib/reflex/text_view.rb +7 -24
- data/lib/reflex/timer.rb +30 -0
- data/lib/reflex/timer_event.rb +29 -0
- data/lib/reflex/update_event.rb +1 -1
- data/lib/reflex/view.rb +127 -32
- data/lib/reflex/wheel_event.rb +9 -1
- data/lib/reflex/window.rb +29 -9
- data/lib/reflex.rb +11 -5
- data/lib/reflexion.rb +23 -7
- data/reflex.gemspec +8 -10
- data/samples/bats.rb +4 -4
- data/samples/fans.rb +1 -1
- data/samples/fps.rb +5 -3
- data/samples/hello.rb +4 -6
- data/samples/image.rb +5 -4
- data/samples/ios/hello/hello.xcodeproj/project.pbxproj +0 -2
- data/samples/layout.rb +16 -7
- data/samples/model.rb +10 -7
- data/samples/physics.rb +22 -20
- data/samples/reflexion/breakout.rb +4 -5
- data/samples/reflexion/hello.rb +2 -2
- data/samples/reflexion/jump_action.rb +191 -0
- data/samples/reflexion/noise.rb +23 -0
- data/samples/reflexion/paint.rb +7 -6
- data/samples/reflexion/physics.rb +15 -8
- data/samples/reflexion/pulse.rb +24 -10
- data/samples/shader.rb +8 -6
- data/samples/shapes.rb +63 -14
- data/samples/tree.rb +9 -10
- data/samples/views.rb +3 -3
- data/samples/visuals.rb +2 -5
- data/src/body.cpp +146 -345
- data/src/body.h +91 -0
- data/src/event.cpp +66 -16
- data/src/exception.cpp +13 -3
- data/src/filter.cpp +76 -0
- data/src/fixture.cpp +164 -39
- data/src/fixture.h +85 -0
- data/src/image_view.cpp +4 -4
- data/src/ios/app_delegate.h +5 -10
- data/src/ios/app_delegate.mm +79 -41
- data/src/ios/application.h +32 -0
- data/src/ios/application.mm +35 -25
- data/src/ios/event.mm +8 -4
- data/src/ios/reflex.mm +0 -7
- data/src/ios/view_controller.h +33 -0
- data/src/ios/view_controller.mm +436 -0
- data/src/ios/window.h +40 -0
- data/src/ios/window.mm +59 -250
- data/src/osx/app_delegate.h +5 -10
- data/src/osx/app_delegate.mm +52 -55
- data/src/osx/application.h +32 -0
- data/src/osx/application.mm +44 -39
- data/src/osx/native_window.h +0 -15
- data/src/osx/native_window.mm +131 -115
- data/src/osx/opengl_view.h +0 -2
- data/src/osx/opengl_view.mm +12 -3
- data/src/osx/reflex.mm +0 -9
- data/src/osx/window.h +42 -0
- data/src/osx/window.mm +45 -252
- data/src/selector.cpp +232 -7
- data/src/selector.h +52 -0
- data/src/shape.cpp +1191 -0
- data/src/shape.h +61 -0
- data/src/style.cpp +571 -374
- data/src/style.h +39 -0
- data/src/timer.cpp +291 -0
- data/src/timer.h +55 -0
- data/src/view.cpp +1624 -984
- data/src/view.h +56 -0
- data/src/win32/window.cpp +3 -4
- data/src/window.cpp +275 -20
- data/src/window.h +92 -0
- data/src/world.cpp +112 -111
- data/src/world.h +34 -53
- data/task/box2d.rake +31 -10
- data/test/test_capture_event.rb +8 -6
- data/test/test_pointer_event.rb +85 -0
- data/test/test_selector.rb +1 -1
- data/test/test_shape.rb +71 -0
- data/test/test_style.rb +77 -11
- data/test/test_style_length.rb +42 -13
- data/test/test_view.rb +138 -14
- metadata +109 -210
- data/.doc/ext/reflex/arc_shape.cpp +0 -89
- data/.doc/ext/reflex/body.cpp +0 -299
- data/.doc/ext/reflex/fixture.cpp +0 -101
- data/.doc/ext/reflex/shape_view.cpp +0 -153
- data/ext/reflex/arc_shape.cpp +0 -94
- data/ext/reflex/body.cpp +0 -328
- data/ext/reflex/fixture.cpp +0 -108
- data/ext/reflex/shape_view.cpp +0 -161
- data/include/reflex/bitmap.h +0 -20
- data/include/reflex/body.h +0 -128
- data/include/reflex/bounds.h +0 -20
- data/include/reflex/color.h +0 -20
- data/include/reflex/color_space.h +0 -20
- data/include/reflex/fixture.h +0 -117
- data/include/reflex/font.h +0 -20
- data/include/reflex/image.h +0 -20
- data/include/reflex/matrix.h +0 -20
- data/include/reflex/painter.h +0 -20
- data/include/reflex/point.h +0 -24
- data/include/reflex/ruby/body.h +0 -41
- data/include/reflex/ruby/fixture.h +0 -41
- data/include/reflex/ruby/shape_view.h +0 -96
- data/include/reflex/shader.h +0 -20
- data/include/reflex/shape_view.h +0 -146
- data/include/reflex/texture.h +0 -20
- data/lib/reflex/body.rb +0 -22
- data/lib/reflex/flags.rb +0 -18
- data/lib/reflex/shape_view.rb +0 -25
- data/src/ios/application_data.h +0 -45
- data/src/ios/native_window.h +0 -39
- data/src/ios/native_window.mm +0 -224
- data/src/ios/opengl_view.h +0 -13
- data/src/ios/opengl_view.mm +0 -139
- data/src/ios/window_data.h +0 -75
- data/src/osx/application_data.h +0 -45
- data/src/osx/window_data.h +0 -75
- data/src/physics/Box2D/Box2D.h +0 -68
- data/src/physics/Box2D/Collision/Shapes/b2ChainShape.cpp +0 -193
- data/src/physics/Box2D/Collision/Shapes/b2ChainShape.h +0 -105
- data/src/physics/Box2D/Collision/Shapes/b2CircleShape.cpp +0 -99
- data/src/physics/Box2D/Collision/Shapes/b2CircleShape.h +0 -91
- data/src/physics/Box2D/Collision/Shapes/b2EdgeShape.cpp +0 -138
- data/src/physics/Box2D/Collision/Shapes/b2EdgeShape.h +0 -74
- data/src/physics/Box2D/Collision/Shapes/b2PolygonShape.cpp +0 -467
- data/src/physics/Box2D/Collision/Shapes/b2PolygonShape.h +0 -101
- data/src/physics/Box2D/Collision/Shapes/b2Shape.h +0 -101
- data/src/physics/Box2D/Collision/b2BroadPhase.cpp +0 -119
- data/src/physics/Box2D/Collision/b2BroadPhase.h +0 -257
- data/src/physics/Box2D/Collision/b2CollideCircle.cpp +0 -154
- data/src/physics/Box2D/Collision/b2CollideEdge.cpp +0 -698
- data/src/physics/Box2D/Collision/b2CollidePolygon.cpp +0 -239
- data/src/physics/Box2D/Collision/b2Collision.cpp +0 -252
- data/src/physics/Box2D/Collision/b2Collision.h +0 -277
- data/src/physics/Box2D/Collision/b2Distance.cpp +0 -603
- data/src/physics/Box2D/Collision/b2Distance.h +0 -141
- data/src/physics/Box2D/Collision/b2DynamicTree.cpp +0 -778
- data/src/physics/Box2D/Collision/b2DynamicTree.h +0 -289
- data/src/physics/Box2D/Collision/b2TimeOfImpact.cpp +0 -486
- data/src/physics/Box2D/Collision/b2TimeOfImpact.h +0 -58
- data/src/physics/Box2D/Common/b2BlockAllocator.cpp +0 -215
- data/src/physics/Box2D/Common/b2BlockAllocator.h +0 -62
- data/src/physics/Box2D/Common/b2Draw.cpp +0 -44
- data/src/physics/Box2D/Common/b2Draw.h +0 -86
- data/src/physics/Box2D/Common/b2GrowableStack.h +0 -85
- data/src/physics/Box2D/Common/b2Math.cpp +0 -94
- data/src/physics/Box2D/Common/b2Math.h +0 -720
- data/src/physics/Box2D/Common/b2Settings.cpp +0 -44
- data/src/physics/Box2D/Common/b2Settings.h +0 -151
- data/src/physics/Box2D/Common/b2StackAllocator.cpp +0 -83
- data/src/physics/Box2D/Common/b2StackAllocator.h +0 -60
- data/src/physics/Box2D/Common/b2Timer.cpp +0 -101
- data/src/physics/Box2D/Common/b2Timer.h +0 -50
- data/src/physics/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp +0 -53
- data/src/physics/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h +0 -39
- data/src/physics/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp +0 -53
- data/src/physics/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h +0 -39
- data/src/physics/Box2D/Dynamics/Contacts/b2CircleContact.cpp +0 -52
- data/src/physics/Box2D/Dynamics/Contacts/b2CircleContact.h +0 -39
- data/src/physics/Box2D/Dynamics/Contacts/b2Contact.cpp +0 -247
- data/src/physics/Box2D/Dynamics/Contacts/b2Contact.h +0 -349
- data/src/physics/Box2D/Dynamics/Contacts/b2ContactSolver.cpp +0 -838
- data/src/physics/Box2D/Dynamics/Contacts/b2ContactSolver.h +0 -95
- data/src/physics/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp +0 -49
- data/src/physics/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h +0 -39
- data/src/physics/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp +0 -49
- data/src/physics/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h +0 -39
- data/src/physics/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp +0 -49
- data/src/physics/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h +0 -38
- data/src/physics/Box2D/Dynamics/Contacts/b2PolygonContact.cpp +0 -52
- data/src/physics/Box2D/Dynamics/Contacts/b2PolygonContact.h +0 -39
- data/src/physics/Box2D/Dynamics/Joints/b2DistanceJoint.cpp +0 -260
- data/src/physics/Box2D/Dynamics/Joints/b2DistanceJoint.h +0 -169
- data/src/physics/Box2D/Dynamics/Joints/b2FrictionJoint.cpp +0 -251
- data/src/physics/Box2D/Dynamics/Joints/b2FrictionJoint.h +0 -119
- data/src/physics/Box2D/Dynamics/Joints/b2GearJoint.cpp +0 -419
- data/src/physics/Box2D/Dynamics/Joints/b2GearJoint.h +0 -125
- data/src/physics/Box2D/Dynamics/Joints/b2Joint.cpp +0 -211
- data/src/physics/Box2D/Dynamics/Joints/b2Joint.h +0 -226
- data/src/physics/Box2D/Dynamics/Joints/b2MotorJoint.cpp +0 -304
- data/src/physics/Box2D/Dynamics/Joints/b2MotorJoint.h +0 -133
- data/src/physics/Box2D/Dynamics/Joints/b2MouseJoint.cpp +0 -222
- data/src/physics/Box2D/Dynamics/Joints/b2MouseJoint.h +0 -129
- data/src/physics/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp +0 -629
- data/src/physics/Box2D/Dynamics/Joints/b2PrismaticJoint.h +0 -196
- data/src/physics/Box2D/Dynamics/Joints/b2PulleyJoint.cpp +0 -348
- data/src/physics/Box2D/Dynamics/Joints/b2PulleyJoint.h +0 -152
- data/src/physics/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp +0 -502
- data/src/physics/Box2D/Dynamics/Joints/b2RevoluteJoint.h +0 -204
- data/src/physics/Box2D/Dynamics/Joints/b2RopeJoint.cpp +0 -241
- data/src/physics/Box2D/Dynamics/Joints/b2RopeJoint.h +0 -114
- data/src/physics/Box2D/Dynamics/Joints/b2WeldJoint.cpp +0 -344
- data/src/physics/Box2D/Dynamics/Joints/b2WeldJoint.h +0 -126
- data/src/physics/Box2D/Dynamics/Joints/b2WheelJoint.cpp +0 -419
- data/src/physics/Box2D/Dynamics/Joints/b2WheelJoint.h +0 -210
- data/src/physics/Box2D/Dynamics/b2Body.cpp +0 -549
- data/src/physics/Box2D/Dynamics/b2Body.h +0 -860
- data/src/physics/Box2D/Dynamics/b2ContactManager.cpp +0 -296
- data/src/physics/Box2D/Dynamics/b2ContactManager.h +0 -52
- data/src/physics/Box2D/Dynamics/b2Fixture.cpp +0 -303
- data/src/physics/Box2D/Dynamics/b2Fixture.h +0 -345
- data/src/physics/Box2D/Dynamics/b2Island.cpp +0 -539
- data/src/physics/Box2D/Dynamics/b2Island.h +0 -93
- data/src/physics/Box2D/Dynamics/b2TimeStep.h +0 -70
- data/src/physics/Box2D/Dynamics/b2World.cpp +0 -1339
- data/src/physics/Box2D/Dynamics/b2World.h +0 -354
- data/src/physics/Box2D/Dynamics/b2WorldCallbacks.cpp +0 -36
- data/src/physics/Box2D/Dynamics/b2WorldCallbacks.h +0 -155
- data/src/physics/Box2D/Rope/b2Rope.cpp +0 -259
- data/src/physics/Box2D/Rope/b2Rope.h +0 -115
- data/src/shape_view.cpp +0 -306
data/ext/reflex/style.cpp
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
#include "reflex/ruby/style.h"
|
2
2
|
|
3
3
|
|
4
|
-
#include <rucy.h>
|
5
4
|
#include "rays/ruby/color.h"
|
6
5
|
#include "rays/ruby/image.h"
|
7
6
|
#include "reflex/ruby/selector.h"
|
8
7
|
#include "defs.h"
|
9
|
-
|
10
|
-
|
11
|
-
using namespace Rucy;
|
8
|
+
#include "selector.h"
|
12
9
|
|
13
10
|
|
14
11
|
RUCY_DEFINE_VALUE_FROM_TO(Reflex::Style)
|
15
12
|
|
16
|
-
#define
|
13
|
+
#define THIS to< Reflex::Style*>(self)
|
14
|
+
#define C_THIS to<const Reflex::Style*>(self)
|
17
15
|
|
18
|
-
#define CHECK
|
16
|
+
#define CHECK RUCY_CHECK_OBJ(Reflex::Style, self)
|
19
17
|
|
20
18
|
|
21
19
|
static
|
@@ -34,76 +32,27 @@ RUCY_DEF1(initialize_copy, obj)
|
|
34
32
|
}
|
35
33
|
RUCY_END
|
36
34
|
|
37
|
-
static
|
38
|
-
RUCY_DEF1(set_name, name)
|
39
|
-
{
|
40
|
-
CHECK;
|
41
|
-
THIS->set_name(name.is_nil() ? NULL : name.c_str());
|
42
|
-
}
|
43
|
-
RUCY_END
|
44
|
-
|
45
|
-
static
|
46
|
-
RUCY_DEF0(get_name)
|
47
|
-
{
|
48
|
-
CHECK;
|
49
|
-
return THIS->name() ? value(THIS->name()) : nil();
|
50
|
-
}
|
51
|
-
RUCY_END
|
52
|
-
|
53
|
-
static
|
54
|
-
RUCY_DEF1(add_tag, tag)
|
55
|
-
{
|
56
|
-
CHECK;
|
57
|
-
THIS->add_tag(tag.c_str());
|
58
|
-
}
|
59
|
-
RUCY_END
|
60
|
-
|
61
|
-
static
|
62
|
-
RUCY_DEF1(remove_tag, tag)
|
63
|
-
{
|
64
|
-
CHECK;
|
65
|
-
THIS->remove_tag(tag.c_str());
|
66
|
-
}
|
67
|
-
RUCY_END
|
68
|
-
|
69
|
-
static
|
70
|
-
RUCY_DEF0(each_tag)
|
71
|
-
{
|
72
|
-
CHECK;
|
73
|
-
|
74
|
-
Value ret;
|
75
|
-
Reflex::Style::tag_iterator end = THIS->tag_end();
|
76
|
-
for (Reflex::Style::tag_iterator it = THIS->tag_begin(); it != end; ++it)
|
77
|
-
ret = rb_yield(value(*it));
|
78
|
-
return ret;
|
79
|
-
}
|
80
|
-
RUCY_END
|
81
|
-
|
82
|
-
static
|
83
|
-
RUCY_DEF1(set_selector, selector)
|
84
|
-
{
|
85
|
-
CHECK;
|
86
|
-
THIS->set_selector(to<Reflex::Selector>(selector));
|
87
|
-
}
|
88
|
-
RUCY_END
|
89
|
-
|
90
|
-
static
|
91
|
-
RUCY_DEF0(get_selector)
|
92
|
-
{
|
93
|
-
CHECK;
|
94
|
-
return value(THIS->selector());
|
95
|
-
}
|
96
|
-
RUCY_END
|
97
|
-
|
98
35
|
static
|
99
36
|
RUCY_DEFN(set_flow)
|
100
37
|
{
|
101
38
|
CHECK;
|
102
39
|
check_arg_count(__FILE__, __LINE__, "Style#set_flow", argc, 1, 2);
|
103
40
|
|
104
|
-
|
105
|
-
|
106
|
-
argc >= 2
|
41
|
+
if (argv[0].is_nil())
|
42
|
+
{
|
43
|
+
if (argc >= 2 && !argv[1].is_nil())
|
44
|
+
argument_error(__FILE__, __LINE__);
|
45
|
+
|
46
|
+
THIS->clear_flow();
|
47
|
+
}
|
48
|
+
else
|
49
|
+
{
|
50
|
+
THIS->set_flow(
|
51
|
+
(Reflex::Style::Flow) to<int>(argv[0]),
|
52
|
+
argc >= 2 ? (Reflex::Style::Flow) to<int>(argv[1]) : Reflex::Style::FLOW_NONE);
|
53
|
+
}
|
54
|
+
|
55
|
+
return value(argc, argv);
|
107
56
|
}
|
108
57
|
RUCY_END
|
109
58
|
|
@@ -111,6 +60,7 @@ static
|
|
111
60
|
RUCY_DEF0(get_flow)
|
112
61
|
{
|
113
62
|
CHECK;
|
63
|
+
|
114
64
|
Reflex::Style::Flow main, sub;
|
115
65
|
THIS->get_flow(&main, &sub);
|
116
66
|
return array(main, sub);
|
@@ -121,7 +71,13 @@ static
|
|
121
71
|
RUCY_DEF1(set_width, width)
|
122
72
|
{
|
123
73
|
CHECK;
|
124
|
-
|
74
|
+
|
75
|
+
if (width.is_nil())
|
76
|
+
THIS->clear_width();
|
77
|
+
else
|
78
|
+
THIS->set_width(to<Reflex::StyleLength>(width));
|
79
|
+
|
80
|
+
return width;
|
125
81
|
}
|
126
82
|
RUCY_END
|
127
83
|
|
@@ -137,7 +93,13 @@ static
|
|
137
93
|
RUCY_DEF1(set_height, height)
|
138
94
|
{
|
139
95
|
CHECK;
|
140
|
-
|
96
|
+
|
97
|
+
if (height.is_nil())
|
98
|
+
THIS->clear_height();
|
99
|
+
else
|
100
|
+
THIS->set_height(to<Reflex::StyleLength>(height));
|
101
|
+
|
102
|
+
return height;
|
141
103
|
}
|
142
104
|
RUCY_END
|
143
105
|
|
@@ -155,8 +117,10 @@ RUCY_DEFN(set_size)
|
|
155
117
|
CHECK;
|
156
118
|
check_arg_count(__FILE__, __LINE__, "Style#set_size", argc, 1, 2);
|
157
119
|
|
158
|
-
set_width
|
120
|
+
set_width( self, argv[0]);
|
159
121
|
set_height(self, argc >= 2 ? argv[1] : argv[0]);
|
122
|
+
|
123
|
+
return value(argc, argv);
|
160
124
|
}
|
161
125
|
RUCY_END
|
162
126
|
|
@@ -164,7 +128,9 @@ static
|
|
164
128
|
RUCY_DEF0(get_size)
|
165
129
|
{
|
166
130
|
CHECK;
|
167
|
-
return array(
|
131
|
+
return array(
|
132
|
+
get_width(self),
|
133
|
+
get_height(self));
|
168
134
|
}
|
169
135
|
RUCY_END
|
170
136
|
|
@@ -172,7 +138,13 @@ static
|
|
172
138
|
RUCY_DEF1(set_left, left)
|
173
139
|
{
|
174
140
|
CHECK;
|
175
|
-
|
141
|
+
|
142
|
+
if (left.is_nil())
|
143
|
+
THIS->clear_left();
|
144
|
+
else
|
145
|
+
THIS->set_left(to<Reflex::StyleLength>(left));
|
146
|
+
|
147
|
+
return left;
|
176
148
|
}
|
177
149
|
RUCY_END
|
178
150
|
|
@@ -188,7 +160,13 @@ static
|
|
188
160
|
RUCY_DEF1(set_top, top)
|
189
161
|
{
|
190
162
|
CHECK;
|
191
|
-
|
163
|
+
|
164
|
+
if (top.is_nil())
|
165
|
+
THIS->clear_top();
|
166
|
+
else
|
167
|
+
THIS->set_top(to<Reflex::StyleLength>(top));
|
168
|
+
|
169
|
+
return top;
|
192
170
|
}
|
193
171
|
RUCY_END
|
194
172
|
|
@@ -204,7 +182,13 @@ static
|
|
204
182
|
RUCY_DEF1(set_right, right)
|
205
183
|
{
|
206
184
|
CHECK;
|
207
|
-
|
185
|
+
|
186
|
+
if (right.is_nil())
|
187
|
+
THIS->clear_right();
|
188
|
+
else
|
189
|
+
THIS->set_right(to<Reflex::StyleLength>(right));
|
190
|
+
|
191
|
+
return right;
|
208
192
|
}
|
209
193
|
RUCY_END
|
210
194
|
|
@@ -220,7 +204,13 @@ static
|
|
220
204
|
RUCY_DEF1(set_bottom, bottom)
|
221
205
|
{
|
222
206
|
CHECK;
|
223
|
-
|
207
|
+
|
208
|
+
if (bottom.is_nil())
|
209
|
+
THIS->clear_bottom();
|
210
|
+
else
|
211
|
+
THIS->set_bottom(to<Reflex::StyleLength>(bottom));
|
212
|
+
|
213
|
+
return bottom;
|
224
214
|
}
|
225
215
|
RUCY_END
|
226
216
|
|
@@ -236,10 +226,13 @@ static
|
|
236
226
|
RUCY_DEF4(set_position, left, top, right, bottom)
|
237
227
|
{
|
238
228
|
CHECK;
|
239
|
-
|
240
|
-
|
241
|
-
|
229
|
+
|
230
|
+
set_left( self, left);
|
231
|
+
set_top( self, top);
|
232
|
+
set_right( self, right);
|
242
233
|
set_bottom(self, bottom);
|
234
|
+
|
235
|
+
return array(left, top, right, bottom);
|
243
236
|
}
|
244
237
|
RUCY_END
|
245
238
|
|
@@ -256,295 +249,468 @@ RUCY_DEF0(get_position)
|
|
256
249
|
RUCY_END
|
257
250
|
|
258
251
|
static
|
259
|
-
RUCY_DEF1(
|
252
|
+
RUCY_DEF1(set_margin_left, left)
|
260
253
|
{
|
261
254
|
CHECK;
|
262
|
-
|
255
|
+
|
256
|
+
if (left.is_nil())
|
257
|
+
THIS->clear_margin_left();
|
258
|
+
else
|
259
|
+
THIS->set_margin_left(to<Reflex::StyleLength>(left));
|
260
|
+
|
261
|
+
return left;
|
263
262
|
}
|
264
263
|
RUCY_END
|
265
264
|
|
266
265
|
static
|
267
|
-
RUCY_DEF0(
|
266
|
+
RUCY_DEF0(get_margin_left)
|
268
267
|
{
|
269
268
|
CHECK;
|
270
|
-
return value(THIS->
|
269
|
+
return value(THIS->margin_left());
|
271
270
|
}
|
272
271
|
RUCY_END
|
273
272
|
|
274
273
|
static
|
275
|
-
RUCY_DEF1(
|
274
|
+
RUCY_DEF1(set_margin_top, top)
|
276
275
|
{
|
277
276
|
CHECK;
|
278
|
-
|
277
|
+
|
278
|
+
if (top.is_nil())
|
279
|
+
THIS->clear_margin_top();
|
280
|
+
else
|
281
|
+
THIS->set_margin_top(to<Reflex::StyleLength>(top));
|
282
|
+
|
283
|
+
return top;
|
279
284
|
}
|
280
285
|
RUCY_END
|
281
286
|
|
282
287
|
static
|
283
|
-
RUCY_DEF0(
|
288
|
+
RUCY_DEF0(get_margin_top)
|
284
289
|
{
|
285
290
|
CHECK;
|
286
|
-
return value(THIS->
|
291
|
+
return value(THIS->margin_top());
|
287
292
|
}
|
288
293
|
RUCY_END
|
289
294
|
|
290
295
|
static
|
291
|
-
RUCY_DEF1(
|
296
|
+
RUCY_DEF1(set_margin_right, right)
|
292
297
|
{
|
293
298
|
CHECK;
|
294
|
-
|
299
|
+
|
300
|
+
if (right.is_nil())
|
301
|
+
THIS->clear_margin_right();
|
302
|
+
else
|
303
|
+
THIS->set_margin_right(to<Reflex::StyleLength>(right));
|
304
|
+
|
305
|
+
return right;
|
295
306
|
}
|
296
307
|
RUCY_END
|
297
308
|
|
298
309
|
static
|
299
|
-
RUCY_DEF0(
|
310
|
+
RUCY_DEF0(get_margin_right)
|
300
311
|
{
|
301
312
|
CHECK;
|
302
|
-
return value(THIS->
|
313
|
+
return value(THIS->margin_right());
|
303
314
|
}
|
304
315
|
RUCY_END
|
305
316
|
|
306
317
|
static
|
307
|
-
RUCY_DEF1(
|
318
|
+
RUCY_DEF1(set_margin_bottom, bottom)
|
308
319
|
{
|
309
320
|
CHECK;
|
310
|
-
|
321
|
+
|
322
|
+
if (bottom.is_nil())
|
323
|
+
THIS->clear_margin_bottom();
|
324
|
+
else
|
325
|
+
THIS->set_margin_bottom(to<Reflex::StyleLength>(bottom));
|
326
|
+
|
327
|
+
return bottom;
|
311
328
|
}
|
312
329
|
RUCY_END
|
313
330
|
|
314
331
|
static
|
315
|
-
RUCY_DEF0(
|
332
|
+
RUCY_DEF0(get_margin_bottom)
|
316
333
|
{
|
317
334
|
CHECK;
|
318
|
-
return value(THIS->
|
335
|
+
return value(THIS->margin_bottom());
|
319
336
|
}
|
320
337
|
RUCY_END
|
321
338
|
|
322
339
|
static
|
323
|
-
RUCY_DEF4(
|
340
|
+
RUCY_DEF4(set_margin, left, top, right, bottom)
|
324
341
|
{
|
325
342
|
CHECK;
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
343
|
+
|
344
|
+
set_margin_left( self, left);
|
345
|
+
set_margin_top( self, top);
|
346
|
+
set_margin_right( self, right);
|
347
|
+
set_margin_bottom(self, bottom);
|
348
|
+
|
349
|
+
return array(left, top, right, bottom);
|
330
350
|
}
|
331
351
|
RUCY_END
|
332
352
|
|
333
353
|
static
|
334
|
-
RUCY_DEF0(
|
354
|
+
RUCY_DEF0(get_margin)
|
335
355
|
{
|
336
356
|
CHECK;
|
337
357
|
return array(
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
358
|
+
get_margin_left(self),
|
359
|
+
get_margin_top(self),
|
360
|
+
get_margin_right(self),
|
361
|
+
get_margin_bottom(self));
|
342
362
|
}
|
343
363
|
RUCY_END
|
344
364
|
|
345
365
|
static
|
346
|
-
RUCY_DEF1(
|
366
|
+
RUCY_DEF1(set_padding_left, left)
|
347
367
|
{
|
348
368
|
CHECK;
|
349
|
-
|
369
|
+
|
370
|
+
if (left.is_nil())
|
371
|
+
THIS->clear_padding_left();
|
372
|
+
else
|
373
|
+
THIS->set_padding_left(to<Reflex::StyleLength>(left));
|
374
|
+
|
375
|
+
return left;
|
350
376
|
}
|
351
377
|
RUCY_END
|
352
378
|
|
353
379
|
static
|
354
|
-
RUCY_DEF0(
|
380
|
+
RUCY_DEF0(get_padding_left)
|
355
381
|
{
|
356
382
|
CHECK;
|
357
|
-
return value(THIS->
|
383
|
+
return value(THIS->padding_left());
|
358
384
|
}
|
359
385
|
RUCY_END
|
360
386
|
|
361
387
|
static
|
362
|
-
RUCY_DEF1(
|
388
|
+
RUCY_DEF1(set_padding_top, top)
|
363
389
|
{
|
364
390
|
CHECK;
|
365
|
-
|
391
|
+
|
392
|
+
if (top.is_nil())
|
393
|
+
THIS->clear_padding_top();
|
394
|
+
else
|
395
|
+
THIS->set_padding_top(to<Reflex::StyleLength>(top));
|
396
|
+
|
397
|
+
return top;
|
366
398
|
}
|
367
399
|
RUCY_END
|
368
400
|
|
369
401
|
static
|
370
|
-
RUCY_DEF0(
|
402
|
+
RUCY_DEF0(get_padding_top)
|
371
403
|
{
|
372
404
|
CHECK;
|
373
|
-
return value(THIS->
|
405
|
+
return value(THIS->padding_top());
|
374
406
|
}
|
375
407
|
RUCY_END
|
376
408
|
|
377
409
|
static
|
378
|
-
RUCY_DEF1(
|
410
|
+
RUCY_DEF1(set_padding_right, right)
|
379
411
|
{
|
380
412
|
CHECK;
|
381
|
-
|
413
|
+
|
414
|
+
if (right.is_nil())
|
415
|
+
THIS->clear_padding_right();
|
416
|
+
else
|
417
|
+
THIS->set_padding_right(to<Reflex::StyleLength>(right));
|
418
|
+
|
419
|
+
return right;
|
382
420
|
}
|
383
421
|
RUCY_END
|
384
422
|
|
385
423
|
static
|
386
|
-
RUCY_DEF0(
|
424
|
+
RUCY_DEF0(get_padding_right)
|
387
425
|
{
|
388
426
|
CHECK;
|
389
|
-
return value(THIS->
|
427
|
+
return value(THIS->padding_right());
|
390
428
|
}
|
391
429
|
RUCY_END
|
392
430
|
|
393
431
|
static
|
394
|
-
RUCY_DEF1(
|
432
|
+
RUCY_DEF1(set_padding_bottom, bottom)
|
395
433
|
{
|
396
434
|
CHECK;
|
397
|
-
|
435
|
+
|
436
|
+
if (bottom.is_nil())
|
437
|
+
THIS->clear_padding_bottom();
|
438
|
+
else
|
439
|
+
THIS->set_padding_bottom(to<Reflex::StyleLength>(bottom));
|
440
|
+
|
441
|
+
return bottom;
|
398
442
|
}
|
399
443
|
RUCY_END
|
400
444
|
|
401
445
|
static
|
402
|
-
RUCY_DEF0(
|
446
|
+
RUCY_DEF0(get_padding_bottom)
|
403
447
|
{
|
404
448
|
CHECK;
|
405
|
-
return value(THIS->
|
449
|
+
return value(THIS->padding_bottom());
|
406
450
|
}
|
407
451
|
RUCY_END
|
408
452
|
|
409
453
|
static
|
410
|
-
RUCY_DEF4(
|
454
|
+
RUCY_DEF4(set_padding, left, top, right, bottom)
|
411
455
|
{
|
412
456
|
CHECK;
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
457
|
+
|
458
|
+
set_padding_left( self, left);
|
459
|
+
set_padding_top( self, top);
|
460
|
+
set_padding_right( self, right);
|
461
|
+
set_padding_bottom(self, bottom);
|
462
|
+
|
463
|
+
return array(left, top, right, bottom);
|
417
464
|
}
|
418
465
|
RUCY_END
|
419
466
|
|
420
467
|
static
|
421
|
-
RUCY_DEF0(
|
468
|
+
RUCY_DEF0(get_padding)
|
422
469
|
{
|
423
470
|
CHECK;
|
424
471
|
return array(
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
472
|
+
get_padding_left(self),
|
473
|
+
get_padding_top(self),
|
474
|
+
get_padding_right(self),
|
475
|
+
get_padding_bottom(self));
|
429
476
|
}
|
430
477
|
RUCY_END
|
431
478
|
|
432
479
|
static
|
433
|
-
RUCY_DEF1(
|
480
|
+
RUCY_DEF1(set_center_x, x)
|
434
481
|
{
|
435
482
|
CHECK;
|
436
|
-
|
483
|
+
|
484
|
+
if (x.is_nil())
|
485
|
+
THIS->clear_center_x();
|
486
|
+
else
|
487
|
+
THIS->set_center_x(to<Reflex::StyleLength>(x));
|
488
|
+
|
489
|
+
return x;
|
437
490
|
}
|
438
491
|
RUCY_END
|
439
492
|
|
440
493
|
static
|
441
|
-
RUCY_DEF0(
|
494
|
+
RUCY_DEF0(get_center_x)
|
442
495
|
{
|
443
496
|
CHECK;
|
444
|
-
return value(THIS->
|
497
|
+
return value(THIS->center_x());
|
445
498
|
}
|
446
499
|
RUCY_END
|
447
500
|
|
448
501
|
static
|
449
|
-
RUCY_DEF1(
|
502
|
+
RUCY_DEF1(set_center_y, y)
|
450
503
|
{
|
451
504
|
CHECK;
|
452
|
-
|
505
|
+
|
506
|
+
if (y.is_nil())
|
507
|
+
THIS->clear_center_y();
|
508
|
+
else
|
509
|
+
THIS->set_center_y(to<Reflex::StyleLength>(y));
|
510
|
+
|
511
|
+
return y;
|
453
512
|
}
|
454
513
|
RUCY_END
|
455
514
|
|
456
515
|
static
|
457
|
-
RUCY_DEF0(
|
516
|
+
RUCY_DEF0(get_center_y)
|
458
517
|
{
|
459
518
|
CHECK;
|
460
|
-
return value(THIS->
|
519
|
+
return value(THIS->center_y());
|
461
520
|
}
|
462
521
|
RUCY_END
|
463
522
|
|
464
523
|
static
|
465
|
-
|
524
|
+
RUCY_DEF2(set_center, x, y)
|
466
525
|
{
|
467
526
|
CHECK;
|
468
|
-
|
527
|
+
|
528
|
+
set_center_x(self, x);
|
529
|
+
set_center_y(self, y);
|
530
|
+
|
531
|
+
return array(x, y);
|
469
532
|
}
|
470
533
|
RUCY_END
|
471
534
|
|
472
535
|
static
|
473
|
-
RUCY_DEF0(
|
536
|
+
RUCY_DEF0(get_center)
|
474
537
|
{
|
475
538
|
CHECK;
|
476
|
-
return
|
539
|
+
return array(
|
540
|
+
get_center_x(self),
|
541
|
+
get_center_y(self));
|
477
542
|
}
|
478
543
|
RUCY_END
|
479
544
|
|
480
545
|
static
|
481
|
-
|
546
|
+
RUCY_DEFN(set_foreground_fill)
|
482
547
|
{
|
483
548
|
CHECK;
|
484
|
-
|
549
|
+
check_arg_count(
|
550
|
+
__FILE__, __LINE__, "Style#set_foreground_fill", argc, 1, 2, 3, 4);
|
551
|
+
|
552
|
+
if (argv[0].is_nil())
|
553
|
+
{
|
554
|
+
if (argc != 1)
|
555
|
+
argument_error(__FILE__, __LINE__);
|
556
|
+
|
557
|
+
THIS->clear_foreground_fill();
|
558
|
+
return argv[0];
|
559
|
+
}
|
560
|
+
else
|
561
|
+
{
|
562
|
+
Reflex::Color color = to<Reflex::Color>(argc, argv);
|
563
|
+
THIS->set_foreground_fill(color);
|
564
|
+
return value(color);
|
565
|
+
}
|
485
566
|
}
|
486
567
|
RUCY_END
|
487
568
|
|
488
569
|
static
|
489
|
-
|
570
|
+
RUCY_DEFN(set_foreground_stroke)
|
490
571
|
{
|
491
572
|
CHECK;
|
492
|
-
|
573
|
+
check_arg_count(
|
574
|
+
__FILE__, __LINE__, "Style#set_foreground_stroke", argc, 1, 2, 3, 4);
|
575
|
+
|
576
|
+
if (argv[0].is_nil())
|
577
|
+
{
|
578
|
+
if (argc != 1)
|
579
|
+
argument_error(__FILE__, __LINE__);
|
580
|
+
|
581
|
+
THIS->clear_foreground_stroke();
|
582
|
+
return argv[0];
|
583
|
+
}
|
584
|
+
else
|
585
|
+
{
|
586
|
+
Reflex::Color color = to<Reflex::Color>(argc, argv);
|
587
|
+
THIS->set_foreground_stroke(color);
|
588
|
+
return value(color);
|
589
|
+
}
|
493
590
|
}
|
494
591
|
RUCY_END
|
495
592
|
|
496
593
|
static
|
497
|
-
|
594
|
+
RUCY_DEF1(set_foreground_stroke_width, width)
|
498
595
|
{
|
499
596
|
CHECK;
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
597
|
+
|
598
|
+
if (width.is_nil())
|
599
|
+
THIS->clear_foreground_stroke_width();
|
600
|
+
else
|
601
|
+
THIS->set_foreground_stroke_width(to<coord>(width));
|
602
|
+
|
603
|
+
return width;
|
504
604
|
}
|
505
605
|
RUCY_END
|
506
606
|
|
507
607
|
static
|
508
|
-
|
608
|
+
RUCY_DEFN(set_background_fill)
|
509
609
|
{
|
510
610
|
CHECK;
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
611
|
+
check_arg_count(
|
612
|
+
__FILE__, __LINE__, "Style#set_background_fill", argc, 1, 2, 3, 4);
|
613
|
+
|
614
|
+
if (argv[0].is_nil())
|
615
|
+
{
|
616
|
+
if (argc != 1)
|
617
|
+
argument_error(__FILE__, __LINE__);
|
618
|
+
|
619
|
+
THIS->clear_background_fill();
|
620
|
+
return argv[0];
|
621
|
+
}
|
622
|
+
else
|
623
|
+
{
|
624
|
+
Reflex::Color color = to<Reflex::Color>(argc, argv);
|
625
|
+
THIS->set_background_fill(color);
|
626
|
+
return value(color);
|
627
|
+
}
|
516
628
|
}
|
517
629
|
RUCY_END
|
518
630
|
|
519
631
|
static
|
520
|
-
|
632
|
+
RUCY_DEFN(set_background_stroke)
|
521
633
|
{
|
522
634
|
CHECK;
|
523
|
-
|
635
|
+
check_arg_count(
|
636
|
+
__FILE__, __LINE__, "Style#set_background_stroke", argc, 1, 2, 3, 4);
|
637
|
+
|
638
|
+
if (argv[0].is_nil())
|
639
|
+
{
|
640
|
+
if (argc != 1)
|
641
|
+
argument_error(__FILE__, __LINE__);
|
642
|
+
|
643
|
+
THIS->clear_background_stroke();
|
644
|
+
return argv[0];
|
645
|
+
}
|
646
|
+
else
|
647
|
+
{
|
648
|
+
Reflex::Color color = to<Reflex::Color>(argc, argv);
|
649
|
+
THIS->set_background_stroke(color);
|
650
|
+
return value(color);
|
651
|
+
}
|
524
652
|
}
|
525
653
|
RUCY_END
|
526
654
|
|
527
655
|
static
|
528
|
-
|
656
|
+
RUCY_DEF1(set_background_stroke_width, width)
|
529
657
|
{
|
530
658
|
CHECK;
|
531
|
-
|
659
|
+
|
660
|
+
if (width.is_nil())
|
661
|
+
THIS->clear_background_stroke_width();
|
662
|
+
else
|
663
|
+
THIS->set_background_stroke_width(to<coord>(width));
|
664
|
+
|
665
|
+
return width;
|
532
666
|
}
|
533
667
|
RUCY_END
|
534
668
|
|
535
669
|
static
|
536
|
-
|
670
|
+
RUCY_DEF0(get_foreground_fill)
|
537
671
|
{
|
538
672
|
CHECK;
|
539
|
-
THIS->
|
673
|
+
return value(THIS->foreground_fill());
|
540
674
|
}
|
541
675
|
RUCY_END
|
542
676
|
|
543
677
|
static
|
544
|
-
RUCY_DEF0(
|
678
|
+
RUCY_DEF0(get_foreground_stroke)
|
545
679
|
{
|
546
680
|
CHECK;
|
547
|
-
return value(THIS->
|
681
|
+
return value(THIS->foreground_stroke());
|
682
|
+
}
|
683
|
+
RUCY_END
|
684
|
+
|
685
|
+
static
|
686
|
+
RUCY_DEF0(get_foreground_stroke_width)
|
687
|
+
{
|
688
|
+
CHECK;
|
689
|
+
return value(THIS->foreground_stroke_width());
|
690
|
+
}
|
691
|
+
RUCY_END
|
692
|
+
|
693
|
+
static
|
694
|
+
RUCY_DEF0(get_background_fill)
|
695
|
+
{
|
696
|
+
CHECK;
|
697
|
+
return value(THIS->background_fill());
|
698
|
+
}
|
699
|
+
RUCY_END
|
700
|
+
|
701
|
+
static
|
702
|
+
RUCY_DEF0(get_background_stroke)
|
703
|
+
{
|
704
|
+
CHECK;
|
705
|
+
return value(THIS->background_stroke());
|
706
|
+
}
|
707
|
+
RUCY_END
|
708
|
+
|
709
|
+
static
|
710
|
+
RUCY_DEF0(get_background_stroke_width)
|
711
|
+
{
|
712
|
+
CHECK;
|
713
|
+
return value(THIS->background_stroke_width());
|
548
714
|
}
|
549
715
|
RUCY_END
|
550
716
|
|
@@ -552,7 +718,13 @@ static
|
|
552
718
|
RUCY_DEF1(set_image, image)
|
553
719
|
{
|
554
720
|
CHECK;
|
555
|
-
|
721
|
+
|
722
|
+
if (image.is_nil())
|
723
|
+
THIS->clear_image();
|
724
|
+
else
|
725
|
+
THIS->set_image(to<Reflex::Image&>(image));
|
726
|
+
|
727
|
+
return image;
|
556
728
|
}
|
557
729
|
RUCY_END
|
558
730
|
|
@@ -584,14 +756,6 @@ Init_style ()
|
|
584
756
|
cStyle.define_alloc_func(alloc);
|
585
757
|
cStyle.define_private_method("initialize_copy", initialize_copy);
|
586
758
|
|
587
|
-
cStyle.define_method("name=", set_name);
|
588
|
-
cStyle.define_method("name", get_name);
|
589
|
-
cStyle.define_method("add_tag", add_tag);
|
590
|
-
cStyle.define_method("remove_tag", remove_tag);
|
591
|
-
cStyle.define_method("each_tag", each_tag);
|
592
|
-
cStyle.define_method("selector=", set_selector);
|
593
|
-
cStyle.define_method("selector", get_selector);
|
594
|
-
|
595
759
|
cStyle.define_method("set_flow", set_flow);
|
596
760
|
cStyle.define_method("get_flow", get_flow);
|
597
761
|
|
@@ -613,17 +777,6 @@ Init_style ()
|
|
613
777
|
cStyle.define_method("position=", set_position);
|
614
778
|
cStyle.define_method("position", get_position);
|
615
779
|
|
616
|
-
cStyle.define_method("offset_left=", set_offset_left);
|
617
|
-
cStyle.define_method("offset_left", get_offset_left);
|
618
|
-
cStyle.define_method("offset_top=", set_offset_top);
|
619
|
-
cStyle.define_method("offset_top", get_offset_top);
|
620
|
-
cStyle.define_method("offset_right=", set_offset_right);
|
621
|
-
cStyle.define_method("offset_right", get_offset_right);
|
622
|
-
cStyle.define_method("offset_bottom=", set_offset_bottom);
|
623
|
-
cStyle.define_method("offset_bottom", get_offset_bottom);
|
624
|
-
cStyle.define_method("offset=", set_offset);
|
625
|
-
cStyle.define_method("offset", get_offset);
|
626
|
-
|
627
780
|
cStyle.define_method("margin_left=", set_margin_left);
|
628
781
|
cStyle.define_method("margin_left", get_margin_left);
|
629
782
|
cStyle.define_method("margin_top=", set_margin_top);
|
@@ -646,20 +799,38 @@ Init_style ()
|
|
646
799
|
cStyle.define_method("padding=", set_padding);
|
647
800
|
cStyle.define_method("padding", get_padding);
|
648
801
|
|
649
|
-
cStyle.define_method("
|
650
|
-
cStyle.define_method("
|
651
|
-
cStyle.define_method("
|
652
|
-
cStyle.define_method("
|
802
|
+
cStyle.define_method("center_x=", set_center_x);
|
803
|
+
cStyle.define_method("center_x", get_center_x);
|
804
|
+
cStyle.define_method("center_y=", set_center_y);
|
805
|
+
cStyle.define_method("center_y", get_center_y);
|
806
|
+
cStyle.define_method("center=", set_center);
|
807
|
+
cStyle.define_method("center", get_center);
|
808
|
+
|
809
|
+
cStyle.define_method("foreground_fill=", set_foreground_fill);
|
810
|
+
cStyle.define_method("foreground_fill", get_foreground_fill);
|
811
|
+
cStyle.define_method("foreground_stroke=", set_foreground_stroke);
|
812
|
+
cStyle.define_method("foreground_stroke", get_foreground_stroke);
|
813
|
+
cStyle.define_method("foreground_stroke_width=", set_foreground_stroke_width);
|
814
|
+
cStyle.define_method("foreground_stroke_width", get_foreground_stroke_width);
|
815
|
+
cStyle.define_method("background_fill=", set_background_fill);
|
816
|
+
cStyle.define_method("background_fill", get_background_fill);
|
817
|
+
cStyle.define_method("background_stroke=", set_background_stroke);
|
818
|
+
cStyle.define_method("background_stroke", get_background_stroke);
|
819
|
+
cStyle.define_method("background_stroke_width=", set_background_stroke_width);
|
820
|
+
cStyle.define_method("background_stroke_width", get_background_stroke_width);
|
653
821
|
|
654
822
|
cStyle.define_method("image=", set_image);
|
655
823
|
cStyle.define_method("image", get_image);
|
656
824
|
|
657
825
|
cStyle.define_method("==", equal);
|
826
|
+
|
658
827
|
cStyle.define_const("FLOW_NONE", Reflex::Style::FLOW_NONE);
|
659
828
|
cStyle.define_const("FLOW_DOWN", Reflex::Style::FLOW_DOWN);
|
660
829
|
cStyle.define_const("FLOW_RIGHT", Reflex::Style::FLOW_RIGHT);
|
661
830
|
cStyle.define_const("FLOW_UP", Reflex::Style::FLOW_UP);
|
662
831
|
cStyle.define_const("FLOW_LEFT", Reflex::Style::FLOW_LEFT);
|
832
|
+
|
833
|
+
define_selector_methods<Reflex::Style>(cStyle);
|
663
834
|
}
|
664
835
|
|
665
836
|
|