Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add WX::info_message_box that shows wx owns info box

  • Loading branch information...
commit f26c2712d9483bef94a1d532bbe3c237d6b857d5 1 parent 89324e5
@Hanmac authored
Showing with 18 additions and 0 deletions.
  1. +10 −0 ext/wxMessageDialogBase.cpp
  2. +8 −0 samples/dialog/dialog_sample.rb
View
10 ext/wxMessageDialogBase.cpp
@@ -79,6 +79,15 @@ VALUE _MessageBox(int argc,VALUE *argv,VALUE self)
return unwrapID(wxMessageBox(unwrap<wxString>(message),wxMessageBoxCaptionStr,wxOK | wxCENTRE,unwrap<wxWindow*>(parent)));
}
+VALUE _InfoMessageBox(int argc,VALUE *argv,VALUE self)
+{
+ VALUE parent;
+ rb_scan_args(argc, argv, "01",&parent);
+
+ wxInfoMessageBox(unwrap<wxWindow*>(parent));
+ return Qnil;
+}
+
}
}
#endif
@@ -100,6 +109,7 @@ void Init_WXMessageDialogBase(VALUE rb_mWX)
rb_define_module_function(rb_mWX,"message_box",RUBY_METHOD_FUNC(_MessageBox),-1);
+ rb_define_module_function(rb_mWX,"info_message_box",RUBY_METHOD_FUNC(_InfoMessageBox),-1);
registerType<wxMessageDialogBase>(rb_cWXMessageDialogBase);
#endif
View
8 samples/dialog/dialog_sample.rb
@@ -32,6 +32,14 @@ def on_init
info.append_normal(:info_adv_generic,"&Advanced info bar (generic)") {
@info_adv_generic.show_message("Sorry, it didn't work out.",:warning)
}
+
+ info.append_separator
+
+ info.append_normal(:wx_info,"&wxWidgets information\tCtrl-W") {
+ WX::info_message_box(@frame)
+ }
+
+
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.