mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
58d99b4a97
* Some file (and class) name changes: ButtonController.[Ch] to ButtonControllerBase.[Ch] BCTemplates.h to ButtonController.h ControlBase.[Ch] to ControlButton.[Ch] * Moved file browsing into the controllers for the Graphics, Include and Print popups. * Fixed search bug in Citation popup. Added case sensitive button. * Implemented controller-view split for External Material popup. Think that it's now correct, but could you check again, Dekel? Angus git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1859 a592a061-630c-0410-9148-cb99ea01b6c8
82 lines
2.1 KiB
C++
82 lines
2.1 KiB
C++
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 2001 The LyX Team.
|
|
*
|
|
* ======================================================
|
|
*
|
|
* \file ControlButton.h
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
*
|
|
* ControlButton serves only to control the activation of the Ok, Apply, Cancel
|
|
* and Restore buttons on the View popup.
|
|
*
|
|
* More generally, the class is part of a hierarchy of controller classes
|
|
* that together connect the GUI-dependent popup to any appropriate
|
|
* signals and dispatches any changes to the kernel.
|
|
*
|
|
* These controllers have no knowledge of the actual instantiation of the
|
|
* GUI-dependent View and ButtonController, which should therefore
|
|
* be created elsewhere.
|
|
*
|
|
* Once created, the Controller will take care of their initialisation,
|
|
* management and, ultimately, destruction.
|
|
*/
|
|
|
|
#ifndef CONTROLBUTTON_H
|
|
#define CONTROLBUTTON_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
#include "DialogBase.h" // This can go eventually
|
|
#include "ButtonControllerBase.h"
|
|
|
|
class ViewBase;
|
|
|
|
/** Abstract base class for Controllers with a ButtonController.
|
|
*/
|
|
class ControlButton : public DialogBase
|
|
{
|
|
public: // methods
|
|
///
|
|
ControlButton() {}
|
|
///
|
|
virtual ~ControlButton() {};
|
|
|
|
/// These functions are called when the controlling buttons are pressed.
|
|
///
|
|
void ApplyButton();
|
|
///
|
|
void OKButton();
|
|
///
|
|
void CancelButton();
|
|
///
|
|
void RestoreButton();
|
|
|
|
/** Allow the view to access the ButtonController. This method must be
|
|
instantiated in a daughter class that creates the actual instance
|
|
of the ButtonController. */
|
|
virtual ButtonControllerBase & bc() = 0;
|
|
|
|
protected:
|
|
/// Get changed parameters and Dispatch them to the kernel.
|
|
virtual void apply() = 0;
|
|
/// Disconnect signals and hide View.
|
|
virtual void hide() = 0;
|
|
/// Update dialog before showing it.
|
|
virtual void update() = 0;
|
|
|
|
/** Allow the Controller to access the View. This method must be
|
|
instantiated in a daughter class that creates the actual instance
|
|
of the View. */
|
|
virtual ViewBase & view() = 0;
|
|
};
|
|
|
|
#include "ViewBase.h"
|
|
|
|
#endif // CONTROLBUTTON_H
|