2000-07-24 13:53:19 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/* This file is part of
|
|
|
|
|
* ======================================================
|
2002-03-21 21:21:28 +00:00
|
|
|
|
*
|
2000-07-24 13:53:19 +00:00
|
|
|
|
* LyX, The Document Processor
|
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
|
* Copyright 1995-2001 The LyX Team.
|
2000-07-24 13:53:19 +00:00
|
|
|
|
*
|
2001-05-30 13:53:44 +00:00
|
|
|
|
* This file is Copyright 1996-2001
|
2000-07-24 13:53:19 +00:00
|
|
|
|
* Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
*
|
|
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
|
|
#ifndef TOOLBAR_H
|
|
|
|
|
#define TOOLBAR_H
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
|
|
class LyXView;
|
|
|
|
|
class ToolbarDefaults;
|
|
|
|
|
|
|
|
|
|
/** The LyX GUI independent toolbar class
|
2002-03-21 21:21:28 +00:00
|
|
|
|
The GUI interface is implemented in the corresponding Toolbar_pimpl class.
|
2000-07-24 13:53:19 +00:00
|
|
|
|
*/
|
|
|
|
|
class Toolbar {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &);
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
~Toolbar();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// (re)sets the toolbar
|
|
|
|
|
void set(bool doingmain = false);
|
|
|
|
|
|
|
|
|
|
/** this is to be the entry point to the toolbar
|
|
|
|
|
frame, where you can change the toolbar realtime. */
|
|
|
|
|
void edit();
|
|
|
|
|
/// add a new button to the toolbar.
|
2002-03-21 21:21:28 +00:00
|
|
|
|
void add(int , bool doclean = true);
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// name of func instead of kb_action
|
|
|
|
|
void add(string const & , bool doclean = true);
|
|
|
|
|
/// invokes the n'th icon in the toolbar
|
|
|
|
|
void push(int);
|
|
|
|
|
/// activates the toolbar
|
2002-03-21 21:21:28 +00:00
|
|
|
|
void activate();
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// deactivates the toolbar
|
2002-03-21 21:21:28 +00:00
|
|
|
|
void deactivate();
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// update the state of the icons
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
|
|
/// update the layout combox
|
2002-03-02 16:39:54 +00:00
|
|
|
|
void setLayout(string const & layout);
|
2002-06-18 15:44:30 +00:00
|
|
|
|
/**
|
|
|
|
|
* Populate the layout combox - returns whether we did a full
|
|
|
|
|
* update or not
|
|
|
|
|
*/
|
|
|
|
|
bool updateLayoutList(int textclass);
|
2000-07-24 13:53:19 +00:00
|
|
|
|
/// Drop down the layout list
|
|
|
|
|
void openLayoutList();
|
|
|
|
|
/// Erase the layout list
|
|
|
|
|
void clearLayoutList();
|
|
|
|
|
|
2002-06-10 07:57:39 +00:00
|
|
|
|
/// Compaq cxx 6.5 requires this to be public
|
2000-07-24 13:53:19 +00:00
|
|
|
|
struct Pimpl;
|
2002-06-10 07:57:39 +00:00
|
|
|
|
private:
|
2000-08-07 20:58:24 +00:00
|
|
|
|
///
|
2000-07-24 13:53:19 +00:00
|
|
|
|
friend struct Toolbar::Pimpl;
|
2000-08-07 20:58:24 +00:00
|
|
|
|
///
|
2000-07-24 13:53:19 +00:00
|
|
|
|
Pimpl * pimpl_;
|
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
|