text
stringlengths 0
2.2M
|
---|
return getControlType <ofxIntSlider>(name);
|
}
|
ofxFloatSlider & ofxGuiGroup::getFloatSlider(const std::string& name){
|
return getControlType <ofxFloatSlider>(name);
|
}
|
ofxToggle & ofxGuiGroup::getToggle(const std::string& name){
|
return getControlType <ofxToggle>(name);
|
}
|
ofxButton & ofxGuiGroup::getButton(const std::string& name){
|
return getControlType <ofxButton>(name);
|
}
|
ofxGuiGroup & ofxGuiGroup::getGroup(const std::string& name){
|
return getControlType <ofxGuiGroup>(name);
|
}
|
ofxBaseGui * ofxGuiGroup::getControl(const std::string& name){
|
for(std::size_t i = 0; i < collection.size(); i++){
|
if(collection[i]->getName() == name){
|
return collection[i];
|
}
|
}
|
return nullptr;
|
}
|
bool ofxGuiGroup::setValue(float mx, float my, bool bCheck){
|
if(!isGuiDrawing()){
|
bGuiActive = false;
|
return false;
|
}
|
if(bCheck){
|
if(b.inside(mx, my)){
|
bGuiActive = true;
|
if(bHeaderEnabled){
|
if(headerRect.inside(mx, my)){
|
minimized = !minimized;
|
if(minimized){
|
minimize();
|
}else{
|
maximize();
|
}
|
return true;
|
}
|
}
|
}
|
}
|
return false;
|
}
|
void ofxGuiGroup::minimize(){
|
minimized = true;
|
sizeChangedCB();
|
onMinimize();
|
}
|
void ofxGuiGroup::maximize(){
|
minimized = false;
|
sizeChangedCB();
|
onMaximize();
|
}
|
void ofxGuiGroup::minimizeAll(){
|
for(std::size_t i = 0; i < collection.size(); i++){
|
ofxGuiGroup * group = dynamic_cast <ofxGuiGroup *>(collection[i]);
|
if(group){
|
group->minimize();
|
}
|
}
|
}
|
void ofxGuiGroup::maximizeAll(){
|
for(std::size_t i = 0; i < collection.size(); i++){
|
ofxGuiGroup * group = dynamic_cast <ofxGuiGroup *>(collection[i]);
|
if(group){
|
group->maximize();
|
}
|
}
|
}
|
bool ofxGuiGroup::isMinimized() const{
|
return minimized;
|
}
|
void ofxGuiGroup::onMinimize(){
|
}
|
void ofxGuiGroup::onMaximize(){
|
}
|
void ofxGuiGroup::updateChild(ofxBaseGui* child, const float& x, const float& y, const float& width, bool bUpdateWidth){
|
if(child){
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.