Skip to content

Commit bfa0d48

Browse files
authored
Fix some typos and missing whitespaces for Lobster registry (aardappel#1302)
1 parent 88cf3ad commit bfa0d48

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

TS/docs/script_reference.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,55 @@
77
</head>
88
<body><center><table border=0><tr><td>
99
<p>lobster builtin functions:(file auto generated by compiler, do not modify)</p></td></tr><tr class="a" valign=top><td><h3>treesheets</h3></td></tr>
10-
<tr><td><table class="a" border=1 cellspacing=0 cellpadding=4><tr class="a" valign=top><td class="a"><tt><b>ts.goto_root</b>()</tt></td><td class="a">makes the root of the document the current cell. this is the default at the startof any script, so this function is only needed to return there.</td>
10+
<tr><td><table class="a" border=1 cellspacing=0 cellpadding=4><tr class="a" valign=top><td class="a"><tt><b>ts.goto_root</b>()</tt></td><td class="a">makes the root of the document the current cell. this is the default at the start of any script, so this function is only needed to return there.</td>
1111

1212
</tr>
13-
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_view</b>()</tt></td><td class="a">makes what the user has zoomed into the current cell.</td>
13+
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_view</b>()</tt></td><td class="a">makes what the user has zoomed into the current cell</td>
1414

1515
</tr>
16-
<tr class="a" valign=top><td class="a"><tt><b>ts.has_selection</b>() -> <font color="#666666">int</font></tt></td><td class="a">whether there is a selection.</td>
16+
<tr class="a" valign=top><td class="a"><tt><b>ts.has_selection</b>() -> <font color="#666666">int</font></tt></td><td class="a">whether there is a selection</td>
1717

1818
</tr>
19-
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_selection</b>()</tt></td><td class="a">makes the current cell the one selected, or the first of a selection.</td>
19+
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_selection</b>()</tt></td><td class="a">makes the current cell the one selected, or the first of a selection</td>
2020

2121
</tr>
22-
<tr class="a" valign=top><td class="a"><tt><b>ts.has_parent</b>() -> <font color="#666666">int</font></tt></td><td class="a">whether the current cell has a parent (is the root cell).</td>
22+
<tr class="a" valign=top><td class="a"><tt><b>ts.has_parent</b>() -> <font color="#666666">int</font></tt></td><td class="a">whether the current cell has a parent (is the root cell)</td>
2323

2424
</tr>
25-
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_parent</b>()</tt></td><td class="a">makes the current cell the parent of the current cell, if any.</td>
25+
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_parent</b>()</tt></td><td class="a">makes the current cell the parent of the current cell, if any</td>
2626

2727
</tr>
28-
<tr class="a" valign=top><td class="a"><tt><b>ts.num_children</b>() -> <font color="#666666">int</font></tt></td><td class="a">returns the total number of children of the current cell (rows * columns).returns 0 if this cell doesn't have a sub-grid at all.</td>
28+
<tr class="a" valign=top><td class="a"><tt><b>ts.num_children</b>() -> <font color="#666666">int</font></tt></td><td class="a">returns the total number of children of the current cell (rows * columns). returns 0 if this cell doesn't have a sub-grid at all.</td>
2929

3030
</tr>
31-
<tr class="a" valign=top><td class="a"><tt><b>ts.num_columns_rows</b>() -> <font color="#666666">int2</font></tt></td><td class="a">returns the number of columns &amp; rows in the current cell.</td>
31+
<tr class="a" valign=top><td class="a"><tt><b>ts.num_columns_rows</b>() -> <font color="#666666">int2</font></tt></td><td class="a">returns the number of columns &amp; rows in the current cell</td>
3232

3333
</tr>
34-
<tr class="a" valign=top><td class="a"><tt><b>ts.selection</b>() -> <font color="#666666">int2</font>, <font color="#666666">int2</font></tt></td><td class="a">returns the (xs,ys) and (x,y) of the current selection, or zeroes if none.</td>
34+
<tr class="a" valign=top><td class="a"><tt><b>ts.selection</b>() -> <font color="#666666">int2</font>, <font color="#666666">int2</font></tt></td><td class="a">returns the (xs,ys) and (x,y) of the current selection, or zeroes if none</td>
3535

3636
</tr>
37-
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_child</b>(n<font color="#666666">: int</font>)</tt></td><td class="a">makes the current cell the nth child of the current cell.</td>
37+
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_child</b>(n<font color="#666666">: int</font>)</tt></td><td class="a">makes the current cell the nth child of the current cell</td>
3838

3939
</tr>
40-
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_column_row</b>(col<font color="#666666">: int</font>, row<font color="#666666">: int</font>)</tt></td><td class="a">makes the current cell the child at col / row.</td>
40+
<tr class="a" valign=top><td class="a"><tt><b>ts.goto_column_row</b>(col<font color="#666666">: int</font>, row<font color="#666666">: int</font>)</tt></td><td class="a">makes the current cell the child at col / row</td>
4141

4242
</tr>
4343
<tr class="a" valign=top><td class="a"><tt><b>ts.get_text</b>() -> <font color="#666666">string</font></tt></td><td class="a">gets the text of the current cell.</td>
4444

4545
</tr>
46-
<tr class="a" valign=top><td class="a"><tt><b>ts.set_text</b>(text<font color="#666666">: string</font>)</tt></td><td class="a">sets the text of the current cell.</td>
46+
<tr class="a" valign=top><td class="a"><tt><b>ts.set_text</b>(text<font color="#666666">: string</font>)</tt></td><td class="a">sets the text of the current cell</td>
4747

4848
</tr>
49-
<tr class="a" valign=top><td class="a"><tt><b>ts.create_grid</b>(cols<font color="#666666">: int</font>, rows<font color="#666666">: int</font>)</tt></td><td class="a">creates a grid in the current cell if there isn't one yet.</td>
49+
<tr class="a" valign=top><td class="a"><tt><b>ts.create_grid</b>(cols<font color="#666666">: int</font>, rows<font color="#666666">: int</font>)</tt></td><td class="a">creates a grid in the current cell if there isn't one yet</td>
5050

5151
</tr>
52-
<tr class="a" valign=top><td class="a"><tt><b>ts.insert_column</b>(c<font color="#666666">: int</font>)</tt></td><td class="a">insert n columns before column c in an existing grid.</td>
52+
<tr class="a" valign=top><td class="a"><tt><b>ts.insert_column</b>(c<font color="#666666">: int</font>)</tt></td><td class="a">inserts n columns before column c in an existing grid</td>
5353

5454
</tr>
55-
<tr class="a" valign=top><td class="a"><tt><b>ts.insert_row</b>(r<font color="#666666">: int</font>)</tt></td><td class="a">insert n rows before row r in an existing grid.</td>
55+
<tr class="a" valign=top><td class="a"><tt><b>ts.insert_row</b>(r<font color="#666666">: int</font>)</tt></td><td class="a">inserts n rows before row r in an existing grid</td>
5656

5757
</tr>
58-
<tr class="a" valign=top><td class="a"><tt><b>ts.delete</b>(pos<font color="#666666">: int2</font>, size<font color="#666666">: int2</font>)</tt></td><td class="a">clears the cells denoted by pos/size. also removes columns/rows if they becomecompletely empty, or the entire grid.</td>
58+
<tr class="a" valign=top><td class="a"><tt><b>ts.delete</b>(pos<font color="#666666">: int2</font>, size<font color="#666666">: int2</font>)</tt></td><td class="a">clears the cells denoted by pos/size. also removes columns/rows if they become completely empty, or the entire grid.</td>
5959

6060
</tr>
6161
<tr class="a" valign=top><td class="a"><tt><b>ts.set_background_color</b>(col<font color="#666666">: float4</font>)</tt></td><td class="a">sets the background color of the current cell</td>
@@ -76,16 +76,16 @@
7676
<tr class="a" valign=top><td class="a"><tt><b>ts.set_relative_size</b>(s<font color="#666666">: int</font>)</tt></td><td class="a">sets the relative size (0 is normal, -1 is smaller etc.) of the current cell</td>
7777

7878
</tr>
79-
<tr class="a" valign=top><td class="a"><tt><b>ts.set_style_bits</b>(s<font color="#666666">: int</font>)</tt></td><td class="a">sets one or more styles (bold = 1, italic = 2, fixed = 4, underline = 8, strikethru = 16) on the current cell.</td>
79+
<tr class="a" valign=top><td class="a"><tt><b>ts.set_style_bits</b>(s<font color="#666666">: int</font>)</tt></td><td class="a">sets one or more styles (bold = 1, italic = 2, fixed = 4, underline = 8, strikethru = 16) on the current cell</td>
8080

8181
</tr>
82-
<tr class="a" valign=top><td class="a"><tt><b>ts.set_status_message</b>(message<font color="#666666">: string</font>)</tt></td><td class="a">sets the status message in TreeSheets.</td>
82+
<tr class="a" valign=top><td class="a"><tt><b>ts.set_status_message</b>(message<font color="#666666">: string</font>)</tt></td><td class="a">sets the status message in TreeSheets</td>
8383

8484
</tr>
8585
<tr class="a" valign=top><td class="a"><tt><b>ts.get_filename_from_user</b>(is_save<font color="#666666">: int</font>) -> <font color="#666666">string</font></tt></td><td class="a">gets a filename using a file dialog. empty string if cancelled.</td>
8686

8787
</tr>
88-
<tr class="a" valign=top><td class="a"><tt><b>ts.get_filename</b>() -> <font color="#666666">string</font></tt></td><td class="a">gets the current documents file name.</td>
88+
<tr class="a" valign=top><td class="a"><tt><b>ts.get_filename</b>() -> <font color="#666666">string</font></tt></td><td class="a">gets the current documents file name</td>
8989

9090
</tr>
9191
<tr class="a" valign=top><td class="a"><tt><b>ts.load_document</b>(filename<font color="#666666">: string</font>) -> <font color="#666666">int</font></tt></td><td class="a">loads a document, and makes it the active one. returns false if failed.</td>

src/lobster_impl.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,62 +12,62 @@ ScriptInterface *si = nullptr;
1212

1313
void AddTreeSheets(NativeRegistry &nfr) {
1414
nfr("goto_root", "", "", "",
15-
"makes the root of the document the current cell. this is the default at the start"
15+
"makes the root of the document the current cell. this is the default at the start "
1616
"of any script, so this function is only needed to return there.",
1717
[](StackPtr &, VM &) {
1818
si->GoToRoot();
1919
return NilVal();
2020
});
2121

22-
nfr("goto_view", "", "", "", "makes what the user has zoomed into the current cell.",
22+
nfr("goto_view", "", "", "", "makes what the user has zoomed into the current cell",
2323
[](StackPtr &, VM &) {
2424
si->GoToView();
2525
return NilVal();
2626
});
2727

28-
nfr("has_selection", "", "", "I", "whether there is a selection.",
28+
nfr("has_selection", "", "", "I", "whether there is a selection",
2929
[](StackPtr &, VM &) { return Value(si->HasSelection()); });
3030

3131
nfr("goto_selection", "", "", "",
32-
"makes the current cell the one selected, or the first of a selection.",
32+
"makes the current cell the one selected, or the first of a selection",
3333
[](StackPtr &, VM &) {
3434
si->GoToSelection();
3535
return NilVal();
3636
});
3737

38-
nfr("has_parent", "", "", "I", "whether the current cell has a parent (is the root cell).",
38+
nfr("has_parent", "", "", "I", "whether the current cell has a parent (is the root cell)",
3939
[](StackPtr &, VM &) { return Value(si->HasParent()); });
4040

41-
nfr("goto_parent", "", "", "", "makes the current cell the parent of the current cell, if any.",
41+
nfr("goto_parent", "", "", "", "makes the current cell the parent of the current cell, if any",
4242
[](StackPtr &, VM &) {
4343
si->GoToParent();
4444
return NilVal();
4545
});
4646

4747
nfr("num_children", "", "", "I",
48-
"returns the total number of children of the current cell (rows * columns)."
48+
"returns the total number of children of the current cell (rows * columns). "
4949
"returns 0 if this cell doesn't have a sub-grid at all.",
5050
[](StackPtr &, VM &) { return Value(si->NumChildren()); });
5151

5252
nfr("num_columns_rows", "", "", "I}:2",
53-
"returns the number of columns & rows in the current cell.",
53+
"returns the number of columns & rows in the current cell",
5454
[](StackPtr &sp, VM &) { PushVec(sp, int2(si->NumColumnsRows())); });
5555

5656
nfr("selection", "", "", "I}:2I}:2",
57-
"returns the (xs,ys) and (x,y) of the current selection, or zeroes if none.",
57+
"returns the (xs,ys) and (x,y) of the current selection, or zeroes if none",
5858
[](StackPtr &sp, VM &) {
5959
auto b = si->SelectionBox();
6060
PushVec(sp, int2(b.second));
6161
PushVec(sp, int2(b.first));
6262
});
6363

64-
nfr("goto_child", "n", "I", "", "makes the current cell the nth child of the current cell.",
64+
nfr("goto_child", "n", "I", "", "makes the current cell the nth child of the current cell",
6565
[](StackPtr &, VM &, Value n) {
6666
si->GoToChild(n.intval());
6767
return NilVal();
6868
});
6969

70-
nfr("goto_column_row", "col,row", "II", "", "makes the current cell the child at col / row.",
70+
nfr("goto_column_row", "col,row", "II", "", "makes the current cell the child at col / row",
7171
[](StackPtr &, VM &, Value x, Value y) {
7272
si->GoToColumnRow(x.intval(), y.intval());
7373
return NilVal();
@@ -76,33 +76,33 @@ nfr("goto_column_row", "col,row", "II", "", "makes the current cell the child at
7676
nfr("get_text", "", "", "S", "gets the text of the current cell.",
7777
[](StackPtr &, VM &vm) { return Value(vm.NewString(si->GetText())); });
7878

79-
nfr("set_text", "text", "S", "", "sets the text of the current cell.",
79+
nfr("set_text", "text", "S", "", "sets the text of the current cell",
8080
[](StackPtr &, VM &, Value s) {
8181
si->SetText(s.sval()->strv());
8282
return NilVal();
8383
});
8484

8585
nfr("create_grid", "cols,rows", "II", "",
86-
"creates a grid in the current cell if there isn't one yet.",
86+
"creates a grid in the current cell if there isn't one yet",
8787
[](StackPtr &, VM &, Value x, Value y) {
8888
si->CreateGrid(x.intval(), y.intval());
8989
return NilVal();
9090
});
9191

92-
nfr("insert_column", "c", "I", "", "insert n columns before column c in an existing grid.",
92+
nfr("insert_column", "c", "I", "", "inserts n columns before column c in an existing grid",
9393
[](StackPtr &, VM &, Value x) {
9494
si->InsertColumn(x.intval());
9595
return NilVal();
9696
});
9797

98-
nfr("insert_row", "r", "I", "", "insert n rows before row r in an existing grid.",
98+
nfr("insert_row", "r", "I", "", "inserts n rows before row r in an existing grid",
9999
[](StackPtr &, VM &, Value x) {
100100
si->InsertRow(x.intval());
101101
return NilVal();
102102
});
103103

104104
nfr("delete", "pos,size", "I}:2I}:2", "",
105-
"clears the cells denoted by pos/size. also removes columns/rows if they become"
105+
"clears the cells denoted by pos/size. also removes columns/rows if they become "
106106
"completely empty, or the entire grid.",
107107
[](StackPtr &sp, VM &) {
108108
auto s = PopVec<int2>(sp);
@@ -146,13 +146,13 @@ nfr("set_relative_size", "s", "I", "",
146146

147147
nfr("set_style_bits", "s", "I", "",
148148
"sets one or more styles (bold = 1, italic = 2, fixed = 4, underline = 8,"
149-
" strikethru = 16) on the current cell.",
149+
" strikethru = 16) on the current cell",
150150
[](StackPtr &, VM &, Value s) {
151151
si->SetStyle(s.intval());
152152
return NilVal();
153153
});
154154

155-
nfr("set_status_message", "message", "S", "", "sets the status message in TreeSheets.",
155+
nfr("set_status_message", "message", "S", "", "sets the status message in TreeSheets",
156156
[](StackPtr &, VM &, Value s) {
157157
si->SetStatusMessage(s.sval()->strv());
158158
return NilVal();
@@ -164,7 +164,7 @@ nfr("get_filename_from_user", "is_save", "I", "S",
164164
return Value(vm.NewString(si->GetFileNameFromUser(is_save.True())));
165165
});
166166

167-
nfr("get_filename", "", "", "S", "gets the current documents file name.",
167+
nfr("get_filename", "", "", "S", "gets the current documents file name",
168168
[](StackPtr &, VM &vm) { return Value(vm.NewString(si->GetFileName())); });
169169

170170
nfr("load_document", "filename", "S", "B",

0 commit comments

Comments
 (0)