2001-07-03 15:19:04 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
2002-03-21 17:27:08 +00:00
|
|
|
* ======================================================
|
|
|
|
*
|
2001-07-03 15:19:04 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
2001-07-03 15:19:04 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 1995-2001 The LyX Team.
|
|
|
|
*
|
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
#ifndef LyXView_H
|
|
|
|
#define LyXView_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
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"
|
2001-07-03 15:19:04 +00:00
|
|
|
|
2002-07-02 19:23:10 +00:00
|
|
|
class Dialogs;
|
|
|
|
|
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();
|
2001-07-03 15:19:04 +00:00
|
|
|
///
|
|
|
|
virtual void prohibitInput() const;
|
|
|
|
///
|
|
|
|
virtual void allowInput() 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-18 20:15:29 +00:00
|
|
|
|
|
|
|
/// dispatch an action
|
|
|
|
void dispatch(string const & arg);
|
|
|
|
|
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-07-02 19:23:10 +00:00
|
|
|
void create_form_form_main(Dialogs & d, int width, int height);
|
2002-06-12 02:54:19 +00:00
|
|
|
/// the main form.
|
2002-07-04 17:45:35 +00:00
|
|
|
FL_FORM * form_;
|
2001-07-03 15:19:04 +00:00
|
|
|
};
|
|
|
|
#endif
|