frauzufall / ofxGuiExtended

ofParameter based GUI addon for openFrameworks; derived from the core OF ofxGui addon and ofxDOM.
MIT License
113 stars 30 forks source link

refactored to adapt to ofxGui changes #21

Closed arturoc closed 9 years ago

arturoc commented 9 years ago

This adapts ofxGuiExtended to the changes in https://github.com/openframeworks/openFrameworks/pull/4150

I've added to ofxBaseGui 2 new properties, a layout (which right now can be vertical and horizontal) and a boolean inContainer. that solves all the cases where parent was being used.

then i've refactored you controls a bit, mostly to get rid of the places where it used parent, and added a config struct to some of the controls. i've also changed the setup methods to return a reference instead of a pointer and even removed some setup methods in favor of the new templated add methods in ofxGuiGroup.

the exampleControls is also refactored to the new syntax.

this is not complete but just as a first step towards integrating it with ofxGui. don't merge it into your master cause that will break the addon with current OF but just to see what you think about the changes.

i think we could:

frauzufall commented 9 years ago

Ahh I just did the same thing , added this changed to the new layout in a new branch of your openframeworks refactor-gui branch.. https://github.com/frauzufall/openFrameworks/tree/refactor-gui-extended

It took a while and I wanted to have separate commits for all changes I made to ofxGui to make it easier to discuss... Wanted to write about that this evening ;)

frauzufall commented 9 years ago

Sorry we should have communicated that somehow to avoid doing everything twice.. But on the other hand I did what you said, integrating ofxGuiGroupExtended and ofxPanelExtended into ofxGuiGroup and ofxPanel and since you also thought about all the changes we can discuss the differences between our versions and have a reasoned result.

For example I thought about the ofxToggleGroup for exclusive toggles, but the problem is that only this group and derivatives can use this functionality. ofxGuiMatrix can also be filled with different controls than toggles, but it should have the exclusive toggles option. That's why I put it in ofxGuiGroup. The drawback is that ofxGuiGroup gets pretty big. That's why I wanted to put this functionality to ofxToggle, but this is not possible without having a parent object.

But I think we should discuss everything in https://github.com/frauzufall/openFrameworks/tree/refactor-gui-extended because it is the merged version of the two addons, what do you say? This addon should keep the old version as long as the new ofxGui is not merged with the OF master.

arturoc commented 9 years ago

:) great no worries, i also wanted to give it a try to see if the changes i did in ofxGui some days ago made sense. i'll take a look at your changes but if you've done more or less the same i think we are good. i'll close this then