#ifndef __COLMASK_H
#define __COLMASK_H

#ifndef __ASSOC_H
#include <assoc.h>
#endif   

#ifndef __AUTOMASK_H
#include <automask.h>
#endif   

#ifndef __COLORS_H
#include <colors.h>
#endif   

class TSelect_color_mask : public TAutomask
{        
  TAssoc_array _color_defs; 
  TString _paragraph;
  
protected:
  virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
  void init(const char* mask_name, const char* para = NULL);
  void save() const;
  
public:
  void add_color(const char* key, const char* prompt, COLOR back, COLOR fore, COLOR def_back, COLOR def_fore);
  void add_color_def(const char* key, const char* prompt, COLOR back = NORMAL_BACK_COLOR, COLOR fore = NORMAL_COLOR);
  bool get_color(const char* key, COLOR& back, COLOR& fore) const;

  TSelect_color_mask(const char* mask_name, const char* para = NULL);
};

#endif