77#include < stdint.h>
88#include < Locker.h>
99#include < View.h>
10+ #include < File.h>
11+ #include < Clipboard.h>
12+ #include < Region.h>
1013
1114namespace py = pybind11;
1215using namespace BPrivate ;
@@ -22,7 +25,7 @@ py::enum_<undo_state>(m, "undo_state", "")
2225.value (" B_UNDO_DROP" , undo_state::B_UNDO_DROP," " )
2326.export_values ();
2427
25- m.attr (" TextGapBuffer" ) = TextGapBuffer;
28+ // m.attr("TextGapBuffer") = TextGapBuffer;
2629
2730py::class_<text_run>(m," text_run" )
2831.def_readwrite (" offset" , &text_run::offset," " )
@@ -32,7 +35,7 @@ py::class_<text_run>(m, "text_run")
3235
3336py::class_<text_run_array>(m," text_run_array" )
3437.def_readwrite (" count" , &text_run_array::count," " )
35- .def_readwrite (" runs" , &text_run_array::runs," " )
38+ .def_readonly (" runs" , &text_run_array::runs," " )
3639;
3740
3841py::class_<BTextView, BView>(m," BTextView" )
@@ -82,17 +85,17 @@ py::class_<BTextView, BView>(m, "BTextView")
8285.def (" Select" , &BTextView::Select," " ,py::arg (" startOffset" ),py::arg (" endOffset" ))
8386.def (" SelectAll" , &BTextView::SelectAll," " )
8487.def (" GetSelection" , &BTextView::GetSelection," " ,py::arg (" _start" ),py::arg (" _end" ))
85- .def (" SetFontAndColor" , py::overload_cast<const BFont *,unsigned int ,const rgb_color *>(&BTextView::SetFontAndColor)," " ,py::arg (" font" ),py::arg (" mode" )=B_FONT_ALL,py::arg (" color" )=NULL )
86- .def (" SetFontAndColor" , py::overload_cast<int ,int ,const BFont *,unsigned int ,const rgb_color *>(&BTextView::SetFontAndColor)," " ,py::arg (" startOffset" ),py::arg (" endOffset" ),py::arg (" font" ),py::arg (" mode" )=B_FONT_ALL,py::arg (" color" )=NULL )
87- .def (" GetFontAndColor" , py::overload_cast<int , BFont *, rgb_color *>(&BTextView::GetFontAndColor)," " ,py::arg (" offset" ),py::arg (" _font" ),py::arg (" _color" )=NULL )
88- .def (" GetFontAndColor" , py::overload_cast<BFont *,unsigned int , rgb_color *,bool *>(&BTextView::GetFontAndColor)," " ,py::arg (" _font" ),py::arg (" _mode" ),py::arg (" _color" )=NULL ,py::arg (" _sameColor" )=NULL )
88+ // .def("SetFontAndColor", py::overload_cast<const BFont *, unsigned int, const rgb_color *>(&BTextView::SetFontAndColor,py::const_ ), "", py::arg("font"), py::arg("mode")=B_FONT_ALL, py::arg("color")=NULL)
89+ // .def("SetFontAndColor", py::overload_cast<int, int, const BFont *, unsigned int, const rgb_color *>(&BTextView::SetFontAndColor,py::const_ ), "", py::arg("startOffset"), py::arg("endOffset"), py::arg("font"), py::arg("mode")=B_FONT_ALL, py::arg("color")=NULL)
90+ // .def("GetFontAndColor", py::overload_cast<int, BFont *, rgb_color *>(&BTextView::GetFontAndColor,py::const_ ), "", py::arg("offset"), py::arg("_font"), py::arg("_color")=NULL)
91+ // .def("GetFontAndColor", py::overload_cast<BFont *, unsigned int, rgb_color *, bool *>(&BTextView::GetFontAndColor,py::const_ ), "", py::arg("_font"), py::arg("_mode"), py::arg("_color")=NULL, py::arg("_sameColor")=NULL)
8992.def (" SetRunArray" , &BTextView::SetRunArray," " ,py::arg (" startOffset" ),py::arg (" endOffset" ),py::arg (" runs" ))
9093.def (" RunArray" , &BTextView::RunArray," " ,py::arg (" startOffset" ),py::arg (" endOffset" ),py::arg (" _size" )=NULL )
91- .def (" LineAt" , py::overload_cast<int >(&BTextView::LineAt)," " ,py::arg (" offset" ))
92- .def (" LineAt" , py::overload_cast<BPoint>(&BTextView::LineAt)," " ,py::arg (" point" ))
94+ .def (" LineAt" , py::overload_cast<int >(&BTextView::LineAt,py::const_ )," " ,py::arg (" offset" ))
95+ .def (" LineAt" , py::overload_cast<BPoint>(&BTextView::LineAt,py::const_ )," " ,py::arg (" point" ))
9396.def (" PointAt" , &BTextView::PointAt," " ,py::arg (" offset" ),py::arg (" _height" )=NULL )
94- .def (" OffsetAt" , py::overload_cast<BPoint>(&BTextView::OffsetAt)," " ,py::arg (" point" ))
95- .def (" OffsetAt" , py::overload_cast<int >(&BTextView::OffsetAt)," " ,py::arg (" line" ))
97+ .def (" OffsetAt" , py::overload_cast<BPoint>(&BTextView::OffsetAt,py::const_ )," " ,py::arg (" point" ))
98+ .def (" OffsetAt" , py::overload_cast<int >(&BTextView::OffsetAt,py::const_ )," " ,py::arg (" line" ))
9699.def (" FindWord" , &BTextView::FindWord," " ,py::arg (" offset" ),py::arg (" _fromOffset" ),py::arg (" _toOffset" ))
97100.def (" CanEndLine" , &BTextView::CanEndLine," " ,py::arg (" offset" ))
98101.def (" LineWidth" , &BTextView::LineWidth," " ,py::arg (" lineNumber" )=0 )