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 » Community » Newbie corner » Layout files versus embedded code
Re: Layout files versus embedded code [message #59627 is a reply to message #59621] Sun, 19 February 2023 10:12 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
Nope. See this:

#define LAYOUTFILE <Days/Days.lay>
#include <CtrlCore/lay.h>


This is actually the layout definition and it is embedded directly to sources.

AFAIK, this is very similar to C# does. The one difference is that while C# dialog designer produces complex C# code with multiple warning in comments "do not edit by hand", in U++, thanks to macros, we have a bit nicer "format"

LAYOUT(DaysLayout, 320, 64)
	ITEM(Upp::EditDate, date1, LeftPosZ(52, 100).TopPosZ(8, 19))
	ITEM(Upp::Label, dv___1, SetLabel(t_("Date 1")).LeftPosZ(8, 40).TopPosZ(8, 19))
	ITEM(Upp::EditDate, date2, LeftPosZ(212, 100).TopPosZ(8, 19))
	ITEM(Upp::Label, dv___3, SetLabel(t_("Date 2")).LeftPosZ(168, 40).TopPosZ(8, 19))
	ITEM(Upp::Label, result, LeftPosZ(8, 304).TopPosZ(36, 19))
END_LAYOUT


which definitely can be and often is edited as text, but with a bit of macro trickery is actually possible input for C++ compiler.

So no, no external files, layouts are C++ code.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Add a new build method
Next Topic: Newbie questions
Goto Forum:
  


Current Time: Thu Jul 31 17:00:00 CEST 2025

Total time taken to generate the page: 0.06924 seconds