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++ Library support » U++ Library : Other (not classified elsewhere) » GetProperty() / SetProperty() for Ctrl
GetProperty() / SetProperty() for Ctrl [message #29796] Wed, 17 November 2010 17:46 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi guys

in my struggle with a 'scriptable' layout for OSC interfaces i came along the need / idea to make the controls more open to manipulation in terms of their properties (not the hardwired things like callbacks).

so one could imagine a uniform interface like
void Ctrl::SetProperty(const String& name, const Value& v);
void Ctrl::GetProperty(const String& name, Value& v);


now this would enable / map things like
c.SetProperty("background", Black);
c.GetProperty("background", v);

c.SetProperty("min", 123);
c.GetProperty("max", v);

c.SetProperty("xalign", "left");
c.SetProperty("xpos", 123);
c.SetProperty("yalign", "center");
c.SetProperty("ypos", 45);

c.SetProperty("pattern", "%.g");
c.SetProperty("grid" ValueArray(Vector<int>() << 5 << 6));

//would map to GetData / SetData directly i.e.
c.SetProperty("data", 345);
c.GetProperty("data", v);

c.GetProperty("count", v);

c.SetProperty("enable", true);
c.GetProperty("enable, v);

c.SetProperty("show", false);
c.SetProperty("title", "MyTitle");
c.SetProperty("tip", "GoHelp");

//query all getable properties
c.GetProperty("rprops", v);
//query all setable properties
c.GetProperty("wprops", v);

..
and many more..


this would ease things like a custom gui creation / live edit of controls..

this is just an idea, where std Ctrl could already map to a lot of things by itself.. and derived Ctrls simply extending the 'dictionary' of properties and managing the properties..

i imagine to extend it on template base if not desired in upp, but having a uniform polymorphic interface already from Ctrl level would help a great deal in this.

i might provide an example implementation soon..
just wanted to know your opinion.

cheers

[Updated on: Wed, 17 November 2010 17:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Drag and Drop between instances [FEATURE REQUEST]
Next Topic: PrinterJob prints blank pages in linux
Goto Forum:
  


Current Time: Fri Mar 29 09:05:13 CET 2024

Total time taken to generate the page: 0.01396 seconds