Page 1 of 1
RTFGadget
Posted: Sat Jun 27, 2009 7:50 am
by garretthylltun
Would love see a RTFGadget someday for all platforms PureBasic supports.

Posted: Sat Jun 27, 2009 11:39 am
by rsts
How would you want it to differ from the editorgadget?
cheers
Posted: Sat Jun 27, 2009 5:06 pm
by garretthylltun
Does the editor gadget allow RTF? And if it does, do you need to use Windows Specific API calls to use it?
I didn't see any reference to the editor gadget being RTF capable.
All I'd like to see is your basic RTF editor gadget with the basic RTF functions, such as setting and getting Bold, Italic, Underline, Foreground color and Background color and that it work on at least Windows, Linux and Mac. I'm sure the Amiga users might use it too.
Posted: Sat Jun 27, 2009 7:07 pm
by rsts
Not sure about mac and linux since it requires the M$ rtf engine, but under windows, the editorgadget supports rtf just fine.
You can find plenty of examples in the forums.
cheers
Posted: Sat Jun 27, 2009 9:17 pm
by garretthylltun
Well that's great...

But darn it, I do really need cross platform support of the RTF.
I'm making a cross platform portable(and not portable) Notes program for myself here. I use Windows ME, 2k, Vista, Linux and Mac and was hoping to be able to use RTF on all of these so that when I work on one or the other I can have my notes, website logons and such with me. As it is, I'll just have to stick with plain old text for now then. Not a major loss, but it sure would've been nice to have RTF support for this one.
Thanks for the reply you two

Re: RTFGadget
Posted: Sun Jun 28, 2009 1:03 am
by PB
The manual says the EditorGadget supports all OSes, and it does RTF,
so what's the problem here? I don't understand your concerns.
Posted: Sun Jun 28, 2009 2:21 am
by garretthylltun
I have no concerns.
I was unaware that the EditorGadget supported RTF at all since the help file made no mention of it at all:
Description
Creates an Editor gadget in the current GadgetList. If #PB_Any is used as '#Gadget' parameter, the new gadget number will be returned as 'Result'. #Gadget will be the number returned by the EventGadget() function.
So one could only assume that it only supported text since there is no mention of RTF support. I also did not see any mention of any formatting ability in the help file related to the EditorGadget.
So... with no information regarding RTF, I thought it might be a nice thing to have in PureBasic and thought I'd post a wish for it here.
Now of course I've been told that at least on Windows you can get RTF support, likely through the use of API calls.
Now you're saying that RTF support is available to the EditorGadget on all platforms.
So I guess there's no need for my wish of RTF support on all platforms since apparently it already exists. Now I only have to find out what functions/commands are needed to get the RTF support since I can't seem to find any documentation on RTF support at all.
Hey, maybe I should wish for documentation of the RTF support in PureBasic.

Posted: Sun Jun 28, 2009 3:01 am
by Digital Wargames
FWIW, RTF has always been cross-platform. You had it on DOS apps and it actually started in MS Word 3 for Macintosh.
You might want to look at the
code archive. There are 28 examples for the editor gadget, showing you how to do everything with it.
Don't forget you also have the lovely Scintilla gadget and EditorGadget3D that are both cross-platform and should handle RTF.
Posted: Sun Jun 28, 2009 4:41 am
by PB
> maybe I should wish for documentation of the RTF support in PureBasic
True, the manual's example doesn't show any text coloring or style for the
EditorGadget. It should, to show that it's not just a plain text editor.
In the meantime, here's all you'll need to know to do RTF in an EditorGadget:
http://www.purebasic.fr/english/viewtopic.php?t=6666
Note: Freak's original post there doesn't work with v4.31, but I ported it, it's
in the second page of the thread now. Hope this helps!
Posted: Sun Jun 28, 2009 5:00 am
by rsts