rubydx 0.0.1alpha.2 → 0.0.1alpha.3

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmFiNDZhZmM1Yzg3ZTIyYjRlN2RjYWE3YzM5YWExY2Q0OWY5Yzg3NQ==
4
+ ZTMxMmIzMDIxOTQxOWJlOGY5ZGZlOGRjM2YwNTgyOGVkNTUyYzhmMQ==
5
5
  data.tar.gz: !binary |-
6
- YzQ5YWNhMzg5MWYzMGMwNjhjZDEyZGQ5Mjk1NWY4MGZjMTZlYWIyZQ==
6
+ OWNmOTZkNGQ0ZmRlMmI2YWE1MmIwMzc2YmJkZjdhMzMxZjcyNzYzNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODI5ZjI1MjIxNTg4N2Q1Y2NmOWE3NjQ3N2FlYzJhYmI1ZWUwM2ZkMjhiYmFl
10
- OGExYTM0OWUzOWZiZWUzYTdmYjYwMWRlOTRjZTRiN2FmMmFhMDkzMDFjNDRl
11
- ZDcwY2ViNmFjNjJiMGFkN2Q1N2NjZjc5MDUxMDVkOGE3NDE4NGU=
9
+ YTkwODI5OWNlOTZiNTljM2ZhNmI2MTgyZTY4YjRmNjI4MGM0MGVjY2FmMzY3
10
+ ZTYyYzc3M2IzNGFlNTI4NTgxMGMwMjZhZjU2OTM4OTkyNzA2MTUxNWM2YTMw
11
+ YWEzODA1ZDA4ZDg2NjdlZWQ3OGI0OTYzMWFlZGM5NmU4MzUxNzk=
12
12
  data.tar.gz: !binary |-
13
- NTQ0ZjJiMDQzZDBkM2FhNmRhYjAyMGVmZjBjYmYyMWIxZjI4NDc5ZjkzMDY2
14
- YTA2YmMyNjM0ODIxMzgwNTE0MTMxMTQ2MWFiODI1Mjg0MGM4MmRjYzhkNzU2
15
- YmZiN2Y3NzEwYWNhMWVjYzAxYWQxN2VjNjY2MDA3NWU2Zjg3NGI=
13
+ MzRkNzYxOWU5OGEwZjk4OThlMWRhZTY4MzM1ODZjZjA0NWU2ODMyMTI4OWI0
14
+ YmM0NWYwMDllYzZjYTIzMzE2YmU1NGRhZDRhNjM2MjUyOWQyNDAzMTIyMWUx
15
+ ZWJkZDE5MzkzYmQ2YzFkMTc5ZjFmYzZlODUwODkwYmQ4ZDY2NDA=
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
@@ -1,3 +1,3 @@
1
1
  module Rubydx
2
- VERSION = "0.0.1alpha.2"
2
+ VERSION = "0.0.1alpha.3"
3
3
  end
@@ -42,6 +42,11 @@ module Rubydx
42
42
  # - +:icon_exclamation+: or +:icon_warning+: or +:exclamation+: or +:warning+: are <b>Warning</b> <tt>(i)</tt>(Yellow color) Icon type.
43
43
  # - +:icon_hand+: or +:icon_stop+: or +:icon_error+: or +:hand+: or +:stop+: or +:error+: are <b>Error</b> <tt>(X)</tt>(Red color) Icon type.
44
44
  #
45
+ # More Options
46
+ #
47
+ # - +:right_align+: Text for Right alignment.
48
+ # - +:top_most+: Dialog always top.
49
+ #
45
50
  # [Returned Value]
46
51
  # For selected Button to Symbol. Are any of
47
52
  # +:ok+, +:cancel+, +:abort+, +:retry+, +:ignore+, +:yes+, +:no+, +:try_again+, +:continue+.
@@ -64,6 +69,10 @@ module Rubydx
64
69
  def options_to_value(options)
65
70
  value = buttons_value(options)
66
71
  value |= icon_value(options)
72
+ value |= default_button_value(options)
73
+
74
+ value |= 0x80000 if (options.include? :right_align)
75
+ value |= 0x40000 if (options.include? :top_most)
67
76
  value
68
77
  end
69
78
 
@@ -85,6 +94,17 @@ module Rubydx
85
94
  (styles.include? :error) ||
86
95
  (styles.include? :icon_hand) ||
87
96
  (styles.include? :hand)
97
+ 0
98
+ end
99
+
100
+ def default_button_value(styles)
101
+ return 0x100 if (styles.include? :second_button_default) ||
102
+ (styles.include? :defbutton2)
103
+ return 0x200 if (styles.include? :third_button_default) ||
104
+ (styles.include? :defbutton3)
105
+ return 0x300 if (styles.include? :fourth_button_default) ||
106
+ (styles.include? :defbutton4)
107
+ 0
88
108
  end
89
109
 
90
110
  def buttons_value(styles)
@@ -1,14 +1,24 @@
1
1
  require 'rubydx'
2
2
 
3
3
  describe Rubydx::WindowsApi::MessageBox do
4
- subject do
4
+ context "Non Option, Message Only (Not caption)" do
5
+ subject do
6
+ Rubydx::WindowsApi.message_box(
7
+ "This is Test Message!!"
8
+ )
9
+ end
10
+ it { should eq :ok }
11
+ end
5
12
 
6
- Rubydx::WindowsApi.message_box(
7
- "This dialog shown expected?",
8
- "RSpec",
9
- nil,
10
- [:yes, :no, :cancel, :icon_question]
11
- )
13
+ context "Caption and options" do
14
+ subject do
15
+ Rubydx::WindowsApi.message_box(
16
+ "This dialog shown expected?",
17
+ "RSpec",
18
+ nil,
19
+ [:yes, :no, :cancel, :icon_question]
20
+ )
21
+ end
22
+ it { should eq :yes }
12
23
  end
13
- it { should eq :yes }
14
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1alpha.2
4
+ version: 0.0.1alpha.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - myun2
@@ -58,8 +58,8 @@ executables: []
58
58
  extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
+ - .gitignore
61
62
  - Gemfile
62
- - Gemfile.lock
63
63
  - README.md
64
64
  - Rakefile
65
65
  - cpp/Makefile
data/Gemfile.lock DELETED
@@ -1,27 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rubydx (0.0.1alpha.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.2.5)
10
- rake (10.0.4)
11
- rspec (2.14.1)
12
- rspec-core (~> 2.14.0)
13
- rspec-expectations (~> 2.14.0)
14
- rspec-mocks (~> 2.14.0)
15
- rspec-core (2.14.8)
16
- rspec-expectations (2.14.5)
17
- diff-lcs (>= 1.1.3, < 2.0)
18
- rspec-mocks (2.14.6)
19
-
20
- PLATFORMS
21
- x86-mingw32
22
-
23
- DEPENDENCIES
24
- bundler (~> 1.3)
25
- rake
26
- rspec
27
- rubydx!