A Python wrapper for ColorTextEdit
widget
- Cython >= 0.29.21
-
We are not using the latest versions of
ColorTextEdit
andimgui
since this wrapper is targeted to be compatiable withpyimgui
which is still working on imgui v1.65. -
Most of the implementation in this wrapper follow the style/layout of
pyimgui
, but there are still something worth noting:-
Since this wrapper is not developed directly under
pyimgui
, some internal states used byimgui
won't be shared between the dll/so files built frompyimgui
and this wrapper. (see also this comment) -
To solve the above-mentioned issue, we have to access the context created by a main application running
pyimgui
byget_current_context()
, then useset_current_context()
to set the shared context going to be used by this wrapper. However, since we cannot accesscdef
ed attributes of a object wrapped by Python object, we have to rely on passing pointer as an argument toset_current_context_ptr()
to achieve this goal. -
Even though we can successfully get the
ImGuiContext
used by the main process, it still failed to render theTextEditor
. See also issue #1.
-