metaforce/Runtime/GuiSys/CTextExecuteBuffer.hpp

65 lines
1.8 KiB
C++
Raw Normal View History

2016-03-19 00:07:31 +00:00
#ifndef __URDE_CTEXTEXECUTEBUFFER_HPP__
#define __URDE_CTEXTEXECUTEBUFFER_HPP__
#include "CSaveableState.hpp"
#include "CGuiTextSupport.hpp"
#include <list>
namespace urde
{
class CInstruction;
class CFontImageDef;
2016-03-19 03:58:01 +00:00
class CTextRenderBuffer;
class CBlockInstruction;
class CLineInstruction;
2016-03-19 00:07:31 +00:00
class CTextExecuteBuffer
{
2016-03-19 03:58:01 +00:00
std::list<std::shared_ptr<CInstruction>> x0_instList;
2016-03-19 00:07:31 +00:00
u32 x14_ = 0;
2016-03-20 00:32:30 +00:00
CSaveableState x18_textState;
2016-03-19 03:58:01 +00:00
CBlockInstruction* x6c_curBlock = nullptr;
CLineInstruction* x70_curLine = nullptr;
2016-03-20 00:32:30 +00:00
std::list<std::shared_ptr<CInstruction>>::iterator x74_curWordIt;
s32 x78_curY;
s32 x7c_curX;
s32 x80_ = 0;
s32 x84_ = 0;
s32 x88_spaceDistance = 0;
std::vector<CSaveableState> x8c_stateStack;
2016-03-19 00:07:31 +00:00
public:
CTextExecuteBuffer()
{
2016-03-20 00:32:30 +00:00
x74_curWordIt = x0_instList.begin();
2016-03-19 00:07:31 +00:00
}
2016-03-19 03:58:01 +00:00
CTextRenderBuffer CreateTextRenderBuffer() const;
2016-03-20 00:32:30 +00:00
std::vector<CToken> GetAssets() const;
2016-03-19 00:07:31 +00:00
void AddString(const wchar_t* str, int);
void AddStringFragment(const wchar_t* str, int);
2016-03-20 00:32:30 +00:00
int WrapOneLTR(const wchar_t* str, int);
2016-03-19 00:07:31 +00:00
void MoveWordLTR();
void StartNewLine();
void StartNewWord();
void TerminateLine();
void TerminateLineLTR();
void AddPopState();
void AddPushState();
void AddVerticalJustification(EVerticalJustification);
void AddJustification(EJustification);
2016-03-20 00:32:30 +00:00
void AddLineExtraSpace(s32 space);
2016-03-19 00:07:31 +00:00
void AddLineSpacing(float);
void AddRemoveColorOverride(int);
void AddColorOverride(int, const CTextColor& color);
void AddColor(EColorType, const CTextColor& color);
void AddImage(const CFontImageDef& image);
void EndBlock();
void BeginBlock(int,int,int,int,ETextDirection,EJustification,EVerticalJustification);
void Clear();
};
}
#endif // __URDE_CTEXTEXECUTEBUFFER_HPP__