mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
a97c4f51c3
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg38939.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4393 a592a061-630c-0410-9148-cb99ea01b6c8
118 lines
2.2 KiB
C++
118 lines
2.2 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file Toolbar_pimpl.h
|
|
* Copyright 2002 the LyX Team
|
|
* Copyright 1996-2001 Lars Gullik Bjønnes
|
|
* Read the file COPYING
|
|
*
|
|
* \author Lars Gullik Bjønnes, larsbj@lyx.org
|
|
*/
|
|
|
|
#ifndef TOOLBAR_PIMPL_H
|
|
#define TOOLBAR_PIMPL_H
|
|
|
|
#include <vector>
|
|
#include "forms_fwd.h"
|
|
|
|
#include "frontends/Toolbar.h"
|
|
|
|
#include "commandtags.h"
|
|
#include "combox.h"
|
|
#include "ToolbarDefaults.h"
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
class XFormsView;
|
|
class Tooltips;
|
|
|
|
/** The LyX xforms toolbar class
|
|
*/
|
|
struct Toolbar::Pimpl {
|
|
public:
|
|
/// called when user selects a layout from combox
|
|
static void layoutSelectedCB(int, void *, Combox *);
|
|
///
|
|
Pimpl(LyXView * o, int x, int y);
|
|
///
|
|
~Pimpl();
|
|
|
|
/// (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.
|
|
void add(int, bool doclean = true);
|
|
/// invokes the n'th icon in the toolbar
|
|
void push(int);
|
|
/// activates the toolbar
|
|
void activate();
|
|
/// deactivates the toolbar
|
|
void deactivate();
|
|
/// update the state of the icons
|
|
void update();
|
|
|
|
/// select the right layout in the combox
|
|
void setLayout(string const & layout);
|
|
/// Populate the layout combox; re-do everything if force is true.
|
|
void updateLayoutList(bool force);
|
|
/// Drop down the layout list
|
|
void openLayoutList();
|
|
/// Erase the layout list
|
|
void clearLayoutList();
|
|
/// the non-static version of layoutSelectedCB
|
|
void layoutSelected();
|
|
|
|
///
|
|
struct toolbarItem
|
|
{
|
|
///
|
|
int action;
|
|
///
|
|
FL_OBJECT * icon;
|
|
///
|
|
toolbarItem();
|
|
///
|
|
void clean();
|
|
///
|
|
~toolbarItem();
|
|
///
|
|
toolbarItem & operator=(toolbarItem const & ti);
|
|
};
|
|
|
|
/// typedef to simplify things
|
|
typedef std::vector<toolbarItem> ToolbarList;
|
|
/// The list containing all the buttons
|
|
ToolbarList toollist;
|
|
///
|
|
XFormsView * owner;
|
|
///
|
|
Tooltips * tooltip_;
|
|
///
|
|
Combox * combox;
|
|
/// Starting position
|
|
int sxpos;
|
|
///
|
|
int sypos;
|
|
///
|
|
int xpos;
|
|
///
|
|
int ypos;
|
|
///
|
|
bool cleaned;
|
|
|
|
/// removes all toolbar buttons from the toolbar.
|
|
void clean();
|
|
|
|
/// more...
|
|
void reset();
|
|
|
|
/// more...
|
|
void lightReset();
|
|
};
|
|
#endif
|