(Am writing this over the course of my workday so it kind of rambles, and I cant test examples at work)...
I want to program an amiga port for my text adventure engine. I dont quite get intuition layouts.
I am reading 'Programmers Guide to Amiga' by Robert Peck.
These days nobody really does anymore - and for a good reason. Intuition uis are cumbersome and hard to write correctly.
I want an infocom style text screen, title across the top, text below. text will scroll without interfeering with the title text and to run from workbench.
From my reading of some amiga programming books I need to create a screen, and within that screen a window? It feels like I'm creating an MDI app, and I dont want an MDI app. I just want to open a screen/window on workbench and render text to two different parts.
There's no MDI contcept in AmigaOS really. From what you're writing it sounds to me like you just want a plain window with custom drawn contents. Or do you want to create a normal buttonized GUI? In that case I'd strongly recommend using MUI since that will take a lot of load off of you. Doing it directly in intuition is a bad bad idea - if you want the plain gadgets, at least use something like gtlayout (although there's no reason not to use MUI in 2011).
When dealing with the text controls, does it retain the text so a window resize will automatically reflow the text or do I have to pragmatically reflow the text?, meaning I have to keep track of the text sent to the window? I'm guessing a NEWSIZE + REFRESHWINDOW means I need to know what text I've sent to redraw it...
Intuition and graphics have no "reflow" concept at all. You have to do everything manually.
Is SIMPLE_REFRESH better than not specifying it? Since I am targeting wb3.1, is it good practice to use SIMPLE_REFRESH or not or go with a smart refresh window?
Simplerefresh is always preferred since it uses less gfx memory. This however means that your window doesn't have a buffer and you need to listen to IDCMP_REFRESHWINDOW and redraw inside Begin/EndRefresh() - meaning you always need to be ready to redraw your current window contents.
random thought.. can you do a memmove inside a rastport to immitate scrolling? or do I need to create an off screen rastport? Can you do a ClipBlit where the source rp + dest rp are the same?
There's ScrollWindowRaster in intuition.library. You could ClipBlit yourself, but to do it right would be very cumbersome.
I see there is a ScrollRaster... so in theory I should have one rastport for my title line, and one rastport for the body text... things are becoming clearer now.
Well, no. You generally have one rastport per window. You'd create more if you were to use offscreen buffers and render into these - but this means you'd have to create offscreen LayerInfos in order to have clipping, otherwise rendering out of bitmap bounds could trash memory.
Would mui help here with doing design/layout of the window interface or should I just stick to intuition?
Yes, MUI will make interface layout automagic. You'd only have to create a custom class if you needed some custom-drawn area. There are good examples how to do this in the MUI sdk archive (see ClassX.c demos).