Skip to content

Commit 22d5ed5

Browse files
Generate Markdown output
1 parent f658c87 commit 22d5ed5

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

output/book.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The sixth section is dedicated to the creation of new
4343
\(This documentation was written by Benjamin Van Ryseghem and Johan Fabry\. For corrections, comments and questions about this text please send a mail to either of them\.\)
4444

4545

46-
##2\. Defining and Reuse UIs with *Spec*
46+
##2\. Defining and Reusing UIs with *Spec*
4747
<a name="sec_reuse_spec"></a>
4848

4949
This section introduces an example of how to define and reuse
@@ -58,21 +58,21 @@ In this section we do not detail the different parts of
5858

5959

6060
The example is structured in four parts\.
61-
First a list UI dedicated to render the subclasses of the
62-
*AbstractWidgetModel* class is created and is called
63-
**ModelList**\.
64-
Second a UI composed of a list and a label is defined and named
61+
First, a list UI named
62+
**ModelList** that is dedicated to render the subclasses of the
63+
*AbstractWidgetModel* class is created\.
64+
Second, a UI composed of a list and a label is defined and named
6565
**ProtocolList**\.
66-
Third a protocol viewer is defined by combining a
66+
Third, a protocol viewer is defined by combining a
6767
**ModelList** with two
6868
**ProtocolList** to browse the
6969
*protocol* and
7070
*protocol\-events* methods\.
71-
Finally a protocol browser is made by reusing a protocol viewer with a text zone in addition\.
71+
Finally a protocol browser is made by reusing a protocol viewer and adding a text zone\.
7272

7373

7474

75-
###2\.1\. The MethodList
75+
###2\.1\. The ModelList
7676

7777

7878
Creating a specific UI always starts with the subclassing of
@@ -169,7 +169,7 @@ The code
169169

170170

171171
The first UI is now done\.
172-
The result can be seen by performing the following snippet:
172+
The result can be seen by executing the following snippet of code:
173173
`ModelList new openWithSpec`\.
174174

175175

@@ -196,7 +196,7 @@ The class definition is similar to the code above, as can be seen in
196196

197197

198198
The
199-
`initializeWidgets` method for this UI is quite similar to the method in ModelList, as the code
199+
`initializeWidgets` method for this UI is quite similar to the method in ModelList, as the code in
200200
[2\.6](#ex_protocolList_init) shows\.
201201

202202

@@ -287,7 +287,7 @@ The code
287287

288288

289289
The
290-
**ProtocolList** UI can be seen by evaluating the snippet
290+
**ProtocolList** UI can be seen by evaluating
291291
`ProtocolList new openWithSpec`\.
292292

293293

@@ -332,8 +332,8 @@ The code in
332332

333333
The
334334
`initializeWidgets` method now uses a different way to initialize the sub\-widgets of the UI\.
335-
This is because it does not use basic widgets but instead reuses the user interfaces we defines previously as sub widgets\.
336-
The remainder of the method is quite similar to the previous implementation, as shown in the code
335+
This is because it does not use basic widgets but instead reuses the user interfaces we defines previously\.
336+
The remainder of the method is quite similar to the previous implementation, as shown in the code in
337337
[2\.10](#ex_viewer_initializeWidgets)\.
338338

339339

@@ -359,7 +359,7 @@ The remainder of the method is quite similar to the previous implementation, as
359359

360360

361361
The layout puts the sub widgets in one column, with all sub widgets taking the same amount of space\.
362-
The code
362+
The code in
363363
[2\.11](#ex_viewer_layout) shows the implementation of this layout\.
364364

365365

@@ -416,7 +416,7 @@ More details on the
416416

417417

418418
The remaining methods are getters, methods to delegate to sub widgets, one method to compute the methods in a specific class for a specific protocol, and methods to register to sub widget events\.
419-
Those methods are summed up in the code in
419+
Those methods are given in the code in
420420
[2\.13](#ex_viewer_others)\.
421421

422422

@@ -475,7 +475,7 @@ Those methods are summed up in the code in
475475

476476

477477

478-
As previously the result can be seen by executing the following snippet:
478+
As previously, the result can be seen by executing the following snippet of code:
479479
`ProtocolViewer new openWithSpec`\.
480480

481481

@@ -525,7 +525,8 @@ The
525525

526526

527527
The layout is more complex than the previous layouts\.
528-
Now the user interface mainly lays out sub widgets of its sub widgets\.
528+
Now the user interface mainly lays out widgets that are contained in its
529+
`viewer` sub widget \(the list of models and the two protocol browsers\)\.
529530
The layout is based on a column whose first row is divided in columns\.
530531
The implementation of this method is shown in code in
531532
[2\.16](#ex_browser_layout)\.

output/chapters/SpecReusability.pier.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
##1\. Defining and Reuse UIs with *Spec*
3+
##1\. Defining and Reusing UIs with *Spec*
44
<a name="sec_reuse_spec"></a>
55

66
This section introduces an example of how to define and reuse
@@ -15,21 +15,21 @@ In this section we do not detail the different parts of
1515

1616

1717
The example is structured in four parts\.
18-
First a list UI dedicated to render the subclasses of the
19-
*AbstractWidgetModel* class is created and is called
20-
**ModelList**\.
21-
Second a UI composed of a list and a label is defined and named
18+
First, a list UI named
19+
**ModelList** that is dedicated to render the subclasses of the
20+
*AbstractWidgetModel* class is created\.
21+
Second, a UI composed of a list and a label is defined and named
2222
**ProtocolList**\.
23-
Third a protocol viewer is defined by combining a
23+
Third, a protocol viewer is defined by combining a
2424
**ModelList** with two
2525
**ProtocolList** to browse the
2626
*protocol* and
2727
*protocol\-events* methods\.
28-
Finally a protocol browser is made by reusing a protocol viewer with a text zone in addition\.
28+
Finally a protocol browser is made by reusing a protocol viewer and adding a text zone\.
2929

3030

3131

32-
###1\.1\. The MethodList
32+
###1\.1\. The ModelList
3333

3434

3535
Creating a specific UI always starts with the subclassing of
@@ -126,7 +126,7 @@ The code
126126

127127

128128
The first UI is now done\.
129-
The result can be seen by performing the following snippet:
129+
The result can be seen by executing the following snippet of code:
130130
`ModelList new openWithSpec`\.
131131

132132

@@ -153,7 +153,7 @@ The class definition is similar to the code above, as can be seen in
153153

154154

155155
The
156-
`initializeWidgets` method for this UI is quite similar to the method in ModelList, as the code
156+
`initializeWidgets` method for this UI is quite similar to the method in ModelList, as the code in
157157
[1\.6](#ex_protocolList_init) shows\.
158158

159159

@@ -244,7 +244,7 @@ The code
244244

245245

246246
The
247-
**ProtocolList** UI can be seen by evaluating the snippet
247+
**ProtocolList** UI can be seen by evaluating
248248
`ProtocolList new openWithSpec`\.
249249

250250

@@ -289,8 +289,8 @@ The code in
289289

290290
The
291291
`initializeWidgets` method now uses a different way to initialize the sub\-widgets of the UI\.
292-
This is because it does not use basic widgets but instead reuses the user interfaces we defines previously as sub widgets\.
293-
The remainder of the method is quite similar to the previous implementation, as shown in the code
292+
This is because it does not use basic widgets but instead reuses the user interfaces we defines previously\.
293+
The remainder of the method is quite similar to the previous implementation, as shown in the code in
294294
[1\.10](#ex_viewer_initializeWidgets)\.
295295

296296

@@ -316,7 +316,7 @@ The remainder of the method is quite similar to the previous implementation, as
316316

317317

318318
The layout puts the sub widgets in one column, with all sub widgets taking the same amount of space\.
319-
The code
319+
The code in
320320
[1\.11](#ex_viewer_layout) shows the implementation of this layout\.
321321

322322

@@ -373,7 +373,7 @@ More details on the
373373

374374

375375
The remaining methods are getters, methods to delegate to sub widgets, one method to compute the methods in a specific class for a specific protocol, and methods to register to sub widget events\.
376-
Those methods are summed up in the code in
376+
Those methods are given in the code in
377377
[1\.13](#ex_viewer_others)\.
378378

379379

@@ -432,7 +432,7 @@ Those methods are summed up in the code in
432432

433433

434434

435-
As previously the result can be seen by executing the following snippet:
435+
As previously, the result can be seen by executing the following snippet of code:
436436
`ProtocolViewer new openWithSpec`\.
437437

438438

@@ -482,7 +482,8 @@ The
482482

483483

484484
The layout is more complex than the previous layouts\.
485-
Now the user interface mainly lays out sub widgets of its sub widgets\.
485+
Now the user interface mainly lays out widgets that are contained in its
486+
`viewer` sub widget \(the list of models and the two protocol browsers\)\.
486487
The layout is based on a column whose first row is divided in columns\.
487488
The implementation of this method is shown in code in
488489
[1\.16](#ex_browser_layout)\.

0 commit comments

Comments
 (0)