📄 txtwindw.h
字号:
//Returns FALSE if colorName contains unrecognized color: BOOL setBackgroundColor(_CHAR* pColorName, ULONG32 colorNameLen); //Returns FALSE if colorName contains and invalid value: BOOL setBackgroundColorFromHexValString( _CHAR* pColorHexVal, ULONG32 colorHexValLen); // Returns FALSE if ulOpacity is > 255. // Default value is 255 - fully opaque BOOL setBackgroundOpacity(UINT32 ulOpacity); UINT32 getBackgroundOpacity() const { return m_ulBackgroundOpacity; } // Returns FALSE if ulOpacity is > 255. // Default value is 255 - fully opaque BOOL setMediaOpacity(UINT32 ulOpacity); UINT32 getMediaOpacity() const { return m_ulMediaOpacity; } // Chroma key related members BOOL isChromaKeySet() const { return m_bIsChromaKeySet; } UINT32 getChromaKey() const { return m_ulChromaKey; } BOOL setChromaKey(UINT32 ulColor); UINT32 getChromaKeyTolerance() const { return m_ulChromaKeyTolerance; } BOOL setChromaKeyTolerance(UINT32 ulTol); UINT32 getChromaKeyOpacity() const { return m_ulChromaKeyOpacity; } BOOL setChromaKeyOpacity(UINT32 ulOpacity); BOOL setHeight(_CHAR* pBuf, ULONG32 bufLen); BOOL setWidth(_CHAR* pBuf, ULONG32 bufLen);#if defined(_DEBUG) BOOL setDebugFlags(_CHAR* pBuf, ULONG32 bufLen); ULONG32 getDebugFlags() { return m_ulDebugFlags; }#endif //Added the following functions so author can // specify the color of hyperlinked text: BOOL setLinkColor(_CHAR* pColorName, ULONG32 colorNameLen); COLORTYPE getLinkColor() { return m_linkColor; } //Added the following functions so author can // specify whether or not hyperlinks get underlined automatically: BOOL setUnderlineHyperlinks(_CHAR* pBuf, ULONG32 bufLen); BOOL usingUnderlineHyperlinks() { return m_bUnderlineHyperlinks; } //Added the following so that authors could change // the font color inside hyperlinked text and still have it go // back to the proper font color when the hyperlinked text is done: void setNumberOfFontColorPushesInsideLinkText(ULONG32 numPshs) { m_ulNumberOfFontColorPushesInsideLinkText = numPshs; } ULONG32 getNumberOfFontColorPushesInsideLinkText() { return m_ulNumberOfFontColorPushesInsideLinkText; } void incrementNumberOfFontColorPushesInsideLinkText() { m_ulNumberOfFontColorPushesInsideLinkText++; } void decrementNumberOfFontColorPushesInsideLinkText() { if(m_ulNumberOfFontColorPushesInsideLinkText) m_ulNumberOfFontColorPushesInsideLinkText--; } //Added the following functions so author can // specify whether or not wordwrap is performed (but wordwrap is // NEVER done if there is a crawlrate only, i.e., perfectly // horizontal motion of the text): BOOL setWordwrap(_CHAR* pBuf, ULONG32 bufLen); void setWordwrap(BOOL bUseWrdWrp) { m_bUseWordwrap = bUseWrdWrp; } BOOL usingWordwrap() { return (m_bUseWordwrap && (!m_crawlRate || m_scrollRate) ); } void setExpandTabs(BOOL bExpTabs) { m_bExpandTabs = bExpTabs; } BOOL expandTabs() { return m_bExpandTabs; } textHorizAlign getHorizAlign() { return m_kHorizAlign; } void setHorizAlign(textHorizAlign kHzAl) { m_kHorizAlign = kHzAl; } textVertAlign getVertAlign() { return m_kVertAlign; } void setVertAlign(textVertAlign kVtAl) { m_kVertAlign = kVtAl; m_bVertAlignWasExplicitlySet = TRUE; } BOOL wasVertAlignExplicitlySet() { return m_bVertAlignWasExplicitlySet; } void setRightToLeftReading(BOOL bRTL) { m_bRightToLeft = bRTL; } BOOL isRightToLeftReading() { return m_bRightToLeft; } void setUserPrefSizeIsRelative() { m_bUserPrefSizeIsRelative = TRUE; } void setUserPrefSizeIsAbsolute() { m_bUserPrefSizeIsRelative = FALSE; } HX_RESULT setUserPrefRelativeTextSizing(ULONG32 ulTextSizeScaleFactor); HX_RESULT setUserPrefAbsoluteTextSizing(ULONG32 ulTextPointSize); HX_RESULT setDefaultPtSize(ULONG32 ulPtSz);// /fails if user pref overrides ULONG32 getDefaultPtSize() { return m_ulDefaultPointSize; } HX_RESULT scaleDefaultPtSize(double dScaleFactor);// /user pref may override void setDefaultTextColor(COLORTYPE defaultTextColor) { m_defaultTextColor = defaultTextColor; } COLORTYPE getDefaultTextColor() { return m_defaultTextColor; } void setDefaultTextBgColor(COLORTYPE defaultTextBgColor) { m_defaultTextBgColor = defaultTextBgColor; } COLORTYPE getDefaultTextBgColor() { return m_defaultTextBgColor; } HX_RESULT setDefaultFontFaceString(const char* pszFace); const char* getDefaultFontFaceString() { return (const char*)m_pDefaultFontFaceString; } HX_RESULT setDefaultCharsetString(const char* pszCharset); const char* getDefaultCharsetString() { return (const char*)m_pDefaultCharsetString; } HX_RESULT getCharsetULONG32(const char* pszCharset, UINT16 uiMaxLevelSupported, ULONG32& ulCharset /*OUT*/); BOOL isCharsetTranslatedForOS() { return m_bIsCharsetTranslatedForOS; } void setCharsetTranslatedForOS(BOOL bCITFOS) { m_bIsCharsetTranslatedForOS = bCITFOS; } void setDefaultFontWeight(UINT32 ulWeight); UINT32 getDefaultFontWeight() { return m_ulDefaultFontWeight; } void setDefaultFontStyleIsItalic(BOOL bIsItalic) { m_bDefaultFontStyleIsItalic = bIsItalic; } BOOL isDefaultFontStyleItalic() { return m_bDefaultFontStyleIsItalic; } // /Angle of a line of text: double getPlainTextAngleOfEscapement() { return m_dAngleOfEscapement; } void setPlainTextAngleOfEscapement(double dAngle) { m_dAngleOfEscapement = dAngle; } // /Make sure this is same as above if no param (i.e., defaults to // angleOfEscapement()): // /XXXEH- If Chinese or Japanese, should this be 0 if escapement is 90 or 180? //base-line orientation angle (==escapement Win95): double getPlainTextAngleOfCharOrientation() { return (m_bAngleOfCharOrientationWasExplicitlySet ? m_dAngleOfCharOrientation : m_dAngleOfEscapement); } void setPlainTextAngleOfCharOrientation(double dAngle) { m_dAngleOfCharOrientation = dAngle; m_bAngleOfCharOrientationWasExplicitlySet = TRUE; } BOOL wasAngleOfCharOrientationExplicitlySet() { return m_bAngleOfCharOrientationWasExplicitlySet; } //Added the following function to keep track of live src: BOOL setIsLiveSource(_CHAR* pBuf, ULONG32 bufLen); BOOL isLiveSource() { return m_bIsLiveSource; } ULONG32 getTimeAtStartup() {return m_ulTimeAtStartup;} void setTimeAtStartup(ULONG32 ulTAS, ULONG32& ulTOLTS) {m_ulTimeAtStartup = ulTOLTS = ulTAS;} ULONG32 getScrollType() { return m_scrollType; }#if defined(SHOW_CODE_CHANGE_MESSAGES)#pragma message("EH- in "__FILE__", need setScrollType(_CHAR* pBuf) \ function; find out why it's not used in .cpp code yet")#endif ULONG32 getType() { return m_type; } BOOL setType(_CHAR* pBbuf, ULONG32 bufLen); BOOL hasThinBorder() { return (m_borderSize > 0); } ULONG32 borderSize() { return (m_borderSize); } //The following four functions return the REQUESTED size and location // of the window (which the rtx-file author specified in the header but // that may be different from the ACTUAL values because a layout metafile // can override these values): LONG32 getUpperLeftX() { return m_upperLeftX;} LONG32 getUpperLeftY() { return m_upperLeftY;} LONG32 getWidth() { return (m_width); } LONG32 getHeight() { return (m_height); } HX_RESULT overrideDefaultWindowWidth(LONG32 ulNewWindowWidth); HX_RESULT overrideDefaultWindowHeight(LONG32 ulNewWindowHeigth); BOOL setContentVersion(_CHAR* pBuf, ULONG32 bufLen); ULONG32 getMajorContentVersion() { return m_ulContentMajorVersion; } ULONG32 getMinorContentVersion() { return m_ulContentMinorVersion; } void setUpperLeftX(LONG32 x) { m_upperLeftX=x;} void setUpperLeftY(LONG32 y) { m_upperLeftY=y;} COLORTYPE getBackgroundColor() { return m_backgroundColor; } ULONG32 string_to_ULONG32(_CHAR* pBbuf, BOOL& didErrorOccur); double string_to_double(_CHAR* pBuf, BOOL& didErrorOccur, ULONG32& ulIntegerPart, ULONG32& ulDecimalPart); LONG32 string_to_LONG32(_CHAR* pBuf, BOOL& didErrorOccur); BOOL string_to_BOOL(_CHAR* pBuf, ULONG32 bufLen, BOOL& didErrorOccur); //Added the following to keep track of when the last // <CLEAR> tag was sent (i.e., the time associated with it) so that // the loss of a packet with a <CLEAR> tag in it doesn't affect the // setting of the text of subsequent packets' positions in the window: void setTimeOfLastClearTag() { m_ulTimeOfLastClearTag = GetLatestSentTimeToRender(); } void setTimeOfLastClearTag(ULONG32 timeOfLC) { m_ulTimeOfLastClearTag=timeOfLC; } ULONG32 getTimeOfLastClearTag() { return m_ulTimeOfLastClearTag; } //Added the following so each packet can tell us // where to start drawing its text: void SetNewPktStartXAtTimeZero(LONG32 x) { m_newPktStartXAtTimeZero=x; } void SetNewPktStartYAtTimeZero(LONG32 y) { m_newPktStartYAtTimeZero=y; } LONG32 GetNewPktStartXAtTimeZero() { return m_newPktStartXAtTimeZero; } LONG32 GetNewPktStartYAtTimeZero() { return m_newPktStartYAtTimeZero; } BOOL m_bClearWasJustSent; //added this for <CLEAR>-tag handling. BOOL m_bUseXPOSVal; //For handling cas where <POS X=x/> immediately // follows packet header. BOOL m_bUseYPOSVal; //For handling cas where <POS Y=y/> immediately // follows packet header. //Tells whether we're currently parsing inside HTML-style comments, i.e., // <!-- we're inside a comment --> : ULONG32 getCommentTagNestCount(); void setInsideCommentTagNestCount(ULONG32 ulCTNC); ULONG32 incrementCommentTagNestCount(); ULONG32 decrementCommentTagNestCount(); ULONG32 GetNumNewlinesStatedInPacketHeader() { return m_ulNumNewlinesStatedInPacketHeader; } void SetNumNewlinesStatedInPacketHeader(ULONG32 ulNNlSIPH) { m_ulNumNewlinesStatedInPacketHeader = ulNNlSIPH; } LONG32 getCurrentTextLineEndX() { return m_currentTextLineEndX; } UINT32 m_ulDuration; protected: //As found in the <window version="maj.min"> string in the rt file: ULONG32 m_ulContentMajorVersion; ULONG32 m_ulContentMinorVersion; //The following are the initial coordinates of the window relative to // its parent window's client area coordinate system: LONG32 m_upperLeftX; //Upper left X of window LONG32 m_upperLeftY; //Upper left Y of window LONG32 m_width; //Width of window's client area LONG32 m_height; //Height of window's client area //In pixels; if >0, then window has WS_BORDER style; // If > 1, same as ==1 as of 12/29/1996: ULONG32 m_borderSize; //Units per second scrolling downward, where units are in // pixels if MAPMODE_PIXLES==m_mapMode, or // twips (1/1440th of an inch) if MAPMODE_TWIPS==m_mapMode: LONG32 m_scrollRate; //Units per second to the right, where units are in // pixels if MAPMODE_PIXLES==m_mapMode, or // twips (1/1440th of an inch) if MAPMODE_TWIPS==m_mapMode: LONG32 m_crawlRate; //The window type in which the text will be rendered; // TYPE_GENERIC for non-moving text: // TYPE_TICKERTAPE for tickertape text that moves horizontally, // TYPE_SCROLLINGNEWS for text that scrolls upward, // TYPE_TELEPROMPTER for text that scrolls upward, // TYPE_MARQUEE for vertically-centered text with a set crawlrate: ULONG32 m_type; //Stores the scroll type, e.g. "setrate" SCROLLTYPE is // SCROLLTYPE_SETRATE: ULONG32 m_scrollType; //XXXEH- unfinished code; not implemented //Background color in 0x00bbggrr format: COLORTYPE m_backgroundColor; // Opacity of background color (0=fully transparent, 255=fully opaque) // Default is 255. UINT32 m_ulBackgroundOpacity; // Opacity of foreground text color (0=fully transparent, 255=fully opaque) // Default is 255.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -