[scribus-dev] Dev a gettext plugin
Jean Ghali
jghali at libertysurf.fr
Sat Aug 15 00:07:19 UTC 2020
Le 14/08/2020 à 19:29, Dimitri Robert a écrit :
> Hi,
>
> I started a plugin to import MarkDown documents. By reading other gettext plugins I
> noticed usage of 2 distincts functions: GetText and GetText2.
>
> GetText use a gtWriter object
> GetText2 use a pageItem object
>
> I wants to access to the Document object (for create image frames) which is accessible via
> pageItem.
>
> What is the best way?
> Is there a deprecated method?
>
The most recent gettext plugins use GetText2, so I'd advise you to use this one. The
document object can simply be retrieved by using PageItem's doc() member function:
ScribusDoc* doc = pageItem->doc();
You can find an example in the scribus\plugins\gettext\docxim\docxim.cpp file, line 45.
Best regards,
Jean
More information about the scribus-dev
mailing list