Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
nw4hbm::ut::TextWriterBase< T > Class Template Reference

#include <TextWriterBase.h>

+ Inheritance diagram for nw4hbm::ut::TextWriterBase< T >:
+ Collaboration diagram for nw4hbm::ut::TextWriterBase< T >:

Public Types

enum  DrawFlag {
  DRAWFLAG_ALIGN_TEXT_BASELINE = 0 , DRAWFLAG_ALIGN_TEXT_CENTER = (1 << 0) , DRAWFLAG_ALIGN_TEXT_RIGHT = (1 << 1) , DRAWFLAG_ALIGN_H_BASELINE = 0 ,
  DRAWFLAG_ALIGN_H_CENTER = (1 << 4) , DRAWFLAG_ALIGN_H_RIGHT = (1 << 5) , DRAWFLAG_ALIGN_V_BASELINE = 0 , DRAWFLAG_ALIGN_V_CENTER = (1 << 8) ,
  DRAWFLAG_ALIGN_V_TOP = (1 << 9) , DRAWFLAG_MASK_ALIGN_TEXT , DRAWFLAG_MASK_ALIGN_H , DRAWFLAG_MASK_ALIGN_V
}
 
- Public Types inherited from nw4hbm::ut::CharWriter
enum  GradationMode { GRADMODE_NONE = 0 , GRADMODE_H , GRADMODE_V , NUM_OF_GRADMODE }
 
typedef enum nw4hbm::ut::CharWriter::GradationMode GradationMode
 

Public Member Functions

 TextWriterBase ()
 
 ~TextWriterBase ()
 
void SetLineHeight (f32 lineHeight)
 
f32 GetLineHeight () const
 
void SetLineSpace (f32 lineSpace)
 
void SetCharSpace (f32 charSpace)
 
f32 GetLineSpace () const
 
f32 GetCharSpace () const
 
void SetTabWidth (int tabWidth)
 
int GetTabWidth () const
 
void SetDrawFlag (u32 flags)
 
u32 GetDrawFlag () const
 
void SetTagProcessor (TagProcessorBase< T > *tagProcessor)
 
void ResetTagProcessor ()
 
TagProcessorBase< T > & GetTagProcessor () const
 
f32 CalcFormatStringWidth (const T *format,...) const
 
f32 CalcFormatStringHeight (const T *format,...) const
 
void CalcFormatStringRect (Rect *pRect, const T *format,...) const
 
void CalcVStringRect (Rect *pRect, const T *format, va_list args) const
 
f32 CalcStringWidth (const T *str, int length) const
 
f32 CalcStringWidth (const T *str) const
 
f32 CalcStringHeight (const T *str, int length) const
 
f32 CalcStringHeight (const T *str) const
 
void CalcStringRect (Rect *pRect, const T *str, int length) const
 
void CalcStringRect (Rect *pRect, const T *str) const
 
f32 Printf (const T *format,...)
 
f32 VPrintf (const T *format, va_list args)
 
f32 Print (const T *str, int length)
 
f32 Print (const T *str)
 
void ut_TextWriterBase_unused1 (Rect *pRect, const T *str, int length)
 
f32 CalcLineWidth (const T *str, int length)
 
int CalcLineRectImpl (Rect *pRect, const T *str, int length)
 
void CalcStringRectImpl (Rect *pRect, const T *str, int length)
 
f32 PrintImpl (const T *str, int length)
 
f32 AdjustCursor (f32 *xOrigin, f32 *yOrigin, const T *str, int length)
 
bool IsDrawFlagSet (u32 mask, u32 flag) const
 
- Public Member Functions inherited from nw4hbm::ut::CharWriter
 CharWriter ()
 
 ~CharWriter ()
 
const FontGetFont () const
 
f32 GetScaleH () const
 
f32 GetScaleV () const
 
f32 GetCursorX () const
 
f32 GetCursorY () const
 
void SetFont (const Font &font)
 
void SetColorMapping (Color min, Color max)
 
void SetScale (f32 hScale, f32 vScale)
 
void SetScale (f32 scale)
 
void SetCursor (f32 x, f32 y)
 
void SetCursor (f32 x, f32 y, f32 z)
 
void SetCursorX (f32 x)
 
void SetCursorY (f32 y)
 
f32 GetFontWidth () const
 
f32 GetFontHeight () const
 
f32 GetFontAscent () const
 
bool IsWidthFixed () const
 
void EnableFixedWidth (bool flag)
 
f32 GetFixedWidth () const
 
void SetFixedWidth (f32 width)
 
void SetGradationMode (GradationMode mode)
 
void SetTextColor (Color color)
 
void SetTextColor (Color start, Color end)
 
Color GetTextColor () const
 
void SetFontSize (f32 width, f32 height)
 
void SetFontSize (f32 height)
 
void SetupGX ()
 
void ResetColorMapping ()
 
void ResetTextureCache ()
 
void EnableLinearFilter (bool atSmall, bool atLarge)
 
f32 Print (u16 code)
 
void MoveCursorX (f32 dx)
 
void MoveCursorY (f32 dy)
 
void PrintGlyph (f32 x, f32 y, f32 z, const Glyph &glyph)
 
void LoadTexture (const Glyph &glyph, GXTexMapID slot)
 
void UpdateVertexColor ()
 

Static Public Member Functions

static TSetBuffer (T *buf, u32 size)
 
static TSetBuffer (u32 size)
 
static u32 GetBufferSize ()
 
static TGetBuffer ()
 
static int VSNPrintf (T *buffer, u32 count, const T *format, va_list arg)
 
static int StrLen (const T *str)
 

Private Attributes

f32 mCharSpace
 
f32 mLineSpace
 
int mTabWidth
 
u32 mDrawFlag
 
TagProcessorBase< T > * mTagProcessor
 

Static Private Attributes

static TmFormatBuffer
 
static u32 mFormatBufferSize = 0x100
 
static TagProcessorBase< TmDefaultTagProcessor
 
static const int DEFAULT_FORMAT_BUFFER_SIZE = 256
 
static const u32 DRAWFLAG_MASK_ALL
 

Member Enumeration Documentation

◆ DrawFlag

template<typename T >
enum nw4hbm::ut::TextWriterBase::DrawFlag
Enumerator
DRAWFLAG_ALIGN_TEXT_BASELINE 
DRAWFLAG_ALIGN_TEXT_CENTER 
DRAWFLAG_ALIGN_TEXT_RIGHT 
DRAWFLAG_ALIGN_H_BASELINE 
DRAWFLAG_ALIGN_H_CENTER 
DRAWFLAG_ALIGN_H_RIGHT 
DRAWFLAG_ALIGN_V_BASELINE 
DRAWFLAG_ALIGN_V_CENTER 
DRAWFLAG_ALIGN_V_TOP 
DRAWFLAG_MASK_ALIGN_TEXT 
DRAWFLAG_MASK_ALIGN_H 
DRAWFLAG_MASK_ALIGN_V 

Constructor & Destructor Documentation

◆ TextWriterBase()

template<typename charT >
nw4hbm::ut::TextWriterBase< charT >::TextWriterBase ( )

◆ ~TextWriterBase()

template<typename charT >
nw4hbm::ut::TextWriterBase< charT >::~TextWriterBase ( )

Member Function Documentation

◆ AdjustCursor()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::AdjustCursor ( f32 * xOrigin,
f32 * yOrigin,
const T * str,
int length )

◆ CalcFormatStringHeight()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::CalcFormatStringHeight ( const T * format,
... ) const

◆ CalcFormatStringRect()

template<typename T >
void nw4hbm::ut::TextWriterBase< charT >::CalcFormatStringRect ( Rect * pRect,
const T * format,
... ) const

◆ CalcFormatStringWidth()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::CalcFormatStringWidth ( const T * format,
... ) const

◆ CalcLineRectImpl()

template<typename T >
int nw4hbm::ut::TextWriterBase< charT >::CalcLineRectImpl ( Rect * pRect,
const T * str,
int length )

◆ CalcLineWidth()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::CalcLineWidth ( const T * str,
int length )

◆ CalcStringHeight() [1/2]

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::CalcStringHeight ( const T * str) const

◆ CalcStringHeight() [2/2]

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::CalcStringHeight ( const T * str,
int length ) const

◆ CalcStringRect() [1/2]

template<typename T >
void nw4hbm::ut::TextWriterBase< T >::CalcStringRect ( Rect * pRect,
const T * str ) const

◆ CalcStringRect() [2/2]

template<typename T >
void nw4hbm::ut::TextWriterBase< T >::CalcStringRect ( Rect * pRect,
const T * str,
int length ) const

◆ CalcStringRectImpl()

template<typename T >
void nw4hbm::ut::TextWriterBase< charT >::CalcStringRectImpl ( Rect * pRect,
const T * str,
int length )

◆ CalcStringWidth() [1/2]

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::CalcStringWidth ( const T * str) const

◆ CalcStringWidth() [2/2]

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::CalcStringWidth ( const T * str,
int length ) const

◆ CalcVStringRect()

template<typename T >
void nw4hbm::ut::TextWriterBase< charT >::CalcVStringRect ( Rect * pRect,
const T * format,
va_list args ) const

◆ GetBuffer()

template<typename charT >
charT * nw4hbm::ut::TextWriterBase< charT >::GetBuffer ( )
static

◆ GetBufferSize()

template<typename charT >
u32 nw4hbm::ut::TextWriterBase< charT >::GetBufferSize ( )
static

◆ GetCharSpace()

template<typename charT >
f32 nw4hbm::ut::TextWriterBase< charT >::GetCharSpace ( ) const

◆ GetDrawFlag()

template<typename charT >
u32 nw4hbm::ut::TextWriterBase< charT >::GetDrawFlag ( ) const

◆ GetLineHeight()

template<typename charT >
f32 nw4hbm::ut::TextWriterBase< charT >::GetLineHeight ( ) const

◆ GetLineSpace()

template<typename charT >
f32 nw4hbm::ut::TextWriterBase< charT >::GetLineSpace ( ) const

◆ GetTabWidth()

template<typename charT >
int nw4hbm::ut::TextWriterBase< charT >::GetTabWidth ( ) const

◆ GetTagProcessor()

template<typename charT >
TagProcessorBase< charT > & nw4hbm::ut::TextWriterBase< charT >::GetTagProcessor ( ) const

◆ IsDrawFlagSet()

template<typename T >
bool nw4hbm::ut::TextWriterBase< T >::IsDrawFlagSet ( u32 mask,
u32 flag ) const
inline

◆ Print() [1/2]

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::Print ( const T * str)

◆ Print() [2/2]

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::Print ( const T * str,
int length )

◆ Printf()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::Printf ( const T * format,
... )

◆ PrintImpl()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::PrintImpl ( const T * str,
int length )

◆ ResetTagProcessor()

template<typename charT >
void nw4hbm::ut::TextWriterBase< charT >::ResetTagProcessor ( )

◆ SetBuffer() [1/2]

template<typename T >
static T * nw4hbm::ut::TextWriterBase< T >::SetBuffer ( T * buf,
u32 size )
static

◆ SetBuffer() [2/2]

template<typename charT >
charT * nw4hbm::ut::TextWriterBase< charT >::SetBuffer ( u32 size)
static

◆ SetCharSpace()

template<typename charT >
void nw4hbm::ut::TextWriterBase< charT >::SetCharSpace ( f32 charSpace)

◆ SetDrawFlag()

template<typename charT >
void nw4hbm::ut::TextWriterBase< charT >::SetDrawFlag ( u32 flags)

◆ SetLineHeight()

template<typename charT >
void nw4hbm::ut::TextWriterBase< charT >::SetLineHeight ( f32 lineHeight)

◆ SetLineSpace()

template<typename charT >
void nw4hbm::ut::TextWriterBase< charT >::SetLineSpace ( f32 lineSpace)

◆ SetTabWidth()

template<typename charT >
void nw4hbm::ut::TextWriterBase< charT >::SetTabWidth ( int tabWidth)

◆ SetTagProcessor()

template<typename T >
void nw4hbm::ut::TextWriterBase< charT >::SetTagProcessor ( TagProcessorBase< T > * tagProcessor)

◆ StrLen()

template<typename T >
static int nw4hbm::ut::TextWriterBase< T >::StrLen ( const T * str)
inlinestatic

◆ ut_TextWriterBase_unused1()

template<typename T >
void nw4hbm::ut::TextWriterBase< charT >::ut_TextWriterBase_unused1 ( Rect * pRect,
const T * str,
int length )

◆ VPrintf()

template<typename T >
f32 nw4hbm::ut::TextWriterBase< charT >::VPrintf ( const T * format,
va_list args )

◆ VSNPrintf()

template<typename T >
static int nw4hbm::ut::TextWriterBase< T >::VSNPrintf ( T * buffer,
u32 count,
const T * format,
va_list arg )
inlinestatic

Member Data Documentation

◆ DEFAULT_FORMAT_BUFFER_SIZE

template<typename T >
const int nw4hbm::ut::TextWriterBase< T >::DEFAULT_FORMAT_BUFFER_SIZE = 256
staticprivate

◆ DRAWFLAG_MASK_ALL

template<typename T >
const u32 nw4hbm::ut::TextWriterBase< T >::DRAWFLAG_MASK_ALL
staticprivate
Initial value:
=
@ DRAWFLAG_MASK_ALIGN_TEXT
Definition TextWriterBase.h:41
@ DRAWFLAG_MASK_ALIGN_H
Definition TextWriterBase.h:44
@ DRAWFLAG_MASK_ALIGN_V
Definition TextWriterBase.h:47

◆ mCharSpace

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::mCharSpace
private

◆ mDefaultTagProcessor

template<typename charT >
TagProcessorBase< charT > nw4hbm::ut::TextWriterBase< charT >::mDefaultTagProcessor
staticprivate

◆ mDrawFlag

template<typename T >
u32 nw4hbm::ut::TextWriterBase< T >::mDrawFlag
private

◆ mFormatBuffer

template<typename charT >
charT * nw4hbm::ut::TextWriterBase< charT >::mFormatBuffer
staticprivate

◆ mFormatBufferSize

template<typename charT >
u32 nw4hbm::ut::TextWriterBase< charT >::mFormatBufferSize = 0x100
staticprivate

◆ mLineSpace

template<typename T >
f32 nw4hbm::ut::TextWriterBase< T >::mLineSpace
private

◆ mTabWidth

template<typename T >
int nw4hbm::ut::TextWriterBase< T >::mTabWidth
private

◆ mTagProcessor

template<typename T >
TagProcessorBase<T>* nw4hbm::ut::TextWriterBase< T >::mTagProcessor
private

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