Haxe bindings for koreader
リビジョン | ed6745a432bae3b8b7c153be28a8ca6dc6165136 (tree) |
---|---|
日時 | 2022-03-06 00:12:20 |
作者 | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fast...> |
コミッター | Jaime Marquínez Ferrándiz |
Add Size class
@@ -5,6 +5,7 @@ | ||
5 | 5 | import koreader.hxutils.Plugin; |
6 | 6 | import koreader.ffi.Blitbuffer; |
7 | 7 | import koreader.ui.UIManager; |
8 | +import koreader.ui.Size; | |
8 | 9 | import koreader.ui.widget.Button; |
9 | 10 | import koreader.ui.widget.ButtonDialog; |
10 | 11 | import koreader.ui.widget.ButtonDialogTitle; |
@@ -38,6 +39,9 @@ | ||
38 | 39 | FrameContainer.create({ |
39 | 40 | widgets: [widget,], |
40 | 41 | background: Blitbuffer.COLOR_LIGHT_GRAY, |
42 | + bordersize: Size.border.window, | |
43 | + radius: Size.radius.window, | |
44 | + padding: Size.padding.button, | |
41 | 45 | }), |
42 | 46 | ], |
43 | 47 | }), |
@@ -0,0 +1,72 @@ | ||
1 | +package koreader.ui; | |
2 | + | |
3 | +@:luaRequire("ui/size") | |
4 | +extern class Size { | |
5 | + static var border : Border; | |
6 | + static var margin : Margin; | |
7 | + static var padding : Padding; | |
8 | + static var radius : Radius; | |
9 | + static var line : Line; | |
10 | + static var item : Item; | |
11 | + static var span : Span; | |
12 | +} | |
13 | + | |
14 | + | |
15 | +extern class Border { | |
16 | + @:native("default") | |
17 | + var default_ : Int; | |
18 | + var thin : Int; | |
19 | + var button : Int; | |
20 | + var window : Int; | |
21 | + var thick : Int; | |
22 | + var inputtext : Int; | |
23 | +} | |
24 | + | |
25 | +extern class Margin { | |
26 | + @:native("default") | |
27 | + var default_ : Int; | |
28 | + var tiny : Int; | |
29 | + var small : Int; | |
30 | + var title : Int; | |
31 | + var fine_tune : Int; | |
32 | + var fullscreen_popout : Int; | |
33 | + var button : Int; | |
34 | +} | |
35 | + | |
36 | +extern class Padding { | |
37 | + @:native("default") | |
38 | + var default_ : Int; | |
39 | + var tiny : Int; | |
40 | + var small : Int; | |
41 | + var large : Int; | |
42 | + var button : Int; | |
43 | + var buttontable : Int; | |
44 | + var fullscreen : Int; | |
45 | +} | |
46 | + | |
47 | +extern class Radius { | |
48 | + @:native("default") | |
49 | + var default_ : Int; | |
50 | + var window : Int; | |
51 | + var button : Int; | |
52 | +} | |
53 | + | |
54 | +extern class Line { | |
55 | + var thin : Int; | |
56 | + var medium : Int; | |
57 | + var thick : Int; | |
58 | + var progress : Int; | |
59 | +} | |
60 | + | |
61 | +extern class Item { | |
62 | + var height_default : Int; | |
63 | + var height_big : Int; | |
64 | + var height_large : Int; | |
65 | +} | |
66 | + | |
67 | +extern class Span { | |
68 | + var horizontal_default : Int; | |
69 | + var horizontal_small : Int; | |
70 | + var vertical_default : Int; | |
71 | + var vertical_large : Int; | |
72 | +} | |
\ No newline at end of file |
@@ -20,4 +20,8 @@ | ||
20 | 20 | typedef FrameContainerParams = { |
21 | 21 | > WidgetContainerParams, |
22 | 22 | ?background : Color8, |
23 | + ?margin : Int, | |
24 | + ?radius : Int, | |
25 | + ?bordersize : Int, | |
26 | + ?padding : Int, | |
23 | 27 | } |
\ No newline at end of file |