mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
28ad960255
* lyxfunc.h: - theLyXFunc(): new function in the global namespace. - lyx::dispatch(): new function in the lyx namespace. - lyx::getStatus(): new function in the lyx namespace. * bufferlist.h: - theBufferList(): new function in the global namespace. * Clipboard.h: - theClipboard(): new function in the global namespace. * Selection.h: - theSelection(): new function in the global namespace. * FontLoader.h: - theFontLoader(): new function in the global namespace. * FontMetrics.h: - theFontMetrics(LyXFont const &): new function in the global namespace. * Application.C: implements the functions defined above. * LyXView.h: - getLyXFunc(): deleted. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15298 a592a061-630c-0410-9148-cb99ea01b6c8
34 lines
625 B
C
34 lines
625 B
C
/**
|
|
* \file dimension.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author André Pönitz
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "dimension.h"
|
|
#include "frontends/FontMetrics.h"
|
|
|
|
|
|
void Dimension::operator+=(Dimension const & dim)
|
|
{
|
|
if (asc < dim.asc)
|
|
asc = dim.asc;
|
|
if (des < dim.des)
|
|
des = dim.des;
|
|
wid += dim.wid;
|
|
}
|
|
|
|
|
|
void Dimension::clear(LyXFont const & font)
|
|
{
|
|
lyx::frontend::FontMetrics const & fm = theFontMetrics(font);
|
|
asc = fm.maxAscent();
|
|
des = fm.maxDescent();
|
|
wid = 0;
|
|
}
|