/*------------------------------------------------------------------------------
 src/lib/djWidget/djFileNameWidget.h
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

#ifndef DJ_FILE_NAME_WIDGET_H
#define DJ_FILE_NAME_WIDGET_H
#include <djWidget.h>

namespace dj {

class TextWidget;

// File name widget.
//
class FileNameWidget : public Widget {
public:

  FileNameWidget();
  ~FileNameWidget();
  void die();

  // Value.
  //
  void set(const Str &);
  const Str & get() const { return _value; }
  
  // Signals.
  //
  Signal<const Str &> & sig() { return _sig; }
  
private:

  DJ_CALLBACK(FileNameWidget, widgetCallback, const Str &)
  DJ_CALLBACK(FileNameWidget, browseCallback, bool)

  void widgetUpdate();

  Str _value;

  Signal<const Str &> _sig;

  TextWidget * _widget;
};

}

#endif
