Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Code generator in Designer [FEATURE REQUEST][SOLVED...:)]
Code generator in Designer [FEATURE REQUEST][SOLVED...:)] [message #2132] Sun, 02 April 2006 11:18 Go to next message
forlano is currently offline  forlano
Messages: 1180
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I started to work with the Designer. Perhaps I'm using it not in the best way. In fact I do not include the .lay file but copy and past its code (that can be shown with CTRL+T) in the code. Nevertheless I found this method powerful because I can retouch in a finer way the geometry, appearence and control of each widget. For example, the following two lines:

A) from designer after CTRL+T
...
ITEM(LabelBox, dv___0, SetLabel(t_("Edit Player")).LeftPosZ(16, 644).TopPosZ(16, 80))
ITEM(Label, dv___1, SetLabel(t_("Name")).SetAlign(ALIGN_CENTER).LeftPosZ(28, 132).TopPosZ(32, 19))
...

become:

B) C++ code of case A
lbox.SetLabel(t_("Edit Player")).LeftPosZ(16, 644).TopPosZ(16, 80);
Add(lbox);

label[0].SetLabel(t_("Name")).SetAlign(ALIGN_CENTER).LeftPosZ(28, 132).TopPosZ(32, 19);
Add(label[0]);

That are very similar to the original. Moreover the lines in (A) include even the declaration of the widget used, so are complete.
I believed that the code generator could produce something like the case (B) instead give some skeleton that seems not very useful.
So my desire is to have a code generator that produce code as that of case (B).

Luigi

[Updated on: Tue, 02 May 2006 04:22] by Moderator

Report message to a moderator

Re: Code generator in Designer [message #2165 is a reply to message #2132] Sun, 02 April 2006 19:09 Go to previous message
forlano is currently offline  forlano
Messages: 1180
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Sun, 02 April 2006 11:18

Hello,

I started to work with the Designer. Perhaps I'm using it not in the best way. In fact I do not include the .lay file but copy and past its code (that can be shown with CTRL+T) in the code. Nevertheless I found this method powerful because I can retouch in a finer way the geometry, appearence and control of each widget. For example, the following two lines:

A) from designer after CTRL+T
...
ITEM(LabelBox, dv___0, SetLabel(t_("Edit Player")).LeftPosZ(16, 644).TopPosZ(16, 80))
ITEM(Label, dv___1, SetLabel(t_("Name")).SetAlign(ALIGN_CENTER).LeftPosZ(28, 132).TopPosZ(32, 19))
...

become:

B) C++ code of case A
lbox.SetLabel(t_("Edit Player")).LeftPosZ(16, 644).TopPosZ(16, 80);
Add(lbox);

label[0].SetLabel(t_("Name")).SetAlign(ALIGN_CENTER).LeftPosZ(28, 132).TopPosZ(32, 19);
Add(label[0]);

That are very similar to the original. Moreover the lines in (A) include even the declaration of the widget used, so are complete.
I believed that the code generator could produce something like the case (B) instead give some skeleton that seems not very useful.
So my desire is to have a code generator that produce code as that of case (B).

Luigi


Well,
I want to retire, delete, cancel, the code generator desire.
Thanks to Fudadmin I've seen how to include the .lay in the code. So that feature is quite useless.

Luigi
Previous Topic: Positioning in Designer
Next Topic: Yet another new user
Goto Forum:
  


Current Time: Tue Mar 19 04:26:08 CET 2024

Total time taken to generate the page: 0.01419 seconds