PureFORM 1.99 (yet another FORM designer)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

User avatar
le_magn
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Aug 24, 2005 12:11 pm
Location: Italia

Post by le_magn »

Thank's Gnozal!!!!!
rule
User
User
Posts: 14
Joined: Sat Sep 02, 2006 7:56 pm
Location: Oostzaan / Netherlands

Post by rule »

Nice peace of work Gnozal, but I have a request.
There is a new feature in version 4.xx: StickyWindow (stay on top), is it posible to add this to your app?

Greetz,

Roel.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

rule wrote:There is a new feature in version 4.xx: StickyWindow (stay on top), is it posible to add this to your app?
With the 'code inject' feature I am working on you could add this code easily.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Post by Kiffi »

gnozal wrote:[...]'code inject' feature[...]
whow, sounds very good! Image I'm curious about it.

Greetings ... Kiffi
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Kiffi wrote:whow, sounds very good!
I hope. :wink:

New features I am adding :
1. PureFORM should be able to update an existing source code, using special code tags (all text between two Start/End code tags will be added/replaced). The rest of the text will remain untouched.
2. The code-inject feature : you can add text in some locations, like window start code, gadget events, etc...

I am not sure exactly how to do all this, I am currently experimenting some alternative solutions.
A screenshot of the code I am playing with this morning :
Image
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- source update feature ('Project' menu, item 'Update code in source')
- code inject feature ('Edit' menu, item 'Code injection' / or F8 / or Context menu item 'Code injection')
- added flag #SS_NOPREFIX for TextGadget

Important notes :

1. Source update

PureFORM is able to update the source code : the first time you save the generated code with 'Save as code', meanwhile you can add some extra code in jaPBe and the next time after you changed the form you can update the source with 'Update code in source'.
You have to enable option 'Add PureFORM code tags to generated code' in Preferences. PureFORM assumes your source file is 'MyProject.pb' when your form file is 'MyProject.pbf'.
The code tags are used to detect the code to be updated in a source file. Note that all code between two Start/End tags is replaced.
Example of code tags :

Code: Select all

...
some code (untouched)
...
;:PureFORM:Windows:Start:
...
all code here is replaced
...
;:PureFORM:Windows:End:
...
some code (untouched)
...
At any time you can erase or rename (:-PureFORM:Windows:Start:/:-PureFORM:Windows:End:) the code tags and the code in between will no longer be updated.
For safety reasons, the source before update is renamed to 'MyProject.pb.PureFORM.Bak'.

2. Code injection

By default, the code inject window uses a scintilla control. You can also use an embedded jaPBe window if you check 'Use embedded jaPBe in Code Inject' (this only works if PureFORM is started as plugin from jaPBe ; for best results update to jaPBe V3 build 608+).
All code entered via the code inject dialog will be injected in the generated source code. This code is saved in a separated 'MyProject.pbfi' file.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :

- displayed text 'Code injection' replaced by 'Code infusion' after a quick synonym search, as 'Code injection' is used by PureVisionXP (requested by Paul).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Looking good! Can I suggest that the Syntax Coloring take my settings from
my "PureBasics.pref" file though? I don't like your default colors. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- syntax coloring : added option 'Load colors from Purebasic.prefs'
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Q*bert
User
User
Posts: 27
Joined: Sat Dec 30, 2006 12:17 am
Location: Milwaukee, WI USA

Post by Q*bert »

gnozal,

I think there's a problem with the "Gadget enumeration" combo box list in the latest version. Whenever I change any Pureform Configuration setting, the combo box is blank and the "FORM_GadgetEnumerationMode" setting in the ini file gets set to -1.

Also, would it be possible to have jaPBe automatically reload the code file after PureForm closes, assuming it has been run as a plugin?

Finally, have you given any consideration of officially supporting an event engine like EasyVent. The combination would be great.

Thanks a lot for this effort. PureForm seems to be the only form designer that is being actively updated, and it is quickly surpassing all the others!
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> syntax coloring : added option 'Load colors from Purebasic.prefs'

Thanks, but it doesn't work properly with my prefs file for code injection,
it has black text on my black background. Do you want a copy of my prefs
file to find out why? PM me with where to send it, if so. Thanks for your
quick addition of this request, too. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Molchyn
User
User
Posts: 42
Joined: Thu Jan 29, 2004 12:54 am

Post by Molchyn »

last build 86 sometimes lost names for gadgets :cry:

Code: Select all

;{[PureFORM Project]
;PureFORM_Project_Begin
;Project¶PureFORM_Clipboard2
;Window¶1¶#Window_0¶13500416¶#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar¶#Window_0¶234¶138¶400¶400¶0¶10¶10¶0¶5000¶5000¶0¶-1¶0¶¶
;PanelGadget¶1¶¶1¶-1¶-1¶0¶0¶19¶0¶0¶¶¶¶-1¶3¶¶¶0¶0¶1¶1¶2¶25¶30¶120¶265¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Tab #1¶0¶¶0¶0
;PanelGadget¶2¶¶1¶-1¶-1¶0¶0¶19¶0¶0¶¶¶¶3¶3¶¶¶0¶0¶1¶1¶2¶170¶30¶185¶280¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶-1¶-1¶Tab #1¶0¶¶0¶0
;SplitterGadget¶3¶¶1¶-1¶-1¶0¶0¶24¶196¶3¶#PB_Splitter_Separator|#PB_Splitter_Vertical¶Gadget_2¶¶2¶0¶¶¶1¶2¶0¶0¶0¶5¶0¶390¶390¶0¶0¶0¶0¶0¶0¶0¶-1¶-1¶0¶0¶¶0¶¶0¶0
;PureFORM_Project_End
;}
probably it's happened then string in ini file stay -1
FORM_GadgetEnumerationMode = -1
how that happened I don't know
Q*bert
User
User
Posts: 27
Joined: Sat Dec 30, 2006 12:17 am
Location: Milwaukee, WI USA

Post by Q*bert »

probably it's happened then string in ini file stay -1
FORM_GadgetEnumerationMode = -1
how that happened I don't know
That's a result of the bug I described a couple of postings ago.
Any time you modify any PureForm Configuration settings the FORM_GadgetEnumerationMode will be reset to -1
and PureForm will screw up the gadget names.

A workaround for this is to manually edit the PureForm.ini file and change FORM_GadgetEnumerationMode to 0, 1 or 2
where 0=Number, 1=Class/Number, and 2=Window/Class/Number for Gadget Enumeration.

I'm sure gnozal will correct this soon as he apparently rarely sleeps! :shock:
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

PB wrote:> syntax coloring : added option 'Load colors from Purebasic.prefs'

Thanks, but it doesn't work properly with my prefs file for code injection,
it has black text on my black background. Do you want a copy of my prefs
file to find out why? PM me with where to send it, if so. Thanks for your
quick addition of this request, too. :)
I made a little change. I hope it works now.
Q*bert wrote:I think there's a problem with the "Gadget enumeration" combo box list in the latest version. Whenever I change any Pureform Configuration setting, the combo box is blank and the "FORM_GadgetEnumerationMode" setting in the ini file gets set to -1.
Should be fixed
Q*bert wrote:Also, would it be possible to have jaPBe automatically reload the code file after PureForm closes, assuming it has been run as a plugin?
Look at the new option in Preferences.
If you start PureFORM as a plugin and your current file in jaPBe is 'MyProject.pb', PureFORM will open 'MyProject.pbf', and reload 'MyProject.pb' in jaPBe before quitting.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

>> [...] black text on my black background
>
> I made a little change. I hope it works now.

Yes, now the text shows when I type it, but there's no cursor seen, so it must
be black on my black background? Makes it hard to see where I'm typing. ;)

Also, there's no capitalization, eg. if I type "debug" it doesn't become "Debug".
Is that something you might be able to add in later?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply