Skip to content

Commit aee988b

Browse files
authored
Replace all references of druid with Druid. (#1071)
1 parent 3b3d401 commit aee988b

File tree

180 files changed

+243
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+243
-228
lines changed

AUTHORS

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This is the list of druid authors for copyright purposes.
1+
# This is the list of Druid authors for copyright purposes.
22
#
33
# This does not necessarily list everyone who has contributed code, since in
44
# some cases, their employer may be the copyright holder. To see the full list
@@ -9,3 +9,4 @@ Hilmar Gústafsson
99
Dmitry Borodin
1010
Kaiyin Zhong
1111
Kaur Kuut
12+
Leopold Luley

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
The latest published druid release is [0.6.0](#060---2020-06-01) which was released on 2020-06-01.
3+
The latest published Druid release is [0.6.0](#060---2020-06-01) which was released on 2020-06-01.
44
You can find its changes [documented below](#060---2020-06-01).
55

66
## [Unreleased]
@@ -73,7 +73,7 @@ all fundamental features are there.
7373

7474
#### Using Core Graphics on macOS.
7575

76-
[@cmyr] continued the work of [@jrmuizel] and implemented Core Graphics support for piet in
76+
[@cmyr] continued the work of [@jrmuizel] and implemented Core Graphics support for Piet in
7777
[piet#176](https://github.com/linebender/piet/pull/176).
7878

7979
Those changes made it into druid via [#905].
@@ -301,7 +301,7 @@ Last release without a changelog :(
301301
[#920]: https://github.com/linebender/druid/pull/920
302302
[#924]: https://github.com/linebender/druid/pull/924
303303
[#925]: https://github.com/linebender/druid/pull/925
304-
[#926]: https://github.com/linebender/druid/pull/926
304+
[#926]: https://github.com/linebender/druid/pull/926
305305
[#928]: https://github.com/linebender/druid/pull/928
306306
[#930]: https://github.com/linebender/druid/pull/930
307307
[#931]: https://github.com/linebender/druid/pull/931

CONTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ add it as part of your patch.
2222

2323
If you're already contributing to this project and want to do more,
2424
then there might be a chance to help out with the preparation of new releases.
25-
Whether you're new or have prepared druid releases many times already,
25+
Whether you're new or have prepared Druid releases many times already,
2626
it helps to follow a checklist of what needs to be done. This is that list.
2727

2828
### Increasing the versions
@@ -49,20 +49,20 @@ to specific version documentation that will need updating.
4949

5050
**We only test and specify the newest versions of dependencies.** Read on for more details.
5151

52-
Rust dependencies like druid specify their own sub-dependencies in `Cargo.toml`.
52+
Rust dependencies like Druid specify their own sub-dependencies in `Cargo.toml`.
5353
These specifications are usually version ranges according to [semver],
5454
stating that the dependency requires a sub-dependency of the specified version
5555
or any newer version that is still compatible. It is up to the final application
5656
to choose which actual versions get used via the `Cargo.lock` file of that application.
5757

5858
Because the final application chooses the sub-dependency versions and they are most likely
5959
going to be higher than the minimum that is specified in our `Cargo.toml` file,
60-
we need to make sure that druid works properly with these newer versions.
60+
we need to make sure that Druid works properly with these newer versions.
6161
Yes according to [semver] rules they should work, but library authors make mistakes
62-
and it won't be a good experience or a sign of druid quality if a new developer
63-
adds druid as a dependency and it won't even compile.
62+
and it won't be a good experience or a sign of Druid's quality if a new developer
63+
adds Druid as a dependency and it won't even compile.
6464
For that reason our CI testing always uses the highest version that is still compatible.
65-
This mimics what a new developer would experience when they start using druid.
65+
This mimics what a new developer would experience when they start using Druid.
6666

6767
What about the the minimum supported version or all the versions between the minimum and maximum?
6868
It is not practical for us to test all the combinations of possible sub-dependency versions.
@@ -79,7 +79,7 @@ Just because `1.1.1` used to work back in the day doesn't mean that it will alwa
7979
One partial solution to this problem is to be more precise in what we are actually promising.
8080
So whenever we release a new version we also update all our dependencies in `Cargo.toml`
8181
to match the versions that we are actually testing with. This will be much more accurate
82-
to the spirit of the version specification - druid will work with the specified version
82+
to the spirit of the version specification - Druid will work with the specified version
8383
and any newer one if it's [semver] compatible. We're not testing the extremely big matrix of
8484
old versions of our sub-dependencies and so we shouldn't claim that the old versions will work.
8585

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# druid
1+
# Druid
22

33
## A data-first Rust-native UI toolkit.
44

@@ -15,11 +15,11 @@ See the [goals section](#Goals) for more details.
1515
Druid's current development is largely driven by its use in [Runebender], a new
1616
font editor.
1717

18-
We have been doing periodic releases of druid on crates.io, but it is under
18+
We have been doing periodic releases of Druid on crates.io, but it is under
1919
active development and its API might change. All changes are documented
2020
in [the changelog](https://github.com/linebender/druid/blob/master/CHANGELOG.md).
2121

22-
For an overview of some key concepts, see the (work in progress) [druid book].
22+
For an overview of some key concepts, see the (work in progress) [Druid book].
2323

2424
## Example
2525

@@ -55,7 +55,7 @@ fn ui_builder() -> impl Widget<u32> {
5555
```
5656

5757
Check out the [the examples folder] for a more comprehensive demonstration of
58-
druid's existing functionality and widgets.
58+
Druid's existing functionality and widgets.
5959

6060
## Screenshots
6161

@@ -85,7 +85,7 @@ platforms. In order to achieve this we strive for a variety of things:
8585

8686
In order to fulfill those goals, we cannot support every use case. Luckily
8787
the Rust community is working on a variety of different libraries with
88-
different goals, so here are some of druid's non-goals and possible
88+
different goals, so here are some of Druid's non-goals and possible
8989
alternatives that can offer those capabilities:
9090

9191
- Use the the platform-native widgets or mimic them. ([Relm])
@@ -100,22 +100,22 @@ doesn't suit your use case, perhaps one of the others will!
100100

101101
### druid-shell
102102

103-
The druid toolkit uses druid-shell for a platform-abstracting application shell.
104-
Druid-shell is responsible for starting a native platform runloop, listening to
103+
The Druid toolkit uses `druid-shell` for a platform-abstracting application shell.
104+
`druid-shell` is responsible for starting a native platform runloop, listening to
105105
events, converting them into a platform-agnostic representation, and calling a
106106
user-provided handler with them.
107107

108-
While druid-shell is being developed with the druid toolkit in mind, it is
108+
While `druid-shell` is being developed with the Druid toolkit in mind, it is
109109
intended to be general enough that it could be reused by other projects
110-
interested in experimenting with Rust GUI. The druid-shell crate includes a
111-
couple of [non-druid examples].
110+
interested in experimenting with Rust GUI. The `druid-shell` crate includes a
111+
couple of [non-`druid` examples].
112112

113113
### piet
114114

115-
Druid relies on the [piet library] for drawing and text layout. Piet is a 2D graphics
115+
Druid relies on the [Piet library] for drawing and text layout. Piet is a 2D graphics
116116
abstraction with multiple backends: `piet-direct2d`, `piet-coregraphics`, `piet-cairo`,
117117
`piet-web`, and `piet-svg` are currently available, and a GPU backend is planned.
118-
In terms of druid platform support via piet, macOS uses `piet-coregraphics`,
118+
In terms of Druid platform support via Piet, macOS uses `piet-coregraphics`,
119119
Linux uses `piet-cairo`, Windows uses `piet-direct2d`, and web uses `piet-web`.
120120

121121
```rust
@@ -144,7 +144,7 @@ ctx.fill(rect, &fill_color);
144144

145145
### widgets
146146

147-
Widgets in druid (text boxes, buttons, layout components, etc.) are objects
147+
Widgets in Druid (text boxes, buttons, layout components, etc.) are objects
148148
which implement the [Widget trait]. The trait is parametrized by a type (`T`)
149149
for associated data. All trait methods (`event`, `lifecycle`, `update`, `paint`,
150150
and `layout`) are provided with access to this data, and in the case of
@@ -201,7 +201,7 @@ fn build_widget() -> impl Widget<u32> {
201201
### layout
202202

203203
Druid's layout protocol is strongly inspired by [Flutter's box layout model].
204-
In druid, widgets are passed a `BoxConstraint` that provides them a minimum and
204+
In Druid, widgets are passed a `BoxConstraint` that provides them a minimum and
205205
maximum size for layout. Widgets are also responsible for computing appropriate
206206
constraints for their children if applicable.
207207

@@ -250,18 +250,18 @@ LensWrap::new(WidgetThatExpectsf64::new(), lens!(AppState, value));
250250

251251
This is particularly useful when working with types defined in another crate.
252252

253-
## Using druid
253+
## Using Druid
254254

255-
An explicit goal of druid is to be easy to build, so please open an issue if you
255+
An explicit goal of Druid is to be easy to build, so please open an issue if you
256256
run into any difficulties. Druid is available on [crates.io] and should work as
257-
a lone dependency (it re-exports all the parts of druid-shell, piet, and kurbo
257+
a lone dependency (it re-exports all the parts of `druid-shell`, piet, and kurbo
258258
that you'll need):
259259

260260
```toml
261261
druid = "0.6.0"
262262
```
263263

264-
Since druid is currently in fast-evolving state, you might prefer to drink from
264+
Since Druid is currently in fast-evolving state, you might prefer to drink from
265265
the firehose:
266266

267267
```toml
@@ -272,7 +272,7 @@ druid = { git = "https://github.com/linebender/druid.git" }
272272

273273
#### Linux
274274

275-
On Linux, druid requires gtk+3; see [gtk-rs dependencies] for installation
275+
On Linux, Druid requires gtk+3; see [gtk-rs dependencies] for installation
276276
instructions.
277277

278278
Alternatively, there is an X11 backend available, although it is currently
@@ -294,7 +294,7 @@ active and friendly community.
294294

295295
[Runebender]: https://github.com/linebender/runebender
296296
[the examples folder]: ./druid/examples
297-
[piet library]: https://github.com/linebender/piet
297+
[Piet library]: https://github.com/linebender/piet
298298
[custom_widget]: ./druid/examples/custom_widget.rs
299299
[basic utility and layout widgets]: ./druid/src/widget
300300
[Flutter's box layout model]: https://api.flutter.dev/flutter/rendering/BoxConstraints-class.html
@@ -303,7 +303,7 @@ active and friendly community.
303303
[Rust-native GUI experiments]: https://areweguiyet.com
304304
[CONTRIBUTING.md]: ./CONTRIBUTING.md
305305
[Zulip chat instance]: https://xi.zulipchat.com
306-
[non-druid examples]: ./druid-shell/examples/shello.rs
306+
[non-`druid` examples]: ./druid-shell/examples/shello.rs
307307
[crates.io]: https://crates.io/crates/druid
308308
[EventCtx]: https://docs.rs/druid/0.6.0/druid/struct.EventCtx.html
309309
[LifeCycleCtx]: https://docs.rs/druid/0.6.0/druid/struct.EventCtx.html
@@ -313,7 +313,7 @@ active and friendly community.
313313
[Widget trait]: https://docs.rs/druid/0.6.0/druid/trait.Widget.html
314314
[Data trait]: https://docs.rs/druid/0.6.0/druid/trait.Data.html
315315
[Lens datatype]: https://docs.rs/druid/0.6.0/druid/trait.Lens.html
316-
[druid book]: https://linebender.org/druid/
316+
[Druid book]: https://linebender.org/druid/
317317
[Iced]: https://github.com/hecrj/iced
318318
[Conrod]: https://github.com/PistonDevelopers/conrod
319319
[Relm]: https://github.com/antoyo/relm

docs/README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# Druid mdbook documentation
2-
This folder contains druid documentation in mdbook format. Mdbook allows documentation written in
3-
markdown to be published as html. This README.md gives some pointers for contributers on how to
1+
# Druid mdBook documentation
2+
This folder contains Druid documentation in mdBook format. mdBook allows documentation written in
3+
markdown to be published as html. This README.md gives some pointers for contributers on how to
44
edit, preview and publish the documentation.
55

66
## Editing
7-
Mdbook handles writing documentation in a similar way to writing software. Documentation 'source
8-
code' lives in the `docs/src` folder in the form of markdown files. It can be built and published
9-
as html using the mdbook tool.
7+
mdBook handles writing documentation in a similar way to writing software. Documentation 'source
8+
code' lives in the `docs/src` folder in the form of markdown files. It can be built and published
9+
as html using the mdBook tool.
1010
To edit documentation you edit the corresponding markdown file in `docs/src`. The
1111
`docs/src/SUMMARY.md` file contains the index for the documentation with links to files for all the
1212
chapters.
1313

1414
## Preview documentation
15-
To preview the documentation or to host it on your own system for offline viewing the mdbook tool
15+
To preview the documentation or to host it on your own system for offline viewing the mdBook tool
1616
needs to be installed. The easiest way to install it is from the crates.io repository using cargo.
1717
`cargo install mdbook`
1818

19-
After this you can start mdbook to serve the documentation locally using
20-
`mdbook serve` from the `docs\` directory. This will serve documetion on `http://localhost:3000`
19+
After this you can start mdBook to serve the documentation locally using
20+
`mdbook serve` from the `docs\` directory. This will serve documentation on `http://localhost:3000`
2121

2222
## Publish documentation
2323
To publish documentation to github pages the documentation needs to be built as html and then moved
2424
to the `gh-pages` branch. This can be done manually or by the build server.
2525
To build the documentation from the project root run;
2626
`mdbook build docs`
2727
This will build the documentation to the `docs\book` folder. This folder can then be copied onto the
28-
`gh-pages` branch. This will tell github to publish the documentation. For the druid repository it
28+
`gh-pages` branch. This will tell github to publish the documentation. For the Druid repository it
2929
will be hosted on [https://linebender.org/druid/]

docs/book_examples/src/data_md.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ struct TodoItem {
1717
category: Category,
1818
// `Data` is implemented for any `Arc`.
1919
due_date: Option<Arc<DateTime>>,
20-
// you can specify a custom comparison fn
21-
// (anything with the signature (&T, &T) -> bool)
20+
// You can specify a custom comparison fn
21+
// (anything with the signature (&T, &T) -> bool).
2222
#[data(same_fn = "PartialEq::eq")]
2323
added_date: DateTime,
2424
title: String,

docs/book_examples/src/lens_md.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct Item {
7676
count: usize,
7777
}
7878

79-
// this now works
79+
// This works now:
8080
impl Item {
8181
fn count(&self) -> usize {
8282
self.count
@@ -88,7 +88,7 @@ impl Item {
8888
use druid::widget::{Checkbox, Flex, Label, Widget, WidgetExt};
8989

9090
fn make_todo_item() -> impl Widget<TodoItem> {
91-
// A label that generates its text based on the data
91+
// A label that generates its text based on the data:
9292
let title = Label::dynamic(|text: &String, _| text.to_string()).lens(TodoItem::title);
9393
let completed = Checkbox::new("Completed:").lens(TodoItem::completed);
9494
let urgent = Checkbox::new("Urgent:").lens(TodoItem::urgent);
@@ -137,7 +137,7 @@ impl Lens<Contacts, Option<Contact>> for ContactIdLens {
137137
_ => true,
138138
};
139139
if changed {
140-
//if !data.inner.get(&self.0).same(&contact.as_ref()) {
140+
// if !data.inner.get(&self.0).same(&contact.as_ref()) {
141141
let contacts = Arc::make_mut(&mut data.inner);
142142
// if we're none, we were deleted, and remove from the map; else replace
143143
match contact {

docs/src/custom_widgets.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Create custom widgets
22

3-
The `Widget` trait is the heart of druid, and in any serious application you
3+
The `Widget` trait is the heart of Druid, and in any serious application you
44
will eventually need to create and use custom `Widget`s.
55

66
## `Painter` and `Controller`
77

8-
There are two helper widgets in druid that let you customize widget behaviour
8+
There are two helper widgets in Druid that let you customize widget behaviour
99
without needing to implement the full widget trait: [`Painter`] and
1010
[`Controller`].
1111

docs/src/data.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Model data and the `Data` trait
22

3-
The heart of a `druid` application is your application model. Your model drives
4-
your UI. When you mutate your model, druid compares the old and new version,
3+
The heart of a Druid application is your application model. Your model drives
4+
your UI. When you mutate your model, Druid compares the old and new version,
55
and propagates the change to the components ('widgets') of your application that
66
are affected by the change.
77

@@ -38,7 +38,7 @@ Here is an example of using `Data` to implement a simple data model.
3838
issues with collection types. For this reason, `Data` is not implemented for
3939
`std` types like `Vec` or `HashMap`. This is not a huge issue, however; you can
4040
always put these types inside an `Rc` or an `Arc`, or if you're dealing with
41-
larger collections you can build druid with the `im` feature, which brings in
41+
larger collections you can build Druid with the `im` feature, which brings in
4242
the [`im crate`], and adds a `Data` impl for the collections there. The [`im`
4343
crate] is a collection of immutable data structures that act a lot like the `std`
4444
collections, but can be cloned efficiently.

docs/src/env.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The `Env` contains the localization resources for the current locale. A
8181
calling its [`resolve`] method.
8282

8383
In general, you should not need to worry about localization directly. See the
84-
[localization] chapter for an overview of localization in druid.
84+
[localization] chapter for an overview of localization in Druid.
8585

8686

8787
[`Env`]: https://docs.rs/druid/0.6.0/druid/struct.Env.html

docs/src/get_started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
*this is outdated, and should be replaced with a walkthrough of getting a simple
33
app built and running*.
44

5-
This chapter will walk you through setting up a simple druid application from start to finish.
5+
This chapter will walk you through setting up a simple Druid application from start to finish.
66

77
## Set up a Druid project
88
Setting up a project is a simple as creating a new Rust project;
99
```bash
1010
> cargo new druid-example
1111
```
1212

13-
And then adding druid as a dependency to Cargo.toml
13+
And then adding Druid as a dependency to Cargo.toml
1414
```toml
1515
[dependencies]
1616
druid = "0.6.0"

docs/src/intro.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Druid is a framework for building simple graphical applications.
44

5-
'Druid' is composed of a number of related projects. [`druid-shell`] is a
5+
Druid is composed of a number of related projects. [`druid-shell`] is a
66
low-level library that provides a common abstraction for interacting with the
77
current OS & window manager. [`piet`] is an abstraction for doing 2D graphics;
88
[`kurbo`] is a library for 2D geometry; and [`druid`] itself is an opinionated set of
@@ -12,11 +12,11 @@ Druid is *data oriented*. It shares many ideas (and is directly inspired by)
1212
contemporary declarative UI frameworks such as [Flutter], [Jetpack Compose],
1313
and [SwiftUI], while also attempting to be conceptually simple and largely
1414
*non-magical*. A programmer familiar with Rust should be able to understand how
15-
druid works without special difficulty.
15+
Druid works without special difficulty.
1616

1717
## Goals and Status
1818

19-
The current goal of druid is to make it easy to write a program in Rust that
19+
The current goal of Druid is to make it easy to write a program in Rust that
2020
can present a GUI and accept user input. Running your program should be as
2121
simple as `cargo run`.
2222

0 commit comments

Comments
 (0)