mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
a6444784dc
- bformat(): contributed by Georg Beaum - Alert::XXX - error(): in SpellBase, ispell, psell, aspell, buffer, etc. - message(), message signal - displayMessage(), setMessage, - ErrorItems - prettyName() - makeDisplayPath() and maybe some more... - etc... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14970 a592a061-630c-0410-9148-cb99ea01b6c8
93 lines
1.1 KiB
C
93 lines
1.1 KiB
C
/**
|
|
* \file FuncStatus.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Jean-Marc Lasgouttes
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "FuncStatus.h"
|
|
|
|
using lyx::docstring;
|
|
|
|
FuncStatus::FuncStatus() : v_(OK)
|
|
{
|
|
}
|
|
|
|
|
|
void FuncStatus::clear()
|
|
{
|
|
v_ = OK;
|
|
message_.erase();
|
|
}
|
|
|
|
|
|
void FuncStatus::operator|=(FuncStatus const & f)
|
|
{
|
|
v_ |= f.v_;
|
|
if (!f.message_.empty())
|
|
message_ = f.message_;
|
|
}
|
|
|
|
|
|
void FuncStatus::unknown(bool b)
|
|
{
|
|
if (b)
|
|
v_ |= UNKNOWN;
|
|
else
|
|
v_ &= !UNKNOWN;
|
|
}
|
|
|
|
|
|
|
|
bool FuncStatus::unknown() const
|
|
{
|
|
return (v_ & UNKNOWN);
|
|
}
|
|
|
|
|
|
void FuncStatus::enabled(bool b)
|
|
{
|
|
if (b)
|
|
v_ &= !DISABLED;
|
|
else
|
|
v_ |= DISABLED;
|
|
}
|
|
|
|
|
|
bool FuncStatus::enabled() const
|
|
{
|
|
return !(v_ & DISABLED);
|
|
}
|
|
|
|
|
|
void FuncStatus::setOnOff(bool b)
|
|
{
|
|
v_ |= (b ? ON : OFF);
|
|
}
|
|
|
|
|
|
bool FuncStatus::onoff(bool b) const
|
|
{
|
|
if (b)
|
|
return (v_ & ON);
|
|
else
|
|
return (v_ & OFF);
|
|
}
|
|
|
|
|
|
void FuncStatus::message(docstring const & m)
|
|
{
|
|
message_ = m;
|
|
}
|
|
|
|
|
|
docstring const & FuncStatus::message() const
|
|
{
|
|
return message_;
|
|
}
|