Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » RichEdit and styles questions
Re: RichEdit and styles questions [message #21538 is a reply to message #21537] Mon, 25 May 2009 18:44 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Hello luzr

Sorry, I am going to explain it better.

The idea I had is to insert equations in Qtf text using a "poor man" approach. Instead of creating a full featured equation editor (perhaps some day) I thought to insert the text and equations in text following certain format, but selecting with a "Formula" style the formulas.

This way the text could look like this.

index.php?t=getfile&id=1741&private=0

After pushing a buttom the user could choose the view mode, so the equation and text before could look like this:

index.php?t=getfile&id=1743&private=0


There is no problem to view the equation as I did a QtfRichObject for equations so a program to show a prompt with that equation would be like this:

GUI_APP_MAIN
{
	QtfRichObject drw = QtfEquation("integral(sqrt(cos(phi_ini^2)) + i^2 + 6, i = 1, 10)*dx");
	String text;
	text << "[R3 This is some formula in QTF:&" << drw;
	PromptOK(text);
}


Code is here: http://www.ultimatepp.org/forum/index.php?t=msg&&th= 4214&goto=20264

But for doing that I need to parse the Qtf text looking for "Formula" style and changing that text with the QtfRichObject representing the equations.

The question was about how to parse the Qtf the smart way.

Ah, the parser in QtfEquation was borrowed from U++ Smile.

Sorry again. I do not understand what do you mean:

Quote:

The problem is that it is PARAGRAPH style...


(I have done the first bitmap Before.jpg by modifying the Qtf file by hand)

Best regards
Koldo
  • Attachment: Before.JPG
    (Size: 12.46KB, Downloaded 987 times)
  • Attachment: After.JPG
    (Size: 10.14KB, Downloaded 979 times)


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: viewing html
Next Topic: Editor Toolbar
Goto Forum:
  


Current Time: Fri Apr 26 09:42:05 CEST 2024

Total time taken to generate the page: 0.02855 seconds