X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyx_gui.C;h=9305d9afce1de98e66cf0a6cc5010c3e8ec8d3eb;hb=617cfbe80f7dca3cab8de7b13f076393b465e11a;hp=c7d3fe9810c5378a123e30856876b4cf1710737b;hpb=a040c0bc6f017d0591bbc7ad1aa590589dbc40ff;p=lyx.git diff --git a/src/lyx_gui.C b/src/lyx_gui.C index c7d3fe9810..9305d9afce 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -45,29 +45,29 @@ #include "banner.xpm" #endif -FD_form_title *fd_form_title; -FD_form_paragraph *fd_form_paragraph; -FD_form_paragraph_extra *fd_form_paragraph_extra; -FD_form_search *fd_form_search; -FD_form_character *fd_form_character; -FD_form_document *fd_form_document; -FD_form_paper *fd_form_paper; -FD_form_table_options *fd_form_table_options; -FD_form_table_extra *fd_form_table_extra; -FD_form_quotes *fd_form_quotes; -FD_form_preamble *fd_form_preamble; -FD_form_table *fd_form_table; -FD_form_print *fd_form_print; -FD_form_sendto *fd_form_sendto; -FD_form_figure *fd_form_figure; -FD_form_screen *fd_form_screen; -FD_form_toc *fd_form_toc; -FD_form_ref *fd_form_ref; -FD_LaTeXOptions *fd_latex_options; // from latexoptions.h -FD_LaTeXLog *fd_latex_log; // from latexoptions.h -Combox *combo_language; - -extern LyXServer *lyxserver; +FD_form_title * fd_form_title; +FD_form_paragraph * fd_form_paragraph; +FD_form_paragraph_extra * fd_form_paragraph_extra; +FD_form_search * fd_form_search; +FD_form_character * fd_form_character; +FD_form_document * fd_form_document; +FD_form_paper * fd_form_paper; +FD_form_table_options * fd_form_table_options; +FD_form_table_extra * fd_form_table_extra; +FD_form_quotes * fd_form_quotes; +FD_form_preamble * fd_form_preamble; +FD_form_table * fd_form_table; +FD_form_print * fd_form_print; +FD_form_sendto * fd_form_sendto; +FD_form_figure * fd_form_figure; +FD_form_screen * fd_form_screen; +FD_form_toc * fd_form_toc; +FD_form_ref * fd_form_ref; +FD_LaTeXOptions * fd_latex_options; // from latexoptions.h +FD_LaTeXLog * fd_latex_log; // from latexoptions.h +Combox * combo_language; + +extern LyXServer * lyxserver; extern bool finished; // flag, that we are quitting the program extern BufferList bufferlist; @@ -121,13 +121,13 @@ char selection_color[32]; FL_resource res[] = { - {"width", "widthClass", FL_INT, &width, "690"}, - {"height", "heightClass", FL_INT, &height, "510"}, - {"xpos", "xposClass", FL_INT, &xpos, "-1"}, - {"ypos", "yposClass", FL_INT, &ypos, "-1"}, - {"Reverse", "reverseClass", FL_INT, &reverse_video, "0"}, - {"Mono", "monoClass", FL_INT, &mono_video, "0"}, - {"FastSelection", "selectionClass", FL_INT, &fast_selection, "0"}, + {"width", "widthClass", FL_INT, &width, "690", 0}, + {"height", "heightClass", FL_INT, &height, "510", 0}, + {"xpos", "xposClass", FL_INT, &xpos, "-1", 0}, + {"ypos", "yposClass", FL_INT, &ypos, "-1", 0}, + {"Reverse", "reverseClass", FL_INT, &reverse_video, "0", 0}, + {"Mono", "monoClass", FL_INT, &mono_video, "0", 0}, + {"FastSelection", "selectionClass", FL_INT, &fast_selection, "0", 0}, {"MathColor", "colorClass", FL_STRING, math_color, "blue", 31}, {"MathFrameColor", "colorClass", FL_STRING, math_frame_color, "magenta", 31}, {"FootColor", "colorClass", FL_STRING, foot_color, "red", 31}, @@ -144,7 +144,7 @@ FL_resource res[] = }; -extern "C" int LyX_XErrHandler(Display *display, XErrorEvent *xeev) +extern "C" int LyX_XErrHandler(Display * display, XErrorEvent * xeev) { //#warning Please see if you can trigger this! // emergency save @@ -161,8 +161,8 @@ extern "C" int LyX_XErrHandler(Display *display, XErrorEvent *xeev) } -LyXGUI::LyXGUI(LyX *owner, int *argc, char *argv[], bool GUI) - :_owner(owner) +LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI) + : _owner(owner) { gui = GUI; if (!gui) @@ -173,7 +173,7 @@ LyXGUI::LyXGUI(LyX *owner, int *argc, char *argv[], bool GUI) static const int num_res = sizeof(res)/sizeof(FL_resource); fl_initialize(argc, argv, "LyX", cmdopt, num_res); fl_get_app_resources(res, num_res); - Display *display = fl_get_display(); + Display * display = fl_get_display(); if (!display) { lyxerr << "LyX: unable to access X display, exiting" << endl; exit(1); @@ -186,18 +186,19 @@ LyXGUI::LyXGUI(LyX *owner, int *argc, char *argv[], bool GUI) // Make sure default screen is not larger than monitor if (width == 690 && height == 510) { - Screen * scr = (DefaultScreenOfDisplay(fl_get_display())); - if (HeightOfScreen(scr)-24(banner)); #if FL_REVISION > 85 fl_set_pixmapbutton_focus_outline(obj, 3); #endif @@ -441,20 +442,20 @@ void LyXGUI::create_forms() fl_set_counter_precision(fd_form_document->slider_tocdepth, 0); fl_addto_form(fd_form_document->form_document); combo_language = new Combox(FL_COMBOX_DROPLIST); - FL_OBJECT *ob = fd_form_document->choice_language; + FL_OBJECT * ob = fd_form_document->choice_language; combo_language->add(ob->x, ob->y, ob->w, ob->h, 200); combo_language->shortcut("#G", 1); fl_end_form(); int n; // declared here because DEC cxx does not like multiple // declarations of variables in for() loops (JMarc) - for (n = 0; tex_babel[n][0]; n++) { + for (n = 0; tex_babel[n][0]; ++n) { combo_language->addto(tex_babel[n]); } // not really necessary, but we can do it anyway. fl_addto_choice(fd_form_document->choice_fontsize, "default|10|11|12"); - for (n = 0; tex_fonts[n][0]; n++) { + for (n = 0; tex_fonts[n][0]; ++n) { fl_addto_choice(fd_form_document->choice_fonts, tex_fonts[n]); } @@ -462,7 +463,7 @@ void LyXGUI::create_forms() "default|latin1|latin2|latin5" "|koi8-r|koi8-u|cp866|cp1251"); - for (n = 0; tex_graphics[n][0]; n++) { + for (n = 0; tex_graphics[n][0]; ++n) { fl_addto_choice(fd_form_document->choice_postscript_driver, tex_graphics[n]); } @@ -639,7 +640,7 @@ void LyXGUI::runTime() } -void LyXGUI::regBuf(Buffer *b) +void LyXGUI::regBuf(Buffer * b) { - lyxViews->currentView()->buffer(b); + lyxViews->view()->buffer(b); }