wxruby3 0.9.0.pre.rc.1-x64-mingw-ucrt → 0.9.0.pre.rc.2-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/INSTALL.md +51 -22
- data/README.md +38 -6
- data/assets/hello_button-macos.png +0 -0
- data/assets/hello_button-msw.png +0 -0
- data/assets/hello_button_clicked-macos.png +0 -0
- data/assets/hello_button_clicked-msw.png +0 -0
- data/assets/hello_button_clicked_combi.png +0 -0
- data/assets/hello_world-macos.png +0 -0
- data/assets/hello_world-msw.png +0 -0
- data/assets/hello_world_combi.png +0 -0
- data/ext/wxbase32u_gcc_custom.dll +0 -0
- data/ext/wxbase32u_net_gcc_custom.dll +0 -0
- data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
- data/lib/wx/core/brush.rb +6 -0
- data/lib/wx/core/events/evt_list.rb +7 -0
- data/lib/wx/core/evthandler.rb +12 -2
- data/lib/wx/core/font.rb +22 -14
- data/lib/wx/core/helpprovider.rb +2 -2
- data/lib/wx/core/menu.rb +5 -0
- data/lib/wx/core/pen.rb +6 -0
- data/lib/wx/core/window.rb +28 -1
- data/lib/wx/doc/app.rb +40 -0
- data/lib/wx/doc/brush.rb +17 -0
- data/lib/wx/doc/font.rb +27 -0
- data/lib/wx/doc/gen/activity_indicator.rb +65 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
- data/lib/wx/doc/gen/context_help_button.rb +48 -0
- data/lib/wx/doc/gen/core.rb +2 -2
- data/lib/wx/doc/gen/event_blocker.rb +18 -16
- data/lib/wx/doc/gen/event_filter.rb +38 -45
- data/lib/wx/doc/gen/event_list.rb +7 -0
- data/lib/wx/doc/gen/file_dialog.rb +48 -49
- data/lib/wx/doc/gen/font.rb +9 -0
- data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
- data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
- data/lib/wx/doc/gen/menu_bar.rb +0 -6
- data/lib/wx/doc/gen/radio_box.rb +0 -8
- data/lib/wx/doc/pen.rb +17 -0
- data/lib/wx/doc/radio_box.rb +20 -0
- data/lib/wx/doc/window.rb +27 -0
- data/lib/wx/keyword_defs.rb +77 -76
- data/lib/wx/prt/keyword_defs.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wxruby_aui.so +0 -0
- data/lib/wxruby_core.so +0 -0
- data/lib/wxruby_grid.so +0 -0
- data/lib/wxruby_html.so +0 -0
- data/lib/wxruby_pg.so +0 -0
- data/lib/wxruby_prt.so +0 -0
- data/lib/wxruby_rbn.so +0 -0
- data/lib/wxruby_rtc.so +0 -0
- data/lib/wxruby_stc.so +0 -0
- data/rakelib/install.rb +17 -6
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +120 -1
- data/rakelib/lib/config/mingw.rb +6 -1
- data/rakelib/lib/config/unixish.rb +26 -11
- data/rakelib/lib/config.rb +15 -6
- data/samples/aui/aui.rb +432 -363
- data/samples/propgrid/propgrid.rb +3 -0
- data/samples/sampler/editor.rb +33 -25
- data/samples/sampler/sample.rb +2 -2
- data/samples/sampler/stc_editor.rb +4 -2
- data/tests/lib/item_container_tests.rb +82 -0
- data/tests/lib/text_entry_tests.rb +80 -0
- data/tests/lib/wxapp_runner.rb +12 -0
- data/tests/lib/wxframe_runner.rb +89 -4
- data/tests/test_ext_controls.rb +28 -0
- data/tests/test_font.rb +239 -0
- data/tests/test_intl.rb +5 -1
- data/tests/test_std_controls.rb +263 -37
- data/tests/test_window.rb +340 -0
- metadata +25 -2
@@ -30,5 +30,53 @@ module Wx
|
|
30
30
|
|
31
31
|
end # ContextHelpButton
|
32
32
|
|
33
|
+
# This class changes the cursor to a query and puts the application into a 'context-sensitive help mode'.
|
34
|
+
# When the user left-clicks on a window within the specified window, a {Wx::EVT_HELP} event is sent to that control, and the application may respond to it by popping up some help.
|
35
|
+
# For example:
|
36
|
+
# ```ruby
|
37
|
+
# # puts the application into a 'context-sensitive help mode' for my_window
|
38
|
+
# context_help = Wx::ContextHelp.new(my_window)
|
39
|
+
# ...
|
40
|
+
# ...
|
41
|
+
# # ends the 'context-sensitive help mode' for my_window
|
42
|
+
# context_help.end_context_help
|
43
|
+
# ```
|
44
|
+
#
|
45
|
+
# There are a couple of ways to invoke this behaviour implicitly:
|
46
|
+
#
|
47
|
+
# - Use the {Wx::DIALOG_EX_CONTEXTHELP} style for a dialog (Windows only). This will put a question mark in the titlebar, and Windows will put the application into context-sensitive help mode automatically, with further programming.- Create a {Wx::ContextHelpButton}, whose predefined behaviour is to create a context help object. Normally you will write your application so that this button is only added to a dialog for non-Windows platforms (use {Wx::DIALOG_EX_CONTEXTHELP} on Windows).
|
48
|
+
#
|
49
|
+
# Note that on macOS, the cursor does not change when in context-sensitive help mode.
|
50
|
+
# ===
|
51
|
+
#
|
52
|
+
# Category: {Wx::HELP}
|
53
|
+
# @see Wx::HelpEvent
|
54
|
+
# @see Wx::HelpController
|
55
|
+
# @see Wx::ContextHelpButton
|
56
|
+
#
|
57
|
+
#
|
58
|
+
class ContextHelp < Object
|
59
|
+
|
60
|
+
# Constructs a context help object, calling {Wx::ContextHelp#begin_context_help} if doNow is true (the default).
|
61
|
+
# If window is NULL, the top window is used.
|
62
|
+
# @param window [Wx::Window]
|
63
|
+
# @param doNow [true,false]
|
64
|
+
# @return [ContextHelp]
|
65
|
+
def initialize(window=nil, doNow=true) end
|
66
|
+
|
67
|
+
# Puts the application into context-sensitive help mode.
|
68
|
+
# window is the window which will be used to catch events; if NULL, the top window will be used.
|
69
|
+
# Returns true if the application was successfully put into context-sensitive help mode. This function only returns when the event loop has finished.
|
70
|
+
# @param window [Wx::Window]
|
71
|
+
# @return [true,false]
|
72
|
+
def begin_context_help(window) end
|
73
|
+
|
74
|
+
# Ends context-sensitive help mode.
|
75
|
+
# Not normally called by the application.
|
76
|
+
# @return [true,false]
|
77
|
+
def end_context_help; end
|
78
|
+
|
79
|
+
end # ContextHelp
|
80
|
+
|
33
81
|
|
34
82
|
end
|
data/lib/wx/doc/gen/core.rb
CHANGED
@@ -7,10 +7,10 @@
|
|
7
7
|
module Wx
|
8
8
|
|
9
9
|
# wxRuby version string
|
10
|
-
Wx::WXRUBY_VERSION = '0.9.0-rc.
|
10
|
+
Wx::WXRUBY_VERSION = '0.9.0-rc.2'
|
11
11
|
|
12
12
|
# wxRuby version release type (alpha, beta, rc)
|
13
|
-
Wx::WXRUBY_RELEASE_TYPE = 'rc.
|
13
|
+
Wx::WXRUBY_RELEASE_TYPE = 'rc.2'
|
14
14
|
# wxRuby major version number
|
15
15
|
Wx::WXRUBY_MAJOR = 0
|
16
16
|
# wxRuby minor version number
|
@@ -9,22 +9,24 @@ module Wx
|
|
9
9
|
# This class is a special event handler which allows discarding any event (or a set of event types) directed to a specific window.
|
10
10
|
# Example:
|
11
11
|
#
|
12
|
-
# ```
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
12
|
+
# ```ruby
|
13
|
+
# class MyWindow
|
14
|
+
#
|
15
|
+
# ...
|
16
|
+
#
|
17
|
+
# def do_something
|
18
|
+
# # block all events directed to this window
|
19
|
+
# Wx::EventBlocker.blocked_for(self) do
|
20
|
+
# # while we do 1000 function_that_sends_events calls
|
21
|
+
# 1000.times { |i| function_that_sends_events(i) }
|
22
|
+
# end
|
23
|
+
# # old event handler restored; generated event(s) from next call will be processed
|
24
|
+
# function_that_sends_events(0)
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# ...
|
28
|
+
#
|
29
|
+
# end
|
28
30
|
# ```
|
29
31
|
#
|
30
32
|
# ===
|
@@ -9,51 +9,44 @@ module Wx
|
|
9
9
|
# A global event filter for pre-processing all the events generated in the program.
|
10
10
|
# This is a very simple class which just provides {Wx::EventFilter#filter_event} virtual method to be called by {Wx::EvtHandler} before starting process of any event. Thus, inheriting from this class and overriding {Wx::EventFilter#filter_event} allows capturing and possibly handling or ignoring all the events happening in the program. Of course, having event filters adds additional overhead to every event processing and so should not be used lightly and your {Wx::EventFilter#filter_event} code should try to return as quickly as possible, especially for the events it is not interested in.
|
11
11
|
# An example of using this class:
|
12
|
-
# ```
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# {
|
51
|
-
# return wxDateTime::Now() - diff > m_last;
|
52
|
-
# }
|
53
|
-
#
|
54
|
-
# private:
|
55
|
-
# wxDateTime m_last;
|
56
|
-
# };
|
12
|
+
# ```ruby
|
13
|
+
# # This class allows determining the last time the user has worked with
|
14
|
+
# # this application:
|
15
|
+
# class LastActivityTimeDetector < Wx::EventFilter
|
16
|
+
# def initialize
|
17
|
+
# Wx::EvtHandler.add_filter(self)
|
18
|
+
#
|
19
|
+
# @last = Time.now
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# def clear
|
23
|
+
# Wx::EvtHandler.remove_filter(self)
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# def filter_event(event)
|
27
|
+
# # Update the last user activity
|
28
|
+
# t = event.get_event_type
|
29
|
+
# case t
|
30
|
+
# when Wx::EVT_KEY_DOWN,
|
31
|
+
# Wx::EVT_MOTION,
|
32
|
+
# Wx::EVT_LEFT_DOWN,
|
33
|
+
# Wx::EVT_RIGHT_DOWN,
|
34
|
+
# Wx::EVT_MIDDLE_DOWN
|
35
|
+
# @last = Time.now
|
36
|
+
# end
|
37
|
+
#
|
38
|
+
# # Continue processing the event normally as well.
|
39
|
+
# Event_Skip
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# # This function could be called periodically from some timer to
|
43
|
+
# # do something (e.g. hide sensitive data or log out from remote
|
44
|
+
# # server) if the user has been inactive for some time period.
|
45
|
+
# def is_inactive_for?(diff)
|
46
|
+
# (Time.now - diff) > @last
|
47
|
+
# end
|
48
|
+
#
|
49
|
+
# end
|
57
50
|
# ```
|
58
51
|
#
|
59
52
|
# Notice that {Wx::App} derives from {Wx::EventFilter} and is registered as an event filter during its creation so you may also override {Wx::EventFilter#filter_event} method in your {Wx::App}-derived class and, in fact, this is often the most convenient way to do it. However creating a new class deriving directly from {Wx::EventFilter} allows isolating the event filtering code in its own separate class and also having several independent filters, if necessary.
|
@@ -1112,6 +1112,13 @@ class Wx::EvtHandler
|
|
1112
1112
|
# @yieldparam [Wx::MediaEvent] event the event to handle
|
1113
1113
|
def evt_media_pause(id, meth = nil, &block) end
|
1114
1114
|
|
1115
|
+
# User clicked on a hyperlink.
|
1116
|
+
# Processes a {Wx::EVT_HYPERLINK} event.
|
1117
|
+
# @param [Integer,Wx::Enum,Wx::Window,Wx::MenuItem,Wx::ToolBarTool,Wx::Timer] id window/control id
|
1118
|
+
# @param [String,Symbol,Method,Proc] meth (name of) method or handler proc
|
1119
|
+
# @yieldparam [Wx::HyperlinkEvent] event the event to handle
|
1120
|
+
def evt_hyperlink(id, meth = nil, &block) end
|
1121
|
+
|
1115
1122
|
# Process a {Wx::EVT_BUTTON} event, when the button is clicked.
|
1116
1123
|
# @param [Integer,Wx::Enum,Wx::Window,Wx::MenuItem,Wx::ToolBarTool,Wx::Timer] id window/control id
|
1117
1124
|
# @param [String,Symbol,Method,Proc] meth (name of) method or handler proc
|
@@ -52,59 +52,58 @@ module Wx
|
|
52
52
|
# This class represents the file chooser dialog.
|
53
53
|
# The path and filename are distinct elements of a full file pathname. If path is {Wx::EmptyString}, the current directory will be used. If filename is {Wx::EmptyString}, no default filename will be supplied. The wildcard determines what files are displayed in the file selector, and file extension supplies a type extension for the required filename.
|
54
54
|
# The typical usage for the open file dialog is:
|
55
|
-
# ```
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
# wxFileDialog
|
67
|
-
# openFileDialog(this, _("Open XYZ file"), "", "",
|
68
|
-
# "XYZ files (*.xyz)|*.xyz", wxFD_OPEN|wxFD_FILE_MUST_EXIST);
|
69
|
-
#
|
70
|
-
# if (openFileDialog.ShowModal() == wxID_CANCEL)
|
71
|
-
# return; // the user changed idea...
|
72
|
-
#
|
73
|
-
# // proceed loading the file chosen by the user;
|
74
|
-
# // this can be done with e.g. wxWidgets input streams:
|
75
|
-
# wxFileInputStream input_stream(openFileDialog.GetPath());
|
76
|
-
# if (!input_stream.IsOk())
|
77
|
-
# {
|
78
|
-
# wxLogError("Cannot open file '%s'.", openFileDialog.GetPath());
|
79
|
-
# return;
|
80
|
-
# }
|
55
|
+
# ```ruby
|
56
|
+
# class MyFrame
|
57
|
+
# ...
|
58
|
+
# def on_open(event)
|
59
|
+
# if (...current content has not been saved...)
|
60
|
+
# if Wx.message_box('Current content has not been saved! Proceed?', 'Please confirm',
|
61
|
+
# Wx::ICON_QUESTION | Wx::YES_NO, self) == Wx::NO
|
62
|
+
# return
|
63
|
+
# #else: proceed asking to the user the new file to open
|
64
|
+
# end
|
65
|
+
# end
|
81
66
|
#
|
67
|
+
# Wx::FileDialog(self, "Open XYZ file", "", "",
|
68
|
+
# "XYZ files (*.xyz)|*.xyz", Wx::FD_OPEN|Wx::FD_FILE_MUST_EXIST) do |dlg|
|
69
|
+
# return if dlg.show_modal == Wx::ID_CANCEL # the user changed idea...?
|
70
|
+
#
|
71
|
+
# # proceed loading the file chosen by the user
|
72
|
+
# file = File.open(dlg.path, 'r') rescue nil
|
73
|
+
# unless file
|
74
|
+
# Wx.log_error("Cannot open file '#{dlg.path}'.")
|
75
|
+
# return
|
76
|
+
# end
|
82
77
|
# ...
|
83
|
-
#
|
78
|
+
# end
|
79
|
+
# end
|
80
|
+
#
|
81
|
+
# end
|
84
82
|
# ```
|
85
83
|
#
|
86
84
|
# The typical usage for the save file dialog is instead somewhat simpler:
|
87
|
-
# ```
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
# if (saveFileDialog.ShowModal() == wxID_CANCEL)
|
95
|
-
# return; // the user changed idea...
|
96
|
-
#
|
97
|
-
# // save the current contents in the file;
|
98
|
-
# // this can be done with e.g. wxWidgets output streams:
|
99
|
-
# wxFileOutputStream output_stream(saveFileDialog.GetPath());
|
100
|
-
# if (!output_stream.IsOk())
|
101
|
-
# {
|
102
|
-
# wxLogError("Cannot save current contents in file '%s'.", saveFileDialog.GetPath());
|
103
|
-
# return;
|
104
|
-
# }
|
85
|
+
# ```ruby
|
86
|
+
# class MyFrame
|
87
|
+
# ...
|
88
|
+
# def on_save_as(event)
|
89
|
+
# Wx::FileDialog(self, "Save XYZ file", "", "",
|
90
|
+
# "XYZ files (*.xyz)|*.xyz", Wx::FD_SAVE|Wx::FD_OVERWRITE_PROMPT) do |dlg|
|
91
|
+
# return if dlg.show_modal == Wx::ID_CANCEL # the user changed idea...?
|
105
92
|
#
|
106
|
-
#
|
107
|
-
#
|
93
|
+
# # save the current contents in the file
|
94
|
+
# begin
|
95
|
+
# File.open(dlg.path, 'w+') do |f|
|
96
|
+
# # save to file
|
97
|
+
# end
|
98
|
+
# rescue
|
99
|
+
# Wx.log_error("Cannot save current contents in file '#{dlg.path}'.")
|
100
|
+
# return
|
101
|
+
# end
|
102
|
+
# end
|
103
|
+
# ...
|
104
|
+
# end
|
105
|
+
#
|
106
|
+
# end
|
108
107
|
# ```
|
109
108
|
#
|
110
109
|
# == Wildcard Filters
|
@@ -115,8 +114,8 @@ module Wx
|
|
115
114
|
# ```
|
116
115
|
#
|
117
116
|
# On Mac macOS in the open file dialog the filter choice box is not shown by default. Instead all given wildcards are applied at the same time: So in the above example all bmp, gif and png files are displayed. To enforce the display of the filter choice set the corresponding {Wx::SystemOptions} before calling the file open dialog:
|
118
|
-
# ```
|
119
|
-
#
|
117
|
+
# ```ruby
|
118
|
+
# Wx::SystemOptions.set_option(Wx::OSX_FILEDIALOG_ALWAYS_SHOW_TYPES, 1)
|
120
119
|
# ```
|
121
120
|
# But in contrast to Windows and Unix, where the file type choice filters only the selected files, on Mac macOS even in this case the dialog shows all files matching all file types. The files which does not match the currently selected file type are greyed out and are not selectable.
|
122
121
|
#
|
data/lib/wx/doc/gen/font.rb
CHANGED
@@ -916,6 +916,15 @@ module Wx
|
|
916
916
|
def set_family(family) end
|
917
917
|
alias_method :family=, :set_family
|
918
918
|
|
919
|
+
# Creates the font corresponding to the given native font description string which must have been previously returned by {Wx::Font#get_native_font_info_desc}.
|
920
|
+
# If the string is invalid, font is unchanged. This function is typically used for de-serializing a {Wx::Font} object previously saved in a string-form.
|
921
|
+
# true if the creation was successful.
|
922
|
+
# @see Wx::Font#set_native_font_info_user_desc
|
923
|
+
# @param info [String]
|
924
|
+
# @return [true,false]
|
925
|
+
def set_native_font_info(info) end
|
926
|
+
alias_method :native_font_info=, :set_native_font_info
|
927
|
+
|
919
928
|
# Creates the font corresponding to the given native font description string and returns true if the creation was successful.
|
920
929
|
# Unlike {Wx::Font#set_native_font_info}, this function accepts strings which are user-friendly. Examples of accepted string formats are:
|
921
930
|
#
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# :stopdoc:
|
2
|
+
# This file is automatically generated by the WXRuby3 documentation
|
3
|
+
# generator. Do not alter this file.
|
4
|
+
# :startdoc:
|
5
|
+
|
6
|
+
|
7
|
+
module Wx
|
8
|
+
|
9
|
+
#
|
10
|
+
HL_CONTEXTMENU = 1
|
11
|
+
|
12
|
+
#
|
13
|
+
HL_ALIGN_LEFT = 2
|
14
|
+
|
15
|
+
#
|
16
|
+
HL_ALIGN_RIGHT = 4
|
17
|
+
|
18
|
+
#
|
19
|
+
HL_ALIGN_CENTRE = 8
|
20
|
+
|
21
|
+
#
|
22
|
+
HL_DEFAULT_STYLE = 2097161
|
23
|
+
|
24
|
+
#
|
25
|
+
#
|
26
|
+
EVT_HYPERLINK = 10023
|
27
|
+
|
28
|
+
# This class shows a static text element which links to an URL.
|
29
|
+
# Appearance and behaviour is completely customizable.
|
30
|
+
# In fact, when the user clicks on the hyperlink, a {Wx::HyperlinkEvent} is sent but if that event is not handled (or it's skipped; see {Wx::Event#skip}), then a call to {launch_default_browser} is done with the hyperlink's URL.
|
31
|
+
# Note that standard {Wx::Window} functions like {Wx::Window#set_background_colour}, {Wx::Window#set_font}, {Wx::Window#set_cursor}, {Wx::Window#set_label} can be used to customize appearance of the hyperlink.
|
32
|
+
# === Styles
|
33
|
+
#
|
34
|
+
# This class supports the following styles:
|
35
|
+
#
|
36
|
+
# - {Wx::HL_ALIGN_LEFT}: Align the text to the left.
|
37
|
+
# - {Wx::HL_ALIGN_RIGHT}: Align the text to the right. This style is not supported under Windows.
|
38
|
+
# - {Wx::HL_ALIGN_CENTRE}: Center the text (horizontally). This style is not supported under Windows.
|
39
|
+
# - {Wx::HL_CONTEXTMENU}: Pop up a context menu when the hyperlink is right-clicked. The context menu contains a "Copy URL" menu item which is automatically handled by the hyperlink and which just copies in the clipboard the URL (not the label) of the control.
|
40
|
+
# - {Wx::HL_DEFAULT_STYLE}: The default style for {Wx::HyperlinkCtrl}: {Wx::Border::BORDER_NONE}|{Wx::HL_CONTEXTMENU}|{Wx::HL_ALIGN_CENTRE}.
|
41
|
+
#
|
42
|
+
# === Events emitted by this class
|
43
|
+
#
|
44
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::HyperlinkEvent} events.
|
45
|
+
# Event handler methods for events emitted by this class:
|
46
|
+
# - {Wx::EvtHandler#evt_hyperlink}(id, meth = nil, &block): The hyperlink was (left) clicked. If this event is not handled in user's code (or it's skipped; see {Wx::Event#skip}), then a call to {Wx::LaunchDefaultBrowser} is done with the hyperlink's URL.
|
47
|
+
#
|
48
|
+
# Currently this class is implemented using native support in {Wx::GTK} and {Wx::MSW} and a generic version is used by the other ports.
|
49
|
+
# ===
|
50
|
+
#
|
51
|
+
# Category: {Wx::Controls} <div class='appearance'><span class='appearance'>Appearance:</span><table><tr><td> {Wx::MSW} Appearance
|
52
|
+
# </td><td> {Wx::GTK} Appearance
|
53
|
+
# </td><td> {Wx::OSX} Appearance
|
54
|
+
# </td></tr></table></div>
|
55
|
+
# @see Wx::URL
|
56
|
+
# @see Wx::HyperlinkEvent
|
57
|
+
#
|
58
|
+
#
|
59
|
+
class HyperlinkCtrl < Control
|
60
|
+
|
61
|
+
# @overload initialize()
|
62
|
+
# @return [HyperlinkCtrl]
|
63
|
+
# @overload initialize(parent, id, label, url, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::HL_DEFAULT_STYLE, name=Wx::HyperlinkCtrlNameStr)
|
64
|
+
# Constructor.
|
65
|
+
# See {Wx::HyperlinkCtrl#create} for more info.
|
66
|
+
# @param parent [Wx::Window]
|
67
|
+
# @param id [Integer]
|
68
|
+
# @param label [String]
|
69
|
+
# @param url [String]
|
70
|
+
# @param pos [Array(Integer, Integer), Wx::Point]
|
71
|
+
# @param size [Array(Integer, Integer), Wx::Size]
|
72
|
+
# @param style [Integer]
|
73
|
+
# @param name [String]
|
74
|
+
# @return [HyperlinkCtrl]
|
75
|
+
def initialize(*args) end
|
76
|
+
|
77
|
+
# Creates the hyperlink control.
|
78
|
+
# @param parent [Wx::Window] Parent window. Must not be NULL.
|
79
|
+
# @param id [Integer] Window identifier. A value of {Wx::StandardID::ID_ANY} indicates a default value.
|
80
|
+
# @param label [String] The label of the hyperlink.
|
81
|
+
# @param url [String] The URL associated with the given label.
|
82
|
+
# @param pos [Array(Integer, Integer), Wx::Point] Window position.
|
83
|
+
# @param size [Array(Integer, Integer), Wx::Size] Window size. If the {Wx::DEFAULT_SIZE} is specified then the window is sized appropriately.
|
84
|
+
# @param style [Integer] Window style. See {Wx::HyperlinkCtrl}.
|
85
|
+
# @param name [String] Window name.
|
86
|
+
# @return [true,false]
|
87
|
+
def create(parent, id, label, url, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::HL_DEFAULT_STYLE, name=Wx::HyperlinkCtrlNameStr) end
|
88
|
+
|
89
|
+
# Returns the colour used to print the label of the hyperlink when the mouse is over the control.
|
90
|
+
# @return [Wx::Colour]
|
91
|
+
def get_hover_colour; end
|
92
|
+
alias_method :hover_colour, :get_hover_colour
|
93
|
+
|
94
|
+
# Returns the colour used to print the label when the link has never been clicked before (i.e. the link has not been visited) and the mouse is not over the control.
|
95
|
+
# @return [Wx::Colour]
|
96
|
+
def get_normal_colour; end
|
97
|
+
alias_method :normal_colour, :get_normal_colour
|
98
|
+
|
99
|
+
# Returns the URL associated with the hyperlink.
|
100
|
+
# @return [String]
|
101
|
+
def get_url; end
|
102
|
+
alias_method :url, :get_url
|
103
|
+
|
104
|
+
# Returns true if the hyperlink has already been clicked by the user at least one time.
|
105
|
+
# @return [true,false]
|
106
|
+
def get_visited; end
|
107
|
+
alias_method :visited, :get_visited
|
108
|
+
|
109
|
+
# Returns the colour used to print the label when the mouse is not over the control and the link has already been clicked before (i.e. the link has been visited).
|
110
|
+
# @return [Wx::Colour]
|
111
|
+
def get_visited_colour; end
|
112
|
+
alias_method :visited_colour, :get_visited_colour
|
113
|
+
|
114
|
+
# Sets the colour used to print the label of the hyperlink when the mouse is over the control.
|
115
|
+
# @param colour [Wx::Colour,String,Symbol]
|
116
|
+
# @return [void]
|
117
|
+
def set_hover_colour(colour) end
|
118
|
+
alias_method :hover_colour=, :set_hover_colour
|
119
|
+
|
120
|
+
# Sets the colour used to print the label when the link has never been clicked before (i.e. the link has not been visited) and the mouse is not over the control.
|
121
|
+
# @param colour [Wx::Colour,String,Symbol]
|
122
|
+
# @return [void]
|
123
|
+
def set_normal_colour(colour) end
|
124
|
+
alias_method :normal_colour=, :set_normal_colour
|
125
|
+
|
126
|
+
# Sets the URL associated with the hyperlink.
|
127
|
+
# @param url [String]
|
128
|
+
# @return [void]
|
129
|
+
def set_url(url) end
|
130
|
+
alias_method :url=, :set_url
|
131
|
+
|
132
|
+
# Marks the hyperlink as visited (see {Wx::HyperlinkCtrl#set_visited_colour}).
|
133
|
+
# @param visited [true,false]
|
134
|
+
# @return [void]
|
135
|
+
def set_visited(visited=true) end
|
136
|
+
alias_method :visited=, :set_visited
|
137
|
+
|
138
|
+
# Sets the colour used to print the label when the mouse is not over the control and the link has already been clicked before (i.e. the link has been visited).
|
139
|
+
# @param colour [Wx::Colour,String,Symbol]
|
140
|
+
# @return [void]
|
141
|
+
def set_visited_colour(colour) end
|
142
|
+
alias_method :visited_colour=, :set_visited_colour
|
143
|
+
|
144
|
+
end # HyperlinkCtrl
|
145
|
+
|
146
|
+
|
147
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# :stopdoc:
|
2
|
+
# This file is automatically generated by the WXRuby3 documentation
|
3
|
+
# generator. Do not alter this file.
|
4
|
+
# :startdoc:
|
5
|
+
|
6
|
+
|
7
|
+
module Wx
|
8
|
+
|
9
|
+
# This event class is used for the events generated by {Wx::HyperlinkCtrl}.
|
10
|
+
# === Events using this class
|
11
|
+
#
|
12
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::HyperlinkEvent} events.
|
13
|
+
# Event handler methods:
|
14
|
+
# - {Wx::EvtHandler#evt_hyperlink}(id, meth = nil, &block): User clicked on a hyperlink.
|
15
|
+
#
|
16
|
+
# ===
|
17
|
+
#
|
18
|
+
# Category: {Wx::Events}
|
19
|
+
#
|
20
|
+
class HyperlinkEvent < CommandEvent
|
21
|
+
|
22
|
+
# The constructor is not normally used by the user code.
|
23
|
+
# @param generator [Wx::Object]
|
24
|
+
# @param id [Integer]
|
25
|
+
# @param url [String]
|
26
|
+
# @return [HyperlinkEvent]
|
27
|
+
def initialize(generator, id, url) end
|
28
|
+
|
29
|
+
# Returns the URL of the hyperlink where the user has just clicked.
|
30
|
+
# @return [String]
|
31
|
+
def get_url; end
|
32
|
+
alias_method :url, :get_url
|
33
|
+
|
34
|
+
# Sets the URL associated with the event.
|
35
|
+
# @param url [String]
|
36
|
+
# @return [void]
|
37
|
+
def set_url(url) end
|
38
|
+
alias_method :url=, :set_url
|
39
|
+
|
40
|
+
end # HyperlinkEvent
|
41
|
+
|
42
|
+
|
43
|
+
end
|
data/lib/wx/doc/gen/menu_bar.rb
CHANGED
@@ -201,12 +201,6 @@ module Wx
|
|
201
201
|
# @return [void]
|
202
202
|
def set_menu_label(pos, label) end
|
203
203
|
|
204
|
-
# Returns the Apple menu.
|
205
|
-
# This is the leftmost menu with application's name as its title. You shouldn't remove any items from it, but it is safe to insert extra menu items or submenus into it.
|
206
|
-
# Availability: only available for the {Wx::OSX/Cocoa} port. {Wx::osx}
|
207
|
-
# @return [Wx::Menu]
|
208
|
-
def osx_get_apple_menu; end
|
209
|
-
|
210
204
|
# @return [Wx::Frame]
|
211
205
|
def get_frame; end
|
212
206
|
alias_method :frame, :get_frame
|
data/lib/wx/doc/gen/radio_box.rb
CHANGED
@@ -182,14 +182,6 @@ module Wx
|
|
182
182
|
def set_selection(n) end
|
183
183
|
alias_method :selection=, :set_selection
|
184
184
|
|
185
|
-
# Shows or hides individual buttons.
|
186
|
-
# true if the item has been shown or hidden or false if nothing was done because it already was in the requested state.
|
187
|
-
# @see Wx::Window#show
|
188
|
-
# @param item [Integer] The zero-based position of the button to show or hide.
|
189
|
-
# @param show [true,false] true to show, false to hide.
|
190
|
-
# @return [true,false]
|
191
|
-
def show(item, show=true) end
|
192
|
-
|
193
185
|
# Returns the number of items in the control.
|
194
186
|
#
|
195
187
|
# @see Wx::RadioBox#is_empty
|
data/lib/wx/doc/pen.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
module Wx
|
3
|
+
|
4
|
+
class Pen
|
5
|
+
|
6
|
+
# Finds a pen with the specified attributes in the global list and returns it, else creates a new pen, adds it to the global pen list, and returns it.
|
7
|
+
# @param [Wx::Colour, String, Symbol] colour Colour of the pen.
|
8
|
+
# @param [Integer] width Width of the pen.
|
9
|
+
# @param [Wx::PenStyle] style Pen style. See {Wx::PenStyle} for a list of styles.
|
10
|
+
# @return [Wx::Pen]
|
11
|
+
def self.find_or_create_pen(colour, width=1, style=Wx::PenStyle::PENSTYLE_SOLID) end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
ThePenList = Wx::Pen
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
class Wx::RadioBox
|
3
|
+
|
4
|
+
# Enables od disables individual buttons.
|
5
|
+
# true if the item has been enabled or disabled or false if nothing was done because it already was in the requested state.
|
6
|
+
# @see Wx::Window#enable
|
7
|
+
# @param item [Integer] The zero-based position of the button to enable or disable.
|
8
|
+
# @param enable [true,false] true to enable, false to disable.
|
9
|
+
# @return [true,false]
|
10
|
+
def enable_item(item, enable=true) end
|
11
|
+
|
12
|
+
# Shows or hides individual buttons.
|
13
|
+
# true if the item has been shown or hidden or false if nothing was done because it already was in the requested state.
|
14
|
+
# @see Wx::Window#show
|
15
|
+
# @param item [Integer] The zero-based position of the button to show or hide.
|
16
|
+
# @param show [true,false] true to show, false to hide.
|
17
|
+
# @return [true,false]
|
18
|
+
def show_item(item, show=true) end
|
19
|
+
|
20
|
+
end
|
data/lib/wx/doc/window.rb
CHANGED
@@ -15,4 +15,31 @@ class Wx::Window
|
|
15
15
|
# @return [Object] result from block
|
16
16
|
def paint_buffered; end
|
17
17
|
|
18
|
+
# Locks the window from updates while executing the given block.
|
19
|
+
# @param [Proc] block
|
20
|
+
def locked(&block); end
|
21
|
+
|
22
|
+
# Find the first child window with the given id recursively in the window hierarchy of this window.
|
23
|
+
#
|
24
|
+
# Window with the given id or nil if not found.
|
25
|
+
# @see Wx::Window.find_window_by_id
|
26
|
+
# @param id [Integer]
|
27
|
+
# @return [Wx::Window]
|
28
|
+
def find_window_by_id(id) end
|
29
|
+
|
30
|
+
# Find the first child window with the given label recursively in the window hierarchy of this window.
|
31
|
+
#
|
32
|
+
# Window with the given label or nil if not found.
|
33
|
+
# @see Wx::Window.find_window_by_label
|
34
|
+
# @param label [String]
|
35
|
+
# @return [Wx::Window]
|
36
|
+
def find_window_by_label(label) end
|
37
|
+
|
38
|
+
# Find the first child window with the given name (as given in a window constructor or {Wx::Window#create} function call) recursively in the window hierarchy of this window.
|
39
|
+
#
|
40
|
+
# Window with the given name or nil if not found.
|
41
|
+
# @param name [String]
|
42
|
+
# @return [Wx::Window]
|
43
|
+
def find_window_by_name(name) end
|
44
|
+
|
18
45
|
end
|