Page 1 of 2

Wishes for PureBasic

Posted: Fri Sep 12, 2014 11:39 am
by Kukulkan
Hello,

being a PB developer and forum member since 2005, this is the first time I'm writing such a list of wishes. I'm the CTO of a company doing consumer software since years and most of the Windows/Mac/Linux software is done in PureBasic (including consumer software development kits etc.).

This is the essence of the features that I and my team are missing for a while. Maybe Fred and team is listening :wink:
  1. We really miss some simple WYSIWYG HTML editor gadget.
  2. Alternatively, some enhanced WebGadget allowing full control about it's DOM. I suggest some GetDOMElement() and SetDOMElement() functions with some RunJSFunction() function. But this is only nice if it is cross-platform.
  3. We also miss the sort functionality in the ListItemGadget. Or at least a simple way to detect header clicks (cross-platform).
  4. The TreeGadget does not support additional columns. We have some cases where this really would be great (http://www.nemethi.de/tablelist/browseTree.png).
  5. The XMLDialog features are great, but not really finished. There is still missing some grouping for option gadgets. Also, there is missing some easy way to scale ImageGadget and CanvasGadget regarding the screen DPI settings. Also, some function for recalculating the dialog sizes is missing if someone changed the gadgets content manually later in code (text, caption, value, image-size). Also missing automatic wordwrap in TextGadgets with automatic height correction.
  6. Generating and updating Gadgets by using threads is really a bad idea in PB (today if you try it cross-platform). But this would be really great for progress-animation and such.
  7. We also still miss some TextGadget with transparent background. Ever tried to do some Window with a simple background image? It becomes an adventure...
  8. We still need to activate WordWrap in the EditorGadget manually by using API. Some native function would be great. (done since PB5.10)
  9. I personally would love to see an easy compiler-switch to verify if there are any graphical dependencies linked (and in which file and line). This would be very handy for compiling tools for server-side usage only.
  10. The profiler is more or less useless as long as I do not see at which position in my code the most time was used. How about letting the profiler show the runtime of each procedure (a single runtime and the overall runtime)?
  11. Gadget tooltips are nice and handy. But the limitation to one line is annoying.
Thats it for now :wink:

Kukulkan

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 12:25 pm
by Brice Eagle
Kukulkan wrote:We still need to activate WordWrap in the EditorGadget manually by using API
I can solve this one for you: there's a #PB_Editor_WordWrap flag now for setting wordwrap. :mrgreen:

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 12:27 pm
by blueznl
> We still need to activate WordWrap in the EditorGadget manually by using API. Some native function would be great.

This one is also bothering me a bit. two flags for the EditorGadget would make life much easier...

- wordwrap
- tab

The wrap option would allow the use of (shift)tab to move to previous / next object. The wordwrap is pretty clear I guess :-)

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 3:14 pm
by Tenaja
We really miss some simple WYSIWYG HTML editor gadget.
There are numerous free options for this already; please use one of them. With so many options available, and the difficulty level of getting it done right, I really hope Fred does not take this on.

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 3:35 pm
by Kukulkan
Hello Tenaja,

I'm happy to hear that there is a cross-platform solution for WYSIWYG HTML editing in a PureBasic Window. Please, can you post a link to a final and usable solution? I did not find some (except the entries in PB forum which are always only addressing a single platform or a single and isolated problem).

Best,

Kukulkan

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 4:02 pm
by Tenaja
I do not think you grasp the task you are asking of Fred, which is basically for him to create his own browser for each platform.

KompoZer is a good wysiwig (cross-platform) tool, which I use myself. I would never ask Fred to integrate it into PB, just like I would never ask him to integrate Notepad++ into PB either.

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 4:27 pm
by Kukulkan
Hi Tenaja,

I think you did not get the point. Our customers are writing some kind of e-mail messages in our software. And later it is displayed in a WebGadget. In order to type with some formatting, I neither can tell them to learn HTML nor can I ask them to use another tool. Some other case is where people are allowed to comment documents in some collaboration tool. The displaying gadget can display HTML but the users do not know HTML. They like to edit comments like in Word or such. So I need a WYSIWYG HTML editor inside of my program. Imagine Outlook or Thunderbird not able to edit HTML messages. Would you ask customers to use KompoZer to edit their stuff?

I know that Fred is most likely not to integrate such Gadget into Purebasic. I'm willing to pay for such component if I get support and cross-platform. It may work internally with some WebKIT, Gecko or Blink engine whatever. Or even some self rendering editor with basic functionality based on the CanvasGadget. But currently, the WebGadget and some JavaScript editor seem to be the only way to go. But the WebGadget is somehow restricted and a beast to work with (missing events, restricted shortcut support, no DOM access, no script access). All of this can be solved by some API (different for each platform) but it does not make fun.

Anyhow, this is why it is called a wishlist and not a todo list ;-)

Kukulkan

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 6:31 pm
by Tenaja
That is a tall order.

Take a look at something like TinyMCE (it has various alternatives/competitors), which is open source and JavaScript. Since your web page is clearly written by you, you should have no trouble embedding an editor like that. Your only challenge will be if their built-in browser does not handle JS...but I venture to guess that anyone running that tight of a system will not need a wysiwig editor. Or, you can distribute an open source browser that will support JS with your project...

An alternative, 100% PB, guaranteed way to get started would be to use a Scintilla gadget, which allows text formatting--albeit every line is displayed with the same height (matching the tallest font), regardless of the font height on any particular line. Then convert it to html when done; there are several examples of converters on the forum, and I believe one in PB's Examples folder. Scintilla even supports images.

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 9:01 pm
by Andre
I think, a list with several important points needed for applications developing.

I'm especially supporting topics 3, 5, 6 and 11, as they would be very handy for me too.... :D

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 9:10 pm
by davido
@Kukulkan,
Thank you for quoting your 'wish list'
I would, in particular, wish for Items 5 & 11
+1

Re: Wishes for PureBasic

Posted: Fri Sep 12, 2014 10:02 pm
by Derren
Kukulkan wrote:Our customers are writing some kind of e-mail messages in our software. And later it is displayed in a WebGadget. In order to type with some formatting, I neither can tell them to learn HTML nor can I ask them to use another tool. Some other case is where people are allowed to comment documents in some collaboration tool. The displaying gadget can display HTML but the users do not know HTML. They like to edit comments like in Word or such. So I need a WYSIWYG HTML editor inside of my program. Imagine Outlook or Thunderbird not able to edit HTML messages. Would you ask customers to use KompoZer to edit their stuff?
Correct me if I'm wrong, but do you really need a full-blown html editor for an email writing tool? It's not like they're going to add image maps or design a newsletter that could be printed and used as promotional material at any convention.
Why do you need script access for such a task?

Re: Wishes for PureBasic

Posted: Sat Sep 13, 2014 12:37 pm
by Kukulkan
Hi Derren,

as written above, I need only basic formatting like bold, italics, underline, alignment and lists. No need for images (in the moment), tables and such.

I'm trying to run CKEditor in the WebGadget, but the WebGadget is restricted. The gadget blocks shortcut events and I need to run some script to get the written content out of it. So far, most things I can handle in the meantime. Only missing good focus recognition to handle the keyboard shortcuts. Also having some cross-platform issues etc. It needs to run on Win, Linux and MacOS.

Kukulkan

Re: Wishes for PureBasic

Posted: Sat Sep 13, 2014 2:34 pm
by Tenaja
Idle made an editor just after the canvasgadget was released...obviously it would need conversion to html, but you could probably use the scintilla samples.
http://purebasic.fr/english/viewtopic.php?f=12&t=45669

Re: Wishes for PureBasic

Posted: Sun Sep 14, 2014 1:51 pm
by bbanelli
Kukulkan wrote:
  1. Generating and updating Gadgets by using threads is really a bad idea in PB (today if you try it cross-platform). But this would be really great for progress-animation and such.
This seems to be working for most of the gadgets (at least those I've tried, String/Edit...) except for ProgressBar?

Re: Wishes for PureBasic

Posted: Sun Sep 14, 2014 4:54 pm
by Kukulkan
I tried updating a progress bar and if it worked on Windows, it crashed on MacOS. After some changes it crashed on Linux and Windows. I've had to do the progress bar in the main thread and the work in a separate thread (work was done in some DLL, so no manual progress was possible). A lot of code for just some progress bar...

Kukulkan