view anagram/vaclgui/dvplug.hpp @ 15:f5acaf0c8a29

Don't cast through "volatile int". Causes a gcc warning nowadays. XXX: should put something else back here to frighten the optimizer
author David A. Holland
date Tue, 31 May 2022 01:00:55 -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 */