view anagram/guisupport/brt.h @ 21:1c9dac05d040

Add lint-style FALLTHROUGH annotations to fallthrough cases. (in the parse engine and thus the output code) Document this, because the old output causes warnings with gcc10.
author David A. Holland
date Mon, 13 Jun 2022 00:04:38 -0400
parents 13d2b8934445
children
line wrap: on
line source

/*
 * AnaGram, A System for Syntax Directed Programming
 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
 * See the file COPYING for license and usage terms.
 *
 * brt.h
 */

#ifndef BRT_H
#define BRT_H

#include "agarray.h"
#include "dc.h"


class help_dc : public dc {
private:
  AgString msg;
  AgArray<int> lines;
  AgArray<int> xref;
  int width;

public:
  unsigned msg_number;
  help_dc(unsigned, const AgString);
  help_dc(help_dc &x)
  : dc(x), msg(x.msg), lines(x.lines), 
  xref(x.xref), width(x.width), msg_number(x.msg_number) {}

  //AgString expand_help_block(short *pairs, const AgArray<char>);
  //void load_help(help_screen_map *m);
  //void find_xref(void);

  virtual void getLine(unsigned) const;
};

class help_index_dc : public dc {
public:
  help_index_dc(void);
  help_index_dc(help_index_dc &x) : dc(x) {}

  virtual void getLine(unsigned)const;
  virtual AgString findHelpTopic();
};

class param_table_dc : public dc {
public:
  param_table_dc(void);
  param_table_dc(param_table_dc &x) : dc(x) {}

  virtual void getLine(unsigned) const;
  virtual AgString findHelpTopic();
};

class text_window_dc : public dc {
protected:
  AgString text;

public:
  text_window_dc(void) {text = NULL;}
  text_window_dc(AgString title, AgString data);
  text_window_dc(text_window_dc &x) : dc(x), text(x.text) {}

  virtual void getLine(unsigned) const;
};


#endif /* BRT_H */