text
stringlengths
0
2.2M
void ofFileLoggerChannel::log(ofLogLevel level, const string & module, const string & message){
file << "[" << ofGetLogLevelName(level, true) << "] ";
if(module != ""){
file << module << ": ";
}
file << message << endl;
}
void ofFileLoggerChannel::log(ofLogLevel level, const string & module, const char* format, ...){
va_list args;
va_start(args, format);
log(level, module, format, args);
va_end(args);
}
void ofFileLoggerChannel::log(ofLogLevel level, const string & module, const char* format, va_list args){
file << "[" << ofGetLogLevelName(level, true) << "] ";
if(module != ""){
file << module << ": ";
}
file << ofVAArgsToString(format,args) << endl;
}
#include "ofxGuiGroup.h"
#include "ofxPanel.h"
#include "ofxSliderGroup.h"
#include "ofGraphics.h"
#include "ofxLabel.h"
#include "ofxInputField.h"
using namespace std;
float ofxGuiGroup::elementSpacing = 1;
float ofxGuiGroup::groupSpacing = 1;
float ofxGuiGroup::childrenLeftIndent = 4;
float ofxGuiGroup::childrenRightIndent = 0;
ofxGuiGroup::ofxGuiGroup(){
minimized = false;
headerRect.height = defaultHeight;
bGuiActive = false;
}
ofxGuiGroup::ofxGuiGroup(const ofParameterGroup & parameters, const std::string& filename, float x, float y){
minimized = false;
parent = nullptr;
setup(parameters, filename, x, y);
}
ofxGuiGroup * ofxGuiGroup::setup(const std::string& collectionName, const std::string& filename, float x, float y){
ofParameterGroup parameters(collectionName);
return setup(parameters, filename, x, y);
}
ofxGuiGroup * ofxGuiGroup::setup(const ofParameterGroup & _parameters, const std::string& _filename, float x, float y){
b.x = x;
b.y = y;
headerRect.height = defaultHeight;
if(parent != nullptr){
b.width = parent->getWidth();
}else{
b.width = defaultWidth;
}
clear();
filename = _filename;
bGuiActive = false;
for(std::size_t i = 0; i < _parameters.size(); i++){
string type = _parameters.getType(i);
if(type == typeid(ofParameter <int32_t> ).name()){
auto p = _parameters.getInt(i);
add(p);
}else if(type == typeid(ofParameter <uint32_t> ).name()){
auto p = _parameters.get<uint32_t>(i);
add(p);
}else if(type == typeid(ofParameter <int64_t> ).name()){
auto p = _parameters.get<int64_t>(i);
add(p);
}else if(type == typeid(ofParameter <uint64_t> ).name()){
auto p = _parameters.get<uint64_t>(i);
add(p);
}else if(type == typeid(ofParameter <int8_t> ).name()){
auto p = _parameters.get<int8_t>(i);
add(p);
}else if(type == typeid(ofParameter <uint8_t> ).name()){
auto p = _parameters.get<uint8_t>(i);
add(p);
}else if(type == typeid(ofParameter <int16_t> ).name()){
auto p = _parameters.get<int16_t>(i);
add(p);
}else if(type == typeid(ofParameter <uint16_t> ).name()){
auto p = _parameters.get<uint16_t>(i);
add(p);
}else if(type == typeid(ofParameter <size_t> ).name()){
auto p = _parameters.get<size_t>(i);
add(p);
}else if(type == typeid(ofParameter <float> ).name()){
auto p = _parameters.getFloat(i);
add(p);