Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
dw::core::style::Font Class Reference

#include <style.hh>

Public Member Functions

void ref ()
 
void unref ()
 
- Public Member Functions inherited from dw::core::style::FontAttrs
bool equals (lout::object::Object *other)
 Returns, whether two objects are equal.
 
int hashValue ()
 Return a hash value for the object.
 
- Public Member Functions inherited from lout::object::Object
virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly.
 
virtual Objectclone ()
 Return an exact copy of the object.
 
virtual void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer.
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object.
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses.
 

Static Public Member Functions

static Fontcreate (Layout *layout, FontAttrs *attrs)
 
static bool exists (Layout *layout, const char *name)
 

Public Attributes

int ascent
 
int descent
 
int spaceWidth
 
int xHeight
 
int zeroWidth
 
- Public Attributes inherited from dw::core::style::FontAttrs
const char * name
 
int size
 
int weight
 
int letterSpacing
 
FontVariant fontVariant
 
FontStyle style
 

Protected Member Functions

 Font ()
 
virtual ~Font ()
 
void copyAttrs (FontAttrs *attrs)
 

Static Private Member Functions

static Fontcreate0 (Layout *layout, FontAttrs *attrs, bool tryEverything)
 

Private Attributes

int refCount
 

Detailed Description

See also
dw::core::style

Definition at line 699 of file style.hh.

Constructor & Destructor Documentation

◆ Font()

dw::core::style::Font::Font ( )
inlineprotected

Definition at line 707 of file style.hh.

References DBG_OBJ_CREATE, and refCount.

◆ ~Font()

dw::core::style::Font::~Font ( )
protectedvirtual

Definition at line 422 of file style.cc.

References DBG_OBJ_DELETE, and dw::core::style::FontAttrs::name.

Member Function Documentation

◆ copyAttrs()

◆ create()

Font * dw::core::style::Font::create ( Layout layout,
FontAttrs attrs 
)
static

Definition at line 444 of file style.cc.

References create0(), and layout.

Referenced by StyleEngine::apply(), main(), and StyleEngine::StyleEngine().

◆ create0()

Font * dw::core::style::Font::create0 ( Layout layout,
FontAttrs attrs,
bool  tryEverything 
)
staticprivate

Definition at line 438 of file style.cc.

References layout.

Referenced by create().

◆ exists()

bool dw::core::style::Font::exists ( Layout layout,
const char *  name 
)
static

Definition at line 449 of file style.cc.

References layout, and dw::core::style::FontAttrs::name.

Referenced by StyleEngine::apply().

◆ ref()

void dw::core::style::Font::ref ( )
inline

Definition at line 724 of file style.hh.

References refCount.

Referenced by dw::core::style::Style::Style().

◆ unref()

void dw::core::style::Font::unref ( )
inline

Definition at line 725 of file style.hh.

References refCount.

Referenced by dw::core::style::Style::~Style().

Member Data Documentation

◆ ascent

◆ descent

◆ refCount

int dw::core::style::Font::refCount
private

Definition at line 702 of file style.hh.

Referenced by Font(), ref(), and unref().

◆ spaceWidth

int dw::core::style::Font::spaceWidth

Definition at line 717 of file style.hh.

Referenced by dw::Textblock::fillSpace(), and dw::fltk::FltkFont::FltkFont().

◆ xHeight

int dw::core::style::Font::xHeight

◆ zeroWidth

int dw::core::style::Font::zeroWidth

Definition at line 719 of file style.hh.

Referenced by StyleEngine::computeValue(), and dw::fltk::FltkFont::FltkFont().


The documentation for this class was generated from the following files: