home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Linux
/
Divers
/
lyx-0.13.2.tar.gz
/
lyx-0.13.2.tar
/
lyx-0.13.2
/
src
/
toolbarbackend.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-04-23
|
2KB
|
104 lines
// -*- C++ -*-
/* This file is part of
* ======================================================
*
* LyX, The Document Processor
* Copyright (C) 1995 Matthias Ettrich
*
* This file is Copyright (C) 1996-1998
* Lars Gullik Bj°nnes
*
*======================================================*/
#ifndef _TOOLBARBACKEND_H_
#define _TOOLBARBACKEND_H_
#ifdef __GNUG__
#pragma interface
#endif
#include "lyxfunc.h"
#include "lyxlex.h"
/** The GUI independant part of the toolbar code.
This holds enough information to build the visible toolbar.
*/
class ToolbarBackend {
public:
///
ToolbarBackend()
{
reset();
init(); // set default toolbar.
}
///
~ToolbarBackend() {
}
///
int get_toolbar_func(LString const & func);
/// The special toolbar actions
enum TOOLBARITEMS {
/// adds space between buttons in the toolbar
TOOL_SEPARATOR = -1,
/// a special combox insead of a button
TOOL_LAYOUTS = -2,
/// begin a new line of button (not working)
TOOL_NEWLINE = -3
};
///
void read(LyXLex&);
/// sets up the default toolbar
void init();
/// add a new button to the toolbar.
void add(int, bool doclean=true);
///
void clean();
private:
///
friend class Toolbar;
///
enum tooltags_ {
TO_ADD = 1,
TO_ENDTOOLBAR,
TO_SEPARATOR,
TO_LAYOUTS,
TO_NEWLINE,
TO_LAST
};
///
struct toolbarFunc
{
///
toolbarFunc *next;
///
int action;
///
LString help;
///
toolbarFunc(){
next = NULL;
action = LFUN_NOACTION;
}
///
~toolbarFunc(){
}
};
/// a list containing all the buttons
toolbarFunc *toollist;
/** more...
*/
void reset(){
toollist = NULL;
}
};
#endif