2000-07-24 13:53:19 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file Toolbar.h
|
2002-09-05 15:14:23 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 21:21:28 +00:00
|
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2000-07-24 13:53:19 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-05 14:10:50 +00:00
|
|
|
|
*/
|
2000-07-24 13:53:19 +00:00
|
|
|
|
|
|
|
|
|
#ifndef TOOLBAR_H
|
|
|
|
|
#define TOOLBAR_H
|
|
|
|
|
|
2003-07-25 18:10:34 +00:00
|
|
|
|
#include "ToolbarBackend.h"
|
2000-07-24 13:53:19 +00:00
|
|
|
|
|
|
|
|
|
class LyXView;
|
2002-08-12 14:28:43 +00:00
|
|
|
|
|
2003-04-10 14:08:06 +00:00
|
|
|
|
/**
|
|
|
|
|
* The LyX GUI independent toolbar class
|
|
|
|
|
*
|
|
|
|
|
* The GUI interface is implemented in the corresponding Toolbar_pimpl class.
|
|
|
|
|
*/
|
2000-07-24 13:53:19 +00:00
|
|
|
|
class Toolbar {
|
|
|
|
|
public:
|
|
|
|
|
///
|
2003-07-25 18:10:34 +00:00
|
|
|
|
Toolbar();
|
2000-07-24 13:53:19 +00:00
|
|
|
|
|
2003-09-09 18:27:24 +00:00
|
|
|
|
///
|
2003-07-25 18:10:34 +00:00
|
|
|
|
virtual ~Toolbar();
|
|
|
|
|
|
|
|
|
|
/// Initialize toolbar from backend
|
2003-09-21 18:57:15 +00:00
|
|
|
|
void init();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
|
2003-04-10 14:08:06 +00:00
|
|
|
|
/// update the state of the toolbars
|
|
|
|
|
void update(bool in_math, bool in_table);
|
2000-07-24 13:53:19 +00:00
|
|
|
|
|
|
|
|
|
/// update the layout combox
|
2003-10-06 15:43:21 +00:00
|
|
|
|
virtual void setLayout(std::string const & layout) = 0;
|
2002-07-02 19:23:10 +00:00
|
|
|
|
/**
|
|
|
|
|
* Populate the layout combox - returns whether we did a full
|
2002-06-18 15:44:30 +00:00
|
|
|
|
* update or not
|
|
|
|
|
*/
|
|
|
|
|
bool updateLayoutList(int textclass);
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// Drop down the layout list
|
2003-07-25 18:10:34 +00:00
|
|
|
|
virtual void openLayoutList() = 0;
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// Erase the layout list
|
2003-08-02 12:23:24 +00:00
|
|
|
|
virtual void clearLayoutList();
|
2000-07-24 13:53:19 +00:00
|
|
|
|
|
2002-06-10 07:57:39 +00:00
|
|
|
|
private:
|
2003-07-25 18:10:34 +00:00
|
|
|
|
|
|
|
|
|
virtual void add(ToolbarBackend::Toolbar const & tb) = 0;
|
|
|
|
|
|
|
|
|
|
/// update the state of the icons
|
|
|
|
|
virtual void update() = 0;
|
|
|
|
|
|
|
|
|
|
/// show or hide a toolbar
|
2003-09-09 18:27:24 +00:00
|
|
|
|
virtual void displayToolbar(ToolbarBackend::Toolbar const & tb,
|
2003-07-25 18:10:34 +00:00
|
|
|
|
bool show) = 0;
|
|
|
|
|
|
|
|
|
|
/// Populate the layout combox.
|
|
|
|
|
virtual void updateLayoutList() = 0;
|
|
|
|
|
|
2002-06-18 15:44:30 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The last textclass layout list in the layout choice selector
|
|
|
|
|
*/
|
|
|
|
|
int last_textclass_;
|
2000-07-24 13:53:19 +00:00
|
|
|
|
};
|
|
|
|
|
#endif
|