@@ -254,7 +254,12 @@ py::class_<BTextView, PyBTextView, BView, std::unique_ptr<BTextView,py::nodelete
254
254
.def (" RunArray" , &BTextView::RunArray, " " , py::arg (" startOffset" ), py::arg (" endOffset" ), py::arg (" _size" )=NULL )
255
255
.def (" LineAt" , py::overload_cast<int32>(&BTextView::LineAt,py::const_), " " , py::arg (" offset" ))
256
256
.def (" LineAt" , py::overload_cast<BPoint>(&BTextView::LineAt,py::const_), " " , py::arg (" point" ))
257
- .def (" PointAt" , &BTextView::PointAt, " " , py::arg (" offset" ), py::arg (" _height" )=NULL )
257
+ // .def("PointAt", &BTextView::PointAt, "", py::arg("offset"), py::arg("_height")=NULL)
258
+ .def (" PointAt" , [](BTextView& self, int32 offset) -> std::tuple<BPoint,float > {
259
+ float height;
260
+ BPoint ret = self.PointAt (offset,&height);
261
+ return std::make_tuple (ret,height);
262
+ }," " ,py::arg (" offset" ))
258
263
.def (" OffsetAt" , py::overload_cast<BPoint>(&BTextView::OffsetAt,py::const_), " " , py::arg (" point" ))
259
264
.def (" OffsetAt" , py::overload_cast<int32>(&BTextView::OffsetAt,py::const_), " " , py::arg (" line" ))
260
265
.def (" FindWord" , &BTextView::FindWord, " " , py::arg (" offset" ), py::arg (" _fromOffset" ), py::arg (" _toOffset" ))
0 commit comments