1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlButtonss.h
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
13 * ControlButtons serves only to control the activation of the Ok, Apply, Cancel
14 * and Restore buttons on the View dialog.
16 * More generally, the class is part of a hierarchy of controller classes
17 * that together connect the GUI-dependent dialog to any appropriate
18 * signals and dispatches any changes to the kernel.
20 * These controllers have no knowledge of the actual instantiation of the
21 * GUI-dependent View and ButtonController, which should therefore
22 * be created elsewhere.
24 * Once created, the Controller will take care of their initialisation,
25 * management and, ultimately, destruction.
28 #ifndef CONTROLBUTTONS_H
29 #define CONTROLBUTTONS_H
35 #include "DialogBase.h" // This can go eventually
38 class ButtonControllerBase;
40 /** Abstract base class for Controllers with a ButtonController.
42 class ControlButtons : public DialogBase
48 virtual ~ControlButtons() {}
50 /// These functions are called when the controlling buttons are pressed.
60 /** Allow the view to access the ButtonController. This method must be
61 instantiated in a daughter class that creates the actual instance
62 of the ButtonController. */
63 virtual ButtonControllerBase & bc() = 0;
66 /// Get changed parameters and Dispatch them to the kernel.
67 virtual void apply() = 0;
68 /// Disconnect signals and hide View.
69 virtual void hide() = 0;
70 /// Update dialog before showing it.
71 virtual void update() = 0;
73 /** Allow the Controller to access the View. This method must be
74 instantiated in a daughter class that creates the actual instance
76 virtual ViewBase & view() = 0;
79 #endif // CONTROLBUTTONS_H