{"id":19468669,"url":"https://github.com/pharo-graphics/spec-brick","last_synced_at":"2025-04-25T11:32:34.588Z","repository":{"id":49427673,"uuid":"368353635","full_name":"pharo-graphics/Spec-Brick","owner":"pharo-graphics","description":"Brick backend for Spec","archived":true,"fork":false,"pushed_at":"2022-12-30T22:05:18.000Z","size":219,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":8,"default_branch":"dev-1.0","last_synced_at":"2025-02-25T14:35:49.160Z","etag":null,"topics":["brick","pharo","spec"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","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/pharo-graphics.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}},"created_at":"2021-05-18T00:12:09.000Z","updated_at":"2023-06-01T22:17:13.000Z","dependencies_parsed_at":"2023-01-31T17:02:00.437Z","dependency_job_id":null,"html_url":"https://github.com/pharo-graphics/Spec-Brick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-graphics%2FSpec-Brick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-graphics%2FSpec-Brick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-graphics%2FSpec-Brick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-graphics%2FSpec-Brick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-graphics","download_url":"https://codeload.github.com/pharo-graphics/Spec-Brick/tar.gz/refs/heads/dev-1.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250808374,"owners_count":21490655,"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":["brick","pharo","spec"],"created_at":"2024-11-10T18:43:14.664Z","updated_at":"2025-04-25T11:32:34.149Z","avatar_url":"https://github.com/pharo-graphics.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spec-Brick\n\n[![License](https://img.shields.io/github/license/pharo-graphics/Spec-Brick.svg)](./LICENSE)\n[![Tests](https://github.com/pharo-graphics/Spec-Brick/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/Spec-Brick/actions/workflows/test.yml)\n\n[Brick](https://github.com/pharo-graphics/Brick) backend for [Spec](https://github.com/pharo-spec/Spec). \n\nBrick is a widget library on top of [Bloc](https://github.com/pharo-graphics/Bloc).\n\nSpec is a [Pharo](https://pharo.org/) library for describing user interfaces. You describe a UI by composing the \"presenters\" and by connecting them via block closures.\n\nMore concretely, a Spec UI is a tree of `SpPresenter`, that is opened in the context of an application (`SpApplication`) that, among others, indicates what is the backend.\n\nOur backend (`SpBrickBackend`) provides the adapters (hierarchy of `SpBrickAdapter`) to make the `Brick` widgets to act as the tree of presenters describe.\n\nOther Spec backends are:\n- Morphic (the default)\n- [GTK](https://github.com/pharo-spec/Spec-Gtk)\n\n\n## Supported Features\n\n:warning: \nThis backend still **covers a very small part of Spec**: partial coverage of a few widgets. To see the current state, you can check the Example subsection below, the SUnit tests, and the hierarchy of `SpBrickAdapter`.\n:warning:\n\nThis is supported:\n\n- Widgets:\n  - Label\n  - Button\n    - icon + text\n    - enabled/disabled\n  - Tool bar\n  - Menu bar\n  - Text and Text input\n    - enabled/disabled\n  - Drop list (ugly transition open/closed)\n  - List and Table\n    - icon + text\n    - enabled/disabled\n    - columns\n    - header\n    - selection action (single-click)\n    - strong-selection action (double-click and enter key)\n    - context menu (not recursive)\n- Window and Dialog\n- Layouts\n  - Box\n    - Horizontal or vertical\n    - Margin (borderWidth)\n    - spacing:\n    - borderWidth:\n    - For each child:\n      - padding\n      - expand\n  - Paned: similar to box\n\n\n## Example\n\nThis repository has a demo Spec UI that you can open with the default backend (**Morphic**) using this snippet:\n\n```smalltalk\n| aModel aPresenter |\naModel := SpToDoList exampleWithSomeTasks.\naPresenter := SpToDoListPresenter on: aModel.\naPresenter openWithSpec.\n```\n\nTo open it using this **Brick** backend, specify the backend in an application:\n\n```smalltalk\n| app aModel aPresenter |\napp := SpApplication new \n\tuseBackend: #Brick;\n\tyourself.\naModel := SpToDoList exampleWithSomeTasks.\naPresenter := SpToDoListPresenter newApplication: app model: aModel.\naPresenter openWithSpec.\n```\n\nVideos:\n- https://youtu.be/nYZS3zqdCQM (June/2021 ~ commit 50dfb5f)\n- https://youtu.be/DGqeRnspGas (June/2021 ~ commit 89b6cbe)\n\n\n## Installation\n\nEvaluate the following script on [Pharo 9 or 10](https://pharo.org/download):\n\n```smalltalk\nMetacello new\n\tbaseline: 'SpecBrick';\n\trepository: 'github://pharo-graphics/Spec-Brick/src';\n\tonConflictUseIncoming;\n\tload\n```\n\nAlternatively, you can do it by terminal (MacOS, linux... and should work as well in Windows with MINGW64). \nCreate a directory and execute `\u003cthis_repo\u003e/scripts/build.sh`, which first downloads the Pharo image and VM and then loads the project.\n\n\n## CI status including dependencies\n\n| Project | Badge |\n| ------- | ----- |\n| Sparta | [![Sparta CI](https://github.com/pharo-graphics/sparta/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/sparta/actions/workflows/test.yml) |\n| Alexandrie | [![Tests](https://github.com/pharo-graphics/Alexandrie/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/Alexandrie/actions/workflows/test.yml) |\n| Bloc | [![Bloc CI](https://github.com/pharo-graphics/Bloc/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/Bloc/actions/workflows/test.yml) |\n| BlocPac | [![BlocPac CI](https://github.com/pharo-graphics/bloc-pac/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/bloc-pac/actions/workflows/test.yml) |\n| Brick | [![Brick CI](https://github.com/pharo-graphics/Brick/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/Brick/actions/workflows/test.yml) |\n| Spec-Brick | [![Spec-Brick CI](https://github.com/pharo-graphics/Spec-Brick/actions/workflows/test.yml/badge.svg)](https://github.com/pharo-graphics/Spec-Brick/actions/workflows/test.yml) |\n\n\n## License\n\nThis code is licensed under the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-graphics%2Fspec-brick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-graphics%2Fspec-brick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-graphics%2Fspec-brick/lists"}