Skip to content

Commit

Permalink
- make methods const and static
Browse files Browse the repository at this point in the history
- add args
- removed whitespaces
- change int -> intptr_t
  • Loading branch information
chcg committed Dec 23, 2023
1 parent b081788 commit 05dd3a2
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 58 deletions.
6 changes: 3 additions & 3 deletions PythonScript/src/NotepadPython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void export_notepad()
boost::python::class_<NotepadPlusWrapper, boost::shared_ptr<NotepadPlusWrapper>, boost::noncopyable>("Notepad", boost::python::no_init)
.add_property("hwnd", &NotepadPlusWrapper::hwnd)
.def("new", &NotepadPlusWrapper::newDocument, "Create a new document")
.def("new", &NotepadPlusWrapper::newDocumentWithFilename, "Create a new document with the given filename")
.def("new", &NotepadPlusWrapper::newDocumentWithFilename, boost::python::args("filename"), "Create a new document with the given filename")
.def("save", &NotepadPlusWrapper::save, "Save the current file")
.def("saveAs", &NotepadPlusWrapper::saveAs, boost::python::args("filename"), "Save the current file as the specified filename")
.def("saveAsCopy", &NotepadPlusWrapper::saveAsCopy, boost::python::args("filename"), "Save the current file as the specified filename, but don't change the filename")
Expand Down Expand Up @@ -58,7 +58,7 @@ void export_notepad()
.def("setLangType", &NotepadPlusWrapper::setCurrentLangType, boost::python::args("langType"), "Set the current language type (use LANGTYPE.xxx constants)")
.def("setLangType", &NotepadPlusWrapper::setBufferLangType, boost::python::args("langType", "bufferID"), "Sets the language type of the current buffer. Pass a buffer ID as the second parameter to set the language for a specific buffer.")
.def("getEncoding", &NotepadPlusWrapper::getEncoding, "Gets the encoding of the current buffer. Pass a buffer ID to get the encoding of a specific buffer.")
.def("getEncoding", &NotepadPlusWrapper::getBufferEncoding, "Gets the encoding of the current buffer. Pass a buffer ID to get the encoding of a specific buffer.")
.def("getEncoding", &NotepadPlusWrapper::getBufferEncoding, boost::python::args("bufferID"), "Gets the encoding of the current buffer. Pass a buffer ID to get the encoding of a specific buffer.")
.def("setEncoding", &NotepadPlusWrapper::setEncoding, boost::python::args("encoding"), "Sets the encoding of the current buffer. Use the BUFFERENCODING constants")
.def("setEncoding", &NotepadPlusWrapper::setBufferEncoding, boost::python::args("encoding", "bufferID"), "Sets the encoding of the given bufferID. Use the BUFFERENCODING constants to specify the encoding")
.def("getFormatType", &NotepadPlusWrapper::getFormatType, "Gets the format type (i.e. Windows, Unix or Mac) of the current buffer. Pass a buffer ID to get the format type of a specific buffer.")
Expand Down Expand Up @@ -258,7 +258,7 @@ void export_notepad()
.value("ANSI", uni7Bit)
.value("UCS2BE_NOBOM", uni16BE_NoBOM)
.value("UCS2LE_NOBOM", uni16LE_NoBOM);

boost::python::enum_<StatusBarSection>("STATUSBARSECTION")
.value("DOCTYPE", STATUSBARSECTION_DOCTYPE)
.value("DOCSIZE", STATUSBARSECTION_DOCSIZE)
Expand Down

0 comments on commit 05dd3a2

Please sign in to comment.