]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/mainapp.h
Dekel's lyxrc.example; Angus's FormDocument; John's build-listerrors; POTFILES.in...
[lyx.git] / src / frontends / gnome / mainapp.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 2000 The LyX Team.
8  *
9  * ====================================================== */
10
11 #ifndef GNOMELYX_MAINWIN
12 #define GNOMELYX_MAINWIN
13
14 #include <gnome--/app.h>
15 #include <gnome--/appbar.h>
16 #include <gtk--/frame.h>
17 #include <gtk--/accelgroup.h>
18
19 #include "MenuBackend.h"
20
21 /*
22  This is (most probably) temporary class and it will be either merged with
23  LyXView or replaced by new implementation of GUI-dependend MainWindow class
24 */
25
26 class GLyxAppWin: public Gnome::App
27 {
28  public:
29   GLyxAppWin();
30   ~GLyxAppWin();
31
32   /// set menu of the window
33   void set_menu(Gnome::UI::Array &);
34   /// update menu
35   void update_menu(string path,
36                    int noelms,
37                    Gnome::UI::Array &);
38   /// add action area
39   void add_action(Gtk::Container &, string title, bool expand=false, Gtk::AccelGroup * acgr=NULL);
40   /// remove action area
41   void remove_action();
42   /// clears action area if Escape is pressed
43   gint key_pressed(GdkEventKey * e);
44   
45  protected:
46   /// init window widgets
47   void init();
48
49  protected:
50   // widgets
51   Gnome::AppBar status_;
52   Gtk::VBox box_;
53   Gtk::Widget *view_;
54
55   Gtk::AccelGroup * accel_;
56
57   bool action_mode;
58   
59   // menu size
60   int menusize_;
61 };
62
63 #endif