#include "lyx_gui.h"
-#include "LyXView.h"
#include "Application.h"
#include "funcrequest.h"
{}
-LyXView * create_view(unsigned int width, unsigned int height, int posx, int posy,
- bool maximize)
-{
- return &theApp->createView(width, height, posx, posy, maximize);
-}
-
-
-int start(LyXView * view, string const & batch)
-{
- return theApp->start(batch);
-}
-
-
-void exit(int status)
-{
- theApp->exit(status);
-}
-
-
FuncStatus getStatus(FuncRequest const & ev)
{
FuncStatus flag;
*/
void parse_lyxrc();
-/**
- * Create the main window with given geometry settings
- */
-LyXView * create_view(unsigned int width, unsigned int height, int posx, int posy,
- bool maximize);
-
-/**
- * Start the main event loop, after executing the given
- * batch commands
- */
-int start(LyXView* view, std::string const & batch);
-
/**
* Enter the main event loop (\sa LyX::exec2)
*/
*/
void sync_events();
-/**
- * Quit running LyX. This may either quit directly or record the exit status
- * and only stop the event loop.
- */
-void exit(int);
-
/**
* return the status flag for a given action. This can be used to tell
* that a given lfun is not implemented by a frontend
// http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry
// Then also the moveEvent, resizeEvent, and the
// code for floatingGeometry_ can be removed;
- // adjust lyx_gui::start
+ // adjust GuiView::setGeometry()
#ifdef Q_OS_WIN32
QRect geometry = normalGeometry();
#else
Alert::warning(_("Unable to remove temporary directory"), msg);
}
- lyx_gui::exit(0);
+ theApp->exit(0);
// Restore original font resources after Application is destroyed.
lyx::support::restoreFontResources();
}
// guarantees a return to the system, no application cleanup.
// This may cause troubles with not executed destructors.
if (lyx_gui::use_gui) {
- // lyx_gui::exit may return and only schedule the exit
- lyx_gui::exit(status);
+ theApp->exit(status);
// Restore original font resources after Application is destroyed.
lyx::support::restoreFontResources();
}
height = 0;
}
// create the main window
- LyXView * view = lyx_gui::create_view(width, height, posx, posy, maximize);
+ LyXView * view = &theApp->createView(width, height, posx, posy, maximize);
ref().addLyXView(view);
// load files
// clear this list to save a few bytes of RAM
session_->clearLastOpenedFiles();
- return lyx_gui::start(view, batch_command);
+ return theApp->start(batch_command);
} else {
// Something went wrong above
quitLyX(false);