Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit82a54a6

Browse files
committed
Fix FindWord returning tuple of int32,int32
1 parent936661d commit82a54a6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎bindings/interface/TextView.cpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,13 @@ py::class_<BTextView, PyBTextView, BView, std::unique_ptr<BTextView,py::nodelete
268268
},"",py::arg("offset"))
269269
.def("OffsetAt", py::overload_cast<BPoint>(&BTextView::OffsetAt,py::const_),"",py::arg("point"))
270270
.def("OffsetAt", py::overload_cast<int32>(&BTextView::OffsetAt,py::const_),"",py::arg("line"))
271-
.def("FindWord", &BTextView::FindWord,"",py::arg("offset"),py::arg("_fromOffset"),py::arg("_toOffset"))
271+
//.def("FindWord", &BTextView::FindWord, "", py::arg("offset"), py::arg("_fromOffset"), py::arg("_toOffset"))
272+
.def("FindWord", [](BTextView& self, int32 offset) -> std::tuple<int32,int32>{
273+
int32 _fromOffset;
274+
int32 _toOffset;
275+
self.FindWord(offset,&_fromOffset,&_toOffset);
276+
returnstd::make_tuple(_fromOffset,_toOffset);
277+
},"",py::arg("offset"))
272278
.def("CanEndLine", &BTextView::CanEndLine,"",py::arg("offset"))
273279
.def("LineWidth", &BTextView::LineWidth,"",py::arg("lineNumber")=0)
274280
.def("LineHeight", &BTextView::LineHeight,"",py::arg("lineNumber")=0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp