lyx_mirror/src/frontends/xforms/checkedwidgets.h
Angus Leeming 649e3fee9a Rob's patch, part 1: the checked widget stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5467 a592a061-630c-0410-9148-cb99ea01b6c8
2002-10-22 12:39:05 +00:00

64 lines
1.3 KiB
C++

// -*- C++ -*-
/**
* \file checkedwidgets.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
*
* Full author contact details are available in file CREDITS
*/
#ifndef CHECKEDWIDGETS_H
#define CHECKEDWIDGETS_H
#ifdef __GNUG__
#pragma interface
#endif
#include "ButtonControllerBase.h"
#include "forms_fwd.h"
void addCheckedLyXLength(ButtonControllerBase & bc,
FL_OBJECT * input, FL_OBJECT * label = 0);
void addCheckedGlueLength(ButtonControllerBase & bc,
FL_OBJECT * input, FL_OBJECT * label = 0);
class CheckedLyXLength : public CheckedWidget {
public:
/** The label widget's label will be turned red if input
* does not make a valid LyXLength.
* If label == 0, then the label of input will be used.
*/
CheckedLyXLength(FL_OBJECT * input, FL_OBJECT * label = 0);
private:
///
virtual bool check() const;
///
FL_OBJECT * input_;
FL_OBJECT * label_;
};
class CheckedGlueLength : public CheckedWidget {
public:
/** The label widget's label will be turned red if input
* does not make a valid LyXGlueLength.
* If label == 0, then the label of input will be used.
*/
CheckedGlueLength(FL_OBJECT * input, FL_OBJECT * label = 0);
private:
///
virtual bool check() const;
///
FL_OBJECT * input_;
FL_OBJECT * label_;
};
#endif // CHECKEDWIDGETS_H