2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
11 * \file ControlButtonss.h
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
14 * ControlButtons serves only to control the activation of the Ok, Apply, Cancel
15 * and Restore buttons on the View dialog.
17 * More generally, the class is part of a hierarchy of controller classes
18 * that together connect the GUI-dependent dialog to any appropriate
19 * signals and dispatches any changes to the kernel.
21 * These controllers have no knowledge of the actual instantiation of the
22 * GUI-dependent View and ButtonController, which should therefore
23 * be created elsewhere.
25 * Once created, the Controller will take care of their initialisation,
26 * management and, ultimately, destruction.
29 #ifndef CONTROLBUTTONS_H
30 #define CONTROLBUTTONS_H
36 #include "DialogBase.h" // This can go eventually
39 class ButtonControllerBase;
41 /** Abstract base class for Controllers with a ButtonController.
43 class ControlButtons : public DialogBase
49 virtual ~ControlButtons() {}
51 /// These functions are called when the controlling buttons are pressed.
61 /** Allow the view to access the ButtonController. This method must be
62 instantiated in a daughter class that creates the actual instance
63 of the ButtonController. */
64 virtual ButtonControllerBase & bc() = 0;
67 /// Get changed parameters and Dispatch them to the kernel.
68 virtual void apply() = 0;
69 /// Disconnect signals and hide View.
70 virtual void hide() = 0;
71 /// Update dialog before showing it.
72 virtual void update() = 0;
74 /** Allow the Controller to access the View. This method must be
75 instantiated in a daughter class that creates the actual instance
77 virtual ViewBase & view() = 0;
80 #endif // CONTROLBUTTONS_H