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 » How to isolate Layouter to layout for custom export files /drag,resize Ctrl's at runtime
How to isolate Layouter to layout for custom export files /drag,resize Ctrl's at runtime [message #23219] Wed, 30 September 2009 12:29 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi there

beeing in need of dragging and resizing controls at runtime, i had a look at the LayDesigner class in ide/LayDes package. i hope to find there some answers, how it is done Smile its quite difficult.

with some digging i managed to compile a test program that just starts up the class, it remains somewhat empy, loading a file there, i only get some kind of wierd behaviour, while i can see the surrounding margins only (some Ctrls).

??? is there any info/help available on how i could resize/change alignment of controls at runtime elsewehre?

??? is it possible to extract the LayDesigner class (and with it the LayDes class, that resembles the function)??

thx

PS: background is, is got some custom controls library and export their type and alignment through a factory to XML and import it also back..now the app just needs to load the xml through the factory. hence, i'd like to change appearance of the used controls and export it back to xml. (well thats much like the layouter itself in some ways, its exaclty what it does, but i need this function at runtime of application). i dont want to change to .lay format, my xml is just fine for that...

Attached is a short testproject, that starts a LayDesigner..but thats all i accomplished so far
Re: How to isolate Layouter to layout for custom export files /drag,resize Ctrl's at runtime [message #29813 is a reply to message #23219] Fri, 19 November 2010 10:36 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
is there any news available on this topic?

i'd be great to have a cool widget placer / editor that can serialize its layour info in a custom way..

btw: in the GUI Design docu, point 21, creating and using custom widgets
http://www.ultimatepp.org/srcdoc$CtrlLib$Tutorial$en-us.html

it is not very clear what to do with the *.usc file, to make TheIDE actually use it.

by chance, i named the usc file after the MyCtrl, "MyCtrl.usc" and restarted the ide. boom, it uses it in designer. maybe this is important for the documentation.

and another point:
is there any possibility to define what things can be edited for the custom Ctrl?

a simple User Class is offered SetFont, SetInk, SetFrame, wheras it will not compile, if defining anything of them, when the class has no methods names like that.

the usc based thing does not offer anything so far, except for class name and instance name..

any infos? i'd love to have a customizable designer Smile
Re: How to isolate Layouter to layout for custom export files /drag,resize Ctrl's at runtime [message #29814 is a reply to message #29813] Fri, 19 November 2010 11:33 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
digging a bit more i found the 'UscCtrl' example, which uses the 'Counter.usc' to have TheIDE understand it. it seems to even react on changes on the usc script immediately, seems like TheIDE is aware of changes to the file. great.

it names the prperties to Edit

	Frame  SetFrame = BlackFrame() @2;
	Font   SetFont = StdFont();
	Color  Ink = :SBlack;
	Color  Paper = :SWhite;


and by playing around i found the syntax for '>'

ctrl MyCtrl {
	> EditInt;
..
};

indicates TheIDE to use the properties from EditInt..cool.

now the biggest point for me now is, to make changes to the layout output possible..with the goal to be able to edit live properties from controls.. since now, the usc infos are used to build the '.lay' code, which is static and compile time for the used Ctrl's.

what would be the approach?

[Updated on: Fri, 19 November 2010 11:34]

Report message to a moderator

Previous Topic: operator ambiguous
Next Topic: How to make Layout Sizeable & Zoomable
Goto Forum:
  


Current Time: Sun Jun 23 15:39:41 CEST 2024

Total time taken to generate the page: 0.01597 seconds