//#define DJ_DBG
#include <djFileBrowser.h>
#include <djApp.h>

using namespace dj;

class myApp : public App {
public:

  myApp(int & argc, char ** argv);

private:

  DJ_CALLBACK(myApp, widgetCallback, const Str &)
  DJ_CALLBACK(myApp, exitCallback, bool)
};

myApp::myApp(int & argc, char ** argv) :
  App("colorWidget", argc, argv)
{
  fileBrowser()->sig().set(this, widgetCallback);
  fileBrowser()->closeSig().set(this, exitCallback);
  fileBrowser()->show();
  
  valid(true);
}

void myApp::widgetCallback(const Str & in) { print(in); }
void myApp::exitCallback(bool) { exit(); }

int main(int argc, char ** argv)
{
  DJ_DBG_LOG();
  return myApp(argc, argv).exec();
}
