Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Export as HTML, RTF, ...

(1/10) > >>

Ceniza:
I've been considering to write a plugin to export the current opened file in Code::Blocks with highlighted syntax to HTML, RTF and maybe some other formats, just like Dev-C++ and SciTE do.

I've spent a lot of time trying to get all I need to extract the information from the wxScintilla component and Code::Blocks itself so I can get the colors and style.

ATM I've only needed to add a GetColorSet() method to get m_pTheme from cbEditor and it seems to be the only decent way to get what I need, and the only thing I'd really need to be added in the SDK (I hope).

Any complaints, ideas, support, ...?

mandrav:
No problem for me, after RC2 of course.

Ceniza:
It seems like that will be really the only needed change in the SDK to get the plugin working.

I've made a few tests, played a bit with some stuff and everything else I'll need is in there.

mandrav: Would you really mind to add that function before RC2 is released? It won't change any behavior of it.


--- Code: ---EditorColorSet* cbEditor::GetColorSet()
{
  return m_pTheme;
}
--- End code ---

EDIT: Yeah, forgot why: the idea is to get it done maybe, just maybe, before RC2 is released or at least have RC2 ready for it.

mandrav:
Done :)

Ceniza:

--- Quote from: mandrav on October 16, 2005, 10:23:58 am ---Done :)
--- End quote ---

Oh, great!

I just finished the first version of it.

It currently exports HTML and seems to be working fine. I still need to add some more things to get it more "real" (WYSIWYG).

A sample file is here

mandrav: would you mind to add this to contrib?

Navigation

[0] Message Index

[#] Next page

Go to full version