txtattrb.h
来自「linux下的一款播放器」· C头文件 代码 · 共 1,012 行 · 第 1/3 页
H
1,012 行
} if(fontTop & FONT_FACE) { popFontFaceStack(); } if(fontTop & FONT_COLOR) { popTextColorStack(); } if(fontTop & FONT_BGCOLOR) { popTextBackgroundColorStack(); } if(fontTop & FONT_CHARSET) { popFontCharsetStack(); } ULONG32 curFontTop = m_fontStack.peek(); m_fontStack.pop(); return fontTop;}inlineCOLORTYPE TextAttributeStacks::popTextColorStack(){ ULONG32 fontTop = m_fontStack.pop(); if(fontTop & FONT_COLOR) { fontTop -= FONT_COLOR; //clears the FONT_COLOR bit. m_fontStack.push(fontTop);//resets stack top with FONT_COLOR gone } return (m_textColorStack.pop());}inlineCOLORTYPE TextAttributeStacks::popTextBackgroundColorStack(){ ULONG32 fontTop = m_fontStack.pop(); if(fontTop & FONT_BGCOLOR) { fontTop -= FONT_BGCOLOR; //clears the FONT_BGCOLOR bit. m_fontStack.push(fontTop);//resets stack top with FONT_COLOR gone } return (m_textBackgroundColorStack.pop());}inlineCOLORTYPE TextAttributeStacks::popTickerUpperColorStack(){ return (m_tickerUpperColorStack.pop());}inlineCOLORTYPE TextAttributeStacks::popTickerLowerColorStack(){ return (m_tickerLowerColorStack.pop());}inlineULONG32 TextAttributeStacks::popFontFaceStack(){ ULONG32 fontTop = m_fontStack.pop(); if(fontTop & FONT_FACE) { fontTop -= FONT_FACE; //clears the FONT_FACE bit. m_fontStack.push(fontTop);//resets stack top with FONT_COLOR gone } return (m_fontFaceStack.pop());}inlineULONG32 TextAttributeStacks::popFontCharsetStack(){ ULONG32 fontTop = m_fontStack.pop(); if(fontTop & FONT_CHARSET) { fontTop -= FONT_CHARSET; //clears the FONT_CHARSET bit. m_fontStack.push(fontTop);//resets stack top with FONT_COLOR gone } return (m_fontCharsetStack.pop());}inlineULONG32 TextAttributeStacks::popFontPointSizeStack(){ ULONG32 fontTop = m_fontStack.pop(); if(fontTop & FONT_SIZE) { fontTop -= FONT_SIZE; //clears the FONT_SIZE bit. m_fontStack.push(fontTop);//resets stack top with FONT_COLOR gone } return (m_fontPointSizeStack.pop());}/* Looks at, but doesn't change stack: */inlineULONG32 TextAttributeStacks::peekAtFontPointSizeStack() { return (m_fontPointSizeStack.peek());}inlineBOOL TextAttributeStacks::popIsBoldStack(){ return ((BOOL)m_isBoldStack.pop());}inlineBOOL TextAttributeStacks::popIsItalicizedStack(){ return ((BOOL)m_isItalicizedStack.pop());}inlineBOOL TextAttributeStacks::popIsUnderlinedStack(){ return ((BOOL)m_isUnderlinedStack.pop());}inlineBOOL TextAttributeStacks::popIsStruckOutStack(){ return ((BOOL)m_isStruckOutStack.pop());}inlineULONG32 TextAttributeStacks::popBlinkRateStack(){ return (m_blinkRateStack.pop());}inlineBOOL TextAttributeStacks::popIsCenteredStack(){ return ((BOOL)m_isCenteredStack.pop());}inlineBOOL TextAttributeStacks::popIsRequiredStack(){ if(m_ulRequiredTagCount>0L) return(BOOL(m_ulRequiredTagCount--)); return (FALSE);}inlineBOOL TextAttributeStacks::popIsPreStack(){ if(m_ulPreTagCount>0L) return(BOOL(m_ulPreTagCount--)); return (FALSE);}inlineBOOL TextAttributeStacks::peekAtIsPreStack(){ return(BOOL(m_ulPreTagCount));}//added this for indenting text in lists and as requested:inlineUINT16 TextAttributeStacks::popLineIndentAmtInPixelsStack(){ return ((UINT16)m_lineIndentAmtInPixelsStack.pop());}//added this for indenting text in lists and as requested:// Looks at, but doesn't change stack:inlineUINT16 TextAttributeStacks::peekAtLineIndentAmtInPixelsStack() { return ((UINT16)m_lineIndentAmtInPixelsStack.peek());}inlineULONG32 TextAttributeStacks::popFontTagStartByteInFileStack(){ return (m_fontTagStartByteInFileStack.pop());}/* ////////////////////////////////////////////////////////////// * All of the following return the default val if stack is empty: */inlinevoid TextAttributeStacks::pushFontStack(ULONG32 ul){ m_fontStack.push(ul);}inlinevoid TextAttributeStacks::pushTextColorStack(COLORTYPE clr, BOOL bPushFontStackToo) //defaults to TRUE.{ m_textColorStack.push(clr); //This is FALSE only in case where more than one FONT attribute // is inside a single FONT tag, like <FONT color=c someotherval=x>, // so that a subsequent </FONT> can pop both the color and the other val: if(bPushFontStackToo) { pushFontStack(FONT_COLOR); }}inlinevoid TextAttributeStacks::pushTextBackgroundColorStack(COLORTYPE clr, BOOL bPushFontStackToo) //defaults to TRUE.{ m_textBackgroundColorStack.push(clr); //This is FALSE only in case where more than one FONT attribute // is inside a single FONT tag, like <FONT bgcolor=c someotherval=x>, // so that a subsequent </FONT> can pop both the bgcolor & the other val: if(bPushFontStackToo) { pushFontStack(FONT_BGCOLOR); }}inlinevoid TextAttributeStacks::pushFontCharsetStack(ULONG32 charset, BOOL bPushFontStackToo) //defaults to TRUE.{ m_fontCharsetStack.push(charset); //This is FALSE only in case where more than one FONT attribute // is inside a single FONT tag, like <FONT charset=c someotherval=x>, // so that a subsequent </FONT> can pop both the size and the other val: if(bPushFontStackToo) { pushFontStack(FONT_CHARSET); }}inlinevoid TextAttributeStacks::pushFontPointSizeStack(ULONG32 siz, BOOL bPushFontStackToo) //defaults to TRUE.{ m_fontPointSizeStack.push(siz); //This is FALSE only in case where more than one FONT attribute // is inside a single FONT tag, like <FONT color=c someotherval=x>, // so that a subsequent </FONT> can pop both the size and the other val: if(bPushFontStackToo) { pushFontStack(FONT_SIZE); }}inlinevoid TextAttributeStacks::pushTickerUpperColorStack(COLORTYPE clr){ m_tickerUpperColorStack.push(clr);}inlinevoid TextAttributeStacks::pushTickerLowerColorStack(COLORTYPE clr){ m_tickerLowerColorStack.push(clr);}inlinevoid TextAttributeStacks::pushIsBoldStack(BOOL isBld){ m_isBoldStack.push(isBld);}inlinevoid TextAttributeStacks::pushIsItalicizedStack(BOOL isItal){ m_isItalicizedStack.push(isItal);}inlinevoid TextAttributeStacks::pushIsUnderlinedStack(BOOL isUndrln){ m_isUnderlinedStack.push(isUndrln);}inlinevoid TextAttributeStacks::pushIsStruckOutStack(BOOL isStrckOut){ m_isStruckOutStack.push(isStrckOut);}inlinevoid TextAttributeStacks::pushBlinkRateStack(ULONG32 blnkRt){ m_blinkRateStack.push(blnkRt);}inlinevoid TextAttributeStacks::pushIsCenteredStack(BOOL isCenterd){ m_isCenteredStack.push(isCenterd);}inlinevoid TextAttributeStacks::pushIsRequiredStack(){ m_ulRequiredTagCount++;}inlinevoid TextAttributeStacks::pushIsPreStack(){ m_ulPreTagCount++;}//added this for indenting text in lists and as requested:inlinevoid TextAttributeStacks::pushLineIndentAmtInPixelsStack( UINT16 lineIndentAmt){ ULONG32 ulCopy = lineIndentAmt; m_lineIndentAmtInPixelsStack.push(ulCopy);}inlinevoid TextAttributeStacks::pushFontTagStartByteInFileStack( ULONG32 ulStartByte){ m_fontTagStartByteInFileStack.push(ulStartByte);}#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?