Page 2 of 4

Posted: Sun Dec 04, 2005 7:41 pm
by Mischa
Sorry, i had should told you.

The new format is not compatible with old one.
But i think it should be save for future versions. :wink:

Regards,
Mischa

Posted: Sun Dec 04, 2005 11:33 pm
by flaith
Excellent, thanks for sharing !!! :D

Posted: Tue Dec 06, 2005 8:53 am
by gnozal
Excellent work, thank you :D
It would be usefull if gDesign could also create 'real' purebasic code like the other designers (pb code for window and gadget creation without using a .gdf included file).

Posted: Tue Dec 06, 2005 11:29 pm
by Mischa
@all
Thanks for nice replies. :)

@gnozal
Not a good idea, i think, cause then i have to analyse full source
to recreate it for the designer.
The concept of gDesign is, that you are able to edit your design again
and again, every time.
UPDATE
---------
-Dynamic include-source creation (modifing)
"Generate full source" will create both needed sources. Include-source will be
generated with the content this design need, only.
"Generate include source only" will create include, the same way, only for the
actual design.
When you save design, the include-source will automatically modified. If other
designs exist in the same path, the missing content will only be added and
nothing will be removed!

-Object-Manager window and learner window have close buttons now

Now a simple window + button costs only 19k with gDesign!
:wink:

Download: http://www.thinkrelative.de/gdesign.zip

Regards,
Mischa

Posted: Wed Dec 07, 2005 12:13 am
by Droopy
Thanks Mischa :D

Posted: Wed Dec 07, 2005 1:09 am
by PB
> Now a simple window + button costs only 19k with gDesign! :wink:

Cool, I will re-download it when I get home -- sounds good! :)

Posted: Wed Dec 07, 2005 9:14 am
by gnozal
Mischa wrote:@gnozal
Not a good idea, i think, cause then i have to analyse full source
to recreate it for the designer.
The concept of gDesign is, that you are able to edit your design again
and again, every time.
Yes, I understand that.
My idea was not to replace the .gdf file, but only to add a 'save as' option.
You could still use the .gdf file to edit your design, and then paste the generated code into the editor (like you do it with the official visual designer).
Anyway, thanks for your work.

Posted: Wed Dec 07, 2005 12:08 pm
by Lars
I agree with gnozal, but I would call it Export, to demonstrate it's not the
main intention. . .

It would be quite helpful if somebody doesn't want to use the Designer
Files, e.g. because he started developing his application earlier and only
wants to design one dialogue in your designer or something like this.

Besides, an Export function would make sense and shouldn't be too much
work, is it?

Posted: Wed Dec 07, 2005 11:19 pm
by Mischa
Update
-Autosize function enhanced
Now 8 different states.
(New: auto border orientation)

The old relative function buttons (X,Y,W,H)
now called RX,RY,RW,RH
Download: http://www.thinkrelative.de/gdesign.zip


@gnozal, @Lars

ts-soft has given me the tip to export gdf-file to Data inside
DataSection. (Data.l ... , ... , ...)
This would be easier to export/import.
What Do you think about that?

Regards,
Mischa

Posted: Wed Dec 07, 2005 11:53 pm
by Droopy
Thanks again 8)

Posted: Thu Dec 08, 2005 12:01 am
by srod
Mischa, sharing work like this is what PB is all about. This is a fantastic piece of code (any chance of getting my grubby hands on the source! :lol:)

A donation for the continued development of this project is on its way.

Posted: Thu Dec 08, 2005 1:11 am
by ts-soft
Mischa wrote: ts-soft has given me the tip to export gdf-file to Data inside
DataSection. (Data.l ... , ... , ...)
This would be easier to export/import.
What Do you think about that?

Regards,
Mischa
I have made a experimentel Procedure :wink:
FirstParameter = Filename from gdf
SecondParameter = PB-DataIncludeFile.pb

Only change the DataSection with:
XIncludeFile "PB-DataIncludeFile.pb"

Have Fun

Code: Select all

Procedure gdf2data(gdf_file.s, data_file.s)
  Protected gdf.l, length.l, *mem.l, file.l, spalte.l, I.l
  gdf = ReadFile(#PB_Any, gdf_file)
  If gdf = #False : ProcedureReturn #False : EndIf
  UseFile(gdf)
  length = Lof()
  *mem = AllocateMemory(Lof())
  ReadData(*mem, length)
  CloseFile(gdf)
  file = CreateFile(#PB_Any, data_file)
  If file = #False
    FreeMemory(*mem)
    ProcedureReturn #False
  EndIf
  WriteStringN("DataSection")
  WriteStringN(" gadgets:")
  WriteString(" data.b ")
  For I = 1 To length - 1
    If I % 10 = 0
      WriteStringN("")
      WriteString(" Data.b " + Str(PeekB(*mem)) + ",")
    Else
      spalte + 1
      If spalte = 9
        WriteString(Str(PeekB(*mem)))
        spalte = 0
      Else
        WriteString(Str(PeekB(*mem)) + ",")
      EndIf
    EndIf
    *mem + 1
  Next
  WriteStringN(Str(PeekB(*mem)))
  WriteStringN("EndDataSection")
  CloseFile(file)
  ProcedureReturn #True
EndProcedure
Is not complete tested

Posted: Thu Dec 08, 2005 8:50 am
by gnozal
Mischa wrote:@gnozal, @Lars

ts-soft has given me the tip to export gdf-file to Data inside
DataSection. (Data.l ... , ... , ...)
This would be easier to export/import.
What Do you think about that?

Regards,
Mischa
It's interesting, but it's not what I meant : it's still the gdf but in another form. I'd like real pb code.

Posted: Thu Dec 08, 2005 11:58 am
by Lars
Again, I have to agree with Gnozal.

I guess nobody will really request an event loop as the original VD
produces or even more (resizing etc) as PV makes possible.

But the possibility to just generate the "create gadget" snippet would
significantly ease the quick use of the GD, as it'd be very easy to just
quickly design a Window and then directly getting rid of any relation to the
designer.

E.g.: Imagine you are already developping an application which has
multiple tabs. Now you want to add a tab with new controlls, and you
would like to design this part in GD. Beeing able to directly retreive code
instead of a binary design makes this possible in the first place.

Posted: Thu Dec 08, 2005 1:59 pm
by Mischa
E.g.: Imagine you are already developping an application which has
multiple tabs. Now you want to add a tab with new controlls, and you
would like to design this part in GD. Beeing able to directly retreive code
instead of a binary design makes this possible in the first place.
Hm. I'm not sure, if i understand correct.
You mean, adding panel tabs, or something?

Edit a .gdf file and adding new controls is possible all the time.
That's the gDesign concept, don't you know? :wink:

This means not, that i don't want to create such export feature.
(Maybe a bit later?)

@ts-soft: Thanks for the posted make-data-routine. 8)

Regards,
Mischa