⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 txtwindw.h

📁 linux下的一款播放器
💻 H
📖 第 1 页 / 共 3 页
字号:
    UINT32 m_ulMediaOpacity;    // Chroma-key-related members    BOOL   m_bIsChromaKeySet;       // Default FALSE    UINT32 m_ulChromaKey;    UINT32 m_ulChromaKeyTolerance;  // Default 0x00000000    UINT32 m_ulChromaKeyOpacity;    // Default 0 (fully transparent)    //If true, re-shows buffered text at start of TextContainerList    // when last text has been rendered in a scrolling or crawling window    // (and no new text is being streamed at the moment).    // Note: is ignored if window has a zero scrollrate and crawlrate):    BOOL m_loop;	     //This tells us whether or not we should treat n contiguous spaces in    // raw RealText as n spaces or as a single space:    BOOL m_bDontIgnoreExtraSpaces;        //Determines a new block of text's position:    ULONG32 m_numBreakTagsEncountered; 		        LONG32 m_currentTextLineStartY;    LONG32 m_currentTextLineEndY;    //Added the following vars needed to keep track of    // current line's x-extent so that, if crawlrate !=0  &&  scrollrate !=0,    // the insertion of the next line's text, i.e., the text immediately    // following a <BR>, can be calculated at the proper angle relative to    // the start location of the previous line of text:    LONG32 m_currentTextLineStartX;    LONG32 m_currentTextLineEndX;    //Added the following for horizontal-motion-only    // windows so that fake new lines can be made so the file format can    // more intelligently break up the data into time-sensitive chunks    // (like it does with wordwrapped and <BR>-filled text):    LONG32 m_xOfFakeNewLine;    ULONG32 m_ulNumNewlinesStatedInPacketHeader;    //added the following 3 members;    COLORTYPE m_linkColor; // Hyperlinked text color.    BOOL m_bUnderlineHyperlinks;//specifies whether or not to underline links.    BOOL m_bUseWordwrap;//specifies whether or not wordwrap should be done.    // /Added the following for plain text; these values get set via <param>    // elements as children of a plain text ref in a SMIL 2+ file:    BOOL m_bExpandTabs; //For plain text: to treat tabs literally or not    textHorizAlign m_kHorizAlign;    textVertAlign m_kVertAlign;    BOOL m_bVertAlignWasExplicitlySet;    BOOL m_bRightToLeft;    char* m_pDefaultFontFaceString;    char* m_pDefaultCharsetString;    BOOL m_bIsCharsetTranslatedForOS;    ULONG32 m_ulDefaultPointSize;    COLORTYPE m_defaultTextColor;    COLORTYPE m_defaultTextBgColor;    ULONG32 m_ulDefaultFontWeight;    BOOL m_bDefaultFontStyleIsItalic;    double m_dAngleOfEscapement;    double m_dAngleOfCharOrientation;    BOOL m_bAngleOfCharOrientationWasExplicitlySet;    // /Added the following for plain text; these values get set by the user    // via the player's user preferences:    BOOL m_bUserTextSizingPrefIsSet; // /User's non-default pref for text size.    BOOL m_bUserPrefSizeIsRelative;  // /absolute if FALSE, relative if TRUE.    // /0 means default, otherwise is pt size if absolute, otherwise is    // scale factor in percent, e.g., 120% for +1 size, 83.33% for -1 size:    ULONG32 m_ulUserPrefTextSizeOrScaleFactorPct;    //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:    ULONG32 m_ulNumberOfFontColorPushesInsideLinkText;    //Added the following to keep track of live source:    BOOL m_bIsLiveSource;    //This will be 0 unless we're live and wallclock-synch is active.    // This is needed for properly calculating begin and end times of    // TextContainers in a non-zero based time line:    ULONG32 m_ulTimeAtStartup;    //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:    ULONG32 m_ulTimeOfLastClearTag;    //Added the following so each packet can tell us    // where to start drawing its text:    LONG32 m_newPktStartXAtTimeZero;    LONG32 m_newPktStartYAtTimeZero;    //Tells whether we're currently parsing inside HTML-style comments, i.e.,    // <!-- we're inside a comment --> :    ULONG32 m_ulInsideCommentTagNestCount;    //[The following is not yet implemented:    // <WINDOW ..> tag in the header will allow a parameter MAPMODE="mm"    // where "mm" is "PIXELS", which means scrollrate and crawlrate are in    // pixels per second, or "TWIPS", which means units are 1/1440th of an    // inch.  X is always positive to the right and Y is always positive    //  downward, even if "TWIPS" is specified:	      /*    int m_mapMode;	    */#if defined(_DEBUG)    ULONG32 m_ulDebugFlags;#endif  private:      //These are in private section to keep them from being used:    TextWindowBase(TextWindowBase& tw) : TextAttributeStacks(),                                         TextContainerList() { ; }       TextWindowBase(TextWindowBase* tw) { ; }    TextWindowBase& operator= (TextWindowBase) { return *this; }}; //end class TextWindowBase.//////////////////////////////////////////////////////////////////////////////////	TextWindow class://class TextWindow : public TextWindowBase{  public:    TextWindow();        ~TextWindow();    //XXXEH- RTRender-only code:#ifdef _WINDOWS    //These receive TextOut()s of all rendered text and are then used in    // OnPaint() to BitBlt() the rendered text to this's window:    void* m_pDeviceContextMemory;  //memory DC for textWindow.#if !defined(USE_DIB_SECTION)    void* m_pBmpCompat;    CHXDIBits*	m_hDIB;#else //USE_DIB_SECTION:    HBITMAP m_hBitmap;    HBITMAP m_hOldBitmap;    LPBITMAPINFO m_LPBITMAPINFO;    BITMAPINFOHEADER m_BITMAPINFOHEADER;    VOID* m_pBits;    //Get new space for bitmapinfo struct (usually plus some bytes for color    // masks):    BOOL AllocNewLPBITMAPINFO(UINT32 ulNumBytes);#endif#endif //_WINDOWS.#if defined(_MACINTOSH) || defined(_MAC_UNIX)//	m_pOffScreenWorld used for offscreen drawing, works just like a port. 	GWorldPtr	m_pOffScreenWorld;#endif    BOOL m_bHandlingWindowResizing;    void clear_all();    //Inserts a ptr to a TextContainer copy of *pTC into the    // TextContainerList part of *this, and deletes pTC if deleteSentTcAtEnd    // is TRUE; bCalledFromRendererCode is needed because there is some    // code, e.g., CENTERing of text, that is only done in the renderer:    BOOL insertAtEndOfList(TextContainer* pTC, BOOL bCalledFromRendererCode,				   BOOL bDealingWithTabCharWithPre);    //XXXEH- RTRender-only code:    //The following four functions return the ACTUAL size and location    // of the window (for more, see the four other functions that start    //with getUpperLeftX() in class TextWindowBase):    LONG32 getWindowUpperLeftX() { return 0;}//XXXEH- Always 0 now (?)    LONG32 getWindowUpperLeftY() { return 0;}//XXXEH- Always 0 now (?)    LONG32 getWindowWidth(){return m_visibleWindowWidth;}    LONG32 getWindowHeight(){return m_visibleWindowHeight;}    void setVisibleWindowWidth(LONG32 w) { m_visibleWindowWidth = w;}    void setVisibleWindowHeight(LONG32 h) { m_visibleWindowHeight = h; }    //This was added to keep track of how far everything was moved when    // the last loop happened so incomming text can know where to be    // moved relative to its packet-header <POS X0= Y0= > tag's values:    LONG32 getCurrentXOffsetDueToLooping()	    { return m_lCurrentXOffsetDueToLooping; }    LONG32 getCurrentYOffsetDueToLooping()	    { return m_lCurrentYOffsetDueToLooping; }    void setCurrentXOffsetDueToLooping(LONG32 lXOffset)	    { m_lCurrentXOffsetDueToLooping = lXOffset; }    void setCurrentYOffsetDueToLooping(LONG32 lYOffset)	    { m_lCurrentYOffsetDueToLooping = lYOffset; }    LONG32 getCurrentYOffsetForTeleprompter()	    { return m_lCurrentYOffsetForTeleprompter; }    void setCurrentYOffsetForTeleprompter(LONG32 lYOffset)	    { m_lCurrentYOffsetForTeleprompter = lYOffset; }    ULONG32 textCntnrListSize() { return (TextContainerList::size()); }    _CHAR* getURL();    ULONG32 getLenURLbuf();    BOOL hasValidURL();    ULONG32 getTargetOfURL() { return m_ulTargetOfURL; }    //returns FALSE if pNewURL is empty or NULL:    BOOL setURL(_CHAR* newURL, ULONG32 newURLstrlen);    void clearURL();    //The values this can take are enum'd in txtattrb.h:    void setTargetOfURL(ULONG32 ulTarget) {m_ulTargetOfURL = ulTarget;}    //XXXEH- RTRender-only code:    void setTimeOfLastTimeSync(ULONG32 ulTime)	{ m_ulTimeOfLastTimeSync=ulTime; };    ULONG32 getTimeOfLastTimeSync() { return m_ulTimeOfLastTimeSync; };    //Goes through the list and, if any nodes' bounding boxes have    // moved outside the window, deletes them.    // Returns the number of nodes in the list that were deleted:    ULONG32 deleteAllNoLongerVisible();    //XXXEH- RTRender-only code:    //Goes through last line of text and centers it (if it's got the    // isCentered() value) based on the actual window width (via a call to    // getWindowWidth() ):    BOOL CenterPriorLine();    BOOL getPriorLineAlreadyCentered()	{ return m_bPriorLineAlreadyCentered; }    void setPriorLineAlreadyCentered(BOOL bPLAC)	{ m_bPriorLineAlreadyCentered=bPLAC; }#if defined(_MACINTOSH)	|| defined(_MAC_UNIX)    HXxEvent*  m_pEvent;#endif  #if defined(_UNIX) && !defined(_MAC_UNIX)    Dict* m_font_dict;    CHXMapLongToObj m_color_list;#endifprivate:    _CHAR* m_pURL;    ULONG32 m_ulLenURLbuf;    //The possible values for this are enum'd in txtattrb.h:    ULONG32 m_ulTargetOfURL;    ULONG32 m_ulTimeOfLastTimeSync;    LONG32 m_visibleWindowWidth;    LONG32 m_visibleWindowHeight;    //This was added to keep track of how far everything was moved when    // the last loop happened so incomming text can know where to be    // moved relative to its packet-header <POS X0= Y0= > tag's values:    LONG32  m_lCurrentXOffsetDueToLooping;    LONG32  m_lCurrentYOffsetDueToLooping;    //This was added to keep track of how much everything has "moved" up    // due to lines of text arriving that extend past the lower edged of the    // window in TYPE_TELEPROMPTER windows:    LONG32 m_lCurrentYOffsetForTeleprompter;    //This makes sure a line of text doesn't get centered twice (which would    // happen if </CENTER> ends a packet of text and then, when the next    // packet gets parsed, the line would get re-centered when a new    // TextContainer was inserted into *this's list if it didn't know better:    BOOL m_bPriorLineAlreadyCentered;    //These are in private section to keep them from being used:    TextWindow(TextWindow& tw) : TextWindowBase() { ; }    TextWindow(TextWindow* tw) { ; }    TextWindow& operator= (TextWindow) { return *this; }};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -