soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SDpiAwareFont Class Reference

Class for managing DPI-aware fonts. This class provides functionality to handle font scaling based on DPI settings. More...

#include <SDpiAwareFont.h>

Public Member Functions

 SDpiAwareFont (void)
 Constructor.
 
 ~SDpiAwareFont (void)
 Destructor.
 
IFontSGetFontPtr ()
 Retrieves the pointer to the current font object.
 
void SetFontDesc (const SStringW &strDesc, int nScale)
 Sets the font description and scale.
 
void UpdateFont (int nScale)
 Updates the font based on the provided scale.
 

Protected Member Functions

IFontSOnGetFont (const SStringW &strDesc, int nScale)
 Retrieves the font object based on the description and scale.
 

Protected Attributes

SStringW m_strDesc
 
SAutoRefPtr< IFontSm_object
 

Detailed Description

Class for managing DPI-aware fonts. This class provides functionality to handle font scaling based on DPI settings.

Definition at line 11 of file SDpiAwareFont.h.

Constructor & Destructor Documentation

◆ SDpiAwareFont()

SDpiAwareFont::SDpiAwareFont ( void )

Constructor.

Definition at line 6 of file SDpiAwareFont.cpp.

◆ ~SDpiAwareFont()

SDpiAwareFont::~SDpiAwareFont ( void )

Destructor.

Definition at line 11 of file SDpiAwareFont.cpp.

Member Function Documentation

◆ GetFontPtr()

IFontS * SDpiAwareFont::GetFontPtr ( )

Retrieves the pointer to the current font object.

Returns
Pointer to the IFontS object.

Definition at line 15 of file SDpiAwareFont.cpp.

◆ OnGetFont()

IFontS * SDpiAwareFont::OnGetFont ( const SStringW & strDesc,
int nScale )
protected

Retrieves the font object based on the description and scale.

Parameters
strDescFont description string.
nScaleDPI scaling factor.
Returns
Pointer to the IFontS object.

Definition at line 33 of file SDpiAwareFont.cpp.

◆ SetFontDesc()

void SDpiAwareFont::SetFontDesc ( const SStringW & strDesc,
int nScale )

Sets the font description and scale.

Parameters
strDescFont description string.
nScaleDPI scaling factor.

Definition at line 20 of file SDpiAwareFont.cpp.

◆ UpdateFont()

void SDpiAwareFont::UpdateFont ( int nScale)

Updates the font based on the provided scale.

Parameters
nScaleDPI scaling factor.

Definition at line 26 of file SDpiAwareFont.cpp.

Member Data Documentation

◆ m_object

SAutoRefPtr<IFontS> SDpiAwareFont::m_object
protected

Definition at line 52 of file SDpiAwareFont.h.

◆ m_strDesc

SStringW SDpiAwareFont::m_strDesc
protected

Definition at line 51 of file SDpiAwareFont.h.


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