Recent

Author Topic: equation editor  (Read 4480 times)

floripanow

  • Newbie
  • Posts: 2
equation editor
« on: April 23, 2010, 10:38:44 am »


Hi folks,

I'm new here.

Some years ago I have used Delphi/Kylix but now I'm coming back to 'object pascal' and I enjoy the idea of lazarus project being a cross platform one.

I am 'updating my mind' about lazarus components, LCL and so on...

and I have a plan to make an equation editor inspired in this one:

http://www.codeproject.com/KB/miscctrl/formulactrl.aspx

which is in MFC/C++  (it is possible to download a demo and also its source code.)

I would like to know how can I create that fields around an integral symbol, in order to enter an integral (or sum, div or whatever ) symbol, for example, write the limits, the integrand part and get all this synchronized with the fortran code (or other one) showed below in the window program. And also it could be possible to put a sign/code/number in the code area and get its symbol at the right place in the equation area.

So, how can I perform this taks? (I would like to use/compile it also in linux and mac)

Best regards  :D

[]'s

floripanow

  • Newbie
  • Posts: 2
Re: equation editor
« Reply #1 on: April 23, 2010, 10:42:14 am »

P.S:  i mean, what components should I use to perform this task. I have no idea.

Thanks.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8488
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: equation editor
« Reply #2 on: April 24, 2010, 09:49:18 am »
I haven't downloaded the code, but from a quick look, I conclude: The equation area is some kind of a self made control (probably CFormulaInplaceEdit). It's like a TPaintBox or TImage but you have to draw everything yourself. Plus, for the synchronization between code area you must build a compiler that can parse codes written in code area into some kind of data structure (probably a tree) which will be traversed to be drawn in the equation area. This is not trivial, I tell you.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10379
  • FPC developer.
Re: equation editor
« Reply #3 on: April 24, 2010, 10:49:54 am »
Plus, for the synchronization between code area you must build a compiler that can parse codes written in code area into some kind of data structure (probably a tree) which will be traversed to be drawn in the equation area. This is not trivial, I tell you.

An example of this is available in the "symbolic" package.

 

TinyPortal © 2005-2018