OpenClonk
C4MarkupTagColor Class Reference

#include <C4Markup.h>

Inheritance diagram for C4MarkupTagColor:
[legend]
Collaboration diagram for C4MarkupTagColor:
[legend]

Public Member Functions

 C4MarkupTagColor (DWORD dwClr)
 
void Apply (C4BltTransform &rBltTrf, bool fDoClr, DWORD &dwClr) override
 
const char * TagName () const override
 
std::string OpeningTag () const override
 
virtual std::string ClosingTag () const
 

Public Attributes

C4MarkupTagpPrev {nullptr}
 
C4MarkupTagpNext {nullptr}
 

Detailed Description

Definition at line 47 of file C4Markup.h.

Constructor & Destructor Documentation

◆ C4MarkupTagColor()

C4MarkupTagColor::C4MarkupTagColor ( DWORD  dwClr)
inline

Definition at line 52 of file C4Markup.h.

References C4MarkupTag::Apply().

52 : C4MarkupTag(), dwClr(dwClr) { } // ctor
C4MarkupTag()=default
Here is the call graph for this function:

Member Function Documentation

◆ Apply()

void C4MarkupTagColor::Apply ( C4BltTransform rBltTrf,
bool  fDoClr,
DWORD dwClr 
)
overridevirtual

Implements C4MarkupTag.

Definition at line 40 of file C4Markup.cpp.

41 {
42  // set color
43  if (fDoClr) dwClr = this->dwClr;
44 }

◆ ClosingTag()

std::string C4MarkupTag::ClosingTag ( ) const
virtualinherited

Definition at line 29 of file C4Markup.cpp.

References s.

30 {
31  return "</"s + TagName() + ">";
32 }
virtual const char * TagName() const =0
#define s

◆ OpeningTag()

std::string C4MarkupTagColor::OpeningTag ( ) const
overridevirtual

Reimplemented from C4MarkupTag.

Definition at line 47 of file C4Markup.cpp.

References FormatString(), StdStrBuf::getData(), and s.

48 {
49  return "<c "s + FormatString("%x", dwClr).getData() + ">";
50 }
const char * getData() const
Definition: StdBuf.h:442
#define s
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:270
Here is the call graph for this function:

◆ TagName()

const char* C4MarkupTagColor::TagName ( ) const
inlineoverridevirtual

Implements C4MarkupTag.

Definition at line 55 of file C4Markup.h.

References C4MarkupTag::OpeningTag().

55 { return "c"; }
Here is the call graph for this function:

Member Data Documentation

◆ pNext

C4MarkupTag * C4MarkupTag::pNext {nullptr}
inherited

Definition at line 25 of file C4Markup.h.

Referenced by C4Markup::Apply(), and C4Markup::~C4Markup().

◆ pPrev

C4MarkupTag* C4MarkupTag::pPrev {nullptr}
inherited

Definition at line 25 of file C4Markup.h.


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