Skip to content

Commit

Permalink
set screen and window nodes to expanded by default
Browse files Browse the repository at this point in the history
fix loading of menu objects (broken by adding requester items)
fix serialisation of requester items (add a dummy item)
increase max undo levels to 50
add edit button on main form
update manual
update file id
  • Loading branch information
dmcoles committed Sep 13, 2024
1 parent d2b3611 commit 5e463dc
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 94 deletions.
Binary file modified Rebuild.info
Binary file not shown.
88 changes: 73 additions & 15 deletions Rebuild_manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---------------------------------------------------------------------------

Rebuild - Reaction GUI Builder
Version 1.1.0
Version 1.2.0

---------------------------------------------------------------------------

Expand All @@ -28,7 +28,8 @@ Just a few of the improvements are:
3) Support for multiple windows in a single project
4) Copy buffer making it easier to move or duplicate gadgets
5) More flexible system of arranging gadgets and layouts

6) Multi-level undo/redo
7) Realtime code preview

2. License

Expand Down Expand Up @@ -156,13 +157,22 @@ window into the copy buffer. This is highly useful if you want to
duplicate a gadget several times with the same settings or move a gadget
from one window to another in your design.


6. Source code generation
6. The code window

Rebuild is able to generate fully working SAS C and Amiga E code for the
GUI designs you create. In order to compile the source code you will need
the Amiga OS 3.2 NDK. The E-VO E compiler has this as standard so I
recommend if you plan to use the E source code then I recommend you use this.
GUI designs you create. The code preview window will show the source code
for the current design. The source code is updated in real-time as you
make changes. If you wish to save the source code there is an option on
the file menu. You can also close the source code window if you do not
wish to see it. Even if the source window is closed you will still be
able to save the source code.

The source code will be based upon the code generation options as
explained in the next section.

In order to compile the source code you will need the Amiga OS 3.2 NDK.
The E-VO E compiler has this as standard so I recommend if you plan to use
the E source code then I recommend you use this.

If you are using C then the NDK can be obtained from the aminet
http://aminet.net/package/dev/misc/NDK3.2
Expand All @@ -175,6 +185,9 @@ if you have ClassAct installed - although it should be noted that despite
the ClassAct documentation stating that it works with OS2.0 and above, it is
my experience that it does not actually work with anything below OS 3.0


7. Source code generation options

When you click the 'Code' button you will be presented with 4 options:

1. E or C source
Expand Down Expand Up @@ -247,8 +260,7 @@ to generate code that does not use these macros. The alternative for GCC is
to use the -DNO_INLINE_STDARG parameter when compiling.



7. Tips on working with the rebuild generated source code.
8. Tips on working with the rebuild generated source code.

Here is an example of some C code generated by rebuild. I have annotated it
with some comments to explain the intended use of some of the parts of the
Expand Down Expand Up @@ -725,7 +737,7 @@ EXCEPT DO
ENDPROC


8. Tooltype settings
9. Tooltype settings

Some of the defaults for the Rebuild application can be configured by
editing the Rebuild.info file.
Expand All @@ -745,13 +757,20 @@ Here is a list of the tooltypes that can be defined
SHOWBUFFER=YES / NO (show the copy buffer at startup)
SHOWSETTINGS=YES / NO (show settings when adding new gadgets)
PROJECTICONS=YES / NO (create an icon for project files)
WARNONDELETE=YES / NO (Warn when an item is deleted)
PREVIEWCODE=YES / NO (Show code preview window at startup)
WINDOWTOP =
WINDOWLEFT =
WINDOWWIDTH =
WINDOWHEIGHT = (override the main window size and position)

CODEWINDOWTOP =
CODEWINDOWLEFT =
CODEWINDOWWIDTH =
CODEWINDOWHEIGHT = (override the code preview window size and position)


9. Futher inforation
10. Futher inforation

ReBuild is written using my own E-VO compiler.

Expand All @@ -766,14 +785,18 @@ Michael Bergmann has put in a lot of time and effort in testing Rebuild and
has also developed a tutorial for Rebuild. This tutorial goes into depth
regarding the use of Rebuild and each of the gadget types.

There have been some changes to this tool since that tutorial was written
so the tutorial may not fully reflect the current workings of the current
version.

The tutorial is available separately from gitub repository:

https://github.com/dmcoles/ReBuild/tree/main/tutorial

My thanks go to Michael for this great work.


10. Future (possible) enhancements
11. Future (possible) enhancements

I have many ideas for future enhancements to this project. My plan was to
release something which could at least cover all of the functionality of
Expand All @@ -782,9 +805,6 @@ the old ClassMate tool for the first version of Rebuild.
Just a few of my ideas (some of which may or may not be possible) are:

* add more languages to the code generator
* add hint text options for all of the gadgets
* add checkable and mutually exclusive menus
* requester designer
* option to generate codecraft project files
* add hint text to the settings pages to help users

Expand All @@ -810,4 +830,42 @@ Just a few of my ideas (some of which may or may not be possible) are:
- Sketchboard was missing many of the settings in the generated code
- SizeBRight and SizeBBottom did not work correctly in preview window

1.2.0
- fix getfile readonly code not being generated when TRUE
- use macros setting was not fully applied to all object definitions
- fix os4 issues with penmap and bitmap gadgets
- rename 'name' fields to 'label'
- add identifier field for all gadgets
- add child labels for gradient slider and palette gadgets
- add support for checkable/toggle/mutual menu items
- add 'move into vlayout' and 'move into hlayout' menu options
- implement reopen function
- add hint text option to all gadgets
- rename incorrect window gadget help label
- set window gadget help to default to true
- window activate flag defaults to true
- adding new gadget now inserts after currently selected gadget instead
of at the end
- add menu keyboard shortcuts
- add undo/redo capability
- save code preview and preview window positions to project file
- update project file format to v2
- add tooltype options for code previews and code preview window position
- settings saved to envarc:
- add realtime code preview window
- set selected item to root layout for new project
- make main window and code preview window remember their last positions
- add preview window width + height properties
- add link to vscroll to text field gadget
- add link to hscroll and link to vscroll to text editor gadget
- add link to slider gadget for integer gadget
- add horizontal scroll flag to texteditor
- throw an error on startup if neither textfield or texteditor gadgets
are present
- all gadget types now have label property
- set preview window settings based on window definition
- re-arrange some gadget settings pages to try to better fit them in
640*256
- Add an edit button on main window

(C) Darren Coles 2024
2 changes: 1 addition & 1 deletion file_id.diz
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.--------------------------------.
| Rebuild - Reaction GUI Builder |
| v1.1.0 !
| v1.2.0 !
! (c)2024 By Darren Coles |
`--------------------------------'
82 changes: 42 additions & 40 deletions reactionObject.e
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ EXPORT PROC create(parent) OF reactionObject
scr:=LockPubScreen(NIL)
self.drawInfo:=GetScreenDrawInfo(scr)
self.visInfo:=GetVisualInfoA(scr,[TAG_END])
self.expanded:=self.allowChildren()<>0
self.expanded:=(self.allowChildren()<>0) OR (self.type==[TYPE_SCREEN,TYPE_WINDOW])
UnlockPubScreen(NIL,scr)
ENDPROC

Expand Down Expand Up @@ -686,7 +686,7 @@ EXPORT PROC serialise(fser:PTR TO fileStreamer) OF reactionObject

list:=self.serialiseData()
count:=ListLen(list)
IF count>0
IF (count>0)
i:=0
WHILE i<count
fieldname:=list[i++]
Expand Down Expand Up @@ -726,9 +726,9 @@ EXPORT PROC serialise(fser:PTR TO fileStreamer) OF reactionObject
ENDIF
ENDIF
ENDWHILE
fser.writeLine('-')
self.serialiseChildren(fser)
ENDIF
fser.writeLine('-')
self.serialiseChildren(fser)
ENDPROC

PROC deserialise(fser:PTR TO fileStreamer) OF reactionObject
Expand Down Expand Up @@ -804,44 +804,46 @@ PROC deserialise(fser:PTR TO fileStreamer) OF reactionObject

list:=self.serialiseData()
count:=ListLen(list)
done:=FALSE
REPEAT
IF fser.readLine(tempStr)
IF StrCmp('-',tempStr)
done:=TRUE
IF count>0
done:=FALSE
REPEAT
IF fser.readLine(tempStr)
IF StrCmp('-',tempStr)
done:=TRUE
ELSE
i:=0
WHILE i<count
fieldname:=list[i++]
fieldptr:=list[i++]
fieldtype:=list[i++]
StrCopy(tempStr2,fieldname)
StrAdd(tempStr2,': ')
UpperStr(tempStr2)
IF StrCmp(tempStr2,tempStr,EstrLen(tempStr2))
SELECT fieldtype
CASE FIELDTYPE_CHAR
PutChar(fieldptr,Val(tempStr+StrLen(tempStr2)))
CASE FIELDTYPE_INT
PutInt(fieldptr,Val(tempStr+StrLen(tempStr2)))
CASE FIELDTYPE_LONG
PutLong(fieldptr,Val(tempStr+StrLen(tempStr2)))
CASE FIELDTYPE_STR
AstrCopy(fieldptr,tempStr+StrLen(tempStr2))
CASE FIELDTYPE_STRLIST
strlist:=Long(fieldptr)
strlist.add(tempStr+StrLen(tempStr2))
CASE FIELDTYPE_INTLIST
intlist:=Long(fieldptr)
intlist.add(Val(tempStr+StrLen(tempStr2)))
ENDSELECT
ENDIF
ENDWHILE
ENDIF
ELSE
i:=0
WHILE i<count
fieldname:=list[i++]
fieldptr:=list[i++]
fieldtype:=list[i++]
StrCopy(tempStr2,fieldname)
StrAdd(tempStr2,': ')
UpperStr(tempStr2)
IF StrCmp(tempStr2,tempStr,EstrLen(tempStr2))
SELECT fieldtype
CASE FIELDTYPE_CHAR
PutChar(fieldptr,Val(tempStr+StrLen(tempStr2)))
CASE FIELDTYPE_INT
PutInt(fieldptr,Val(tempStr+StrLen(tempStr2)))
CASE FIELDTYPE_LONG
PutLong(fieldptr,Val(tempStr+StrLen(tempStr2)))
CASE FIELDTYPE_STR
AstrCopy(fieldptr,tempStr+StrLen(tempStr2))
CASE FIELDTYPE_STRLIST
strlist:=Long(fieldptr)
strlist.add(tempStr+StrLen(tempStr2))
CASE FIELDTYPE_INTLIST
intlist:=Long(fieldptr)
intlist.add(Val(tempStr+StrLen(tempStr2)))
ENDSELECT
ENDIF
ENDWHILE
done:=TRUE
ENDIF
ELSE
done:=TRUE
ENDIF
UNTIL done
UNTIL done
ENDIF
ENDPROC

PROC serialiseChildren(fser:PTR TO fileStreamer) OF reactionObject
Expand Down
Loading

0 comments on commit 5e463dc

Please sign in to comment.