My favorite list

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Erich
User
User
Posts: 49
Joined: Thu Sep 30, 2010 9:21 pm

My favorite list

Post by Erich »

Hi! To introduce me, I'm a hobby programmer and have seen and use many different languages. Currently I'm using Racket, Ada, and Purebasic. I used to be very active in the REALbasic community and used to sell shareware made with it, and based on that experience (before RB became ridiculously expensive) I believe the most important features for GUI desktop apps currently missing from PB have to do with cross-platform functionality and geometry layout:
  • Functions to determine the OS-preferred width and height of Gadgets, like ButtonGadget. This could be done via GetGadgetAttribute(), but perhaps it would be better to be able to obtain it before the Gadget is displayed. The idea is that you have a way to know the right, platform-dependent size of buttons, text, and similar items based on a given caption. This needs to account for DPI scaling.
  • Automatic layout management, e.g. based on VerticalPanelGadget and HorizontalPanelGadget that can hierarchically embedd other gadgets. Perhaps the PB-way would be via functions like OpenVerticalPanel ... CloseVerticalPanel. Not sure if this will be obsolete with the new XML-based layout forms. Anyway, we need a way for grouping Gadgets in the platform-optimal layout, e.g. with platform-dependent borders and default sizes (and adjust the window default minimum size accordingly)
  • Related to the above: Patform-dependent control fonts (e.g. to get a LargeGadgetSystemFont, SmallGadgetSystemFont, ListItemGadgetSystemFont, ...)
  • A completely cross-platform way to obtain an EditorGadget's selection start, end, range, set the selection, insert into the selection, activating word wrap, and tracking changes to the editor (via Events).
The last point is pretty important. It's surely possible to achieve this via API calls, but I couldn't find a truly full cross-platform solution yet. (See http://www.purebasic.fr/english/viewtop ... 13&t=54786)

One more in the long run. An editable EditorGadget or other text gadget with
  • cross-platform font and text style settings (bold, italic, underline) font size and font
  • getting, setting and manipulation of styled text (in internal format, e.g. as binary blob string)
  • rudimentary support for inline images
  • my favorite: a way to associate arbitrary regions of text with user-defined "tags" (e.g. just a number) and make these regions behave like styles (i.e. keep track of changes)
That's all. I know it's a lot. Anyway, keep up the good work! :D
"I have never let my schooling interfere with my education." - Mark Twain
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: My favorite list

Post by Tenaja »

Your EditorGadget requests are all built in already, using Scintilla.
User avatar
Erich
User
User
Posts: 49
Joined: Thu Sep 30, 2010 9:21 pm

Re: My favorite list

Post by Erich »

I know Scintilla has some (not all) of the features but it's not supported by the new Form Designer and seems a bit heavyweight for certain tasks like single-line text entry.

My point is that the EditorGadget, as it is now, does not have sufficient built-in functionality for cross-platform development. Perhaps not so many people realize this here, because it seems that many of you develop for Windows only. If it takes exchanging the platform-dependent editors for Scintilla or another free 3rd party library to get the desired functionality, I'm all for it. Ideally, the underlying implementation is not my business.

Just wanted to give some feedback based on my experience with other languages and toolkits and how they became successful.
"I have never let my schooling interfere with my education." - Mark Twain
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: My favorite list

Post by Justin »

+1 for crossplatform system fonts, default colors, etc..
And gadget layout, docking, anchoring.. I think requested ages ago.
Post Reply