Skip to content

Commit

Permalink
Merge pull request #256 from mcorino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mcorino authored Mar 14, 2024
2 parents 40316ea + a5acc37 commit e893616
Show file tree
Hide file tree
Showing 23 changed files with 128 additions and 1,928 deletions.
13 changes: 2 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Two options are available to control the wxRuby3 gem installation process.
#### The `prebuilt` option
The `prebuilt=none|only|head` option can be used to either prevent binary package matching and installation (`prebuilt=none`)
The `prebuilt=none|only` option can be used to either prevent binary package matching and installation (`prebuilt=none`)
or make binary package installation mandatory (`prebuilt=only`).
The following command therefor forces a wxRuby3 source installation and will never fail:
Expand All @@ -240,15 +240,6 @@ And the following command will force binary package installation and fails if no
gem install wxruby3 -- prebuilt=only
```

It is also possible to specify installing the, experimental, head (master) wxWidgets binary package version (`prebuilt=head`).
This package version may not be as readily available as regular release packages depending on the development state of the
wxWidgets master branch.

> **NOTE**<br>
> Although wxRuby3 endeavors to keep up to date with the wxWidgets master branch your mileage may vary. Any release
> binary 'head' package should have basic stability at least but will not have been as extensively tested as regular
> release packages.
#### The `package` option

The `package=URL` option can be used to explicitly specify a binary package to install. This option implies `prebuilt=only`.
Expand Down Expand Up @@ -517,6 +508,6 @@ commands are executed using parallel task execution by default.
When the build has finished without errors the regression tests can be run by calling `rake test`.

After successfully building the wxRuby3 extension libraries (and possibly embedded wxWidgets libraries) a binary package
can be created by call `rake binpkg`.
can be created by calling `rake binpkg`.

For more details concerning the wxRuby3 development strategy and build options see [here](TODO).
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ end

Anyone who is familiar with wxWidgets should feel right at home since the API may be Ruby-fied, it is still easily
recognizable (but being Ruby-fied allowing for elegant and compact coding). And for those that do not have previous
experience, do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and tests.
experience, do not fear, wxRuby3 comes with an extensive [User Guide](https://github.com/mcorino/wxRuby3/wiki/User-Guide-%3A-Introduction)
and detailed [reference documentation](https://mcorino.github.io/wxRuby3) and lots of examples and tests.

```ruby
require 'wx'
Expand Down Expand Up @@ -177,13 +178,17 @@ some use a more modern coding style than others. Use the bundled `wxruby`
CLI to access the samples (see the section **Bundled CLI** in
the [INSTALL](INSTALL.md) document for more details).

An extensive [User Guide](https://github.com/mcorino/wxRuby3/wiki/User-Guide-%3A-Introduction)
is available at the [wxRuby3 Wiki](https://github.com/mcorino/wxRuby3/wiki) providing detailed
information about how to build desktop applications with wxRuby3.

Complete (more or less) wxRuby API documentation should be part of any
complete wxRuby3 build. This tends to focus on providing a reference
of all available modules, classes and methods and how to use specific
classes and methods, rather than on how to construct an application
overall.
This documentation (for the latest release) is also available online
[here](https://mcorino.github.io/wxRuby3/file.00_starting.html).
[here](https://mcorino.github.io/wxRuby3).

One of the advantages of wxRuby3 is the much larger ecosystem of
wxWidgets and wxPython resources out there. There is a book for
Expand Down
4 changes: 1 addition & 3 deletions ext/mkrf_conf_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
options:
prebuilt=OPT Specifies to either require (OPT == 'only' | 'head') or avoid (OPT == 'none') installing prebuilt
prebuilt=OPT Specifies to either require (OPT == 'only') or avoid (OPT == 'none') installing prebuilt
binary packages. If not specified installing a prebuilt package will be attempted reverting
to source install if none found.
Expand All @@ -48,8 +48,6 @@
task_args << "'--prebuilt'"
when :none
task_args << "'--no-prebuilt'"
when :head
task_args << "'--prebuilt'" << "'head'"
end
end
if OPTIONS[:package]
Expand Down
16 changes: 16 additions & 0 deletions lib/wx/core/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
# Controller class which creates and manages all windows.
class Wx::App

if Wx::PLATFORM == 'WXOSX'
class << self
# provide aliases for macosx specials
alias :mac_about_menu_itemid= :set_mac_about_menu_itemid
alias :mac_about_menu_itemid :get_mac_about_menu_itemid
alias :mac_preferences_menu_itemid= :set_mac_preferences_menu_itemid
alias :mac_preferences_menu_itemid :get_mac_preferences_menu_itemid
alias :mac_exit_menu_itemid= :set_mac_exit_menu_itemid
alias :mac_exit_menu_itemid :get_mac_exit_menu_itemid
alias :mac_help_menu_title= :set_mac_help_menu_title
alias :mac_help_menu_title :get_mac_help_menu_title
alias :mac_window_menu_title= :set_mac_window_menu_title
alias :mac_window_menu_title :get_mac_window_menu_title
end
end

# convenience method to retrieve global Wx::App instance
def self.the_app
if Wx::const_defined?(:THE_APP) and Wx::THE_APP.is_running
Expand Down
114 changes: 73 additions & 41 deletions lib/wx/doc/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,79 @@ module Wx

class App

# Set the menu item id for the About menu item.
# Default is {Wx::ID_ABOUT}
# @param [Integer] id
# @wxrb_require WXOSX
def set_mac_about_menu_itemid(id) end
alias :mac_about_menu_itemid= :set_mac_about_menu_itemid

# Get the current menu item id for the About menu item.
# Default is {Wx::ID_ABOUT}
# @return [Integer]
# @wxrb_require WXOSX
def get_mac_about_menu_itemid(id) end
alias :mac_about_menu_itemid :get_mac_about_menu_itemid

# Set the menu item id for the Preferences menu item.
# Default is {Wx::ID_PREFERENCES}
# @param [Integer] id
# @wxrb_require WXOSX
def set_mac_preferences_menu_itemid(id) end
alias :mac_preferences_menu_itemid= :set_mac_preferences_menu_itemid

# Get the current menu item id for the Preferences menu item.
# Default is {Wx::ID_PREFERENCES}
# @return [Integer]
# @wxrb_require WXOSX
def get_mac_preferences_menu_itemid(id) end
alias :mac_preferences_menu_itemid :get_mac_preferences_menu_itemid

# Set the menu item id for the Exit menu item.
# Default is {Wx::ID_EXIT}
# @param [Integer] id
# @wxrb_require WXOSX
def set_mac_exit_menu_itemid(id) end
alias :mac_exit_menu_itemid= :set_mac_exit_menu_itemid

# Get the current menu item id for the Exit menu item.
# Default is {Wx::ID_EXIT}
# @return [Integer]
# @wxrb_require WXOSX
def get_mac_exit_menu_itemid(id) end
alias :mac_exit_menu_itemid :get_mac_exit_menu_itemid
class << self

# Set the menu item id for the About menu item.
# Default is {Wx::ID_ABOUT}
# @param [Integer] id
# @wxrb_require WXOSX
def set_mac_about_menu_itemid(id) end
alias :mac_about_menu_itemid= :set_mac_about_menu_itemid

# Get the current menu item id for the About menu item.
# Default is {Wx::ID_ABOUT}
# @return [Integer]
# @wxrb_require WXOSX
def get_mac_about_menu_itemid; end
alias :mac_about_menu_itemid :get_mac_about_menu_itemid

# Set the menu item id for the Preferences menu item.
# Default is {Wx::ID_PREFERENCES}
# @param [Integer] id
# @wxrb_require WXOSX
def set_mac_preferences_menu_itemid(id) end
alias :mac_preferences_menu_itemid= :set_mac_preferences_menu_itemid

# Get the current menu item id for the Preferences menu item.
# Default is {Wx::ID_PREFERENCES}
# @return [Integer]
# @wxrb_require WXOSX
def get_mac_preferences_menu_itemid; end
alias :mac_preferences_menu_itemid :get_mac_preferences_menu_itemid

# Set the menu item id for the Exit menu item.
# Default is {Wx::ID_EXIT}
# @param [Integer] id
# @wxrb_require WXOSX
def set_mac_exit_menu_itemid(id) end
alias :mac_exit_menu_itemid= :set_mac_exit_menu_itemid

# Get the current menu item id for the Exit menu item.
# Default is {Wx::ID_EXIT}
# @return [Integer]
# @wxrb_require WXOSX
def get_mac_exit_menu_itemid; end
alias :mac_exit_menu_itemid :get_mac_exit_menu_itemid

# Set the menu title for the Help menu.
# Default is '&Help'
# @param [String] title
# @wxrb_require WXOSX
def set_mac_help_menu_title(title) end
alias :mac_help_menu_title= :set_mac_help_menu_title

# Get the current title for the Help menu.
# Default is '&Help'
# @return [String]
# @wxrb_require WXOSX
def get_mac_help_menu_title; end
alias :mac_help_menu_title :get_mac_help_menu_title

# Set the menu title for the Window menu.
# Default is '&Window'
# @param [String] title
# @wxrb_require WXOSX
def set_mac_window_menu_title(title) end
alias :mac_window_menu_title= :set_mac_window_menu_title

# Get the current title for the Window menu.
# Default is '&Window'
# @return [String]
# @wxrb_require WXOSX
def get_mac_window_menu_title; end
alias :mac_window_menu_title :get_mac_window_menu_title

end

end

Expand Down
154 changes: 0 additions & 154 deletions lib/wx/doc/extra/00_starting.md

This file was deleted.

Loading

0 comments on commit e893616

Please sign in to comment.