class wrap_in_bracket: public bist_plugin{
public:
  wrap_in_bracket(immagine* image, string libpath);
  virtual ~wrap_in_bracket();
  
  virtual bool act(int e);
  
  
  virtual void register_plugin();
  virtual bool time_to_act();
  

  virtual bool need_atom();
  virtual bool need_leg();

  virtual string libpath();
  void inizialize();

protected:
  /**
   *\param the_group if NULL a new group will be created
   **/
  void insert_parent_bra(gruppo* the_group,float px,float py,float w,float h);
  /**
   *\param the_group if NULL a new group will be created
   **/
  void insert_box_bra(gruppo* the_group, float px, float py, float w, float h);
  /**
   *\param the_group if NULL a new group will be created
   **/
  void insert_curly_bra(gruppo* the_group,float px,float py,float w,float h);

  bool _has_to_act;
  bool _has_acted;
  bool _merge;
  bool _free_wrap;
  int  _type;
  std::vector< std::pair<float,float> > _box;

};

extern "C" bist_plugin* create_plugin(immagine* imm, string libpath);
extern "C"  void destroy_plugin(bist_plugin* j);

