Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
refactored to adapt to ofxGui changes #21
This adapts ofxGuiExtended to the changes in openframeworks/openFrameworks#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:
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 ;)
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.