{"id":18275966,"url":"https://github.com/mcorino/wxruby3","last_synced_at":"2025-04-09T09:06:09.126Z","repository":{"id":154073046,"uuid":"520201934","full_name":"mcorino/wxRuby3","owner":"mcorino","description":"Ruby Cross-Platform GUI extension","archived":false,"fork":false,"pushed_at":"2024-09-13T17:31:09.000Z","size":7954,"stargazers_count":76,"open_issues_count":5,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-14T08:32:05.844Z","etag":null,"topics":["cocoa","cross-platform-desktop","cross-platform-gui","desktop","gtk","gui","gui-framework","linux","mac","macos","macosx","osx","portable","ruby","win32","windows","wxwidgets"],"latest_commit_sha":null,"homepage":"https://mcorino.github.io/wxRuby3/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcorino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-01T17:25:56.000Z","updated_at":"2024-09-11T12:37:25.000Z","dependencies_parsed_at":"2023-09-26T00:48:40.446Z","dependency_job_id":"d9e41a6b-13e8-4b83-aa38-93f6870a3e33","html_url":"https://github.com/mcorino/wxRuby3","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcorino%2FwxRuby3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcorino%2FwxRuby3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcorino%2FwxRuby3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcorino%2FwxRuby3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcorino","download_url":"https://codeload.github.com/mcorino/wxRuby3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008629,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoa","cross-platform-desktop","cross-platform-gui","desktop","gtk","gui","gui-framework","linux","mac","macos","macosx","osx","portable","ruby","win32","windows","wxwidgets"],"created_at":"2024-11-05T12:14:35.823Z","updated_at":"2025-04-09T09:06:09.109Z","avatar_url":"https://github.com/mcorino.png","language":"Ruby","readme":"[![Linux wxGTK](https://github.com/mcorino/wxRuby3/actions/workflows/linux.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/linux.yml)\n[![Windows wxMSW](https://github.com/mcorino/wxRuby3/actions/workflows/msw.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/msw.yml)\n[![Mac wxOSX](https://github.com/mcorino/wxRuby3/actions/workflows/mac.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/mac.yml)\n\n[![License](https://img.shields.io/badge/license-MIT-yellowgreen.svg)](LICENSE)\n[![Gem Version](https://badge.fury.io/rb/wxruby3.svg)](https://badge.fury.io/rb/wxruby3)\n[![Documentation](https://img.shields.io/badge/docs-pages-blue.svg)](https://mcorino.github.io/wxRuby3)\n[![Chat](https://img.shields.io/gitter/room/mcorino/wxruby)](https://gitter.im/mcorino/wxruby3)\n\n# README for wxRuby3\n\n![Logo](assets/logo.svg \"wxRuby3\")\n\nReviving wxRuby\n\n## Introduction\n\nwxRuby3 is a cross-platform GUI library for Ruby, based on the mature [wxWidgets](https://wxwidgets.org)\nGUI toolkit for C++. It uses native widgets wherever possible, providing\nthe correct look, feel and behaviour to GUI applications on Windows, macOS\nand Linux/GTK. wxRuby aims to provide a comprehensive solution to\ndeveloping professional-standard desktop applications in Ruby. \n\n## Usage examples\n\n### Hello world\n\nwxRuby3 is very easy to use.\n\n```ruby\nrequire 'wx'\n\nWx::App.run do\n  Wx::Frame.new(nil, title: 'Hello world!').show\nend\n```\n\n![Hello_World](assets/hello_world_combi.png \"Hello World sample\")\n\n### Hello Button\n\nAnyone who is familiar with wxWidgets should feel right at home since the API may be Ruby-fied, it is still easily \nrecognizable (but being Ruby-fied allowing for elegant and compact coding). And for those that do not have previous \nexperience, do not fear, wxRuby3 comes with an extensive [User Guide](https://github.com/mcorino/wxRuby3/wiki/User-Guide-%3A-Introduction) \nand detailed [reference documentation](https://mcorino.github.io/wxRuby3) and lots of examples and tests.    \n\n```ruby\nrequire 'wx'\n\nclass TheFrame \u003c Wx::Frame\n  def initialize(title)\n    super(nil, title: title)\n    panel = Wx::Panel.new(self)\n    button = Wx::Button.new(panel, label: 'Click me')\n    button.evt_button(Wx::ID_ANY) { Wx.message_box('Hello. Thanks for clicking me!', 'Hello Button sample') }\n  end\nend\n\nWx::App.run { TheFrame.new('Hello world!').show }\n```\n\n![Hello_Button_Clicked](assets/hello_button_clicked_combi.png \"Hello Button sample clicked\")\n\n\n## wxRuby3 licence\n\nwxRuby3 is free and open-source. It is distributed under the liberal\nMIT licence which is compatible with both free and commercial development.\nSee [LICENSE](LICENSE) for more details.\n\n### wxRuby3 and wxWidgets\n\nIf you distribute (your) wxRuby3 (application) with a binary copy of wxWidgets,\nyou are bound to the requirements of the copy of wxWidgets within. Fortunately,\nthose requirements do not impose any serious restrictions.\n\n### wxWidgets License Summary (from wxWidgets)\n\nIn summary, the licence is LGPL plus a clause allowing unrestricted\ndistribution of application binaries. To answer a FAQ, you don't have to\ndistribute any source if you wish to write commercial applications using\nwxWidgets.\n\n### Required Credits and Attribution\n\nGenerally, neither wxWidgets nor wxRuby3 require attribution, beyond\nretaining existing copyright notices. However, if you build your own\ncustom wxWidgets library, there may be portions that require specific\nattributions or credits, such as TIFF or JPEG support. See the wxWidgets\nREADME and license files for details.\nSee [here](CREDITS.md) for more details on and acknowledgement of the developers \nof these products.\n\n## (Some of the) Most Frequently Asked Questions\n\n(see the extended [FAQ](https://github.com/mcorino/wxRuby3/wiki/Frequently-Asked-Questions) in the [Wiki](https://github.com/mcorino/wxRuby3/wiki) for more information)\n \n### What platforms and operating systems are supported in wxRuby3?\n\nCurrently the following are fully supported:\n\n| Platform                                                                                                                           | Ruby version(s)                                     | wxWidgets version(s) |\n|------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|----------------------|\n| Windows \u003e= 10                                                                                                                      | Ruby \u003e= 2.5\u003cbr\u003e(RubyInstaller MSYS2-DevKit)         | wxWidgets \u003e= 3.2     |\n| Linux (tested; all major AMD64 and ARM64 distributions: Ubuntu, Debian, Fedora, OpenSuSE and ArchLinux)\u003cbr\u003e(most likely also i686) | Ruby \u003e= 2.5                                         | wxWidgets \u003e= 3.2     |\n| MacOS \u003e= 10.10 using Cocoa (tested on AMD64 and ARM64 M1/M2 Chip)                                                                  | Ruby \u003e= 2.5 (MacPorts, Homebrew, ruby-install, RVM) | wxWidgets \u003e= 3.2     |\n\nSupport for other platforms is not being actively developed at present,\nbut patches are welcome. It is likely to be much simpler to get wxRuby\nworking on similar modern systems (eg FreeBSD or Solaris with GTK) than\non legacy systems (eg Windows 98, Mac OS 9).\n\n### How can I install wxRuby3?\n\nwxRuby3 is distributed as a Ruby gem on [RubyGems](https://rubygems.org). This gem can also be downloaded from the release \nassets on [Github](https://github.com/mcorino/wxRuby3/releases).\n\nThe wxRuby3 gem provides a **worry-free** installation procedure for all supported platforms.  \n\nInstalling the gem requires no additional installation steps and/or additional software to be installed except for a \nsupported version of the Ruby interpreter. So the following command is all it takes to install: \n\n```shell\ngem install wxruby3\n```\n\nThe wxRuby3 installation procedure will check the availability of a, prebuilt, binary package matching the platform\nbeing installed on and if found will download and install that package resulting in a ready-to-run wxRuby3 installation.\u003cbr\u003e\nIf no matching package is found the installation reverts to a source installation which will require an additional setup\nstep to finalize the wxRuby3 installation by executing the following command:\n\n```shell\nwxruby setup\n```\n\nThis last command is a fully automated setup procedure provided by the wxRuby3 **CLI** installed with the gem. This \nprocedure (by default) will analyze your system and install (after asking your consent) any missing software \nrequirements and build the wxRuby3 extension libraries (including a embedded copy of wxWidgets if necessary). It may \ntake quite a while depending on your system (around 10-15 minutes on a modern PC but could be significantly longer\non 'older' PC's) but you can mostly sit back and relax.\n\n\u003e **NOTE**\u003cbr\u003e\n\u003e A source based installation requires the availability of the Ruby development headers. User installed Rubies in most cases\n\u003e will already include those but (especially on Linux) system installed Rubies may require having an additional '-dev/-devel'\n\u003e package installed (although actually you may already have needed those to install the gems that the wxRuby3 gem depends \n\u003e on like the nokogiri gem).\n\nThe wxRuby3 CLI also provides a 'check' command with which the runtime status of the wxRuby3 installation can be checked\nat any time. By default running `wxruby check` will display a message reporting the runtime and suggestions on finalizing\nthe installation if not finalized yet. No message is displayed if wxRuby3 is ready to run. Run `wxruby check -h` for \ndetails concerning this command. \n\nA selection of (prebuilt) binary packages is provided as release assets on [Github](https://github.com/mcorino/wxRuby3/releases).\nSee the [INSTALL](INSTALL.md#binary-packages) document for more details.\n\nThis install procedure can of course be tweaked and customized with commandline arguments.\nSee the [INSTALL](INSTALL.md) document for more details.\n\n### Where can I ask a question, or report a bug?\n\nUse GitHUb Issues.\n\nWhen asking a question, if something is not working as you expect,\nplease provide a *minimal*, *runnable* sample of code that demonstrates\nthe problem, and describe clearly what you expected to happen and what actually\nhappened. Please also provide basic details of your platform, Ruby,\nwxRuby and wxWidgets version, and make a reasonable effort to find answers \nin the archive, wiki and/or documentation before posting. People are mostly happy\nto help, but it's too much to expect them to guess what you're trying to\ndo, or try and debug 1,000 lines of your application.\nVery important also; do not use offensive language and be **polite**.\n\n### How can I learn to use wxRuby?\n\nwxRuby3 is a large API and takes some time to learn. The wxRuby3\ndistribution comes with numerous samples which illustrate how to use\nmany specific parts of the API. A good one to start with is the\n'minimal' sample, which provides an application skeleton. All the\nbundled samples are expected to work with current wxRuby3, although\nsome use a more modern coding style than others. Use the bundled `wxruby`\nCLI to access the samples (see the section **Bundled CLI** in \nthe [INSTALL](INSTALL.md) document for more details).\n\nAn extensive [User Guide](https://github.com/mcorino/wxRuby3/wiki/User-Guide-%3A-Introduction) \nis available at the [wxRuby3 Wiki](https://github.com/mcorino/wxRuby3/wiki) providing detailed\ninformation about how to build desktop applications with wxRuby3. \n\nComplete (more or less) wxRuby API documentation should be part of any\ncomplete wxRuby3 build. This tends to focus on providing a reference\nof all available modules, classes and methods and how to use specific \nclasses and methods, rather than on how to construct an application \noverall.\nThis documentation (for the latest release) is also available online\n[here](https://mcorino.github.io/wxRuby3).\n\nOne of the advantages of wxRuby3 is the much larger ecosystem of\nwxWidgets and wxPython resources out there. There is a book for\nwxWidgets, \"Cross-Platform Programming in wxWidgets\", which can be freely\ndownloaded as a PDF. This provides very comprehensive coverage of the\nwxWidgets API in C++. The code may not be directly useful but the\ndescriptions of how widgets and events and so forth work are almost\nalways relevant to wxRuby3 (and should be fairly easily relatable).\n\nWhen using a search engine to find answers about a wxRuby3 class, it can\nbe worth searching for the same term but with 'wx' prepended. For\nexample, if you wanted answers about the \"Grid\" class, try searching for\n\"wxGrid\" as this will turn up results relating to wxWidgets and wxPython\nwhich may be relevant.\n\n### How does wxRuby3 relate to the wxRuby 2.0 (and even older 0.6.0) release?\n\nwxRuby 0.6.0 was the last in a series of releases developed using a\ndifferent approach in the early days of wxRuby. Work on this series\nstopped in early 2005, in favour of what became wxRuby 2.0. This project\nin turn stopped being supported in 2013.\nSeveral years of development have passed for wxWidgets and Ruby respectively,\nimproving code quality, adding new classes and new language features.\nIn 2022 I finally found the time and the inspiration to pick up this project\nwith the idea of reviving it to build some applications I had in mind.\nwxRuby 3 intends to provide Ruby interfaces for all relevant (!) wxWidget\nclasses of the latest version 3.2 and beyond. \nBuilding on the experiences of the previous wxRuby (2) developments as well\nas the wxPython Phoenix project it is expected to provide a better and more\nmaintainable solution.\n\n### I am getting an error trying to install or compile wxRuby3\n\nPlease double-check the instructions above and in the [INSTALL](INSTALL.md) document and search issue archives. If \nthis doesn't help, please post your question using GitHub Issues.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcorino%2Fwxruby3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcorino%2Fwxruby3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcorino%2Fwxruby3/lists"}