2000-06-12 11:27:15 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
#ifndef INSET_BUTTON_H
|
|
|
|
#define INSET_BUTTON_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "lyxinset.h"
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
/** Used to provide an inset that looks like a button.
|
|
|
|
*/
|
|
|
|
class InsetButton: public Inset {
|
|
|
|
public:
|
|
|
|
///
|
2000-07-05 14:57:48 +00:00
|
|
|
int ascent(BufferView *, LyXFont const &) const;
|
2000-06-12 11:27:15 +00:00
|
|
|
///
|
2000-07-05 14:57:48 +00:00
|
|
|
int descent(BufferView *, LyXFont const &) const;
|
2000-06-12 11:27:15 +00:00
|
|
|
///
|
2000-07-05 14:57:48 +00:00
|
|
|
int width(BufferView *, LyXFont const &) const;
|
2000-06-12 11:27:15 +00:00
|
|
|
///
|
2000-06-23 15:02:46 +00:00
|
|
|
void draw(BufferView *, LyXFont const &, int, float &, bool) const;
|
2000-06-12 11:27:15 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/// This should provide the text for the button
|
2000-09-14 17:53:12 +00:00
|
|
|
virtual string const getScreenLabel() const = 0;
|
2000-06-12 11:27:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|