New to reaction programming and I am having a bit of trouble understanding a couple concepts. One thing I am trying to do is completely control positioning of gadgets utilizing LAYOUT_NoLayout
1. Without using GIMMIEZEROZERO on the window attribute how do you get the proper metrics for the borders and other gadgets?
2. The label image class.
How do you control the size and position of label in a layout if you are using so you have manual control over placement like you can with gadgets.
Hopefully some of you can point me in right direction. I have been reading all the articles here and have gleaned much but I am really trying to wrap my head around some of the conceptual differences from other GUI APIs. ie. no child windows, labels are not gadgets etc...
Thanks
Doug
Sun, 2017-03-19 23:37
#1
New to Reaction
I know this is quite old as I had been working getting my Blitzmax compiler issues PPC ABI sorted out and writing AHI sound driver interfacing with MiniGL. I got back to looking at this. And dumb as it was I figured it out. Not sure if its a bug with image derived objects like labels but when under NOLAYOUT layout(Say that fast) it does not respect initial coordinates. After creating the window I can move and control the image objects no problem location wise. So on to implementing a BlitzMax GUI. Just a little more effort on my part dealing with labels. Is there any sort of RTF control or am I going to have to write a texteditor that has colors as I cant seem to make a Textcontrol work at all respecting escape codes regardless of what the Documentation says.
Regard
Doug
LAYOUT_NoLayout means exatly that, you have to do all the work yuourself. Images don't behave like gadgets, the don't really have specific location, the same image can be drawn in different places in the GUI (and so shared between gadgets).
If you are refering o texteditor.gadget then no there is no full colour support. Even the escape code approach was pretty minimal, and less so in the AmigaOS 4 version.
Highlighting certain lines is the limit (see AutDoc Viewer as an example. of what I mean).
There is richeditor.gadget in use by codebench, but the API is not public. Not sure if there is any plans for it to be.
Do you need the colours for syntax highlighting?
@Broadblues Yes I am looking at syntax highlighting. As for reason for no layout is BlitzMax GUI has a Layout mechanism built into its API for cross platform development. So if I can fulfill the various contracts of the maxguidriver. As for coloring of editor yes it is for syntax highlighting. I need a rudimentary html control as well I know there is a datatype but don't think its supports any hyperlinking. I have idea of some code that I can use to maybe build out support for hmtl control. Not full browser but good enough for help files.
Regards,
Doug
If by datatype you mean the simpleHTML.datatype refered in the other thread, yes it supports hyperlinks, but only file based ones , there's no http(s) .
As to syntax highlighting, even if the colours worked as advertised in texteditor.gadget it would not be suitable for syntax uses. You'll probably have to build your own.
AFAICT it should be possible to position images in a LAYOUT_NoLayout layout by using the LeftEdge/TopEdge fields of the image (IA_Left/IA_Top for BOOPSI images).
There might be some implementation differences between image classes though, making it not work correctly with some of them.
@salass00,
Yes sir that is how I got it to work but I found it did not respect the coordinates when I create the object. I had to set them after I open the window. If curious I will post a simple example of what works and what didnt.
Regards
Doug
Thread Necro! Was this Beginner's Guide the one Jim Tubbs wrote, which Trixie followed up with "No don't do that. This is the best way" blog?
Never done any multi-tasking/GUI stuff before, so I need to learn a lot. I'm especially lost with how Wait() works. I have many questions, but want to learn as much as I can by reading docs/code before I start asking a torrent of questions.