// -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file insetbutton.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
+ * \author Asger Alstrup Nielsen
+ * \author Jürgen Vigna
+ * \author Lars Gullik Bjønnes
*
- * Copyright 1995 Matthias Ettrich
- * Copyright 2000-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS
+ */
#ifndef INSET_BUTTON_H
#define INSET_BUTTON_H
-#ifdef __GNUG__
-#pragma interface
-#endif
#include "inset.h"
#include "LString.h"
+#include <boost/weak_ptr.hpp>
/** Used to provide an inset that looks like a button.
*/
///
int width(BufferView *, LyXFont const &) const;
///
- void draw(BufferView *, LyXFont const &, int, float &, bool) const;
+ void draw(BufferView *, LyXFont const &, int, float &) const;
protected:
+ ///
+ virtual void cache(BufferView *) const;
+ ///
+ virtual BufferView * view() const;
/// This should provide the text for the button
virtual string const getScreenLabel(Buffer const *) const = 0;
+private:
+ mutable boost::weak_ptr<BufferView> view_;
};
#endif