view anagram/vaclgui/dvplug.hpp @ 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 1997-2002 Parsifal Software. All Rights Reserved.
 * See the file COPYING for license and usage terms.
 *
 * dvplug.hpp
 */

#ifndef DVPLUG_HPP
#define DVPLUG_HPP

#include "agarray.h"
#include "dc.h"
#include "dview.hpp"
#include "wdata.h"


class AgDataViewPlug
 : public WindowData
 , public WindowConnector
{
private:
  dc_ref displayControl;
  AgDataView *dataView;

public:
  AgDataViewPlug(dc_ref control)
    : displayControl(control)
    , dataView(0)
  {}

  virtual ~AgDataViewPlug();

  void disconnect();
  void setFocus();
  int getCursorLine();
  AgDataViewPlug *windowData() { return this; }
  virtual void synchCursor(unsigned);

  static IColor color[10];

  void connect(AgDataView *dataView_) {
    //LOGSECTION("AgDataViewPlug::connect");
    dataView = dataView_;
  }
  AgArray<AgMenuItem> auxMenu();
  virtual void show();

  AgString getLine(unsigned k);
  AgString findHelpTopic();
  unsigned nColumns();
  unsigned nLines();
  int nextChildId();

  AgString fileName();
  AgString headTitle();
  AgString columnHeadTitle();
  AgString footTitle();

  int syntaxDependent();
};

#endif /* DVPLUG_HPP */