Text Editor

Started by
5 comments, last by Patrik Malk 12 years, 7 months ago
I am trying to make a cross-platform text editor. I'm really just in the initial design stages but I think I already hit a problem.

Using Win32 to create the menu items and text box would be relatively easy, but it kills platform independence.
I could use SDL, it would be much simpler to create window, I could also remove the frame, create my own menu, and make it look all sexy.
The problem is the actual text editor. SDL_ttf wouldn't work so great compared to native Win32.

What's my best option to do this?
Is it possible to use Win32/MFC for the text editing with SDL for window management and stuff?
What would replace Win32/MFC on Linux/Mac?
Advertisement
You probably want to use a cross platform windowing toolkit. I personally like wxWidgets, though Qt seems relatively popular on this forum.
I looked at both Qt and wxWidgets, it looks like Qt is easier but wxWidgets is faster and more powerful. Which means I am leaning toward wxWidgets.

They can both create the natural menus and text boxes.
My problem is that Qt and wxWidgets have pretty much full text editors in one function, Scintilla and all.
But the point was to start with a basic one like what Win32 gives you and build on it myself.
(Unless I'm wrong of course and they provide more basic alternatives, but I didn't find that.)

Is there any other way, with or without a windowing toolkit? Something that gives you a basic natural-looking text box that I can improve on myself, like Win32/MFC would give, but platform independent?
For wxWidgets the wxTextCtrl class is pretty basic, though obviously there are ones with more features available.
Scintilla has already solved this problem very well. I would suggest using it directly; or, if you absolutely have to roll your own, at least look at their code (it's open source) for some guidance on good ways to do things.

(Don't forget to check out SCiTE, the editor app that uses the Scintilla widget.)

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


Scintilla has already solved this problem very well. I would suggest using it directly; or, if you absolutely have to roll your own, at least look at their code (it's open source) for some guidance on good ways to do things.

(Don't forget to check out SCiTE, the editor app that uses the Scintilla widget.)



++

Also, if you really want to ( reinvent | Improve ) the wheel i suggest you first craft an OS independent graphics abstraction layer, and then build your text editor on top of it.
Currently, I only work with Direct3D & GDI , although i guess you can use very easily OpenGL for this task. Then you can embed it wherever you want.



Also, if you really want to ( reinvent | Improve ) the wheel i suggest you first craft an OS independent graphics abstraction layer, and then build your text editor on top of it.
Currently, I only work with Direct3D & GDI , although i guess you can use very easily OpenGL for this task. Then you can embed it wherever you want.[/quote]
Although that's quite an interesting idea, it's a bit more than what I'm aiming to do for now.

I think I'll use wxWidgets and either wxTextCtrl or Scintilla/SciTE. (Still haven't decided...)
Thanks for the help guys!

This topic is closed to new replies.

Advertisement