]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlVCLog.h
6da6c7b96d7b2dd88a88983da7d7c11e1d22aa72
[lyx.git] / src / frontends / controllers / ControlVCLog.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2001 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \file ControlVCLog.h
12  * \author John Levon, moz@compsoc.man.ac.uk
13  * \author Angus Leeming <a.leeming@ic.ac.uk>
14  */
15
16 #ifndef CONTROLVCLOG_H
17 #define CONTROLVCLOG_H
18
19 #include <utility>
20
21 #ifdef __GNUG__
22 #pragma interface
23 #endif
24
25 #include "ControlConnections.h"
26
27 /**
28  * A controller for the Version Control log viewer.
29  */
30 class ControlVCLog : public ControlConnectBD {
31 public:
32         ///
33         ControlVCLog(LyXView &, Dialogs &);
34         ///
35         string const & logfile() { return logfile_; }
36
37 protected:
38         ///
39         virtual void apply() {}
40         /// Show the dialog.
41         virtual void show();
42         /// Update the dialog.
43         virtual void update();
44         /// Hide the dialog.
45         virtual void hide();
46
47 private:
48         string logfile_;
49 };
50
51
52 /** A class to instantiate and make available the GUI-specific
53     ButtonController and View.
54  */
55 template <class GUIview, class GUIbc>
56 class GUIVCLog : public ControlVCLog {
57 public:
58         ///
59         GUIVCLog(LyXView &, Dialogs &);
60         ///
61         virtual ButtonControllerBase & bc() { return bc_; }
62         ///
63         virtual ViewBase & view() { return view_; }
64
65 private:
66         ///
67         ButtonController<OkCancelPolicy, GUIbc> bc_;
68         ///
69         GUIview view_;
70 };
71
72 template <class GUIview, class GUIbc>
73 GUIVCLog<GUIview, GUIbc>::GUIVCLog(LyXView & lv, Dialogs & d)
74         : ControlVCLog(lv, d),
75           view_(*this)
76 {}
77
78 #endif // CONTROLVCLOG_H