@@ -243,7 +243,13 @@ py::class_<BTextView, PyBTextView, BView, std::unique_ptr<BTextView,py::nodelete
243
243
.def (" AcceptsDrop" , &BTextView::AcceptsDrop, " " , py::arg (" message" ))
244
244
.def (" Select" , &BTextView::Select, " " , py::arg (" startOffset" ), py::arg (" endOffset" ))
245
245
.def (" SelectAll" , &BTextView::SelectAll, " " )
246
- .def (" GetSelection" , &BTextView::GetSelection, " " , py::arg (" _start" ), py::arg (" _end" ))
246
+ // .def("GetSelection", &BTextView::GetSelection, "", py::arg("_start"), py::arg("_end"))
247
+ .def (" GetSelection" , [](BTextView& self)-> std::tuple<int32,int32>{
248
+ int32 start;
249
+ int32 end;
250
+ self.GetSelection (&start,&end);
251
+ return std::make_tuple (start,end);
252
+ }, " " )
247
253
// .def("SetFontAndColor", static_cast<void (BTextView::*)(const BFont*, uint32, const rgb_color*)>(&BTextView::SetFontAndColor), "", py::arg("font"), py::arg("mode")=B_FONT_ALL, py::arg("color")=NULL)
248
254
.def (" SetFontAndColor" , py::overload_cast<const BFont *, uint32, const rgb_color *>(&BTextView::SetFontAndColor), " " , py::arg (" font" ), py::arg (" mode" )=B_FONT_ALL, py::arg (" color" )=NULL )
249
255
// .def("SetFontAndColor", static_cast<void (BTextView::*)(int32, int32, const BFont *, uint32, const rgb_color *)>(&BTextView::SetFontAndColor), "", py::arg("startOffset"), py::arg("endOffset"), py::arg("font"), py::arg("mode")=B_FONT_ALL, py::arg("color")=NULL)
0 commit comments