2001-07-03 15:19:04 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file XFormsView.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 17:27:08 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author unknown
|
2001-07-03 15:19:04 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
2001-07-03 15:19:04 +00:00
|
|
|
|
|
|
|
#ifndef LyXView_H
|
|
|
|
#define LyXView_H
|
|
|
|
|
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
#include "forms_fwd.h"
|
2001-07-03 15:19:04 +00:00
|
|
|
|
2002-05-23 12:08:47 +00:00
|
|
|
#include "frontends/LyXView.h"
|
2002-09-30 20:00:42 +00:00
|
|
|
#include <X11/Xlib.h> // for Pixmap
|
2001-07-03 15:19:04 +00:00
|
|
|
|
2002-07-19 20:56:31 +00:00
|
|
|
class XMiniBuffer;
|
2002-07-02 19:23:10 +00:00
|
|
|
|
2001-07-03 15:19:04 +00:00
|
|
|
/**
|
2002-06-12 02:54:19 +00:00
|
|
|
* XFormsView - xforms implementation of LyXView
|
|
|
|
*
|
|
|
|
* xforms-private implementation of the main LyX window.
|
2001-07-03 15:19:04 +00:00
|
|
|
*/
|
|
|
|
class XFormsView : public LyXView {
|
|
|
|
public:
|
2002-06-12 02:54:19 +00:00
|
|
|
/// create a main window of the given dimensions
|
2001-07-03 15:19:04 +00:00
|
|
|
XFormsView(int w, int h);
|
2002-06-12 02:54:19 +00:00
|
|
|
|
2001-07-03 15:19:04 +00:00
|
|
|
~XFormsView();
|
2002-06-12 09:47:10 +00:00
|
|
|
|
2002-07-02 19:23:10 +00:00
|
|
|
/**
|
|
|
|
* show - display the top-level window
|
|
|
|
* @param xpos requested x position (or 0)
|
|
|
|
* @param xpos requested y position (or 0)
|
|
|
|
* @param title window title
|
|
|
|
*/
|
2002-06-12 09:47:10 +00:00
|
|
|
void show(int xpos, int ypos, string const & t = string("LyX"));
|
2002-07-02 19:23:10 +00:00
|
|
|
|
2002-06-12 02:54:19 +00:00
|
|
|
/// get the xforms main form
|
2001-07-03 15:19:04 +00:00
|
|
|
FL_FORM * getForm() const;
|
2002-06-12 02:54:19 +00:00
|
|
|
/// redraw the main form.
|
|
|
|
virtual void redraw();
|
2003-02-14 14:49:51 +00:00
|
|
|
/// show busy cursor
|
|
|
|
virtual void busy(bool) const;
|
2002-06-12 02:54:19 +00:00
|
|
|
|
|
|
|
/// callback for close event from window manager
|
2001-07-03 15:19:04 +00:00
|
|
|
static int atCloseMainFormCB(FL_FORM *, void *);
|
2002-07-22 20:57:58 +00:00
|
|
|
|
2002-07-19 20:56:31 +00:00
|
|
|
/// display a status message
|
|
|
|
virtual void message(string const & str);
|
|
|
|
|
2003-04-07 16:57:38 +00:00
|
|
|
/// clear back to normal status message
|
|
|
|
virtual void clearMessage();
|
|
|
|
|
2001-07-03 15:19:04 +00:00
|
|
|
private:
|
2002-06-12 02:54:19 +00:00
|
|
|
/**
|
|
|
|
* setWindowTitle - set title of window
|
|
|
|
* @param t main window title
|
|
|
|
* @param it iconified (short) title
|
|
|
|
*/
|
2002-07-02 19:23:10 +00:00
|
|
|
virtual void setWindowTitle(string const & t, string const & it);
|
|
|
|
|
2002-07-17 04:13:41 +00:00
|
|
|
/// update the minibuffer state message
|
2002-07-18 20:15:29 +00:00
|
|
|
void show_view_state();
|
2002-07-17 04:13:41 +00:00
|
|
|
|
2001-07-03 15:19:04 +00:00
|
|
|
/// makes the main form.
|
2002-08-12 14:28:43 +00:00
|
|
|
void create_form_form_main(int width, int height);
|
2002-07-19 20:56:31 +00:00
|
|
|
/// the minibuffer
|
|
|
|
boost::scoped_ptr<XMiniBuffer> minibuffer_;
|
2002-07-22 20:57:58 +00:00
|
|
|
///
|
|
|
|
boost::signals::connection view_state_con;
|
|
|
|
///
|
|
|
|
boost::signals::connection focus_con;
|
|
|
|
///
|
|
|
|
boost::signals::connection redraw_con;
|
|
|
|
|
2002-06-12 02:54:19 +00:00
|
|
|
/// the main form.
|
2002-07-04 17:45:35 +00:00
|
|
|
FL_FORM * form_;
|
2002-09-30 20:00:42 +00:00
|
|
|
/// Passed to the window manager to give a pretty little symbol ;-)
|
|
|
|
Pixmap icon_pixmap_;
|
|
|
|
///
|
|
|
|
Pixmap icon_mask_;
|
2001-07-03 15:19:04 +00:00
|
|
|
};
|
|
|
|
#endif
|