mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
bazaar: BoostPyTest: exporting the various edit fields
git-svn-id: svn://ultimatepp.org/upp/trunk@3633 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5a10e46fab
commit
9bbba24d1d
22 changed files with 618 additions and 123 deletions
26
bazaar/CtrlLibBoostPy/EditString.cpp
Normal file
26
bazaar/CtrlLibBoostPy/EditString.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include "Common.h"
|
||||
using namespace boost::python;
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
void EditStringMaxLen(EditString& c, int m) { c.MaxLen(m); }
|
||||
void EditStringTrimLeft(EditString& c, bool b) { c.TrimLeft(b); }
|
||||
void EditStringTrimRight(EditString& c, bool b) { c.TrimRight(b); }
|
||||
void EditStringSetNotNull(EditString& c, bool b) { c.NotNull(b); }
|
||||
|
||||
void export_EditString()
|
||||
{
|
||||
ONCELOCK
|
||||
{
|
||||
class_<EditString, bases<EditField>, boost::noncopyable>("EditString", "Upp EditString")
|
||||
.add_property("maxlen", &EditString::GetMaxLength, &EditStringMaxLen)
|
||||
.add_property("trimleft", &EditString::IsTrimLeft, &EditStringTrimLeft)
|
||||
.add_property("trimright", &EditString::IsTrimRight, &EditStringTrimRight)
|
||||
.add_property("notnull", &EditString::IsNotNull, &EditStringSetNotNull)
|
||||
;
|
||||
class_<EditStringNotNull, bases<EditString>, boost::noncopyable>("EditStringNotNull", "Upp EditStringNotNull")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
Loading…
Add table
Add a link
Reference in a new issue