rabbit 3.0.0 → 3.0.1
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 +4 -4
- data/data/locale/en/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
- data/doc/_config.yml +2 -2
- data/doc/en/faq.rd +4 -2
- data/doc/en/news.rd +91 -0
- data/doc/en/sample/hiki/rabbit.hiki +0 -4
- data/doc/en/sample/rd/rabbit.rd +0 -4
- data/doc/en/usage/rabbit-slide.rd +3 -3
- data/doc/index.html.en +1 -1
- data/doc/ja/faq.rd +2 -0
- data/doc/ja/news.rd +90 -0
- data/doc/ja/sample/hiki/rabbit.hiki +0 -4
- data/doc/ja/sample/rd/rabbit.rd +0 -4
- data/doc/ja/usage/rabbit-slide.rd +3 -3
- data/doc/ja/users.rd +7 -0
- data/lib/rabbit/action/toggle.rb +7 -0
- data/lib/rabbit/author-configuration.rb +3 -4
- data/lib/rabbit/canvas.rb +11 -1
- data/lib/rabbit/command/rabbit-slide.rb +59 -1
- data/lib/rabbit/command/rabbit-slide.ui +127 -49
- data/lib/rabbit/command/rabbit.rb +5 -9
- data/lib/rabbit/element/image.rb +78 -94
- data/lib/rabbit/element/video.rb +3 -11
- data/lib/rabbit/error.rb +2 -2
- data/lib/rabbit/frame.rb +102 -4
- data/lib/rabbit/gem-pusher.rb +28 -6
- data/lib/rabbit/image/base.rb +97 -26
- data/lib/rabbit/image/dia.rb +21 -6
- data/lib/rabbit/image/pdf.rb +1 -4
- data/lib/rabbit/image/svg.rb +1 -4
- data/lib/rabbit/image.rb +3 -4
- data/lib/rabbit/info-window.rb +106 -80
- data/lib/rabbit/keys.rb +6 -0
- data/lib/rabbit/menu.rb +2 -0
- data/lib/rabbit/parser/ext/charty.rb +58 -0
- data/lib/rabbit/parser/ext/image.rb +2 -1
- data/lib/rabbit/parser/rd/ext/block-verbatim.rb +13 -5
- data/lib/rabbit/progress.rb +1 -1
- data/lib/rabbit/properties.rb +141 -0
- data/lib/rabbit/rabbit.rb +3 -1
- data/lib/rabbit/relative-size.rb +28 -0
- data/lib/rabbit/renderer/base.rb +6 -0
- data/lib/rabbit/renderer/display/drawing-area-base.rb +0 -1
- data/lib/rabbit/renderer/display/drawing-area-primitive.rb +1 -0
- data/lib/rabbit/renderer/display/info.rb +6 -1
- data/lib/rabbit/renderer/display/key-handler.rb +27 -2
- data/lib/rabbit/renderer/engine/cairo.rb +24 -3
- data/lib/rabbit/renderer/screen.rb +0 -1
- data/lib/rabbit/slide-configuration.rb +12 -8
- data/lib/rabbit/task/slide.rb +3 -3
- data/lib/rabbit/theme/clear-blue/clear-blue.rb +3 -1
- data/lib/rabbit/theme/edge-info-toolkit/edge-info-toolkit.rb +12 -2
- data/lib/rabbit/theme/image-slide-number/image-slide-number.rb +1 -1
- data/lib/rabbit/theme/slide-footer-info/slide-footer-info.rb +2 -0
- data/lib/rabbit/theme/tag/tag.rb +9 -2
- data/lib/rabbit/theme-configuration.rb +3 -4
- data/lib/rabbit/version.rb +1 -1
- data/lib/rabbit/video-window.rb +14 -3
- data/lib/rabbit/yaml-loader.rb +39 -0
- data/po/en/rabbit.edit.po +82 -64
- data/po/en/rabbit.po +16 -2
- data/po/fr/rabbit.edit.po +81 -63
- data/po/fr/rabbit.po +15 -1
- data/po/ja/rabbit.edit.po +108 -65
- data/po/ja/rabbit.po +19 -3
- data/sample/can_rabbit.rd +0 -24
- data/sample/rabbit-en.hiki +0 -4
- data/sample/rabbit-en.rd +0 -4
- data/sample/rabbit.hiki +0 -4
- data/sample/rabbit.rd +0 -4
- data/test/test-slide-configuration.rb +3 -2
- metadata +27 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ce2e5a227e5b700aab7ed9bf170bd44cdd322e2acf75fdfbd7e846d0a95f5f4
|
4
|
+
data.tar.gz: 73e79afd0c49ecb664fb98594b589521a4bbaf74bcd1b91209335a22e90f5d74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a76046159d4c2dc9bb19703a59222f1c93d993f9c5928b41b57868b15377f2659629a15492058ede5e3dbeeb32592099dcadb39a8b686187fa45e47129f1107
|
7
|
+
data.tar.gz: aee5a1944c8fe477b7a879fae1641fcbfa4f02ea050aab9f82415e1eb194a21a994e33512182a51a36c5a595fb992a335e176e7eddc555812bb090b43139affe
|
Binary file
|
Binary file
|
data/doc/_config.yml
CHANGED
data/doc/en/faq.rd
CHANGED
@@ -39,16 +39,18 @@ Use --allotted-time option.
|
|
39
39
|
|
40
40
|
% rabbit --allotted-time 5m slide.pdf
|
41
41
|
|
42
|
-
The same value format of
|
42
|
+
The same value format of
|
43
43
|
|
44
44
|
# _
|
45
45
|
: allotted-time
|
46
46
|
5m
|
47
47
|
|
48
|
-
on slides are available for that of --allotted-time.
|
48
|
+
on slides are available for that of --allotted-time.
|
49
49
|
|
50
50
|
For this example you set "5m" and the tortoise runs just 5 minutes.
|
51
51
|
|
52
|
+
Note that not all themes support the hare and tortoise feature. For example, the "default" theme supports it but the "lightning-talk" theme doesn't support it.
|
53
|
+
|
52
54
|
== How can I reset tortoise to start?
|
53
55
|
|
54
56
|
Hit Alt+t
|
data/doc/en/news.rd
CHANGED
@@ -3,6 +3,97 @@ layout: en
|
|
3
3
|
title: News
|
4
4
|
---
|
5
5
|
{% raw %}
|
6
|
+
|
7
|
+
== 3.0.1: 2021-09-25
|
8
|
+
|
9
|
+
Ruby 3.0 support release.
|
10
|
+
|
11
|
+
=== Improvements
|
12
|
+
|
13
|
+
==== rabbit
|
14
|
+
|
15
|
+
* Suppressed warnings.
|
16
|
+
[GitHub#132][Patch by kojix2]
|
17
|
+
|
18
|
+
* image: Added support for Ruby 3.0.
|
19
|
+
[GitHub#133][Patch by kojix2]
|
20
|
+
|
21
|
+
* image: Reused downloaded images.
|
22
|
+
|
23
|
+
* image: Removed support for (({normalized_width})) and
|
24
|
+
(({normalized_height})).
|
25
|
+
|
26
|
+
* image: Added support for clipping by (({clip_x})), (({clip_y})),
|
27
|
+
(({clip_width})) and (({clip_height})).
|
28
|
+
|
29
|
+
* info-window: Moved timer position to bottom on note mode.
|
30
|
+
|
31
|
+
* info-window: Added support for (({wait})).
|
32
|
+
|
33
|
+
* Removed duplicated requires.
|
34
|
+
[GitHub#134][Patch by kojix2]
|
35
|
+
|
36
|
+
* Added support for Charty.
|
37
|
+
|
38
|
+
* Added support for embedding terminal.
|
39
|
+
|
40
|
+
* Dropped support for Ustream.
|
41
|
+
|
42
|
+
* Added support for pushing gem with MFA enabled account.
|
43
|
+
[GitHub#141][Patch by Yusuke Nakamura]
|
44
|
+
|
45
|
+
==== rabbit-slide
|
46
|
+
|
47
|
+
* Added support for specifying slide size.
|
48
|
+
|
49
|
+
==== Theme
|
50
|
+
|
51
|
+
* clear-blue: Added support for disabling vertical centering.
|
52
|
+
|
53
|
+
* tag: (({margin-*})): Added support for negative and float values.
|
54
|
+
|
55
|
+
* tag: Added support for wrapping by (({wrap-char})),
|
56
|
+
(({wrap-word})) and (({wrap-word-char})).
|
57
|
+
|
58
|
+
* tag: Added support for justifying by (({justify})) and
|
59
|
+
(({no-justify})).
|
60
|
+
|
61
|
+
* edge-info-toolkit: Added support for center text.
|
62
|
+
|
63
|
+
* slide-footer-info: Added support for center text.
|
64
|
+
|
65
|
+
==== Document
|
66
|
+
|
67
|
+
* Added note about theme and here + tortoise.
|
68
|
+
[GitHub#139][Patch by Asaf Bartov]
|
69
|
+
|
70
|
+
=== Fixes
|
71
|
+
|
72
|
+
==== Theme
|
73
|
+
|
74
|
+
* image-slide-number: Fixed wrong width calculation.
|
75
|
+
[GitHub#130][Patch by HASUMI Hitoshi]
|
76
|
+
|
77
|
+
==== Document
|
78
|
+
|
79
|
+
* Fixed English.
|
80
|
+
[GitHub#128][Patch by Zero King]
|
81
|
+
|
82
|
+
* Fixed typos.
|
83
|
+
[GitHub#140][Patch by Yusuke Nakamura]
|
84
|
+
|
85
|
+
=== Thanks
|
86
|
+
|
87
|
+
* Zero King
|
88
|
+
|
89
|
+
* HASUMI Hitoshi
|
90
|
+
|
91
|
+
* kojix2
|
92
|
+
|
93
|
+
* Asaf Bartov
|
94
|
+
|
95
|
+
* Yusuke Nakamura
|
96
|
+
|
6
97
|
== 3.0.0: 2019-09-06
|
7
98
|
|
8
99
|
GTK+ 3 support release. GTK+ 2 support is dropped.
|
@@ -129,8 +129,6 @@ A presentation tool
|
|
129
129
|
:keep_ratio => true,
|
130
130
|
:width => 100,
|
131
131
|
:height => 100,
|
132
|
-
# :normalized_width => 50,
|
133
|
-
# :normalized_height => 50,
|
134
132
|
# :relative_width => 100,
|
135
133
|
# :relative_height => 50,
|
136
134
|
})}}
|
@@ -177,8 +175,6 @@ Relative image sizes
|
|
177
175
|
{
|
178
176
|
:caption => "USAGI",
|
179
177
|
:keep_ratio => true,
|
180
|
-
# :normalized_width => 50,
|
181
|
-
# :normalized_height => 50,
|
182
178
|
# :relative_width => 100,
|
183
179
|
:relative_height => 80,
|
184
180
|
})}}
|
data/doc/en/sample/rd/rabbit.rd
CHANGED
@@ -133,8 +133,6 @@ title: "Sample slide: Rabbit"
|
|
133
133
|
# keep_ratio = true
|
134
134
|
# width = 100
|
135
135
|
# height = 100
|
136
|
-
# # normalized_width = 50
|
137
|
-
# # normalized_height = 50
|
138
136
|
# # relative_width = 100
|
139
137
|
# # relative_height = 50
|
140
138
|
|
@@ -185,8 +183,6 @@ title: "Sample slide: Rabbit"
|
|
185
183
|
# src = usagi.png
|
186
184
|
# caption = USAGI
|
187
185
|
# keep_ratio = true
|
188
|
-
# # normalized_width = 50
|
189
|
-
# # normalized_height = 50
|
190
186
|
# # relative_width = 100
|
191
187
|
# relative_height = 80
|
192
188
|
|
@@ -201,12 +201,12 @@ For example, here is a theme-benchmark-en case:
|
|
201
201
|
elements. So it's useful for confirming your theme.
|
202
202
|
|
203
203
|
You can publish your slide to both RubyGems.org and SlideShare by
|
204
|
-
((%
|
204
|
+
((%rake publish%)). The following documentation describes to publish
|
205
205
|
your slide separately.
|
206
206
|
|
207
207
|
=== Publication for RubyGems.org
|
208
208
|
|
209
|
-
You can publish your slide to RubyGems.org by ((%
|
209
|
+
You can publish your slide to RubyGems.org by ((%rake
|
210
210
|
publish:rubygems%)):
|
211
211
|
|
212
212
|
% rake publish:rubygems
|
@@ -231,7 +231,7 @@ RubyGems.org.
|
|
231
231
|
|
232
232
|
=== Publication for SlideShare
|
233
233
|
|
234
|
-
You can publish your slide to SlideShare by ((%
|
234
|
+
You can publish your slide to SlideShare by ((%rake publish:slideshare%)).
|
235
235
|
|
236
236
|
% rake publish:slideshare
|
237
237
|
|
data/doc/index.html.en
CHANGED
@@ -5,7 +5,7 @@ lang_suffix: true
|
|
5
5
|
no_sidebar: true
|
6
6
|
---
|
7
7
|
<div class="latest-release">
|
8
|
-
<p><a href="/en/news.html">{{ site.version }}</a> is the latest release. It
|
8
|
+
<p><a href="/en/news.html">{{ site.version }}</a> is the latest release. It was released on {{ site.release_date }}.</p>
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<section id="screenshots">
|
data/doc/ja/faq.rd
CHANGED
data/doc/ja/news.rd
CHANGED
@@ -4,6 +4,96 @@ title: お知らせ
|
|
4
4
|
apply_data: false
|
5
5
|
---
|
6
6
|
{% raw %}
|
7
|
+
|
8
|
+
== 3.0.1: 2021-09-25
|
9
|
+
|
10
|
+
Ruby 3.0をサポートしたリリース。
|
11
|
+
|
12
|
+
=== 改良
|
13
|
+
|
14
|
+
==== rabbit
|
15
|
+
|
16
|
+
* 警告を除去。
|
17
|
+
[GitHub#132][kojix2さんがパッチ提供]
|
18
|
+
|
19
|
+
* image: Ruby 3.0をサポート。
|
20
|
+
[GitHub#133][kojix2さんがパッチを提供]
|
21
|
+
|
22
|
+
* image: ダウンロードした画像を再利用するようにしました。
|
23
|
+
|
24
|
+
* image: (({normalized_width}))と(({normalized_height}))のサポートを
|
25
|
+
削除。
|
26
|
+
|
27
|
+
* image: (({clip_x}))と(({clip_y}))と(({clip_width}))と(({clip_height}))で
|
28
|
+
クリップをサポート。
|
29
|
+
|
30
|
+
* info-window: ノートモードではタイマーの位置を下部に移動。
|
31
|
+
|
32
|
+
* info-window: (({wait}))をサポート。
|
33
|
+
|
34
|
+
* 重複した(({require}))を削除。
|
35
|
+
[GitHub#134][kojix2さんがパッチを提供]
|
36
|
+
|
37
|
+
* Chartyをサポート。
|
38
|
+
|
39
|
+
* 埋め込みターミナルをサポート。
|
40
|
+
|
41
|
+
* Ustreamサポートを削除。
|
42
|
+
|
43
|
+
* MFAが有効になったアカウントでのgemのpushをサポート。
|
44
|
+
[GitHub#141][Yusuke Nakamuraさんが報告]
|
45
|
+
|
46
|
+
==== rabbit-slide
|
47
|
+
|
48
|
+
* スライドサイズの指定をサポート。
|
49
|
+
|
50
|
+
==== テーマ
|
51
|
+
|
52
|
+
* clear-blue: 縦方向のセンタリングの無効化をサポート。
|
53
|
+
|
54
|
+
* tag: (({margin-*})): 負の値と浮動小数点数をサポート。
|
55
|
+
|
56
|
+
* tag: (({wrap-char}))と(({wrap-word}))と(({wrap-word-char}))で折り返し
|
57
|
+
をサポート。
|
58
|
+
|
59
|
+
* tag: (({justify}))と(({no-justify}))で両端揃えをサポート。
|
60
|
+
|
61
|
+
* edge-info-toolkit: テキストのセンタリングをサポート。
|
62
|
+
|
63
|
+
* slide-footer-info: テキストのセンタリングをサポート。
|
64
|
+
|
65
|
+
==== ドキュメント
|
66
|
+
|
67
|
+
* うさぎとかめとテーマに関する注意書きを追加。
|
68
|
+
[GitHub#139][Asaf Bartovさんがパッチを提供]
|
69
|
+
|
70
|
+
=== 修正
|
71
|
+
|
72
|
+
==== テーマ
|
73
|
+
|
74
|
+
* image-slide-number: 幅の計算方法を修正。
|
75
|
+
[GitHub#130][HASUMI Hitoshiさんがパッチを提供]
|
76
|
+
|
77
|
+
==== ドキュメント
|
78
|
+
|
79
|
+
* 英語を修正。
|
80
|
+
[GitHub#128][Zero Kingさんがパッチを提供]
|
81
|
+
|
82
|
+
* typoを修正。
|
83
|
+
[GitHub#140][Yusuke Nakamuraさんがパッチを提供]
|
84
|
+
|
85
|
+
=== 感謝
|
86
|
+
|
87
|
+
* Zero Kingさん
|
88
|
+
|
89
|
+
* HASUMI Hitoshiさん
|
90
|
+
|
91
|
+
* kojix2さん
|
92
|
+
|
93
|
+
* Asaf Bartovさん
|
94
|
+
|
95
|
+
* Yusuke Nakamuraさん
|
96
|
+
|
7
97
|
== 3.0.0: 2019-09-06
|
8
98
|
|
9
99
|
GTK+ 3をサポートしたリリース。GTK+ 2のサポートは終了。
|
@@ -130,8 +130,6 @@ title: "サンプルスライド: Rabbit"
|
|
130
130
|
:caption => "Lavie",
|
131
131
|
:width => 100,
|
132
132
|
:height => 100,
|
133
|
-
# :normalized_width => 50,
|
134
|
-
# :normalized_height => 50,
|
135
133
|
# :relative_width => 100,
|
136
134
|
# :relative_height => 50,
|
137
135
|
})}}
|
@@ -177,8 +175,6 @@ title: "サンプルスライド: Rabbit"
|
|
177
175
|
{{image("usagi.png",
|
178
176
|
{
|
179
177
|
:caption => "兎",
|
180
|
-
# :normalized_width => 50,
|
181
|
-
# :normalized_height => 50,
|
182
178
|
# :relative_width => 100,
|
183
179
|
:relative_height => 50,
|
184
180
|
})}}
|
data/doc/ja/sample/rd/rabbit.rd
CHANGED
@@ -133,8 +133,6 @@ title: "サンプルスライド: Rabbit"
|
|
133
133
|
# caption = Lavie
|
134
134
|
# width = 100
|
135
135
|
# height = 100
|
136
|
-
# # normalized_width = 50
|
137
|
-
# # normalized_height = 50
|
138
136
|
# # relative_width = 100
|
139
137
|
# # relative_height = 50
|
140
138
|
|
@@ -184,8 +182,6 @@ title: "サンプルスライド: Rabbit"
|
|
184
182
|
# image
|
185
183
|
# src = usagi.png
|
186
184
|
# caption = 兎
|
187
|
-
# # normalized_width = 50
|
188
|
-
# # normalized_height = 50
|
189
185
|
# # relative_width = 100
|
190
186
|
# relative_height = 80
|
191
187
|
|
@@ -185,12 +185,12 @@ APIがなかったので諦めました。
|
|
185
185
|
Rabbitのテーマを確認するためのスライドです。スライドで使われる要素がた
|
186
186
|
くさん入っているためテーマの確認に便利です。
|
187
187
|
|
188
|
-
準備ができたら((%
|
188
|
+
準備ができたら((%rake publish%))でRubyGems.orgとSlideShareにまとめて
|
189
189
|
公開できます。別々に公開する方法は以下の通りです。
|
190
190
|
|
191
191
|
=== RubyGems.orgへ公開
|
192
192
|
|
193
|
-
((%
|
193
|
+
((%rake publish:rubygems%))でRubyGems.orgに公開できます。
|
194
194
|
|
195
195
|
% rake publish:rubygems
|
196
196
|
|
@@ -213,7 +213,7 @@ Rabbit Slide ShowはRubyGems.orgに公開されているスライドを自動で
|
|
213
213
|
|
214
214
|
=== SlideShareへ公開
|
215
215
|
|
216
|
-
((%
|
216
|
+
((%rake publish:slideshare%))でSlideShareに公開できます。
|
217
217
|
|
218
218
|
% rake publish:slideshare
|
219
219
|
|
data/doc/ja/users.rd
CHANGED
@@ -186,4 +186,11 @@ Rabbitショッカーのためにshocker-jaというメーリングリストが
|
|
186
186
|
* ((<効率的なビットマップマーキングを用いたRuby用ごみ集め実装|URL:http://www.narihiro.info/resource/presen/Ruby%20Garbage%20Collection%20Using%20Efficient%20Bitmap%20Marking.pdf>))
|
187
187
|
* うえださん
|
188
188
|
* ((<エンジニアでありたい人の日記|URL:http://d.hatena.ne.jp/hiro-ueda/>))
|
189
|
+
|
190
|
+
# 2019年
|
191
|
+
|
192
|
+
* yoku0825さん
|
193
|
+
* ((<日々の覚書|URL:https://yoku0825.blogspot.com/>))
|
194
|
+
* ((<Shooting a trouble of MySQL|URL:https://speakerdeck.com/yoku0825/shooting-a-trouble-of-mysql>))
|
195
|
+
* 他にもたくさん
|
189
196
|
* ...
|
data/lib/rabbit/action/toggle.rb
CHANGED
@@ -71,5 +71,12 @@ module Rabbit
|
|
71
71
|
def act_toggle_magnifier_config(config, canvas)
|
72
72
|
config[:label] = N_("Magnifier")
|
73
73
|
end
|
74
|
+
|
75
|
+
def act_toggle_terminal(action, group, canvas)
|
76
|
+
canvas.toggle_terminal
|
77
|
+
end
|
78
|
+
def act_toggle_terminal_config(config, canvas)
|
79
|
+
config[:label] = N_("Terminal")
|
80
|
+
end
|
74
81
|
end
|
75
82
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012 Kouhei
|
1
|
+
# Copyright (C) 2012-2021 Sutou Kouhei <kou@cozmixng.org>
|
2
2
|
#
|
3
3
|
# This program is free software; you can redistribute it and/or modify
|
4
4
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,11 +14,10 @@
|
|
14
14
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
15
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
16
|
|
17
|
-
require "yaml"
|
18
|
-
|
19
17
|
require "rabbit/gettext"
|
20
18
|
require "rabbit/logger"
|
21
19
|
require "rabbit/path-manipulatable"
|
20
|
+
require "rabbit/yaml-loader"
|
22
21
|
|
23
22
|
module Rabbit
|
24
23
|
class AuthorConfiguration
|
@@ -35,7 +34,7 @@ module Rabbit
|
|
35
34
|
|
36
35
|
def load
|
37
36
|
return unless File.exist?(path)
|
38
|
-
conf =
|
37
|
+
conf = YAMLLoader.load(File.read(path))
|
39
38
|
clear
|
40
39
|
merge!(conf)
|
41
40
|
rescue
|
data/lib/rabbit/canvas.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2004-
|
1
|
+
# Copyright (C) 2004-2021 Sutou Kouhei <kou@cozmixng.org>
|
2
2
|
#
|
3
3
|
# This program is free software; you can redistribute it and/or modify
|
4
4
|
# it under the terms of the GNU General Public License as published by
|
@@ -43,6 +43,8 @@ module Rabbit
|
|
43
43
|
def_delegators(:@frame, :iconify, :window)
|
44
44
|
def_delegators(:@frame, :fullscreen_available?)
|
45
45
|
def_delegators(:@frame, :iconify_available?)
|
46
|
+
def_delegators(:@frame, :toggle_terminal)
|
47
|
+
def_delegators(:@frame, :in_terminal?)
|
46
48
|
|
47
49
|
def_delegators(:@renderer, :width, :height)
|
48
50
|
# Deprecated. Use #base_width= instead.
|
@@ -436,6 +438,14 @@ module Rabbit
|
|
436
438
|
@renderer.post_iconify
|
437
439
|
end
|
438
440
|
|
441
|
+
def pre_terminal
|
442
|
+
@renderer.pre_terminal
|
443
|
+
end
|
444
|
+
|
445
|
+
def post_terminal
|
446
|
+
@renderer.post_terminal
|
447
|
+
end
|
448
|
+
|
439
449
|
def saved_image_base_name
|
440
450
|
if @saved_image_base_name
|
441
451
|
base_name = @saved_image_base_name.encode("UTF-8")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2021 Sutou Kouhei <kou@cozmixng.org>
|
2
2
|
#
|
3
3
|
# This program is free software; you can redistribute it and/or modify
|
4
4
|
# it under the terms of the GNU General Public License as published by
|
@@ -106,6 +106,8 @@ module Rabbit
|
|
106
106
|
" --id rubykaigi2012 \\\n" \
|
107
107
|
" --base-name rabbit-introduction \\\n" \
|
108
108
|
" --markup-language rd \\\n" \
|
109
|
+
" --width 800 \\\n" \
|
110
|
+
" --height 450 \\\n" \
|
109
111
|
" --name \"Kouhei Sutou\" \\\n" \
|
110
112
|
" --email kou@cozmixng.org \\\n" \
|
111
113
|
" --rubygems-user kou \\\n" \
|
@@ -218,6 +220,22 @@ module Rabbit
|
|
218
220
|
@data.slide_conf.presentation_end_time = time
|
219
221
|
end
|
220
222
|
|
223
|
+
width_example = "--width=800"
|
224
|
+
parser.on("--width=WIDTH", Integer,
|
225
|
+
_("The default slide width"),
|
226
|
+
_("(e.g.: %s)") % width_example,
|
227
|
+
_("(optional)")) do |width|
|
228
|
+
@data.slide_conf.width = width
|
229
|
+
end
|
230
|
+
|
231
|
+
height_example = "--width=450"
|
232
|
+
parser.on("--height=HEIGHT", Integer,
|
233
|
+
_("The default slide height"),
|
234
|
+
_("(e.g.: %s)") % height_example,
|
235
|
+
_("(optional)")) do |height|
|
236
|
+
@data.slide_conf.height = height
|
237
|
+
end
|
238
|
+
|
221
239
|
parser.separator(_("Your information"))
|
222
240
|
|
223
241
|
messages = [
|
@@ -324,6 +342,20 @@ module Rabbit
|
|
324
342
|
end
|
325
343
|
end
|
326
344
|
|
345
|
+
class IntegerMapper
|
346
|
+
def initialize(data)
|
347
|
+
@data = data
|
348
|
+
end
|
349
|
+
|
350
|
+
def attach(entry)
|
351
|
+
entry.value = value if value
|
352
|
+
end
|
353
|
+
|
354
|
+
def apply(entry)
|
355
|
+
apply_value(entry.value_as_int)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
327
359
|
class SlideIDMapper < TextMapper
|
328
360
|
private
|
329
361
|
def valid?(value)
|
@@ -374,11 +406,35 @@ module Rabbit
|
|
374
406
|
end
|
375
407
|
end
|
376
408
|
|
409
|
+
class SlideWidthMapper < IntegerMapper
|
410
|
+
private
|
411
|
+
def value
|
412
|
+
@data.slide_conf.width
|
413
|
+
end
|
414
|
+
|
415
|
+
def apply_value(value)
|
416
|
+
@data.slide_conf.width = value
|
417
|
+
end
|
418
|
+
end
|
419
|
+
|
420
|
+
class SlideHeightMapper < IntegerMapper
|
421
|
+
private
|
422
|
+
def value
|
423
|
+
@data.slide_conf.height
|
424
|
+
end
|
425
|
+
|
426
|
+
def apply_value(value)
|
427
|
+
@data.slide_conf.height = value
|
428
|
+
end
|
429
|
+
end
|
430
|
+
|
377
431
|
def build_gui_mappers
|
378
432
|
{
|
379
433
|
"slide-id" => SlideIDMapper.new(@data),
|
380
434
|
"slide-base-name" => SlideBaseNameMapper.new(@data),
|
381
435
|
"slide-markup-language" => SlideMarkupLanguageMapper.new(@data),
|
436
|
+
"slide-width" => SlideWidthMapper.new(@data),
|
437
|
+
"slide-height" => SlideHeightMapper.new(@data),
|
382
438
|
}
|
383
439
|
end
|
384
440
|
|
@@ -484,6 +540,8 @@ EOD
|
|
484
540
|
def generate_dot_rabbit
|
485
541
|
create_file(".rabbit") do |dot_rabbit|
|
486
542
|
options = []
|
543
|
+
size = [@data.slide_conf.width, @data.slide_conf.height].join(",")
|
544
|
+
options << "--size #{size}"
|
487
545
|
if @data.author_conf.markup_language.nil? and @data.allotted_time
|
488
546
|
options << "--allotted-time #{@data.allotted_time}"
|
489
547
|
end
|