/***************************************************************************** # Copyright (C) 1994-2008 by David Gordon. # All rights reserved. # # This software is part of a beta-test version of the Consed/Autofinish # package. It should not be redistributed or # used for any commercial purpose, including commercially funded # sequencing, without written permission from the author and the # University of Washington. # # This software is provided ``AS IS'' and any express or implied # warranties, including, but not limited to, the implied warranties of # merchantability and fitness for a particular purpose, are disclaimed. # In no event shall the authors or the University of Washington be # liable for any direct, indirect, incidental, special, exemplary, or # consequential damages (including, but not limited to, procurement of # substitute goods or services; loss of use, data, or profits; or # business interruption) however caused and on any theory of liability, # whether in contract, strict liability, or tort (including negligence # or otherwise) arising in any way out of the use of this software, even # if advised of the possibility of such damage. # # Building Consed from source is error prone and not simple which is # why I provide executables. Due to time limitations I cannot # provide any assistance in building Consed. Even if you do not # modify the source, you may introduce errors due to using a # different version of the compiler, a different version of motif, # different versions of other libraries than I used, etc. For this # reason, if you discover Consed bugs, I can only offer help with # those bugs if you first reproduce those bugs with an executable # provided by me--not an executable you have built. # # Modifying Consed is also difficult. Although Consed is modular, # some modules are used by many other modules. Thus making a change # in one place can have unforeseen effects on many other features. # It may takes months for you to notice these other side-effects # which may not seen connected at all. It is not feasable for me to # provide help with modifying Consed sources because of the # potentially huge amount of time involved. # #*****************************************************************************/ // // Guicontigwin.h // // the GuiContigWin object is the subclass of motif window inherited // by the ContigWin object. it inherits the main window, menu bar // and form widget and then builds into the form a contig window, // scroll bar and all the other neat stuff you see on the editor. // // #ifndef GUICONTIGWIN_INCLUDED #define GUICONTIGWIN_INCLUDED #ifdef SCCS_ID static const char* guiContigWinSccsId = "@(#)guicontigwin.h 1.25 04/16/96 16:11:22"; #endif #include #include #include #include "numutil.h" #include "guiapp.h" #include "motifutils.h" #include "infobutton.h" #include "textfield.h" #include "rwtptrorderedvector.h" #include "rwtvalorderedvector.h" #include #include "consedParameters.h" #include "contigwin.h" static const int nNumberOfBasesToOverlapWhenPaging = 8; // should be a typedef, but causes HP compiler bug. see below. static const int GedButtonDown = 1; static const int GedButtonUp = 0; // a little separation between the scale and the consensus static const int nPixelMarginAboveConsensus = 0; static const int nPixelMarginBelowConsensus = 3; static const int nPixelMarginAboveProteinTranslation = 0; // where to position Fragment Names within the contig window static const int nPixelMarginAboveFragmentBases = 3; static const int nFragmentNameXPixel = 0; // static const int nFragmentNameMaxLength = 20; static const int nPixelMarginAfterFragmentName = 0; static const int nPixelMarginAfterSequencingDirection = 10; static const int nPixelMarginAboveDirSepLine = 3; static const int nPixelMarginBelowDirSepLine = 3; static const int nPixelDirSepLineThickness = 1; // just a class to allow us to pass both // of these subclasses to a callback // forward declarations until they are declared class tag; class GuiContigWin; class wholeReadItem; class LocatedFragment; class Contig; class passToShowTagInfo { public: bool operator==( const passToShowTagInfo& p2 ) const { return( this == &p2 ); } passToShowTagInfo() {} ~passToShowTagInfo() {} GuiContigWin* pGuiContigWin_; tag* pTag_; }; class passToShowWholeReadItem { public: bool operator==( const passToShowWholeReadItem& p2 ) const { return( this == &p2 ); } GuiContigWin* pGuiContigWin_; wholeReadItem* pWholeReadItem_; }; class passToPutReadIntoItsOwnContig { public: bool operator==( const passToPutReadIntoItsOwnContig& p2 ) const { return( this == &p2 ); } public: GuiContigWin* pGuiContigWin_; LocatedFragment* pLocFrag_; }; class passToEditAllReads { public: bool operator=( const passToEditAllReads& p2 ) const { return( this == &p2 ); } public: ContigWin* pContigWin_; LocatedFragment* pLocFrag_; int nConsPos_; }; // forward declaration of ContigWin object - Guicontigwin.has pointer // to it. class ContigWin; class GuiContigWin { public: friend class ContigWin; // sole ctor GuiContigWin( ContigWin* pvClientData); // destroy all widgets ~GuiContigWin(); // a subset of translated events, defined here as an enum typedef enum { KpLeft, KpRight, KpDel, KpUp, KpDown, KpPageUp, KpPageDown } GedKeyPress; // ColorMode objects need the drawing area widget Widget widGetContigWin() { return widContigWin_; } // sets position, max and size of slider from passed values void guiResetSlider(const int nVal, const int nMin, const int nMax, const int nSize); void guiResetSliderMax( const int nMax ); //////////////////////////////////////////////////////////////////// // // these member functions are used to draw, refresh or resize // the contigwin. // //////////////////////////////////////////////////////////////////// // this member function resizes the contig window (and hence // the entire editor object) in terms of characters drawn in // the current font void resizeContigWindow(const int nWide, const int nHigh); // clear the contig window void guiClearContigWindow(); // draws the scale and tick marks at top of contig window void guiDrawScaleBigTick( const int nScreenCharPosition); void guiDrawScaleBigBigTick( const int nScreenCharPosition); void guiDrawScaleLittleTick( const int nScreenCharPosition); void guiDrawScaleHorizontalLine(); void guiDrawScaleNumber( const int nScreenCharPosition, char *szNumber ); // draws passed number of chars at passed character based // screen pos using passed gc void guiDrawReadColorWord(const int nScreenCharX, const int nReadLineY, // will be later adjusted // for vertical scrolling const char *szCharsToDraw, const int nNumberOfChars, GuiColorText* pGctToUse ); void guiDrawConsensusColorWord(const int nScreenCharX, const char *szCharsToDraw, const int nNumberOfChars, GuiColorText* pGctToUse ); void guiDrawReadPrefix( const int nReadLine, const RWCString& soReadPrefix, GuiColorText* pGuiColorText ); // draws the fragment name at the specified line int nGuiDrawFragmentName(const int nReadLine, const RWCString& soFragmentName, const bool bIsHighlighted ); // draws a little magenta triangle indicating 5' or 3' int nGuiDrawSequencingDirectionArrow( const int nReadLine, const bool bFragmentComplemented, const bool bThisReadsTraceIsUp ); void guiDrawConsensusLabel(); void guiDrawConsensusSeparatorLine(); void guiDrawHalfCharacterTag( const bool bReadTagNotConsensusTag, const int nScreenCharX, const int nReadLine, const int nNumberOfChars, GuiColorText* pGctToUse ); void guiDrawBasesWithoutBackground( const bool bReadNotConsensus, const int nScreenCharX, const int nReadLine, const RWCString& soBasesToDraw, GuiColorText* pGctToUse ); // draw a single consensus char, at passed screen relative // position. if bIsCursor true, cursor graphics context used, // else drawn in normal color for consensus void guiDrawOneConsensusChar(const char cBase, const int nScreenCharPos, GuiColorText* pGctToUse); void guiDrawAminoAcid( const char cAminoAcid, const int nScreenCharX, const int nReadingFrame, GuiColorText* pGctToUse ); void guiDrawProteinTranslationLabel( char* szLabel, const int nReadingFrame ); // draws the line that separates the forward & reverse reads void nGuiDrawSepLine() const; void guiDrawVerticalLineAtCursor( const int nScreenCharPos ); void guiDrawHorizontalLineAtCursor( const int nReadLine ); // sets size and page increment of slider from private // GuiContigWin window size member void guiResizeSlider(); void guiResizeVerticalScrollBar(); // set only slider position void guiSetSliderPos(const int); void guiSetSliderPosOfVerticalScrollBar( const int nNewPosition ); void guiResetVerticalScrollBar(const int nVal, const int nMin, const int nMax, const int nSize); //////////////////////////////////////////////////////////////////// // // these member functions are used to map/navigate the // real estate of the contigwin. // //////////////////////////////////////////////////////////////////// // returns which fragment base character the pixel is in // assumes that it IS in one of the base lines int nCharXFromPixel(const int nPixelsX) const { return ( (nPixelsX - nFragmentBasesStartPixelX())/ GuiApp::pGetGuiApp()->nGetFontWidth() ); } // return the (max) number of bases displayed on frag/consensus // lines, depending on current window width, etc. int nGetDisplayedBasesWide(); // return the max number of reads that could fit on the window int nGetDisplayedReadsHigh(); // how many of each (for/rev) fragment line are on screen // (from ContigView) int nForFragsVisible() const; int nRevFragsVisible() const; //////////////////////////////////////////////////////////////////// // // these friend functions are all Xt callbacks that need access to // private data // //////////////////////////////////////////////////////////////////// friend void horizontalScrollBarXtCb(Widget, GuiContigWin*, XmScrollBarCallbackStruct*); friend void verticalScrollBarXtCb(Widget, GuiContigWin*, XmScrollBarCallbackStruct*); friend void resizeXtCb(Widget widCw, GuiContigWin*, XmDrawingAreaCallbackStruct*); friend void inputXtCb(Widget, GuiContigWin*, XmDrawingAreaCallbackStruct*); friend void exposureXtCb( Widget, GuiContigWin*, XmDrawingAreaCallbackStruct*); friend void dismissXtCb( Widget, GuiContigWin*, XmDrawingAreaCallbackStruct*); friend void cbGuiExportConsensus( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateMultiProblemNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateLowConsensusQualityNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateHighQualityDiscrepancyNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateHighQualityDiscrepancyNavigatorWithoutCompressionsOrG_dropouts( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateEditedNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateEditedButNotNsNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateTagsNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiCreateUnalignedHighQualityNavigator( Widget w, XtPointer client_data, XtPointer call_data); friend void cbSearchForSingleStrandedRegions( Widget w, XtPointer pClientData, XtPointer pCallData ); friend void cbSearchForSingleSubcloneRegions( Widget w, XtPointer pClientData, XtPointer pCallData ); friend void cbToggleNavigateAutomaticTracePopup( Widget wid, XtPointer pClientData, XtPointer pCallData ); friend void cbGuiContigInfo( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiColorMeansMatch( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiColorMeansQuality( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiColorMeansEdited( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiColorMeansQualityAndTags( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiColorMeansEditedAndTags( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiShowDocumentation( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiPickForwardPrimerFromSubclone( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiPickReversePrimerFromSubclone( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiPickForwardPrimerFromClone( Widget w, XtPointer client_data, XtPointer call_data); friend void cbGuiPickReversePrimerFromClone( Widget w, XtPointer client_data, XtPointer call_data); // friend void cbCreateExperiments( Widget w, // XtPointer pClientThis, // XtPointer pClientData ); friend void cbErrorRateButton( Widget w, XtPointer pClientThis, XtPointer pClientData ); friend void cbGuiTellPhrapToNotOverlapReadsDiscrepantAtThisLocation( Widget wid, XtPointer pClientData, XtPointer pCallData ); friend void cbGuiMakeAllReadsNAtThisLocation( Widget wid, XtPointer pClientData, XtPointer pCallData ); friend void cbAddReadNameToFile( Widget wid, XtPointer pClientData, XtPointer pCallData ); friend void cbAddReadNameWithOptionsToFile( Widget wid, XtPointer pClientData, XtPointer pCallData ); void guiPopupTagInfoForTagsAtThisLocation(); friend void guiContigWinButton1MotionXtEventHandler(Widget, XtPointer client_data, XEvent* pEvent, Boolean* ); friend void guiContigWinButton2MotionXtEventHandler(Widget, XtPointer client_data, XEvent* pEvent, Boolean* ); friend void cbFixNavigateMenuLabels( Widget wid, XtPointer pClientData, XtPointer pCallData ); void fixNavigateMenuLabels(); void fixDimMenuLabels(); void resetDimMenuLabels(); friend void cbResetPopupMenuLabels( Widget wid, XtPointer pClientData, XtPointer pCallData ); void resetPopupMenuLabels(); void fixPopupMenuLabels(); friend void cbShowTagInfo( Widget wid, XtPointer pClientData, XtPointer pCallData ); friend void cbSearchForStringWithMatchElsewhereTag( Widget wid, XtPointer pClientData, XtPointer pCallData ); void popupMenu( XButtonPressedEvent* pEvent ); void guiGotoConsensusPosition(); // debug void dumpRealEstate (); void makeVisible(); // returns the shell widget from MainWin Widget widGetGuiContigWinTopLevel() { return( widMainWinTopLevelShell_ );} void setButtonStatesForActiveContig() { ibComplementContig_.activate(); ibCompareContigs_.activate(); } // for debugging void getScrollBarData( int& nMin, int& nMax, int& nVal, int& nSize ); // passed the line number of the fragment, what is the // pixel Y of that line on screen? if reverse frag, // allows for separator line int nFragLineToPixelY( int nFragLine ) const; // gc for static parts of consensus line GuiColorText *pGetGctConsensusCursor() { return( pGctConsensusCursor_ ); } void toggleComplementContigButtonLabel(); void guiPickPrimer( const bool bForwardNotReversePrimer, const bool bCloneNotSubcloneTemplate ); void guiPickFirstPCRPrimer( const bool bTopStrandNotBottomStrand ); void guiPickSecondPCRPrimer( const bool bTopStrandNotBottomStrand ); void guiStartHighlight( const int nPixelX, const int nPixelY ); void displayErrorRate( char* szErrors ); void displayMessageAtBottom( char* szMessage ); void highlightVerticalScrollBar( const bool bHighlight ); void guiTellPhrapToNotOverlapReadsDiscrepantAtThisLocation(); void guiMakeAllReadsNAtThisLocation(); void addReadNameToFile(); void addReadNameToFileWithReadListOptions(); bool bReadLineIsBelowBottomOfWindow( const int nReadLine ); void setContigLabel( const RWCString& soContigName ); void setAceFileLabel( const RWCString& soAceFile ); void setLabelOfShowSomeTagsButton(); void userPushedShowSomeTagsButton(); void exportConsensusWithOptions(); void showProteinTranslation( const int nShow ); void setScreenForProteinTranslation( const int nShowProteinTranslation ); void fixShowProteinTranslationLabels(); void guiSearchForOpenReadingFrames2(); void guiTearContigs(); void guiShowAllTraces(); void handleMovingMouseOffOrBackIntoWindow( const int nPixelX ); void automaticScrollingTimer(); void resetScrollingTimer(); void stopAutomaticScrollingIfNecessary(); private: //////////////////////////////////////////////////////////////////// // // these private member functions are used to map/navigate the // real estate of the contigwin. // //////////////////////////////////////////////////////////////////// int nGetContigWindowPixelWidth() const; int nGetContigWindowPixelHeight() const; // takes index of base in a fragment line (where the leftmost // position possible for visible bases = 0) and returns pixel pos inline int nPixelXFromScreenChar( int nScreenChar ) const { return GuiApp::pGetGuiApp()->nGetFontWidth() * nScreenChar + nFragmentBasesStartPixelX(); } inline int nBasesWideToPixelsWide( int nBasesWide ) { return GuiApp::pGetGuiApp()->nGetFontWidth() * nBasesWide + nFragmentBasesStartPixelX() - 1; } // passed the a number of forward & rev frag lines // returns (required) height of drawing area int nFragLinesToPixelsHigh(const int nLines) const; //////////////////////////////////////////////////////////////////// // // these private member functions are used to draw/resize // the contigwin. // //////////////////////////////////////////////////////////////////// // adjusts the size of the scrollbar slider depending // on current contig length and contig window size; void adjustSliderForResizeWindow(); // member function called by xt callback for resize events void guiResizeCallback( XmDrawingAreaCallbackStruct *pCb ); //////////////////////////////////////////////////////////////////// // // these private member data are used to map/navigate // the contigwin. // //////////////////////////////////////////////////////////////////// inline int nScaleNumbersBaseline() const { return GuiApp::pGetGuiApp()->nGetFontHeight(); } inline int nScaleLinePixelY() const { return (int) (nScaleNumbersBaseline() + .5 * GuiApp::pGetGuiApp()->nGetFontHeight()); } inline int nScaleMarksHeight() const { return (int) (.5 * GuiApp::pGetGuiApp()->nGetFontHeight() ); } inline int nReadingFrameToPixelY( const int nReadingFrame ) { int nPixelY = nScaleLinePixelY() + nScaleMarksHeight() + nPixelMarginAboveProteinTranslation + + nReadingFrame * GuiApp::pGetGuiApp()->nGetFontHeight(); return( nPixelY ); } inline int nConsensusBaselinePixelY() const { return( nConsensusBaselinePixelY_ ); } inline int nConsensusSeparatorLinePixelY() const { return nConsensusBaselinePixelY() + GuiApp::pGetGuiApp()->nGetFontDescent() + nPixelMarginBelowConsensus; } inline int nReadPrefixPixelX() const { return( 0 ); } inline int nFragmentNameXPixelPosition() const { return( nReadPrefixPixelX() + ( pContigWin_->pContigView_ ? pContigWin_->pContigView_->nSizeOfLargestReadPrefix_ : 0 ) * GuiApp::pGetGuiApp()->nGetFontWidth() ); } // where the sequencing direction indicator starts, in // currently this is an isoceles triangle. inline int nDirectionIndicatorPixelX() const { return ( nFragmentNameXPixelPosition() + MAX( nRoomForReadNames_, pCP->nAlignedReadsWindowMaxCharsForReadNames_ ) * GuiApp::pGetGuiApp()->nGetFontWidth() + nPixelMarginAfterFragmentName ); } inline int nFragmentBasesStartPixelX() const { return nDirectionIndicatorPixelX() + MAX( MAX( aPointRight[0].x, aPointRight[1].x ), aPointRight[2].x ) + nPixelMarginAfterSequencingDirection; } // pixel position of indicator from line number // offset back up to baseline inline int nDirectionIndicatorPixelY(const int nReadLine) const { return nFragLineToPixelY(nReadLine) - GuiApp::pGetGuiApp()->nGetFontDescent(); } // since the forward and reverse reads are separated by // a line, there are two Y values for their start inline int nForFragLineTopPixelY() const { return (nConsensusSeparatorLinePixelY() + 1 + nPixelMarginAboveFragmentBases); } inline int nForFragLineBaselinePixelY() const { return nForFragLineTopPixelY() + GuiApp::pGetGuiApp()->nGetFontAscent(); } // the top of the direction separator line region inline int nDirectionSepLineTopPixelY() const { return nForFragLineTopPixelY() + ( nForFragsVisible() * GuiApp::nGetFontHeight() ); } // the forward and reverse reads are separated by a line // drawn here, horizontally inline int nDirectionSepLinePixelY() const { return nDirectionSepLineTopPixelY() + nPixelMarginAboveDirSepLine; } // the last pixel _in_ the direction separator line region inline int nDirectionSepLineBotPixelY() const { return nDirectionSepLinePixelY() + nPixelMarginAboveDirSepLine - 1; } // return the height in pixels that the Dir Sep line takes up inline int nGetDirectionSepLineHeightPixels() const { return (nPixelMarginAboveDirSepLine + nPixelMarginBelowDirSepLine + nPixelDirSepLineThickness); } // add +1 so that the reverse fragments start AFTER the // margin. Thus nPixelMarginBelowDirSepLine is the number of blank // pixel lines between the violet separator line and the reverse read // bases. This makes this blank space the same size as the space above // the violet separator line. inline int nRevFragLineTopPixelY() const { return nDirectionSepLinePixelY() + nPixelMarginBelowDirSepLine + 1; } inline int nRevFragLineBaselinePixelY() const { return nRevFragLineTopPixelY() + GuiApp::pGetGuiApp()->nGetFontAscent(); } // get y in pixels of bottom of last frag line displayed // i.e. start of unused blank area int nGetFragmentBasesMaxPixelY(); // is the point in the consensus bases area? inline bool bIsInConsensusBasesArea(const int nPixelX, const int nPixelY) const { return ((nPixelY < nConsensusSeparatorLinePixelY()) && (nPixelY > (nConsensusBaselinePixelY() - GuiApp::pGetGuiApp()->nGetFontAscent() )) && (nPixelX >= nFragmentBasesStartPixelX()) ); } // Is the point in the fragment bases area? bool bIsInFragmentBasesArea(const int nPixelX, const int nPixelY) const; bool bIsOnAReadName( const int nPixelX, const int nPixelY ); bool bIsOnARead( const int nPixelY ); void putIntoPopupMenuWholeReadItems( LocatedFragment* pLocFrag ); void putIntoPopupMenuAddReadNameToFile( LocatedFragment* pLocFrag ); void putIntoPopupMenuConsensusTags( Contig* pContig, const int nConsPos ); void putIntoPopupMenuReadTags( LocatedFragment* pLocFrag, const int nConsPos ); void putIntoPopupMenuButtonToPutReadIntoItsOwnContig( LocatedFragment* pLocFrag ); void putIntoPopupMenuPickPCRPrimers(); void putIntoPopupMenuIfWholeReadIsUnalignedOrLowQuality( LocatedFragment* pLocFrag ); void putIntoPopupMenuFindReadInAssemblyView( LocatedFragment* pLocFrag ); void putIntoPopupMenuEditAllReads( LocatedFragment* pLocFrag, const int nConsPos ); // warning--private member functions above here public: // "pre-drawn" arrow direction indicators XPoint aPointLeft[4]; XPoint aPointRight[4]; //////////////////////////////////////////////////////////////////// // // widgets and x related stuff // //////////////////////////////////////////////////////////////////// Widget widMainWinTopLevelShell_; Widget widMainWin_; Widget widMenuBar_; Widget widForm_; Widget widScrolledWin_; Widget widHorizontalScrollBar_; Widget widVerticalScrollBar_; Widget widContigWin_; Widget widAssemblyName_; Widget widContigName_; Widget widShowSomeTags_; Widget widGotoConsensusPosition_; Widget widClearConsensusPositionButton_; Widget widErrorRate_; Widget widErrorRateButton_; Widget widDismissButton_; Widget widMessageWindowAtBottom_; Widget widPopupMenu_; Widget widCreateMultiProblemNavigator_; Widget widCreateLowConsensusQualityNavigator_; Widget widCreateHighQualityDiscrepancyNavigator_; Widget widCreateUnalignedHighQualityNavigator_; Widget widSearchForSingleStrandedRegions_; Widget widSearchForSingleSubcloneRegions_; Widget widToggleNavigateAutomaticTracePopup_; Widget widToggleNavigateAutomaticAllTracesPopup_; Widget widDimNothing_; Widget widDimUnaligned_; Widget widDimLowQuality_; Widget widDimLowQualityOrUnaligned_; Widget widShowProteinTranslationTopStrand_; Widget widShowProteinTranslationBottomStrand_; Widget widDontShowProteinTranslation_; // infobuttons at top of contig window for assembly file, // current contig name and info. like all InfoButtons, // these must be explicitly initialized, managed and positioned // (in this case on the form widget inheritied from FormMenuMainWin). // most of these start out inactive, and only become active when // a contig is selected ( calls setButtonStatesForActiveContig() ). InfoButton ibComplementContig_; InfoButton ibCompareContigs_; // TextFields at top of contig window // must be initialized, managed and positioned within form TextField tfCursorPos_; // pointer to companion ContigWin object ContigWin *pContigWin_; // read name to be put into (project)_read_list.txt file RWCString soReadName_; int nPixelXBeforePopupMenu_; int nPixelYBeforePopupMenu_; // graphics contexts for same GuiColorText *pGctScale_; GuiColorText *pGctScaleNumbers_; // graphics context for fragment names GuiColorText *pGctFragmentNames_; // gc for highlighted read names GuiColorText *pGctFragmentNamesHighlighted_; // gc for static parts of consensus line GuiColorText *pGctConsensusLabel_; // gc for consensus cursor GuiColorText *pGctConsensusCursor_; // sequencing direction color GuiColorText *pGctSequencingDirection_; // sequencing direction color if trace is up GuiColorText *pGctSequencingDirectionTraceIsUp_; // gc for horizontal line GuiColorText *pGctHorizontalLineAtCursor_; // gc for vertical line GuiColorText *pGctVerticalLineAtCursor_; // member function called by xt callback for input events void GuiInputCallback( XmDrawingAreaCallbackStruct *pCb ); GuiColorText* pGuiColorTextForHighlightedBases_; GuiColorText* pGctProteinTranslation_; GuiColorText* pGctProteinTranslationLabels_; GuiColorText* pGctProteinStartCodon_; GuiColorText* pGctProteinStopCodon_; XmString xmsComplementContig_; XmString xmsUncomplementContig_; unsigned int uButtonPressState_; // normal vertical scrollbar colors bool bSavedVerticalScrollbarColors_; Pixel pixVerticalScrollbarNormalTopShadowColor_; Pixel pixVerticalScrollbarNormalBottomShadowColor_; // vertical scrollbar colors when scrolled down Pixel pixVerticalScrollbarScrolledDownTopShadowColor_; Pixel pixVerticalScrollbarScrolledDownBottomShadowColor_; GuiColorText* pGuiColorTextWhenVerticalScrollbarScrolledDown_; // list of Widgets from last time the menu popped up // these lists allow deallocating memory for widgets and memory // for the Pass objects RWTValOrderedVector aTemporaryPopupMenuItems_; RWTPtrOrderedVector aPassToShowTagInfo_; RWTPtrOrderedVector aPassToShowWholeReadItem_; RWTPtrOrderedVector aPassToPutReadIntoItsOwnContig_; RWTPtrOrderedVector aPassToEditAllReads_; int nConsensusBaselinePixelY_; RWCString soDisplayedMessageAtBottom_; int nRoomForReadNames_; XtIntervalId xtidTimerForAutomaticScrolling_; bool bMouseIsOnBasesWithButtonDown_; bool bAutomaticallyScrollLeftNotRight_; bool bAutomaticScrollingInProgress_; }; void cbShowTagInfo( Widget wid, XtPointer pClientData, XtPointer pCallData ); void cbSearchForStringWithMatchElsewhereTag( Widget wid, XtPointer pClientData, XtPointer pCallData ); void horizontalScrollBarXtCb(Widget, GuiContigWin*, XmScrollBarCallbackStruct*); void verticalScrollBarXtCb(Widget, GuiContigWin*, XmScrollBarCallbackStruct*); void resizeXtCb(Widget widCw, GuiContigWin*, XmDrawingAreaCallbackStruct*); void inputXtCb(Widget, GuiContigWin*, XmDrawingAreaCallbackStruct*); void exposureXtCb( Widget, GuiContigWin*, XmDrawingAreaCallbackStruct*); void dismissXtCb( Widget, GuiContigWin*, XmDrawingAreaCallbackStruct*); void cbGuiExportConsensus( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateMultiProblemNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateLowConsensusQualityNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateHighQualityDiscrepancyNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateHighQualityDiscrepancyNavigatorWithoutCompressionsOrG_dropouts( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateEditedNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateEditedButNotNsNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateTagsNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiCreateUnalignedHighQualityNavigator( Widget w, XtPointer client_data, XtPointer call_data); void cbSearchForSingleStrandedRegions( Widget w, XtPointer pClientData, XtPointer pCallData ); void cbSearchForSingleSubcloneRegions( Widget w, XtPointer pClientData, XtPointer pCallData ); void cbToggleNavigateAutomaticTracePopup( Widget wid, XtPointer pClientData, XtPointer pCallData ); void cbGuiContigInfo( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiColorMeansMatch( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiColorMeansQuality( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiColorMeansEdited( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiColorMeansQualityAndTags( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiColorMeansEditedAndTags( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiShowDocumentation( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiPickForwardPrimerFromSubclone( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiPickReversePrimerFromSubclone( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiPickForwardPrimerFromClone( Widget w, XtPointer client_data, XtPointer call_data); void cbGuiPickReversePrimerFromClone( Widget w, XtPointer client_data, XtPointer call_data); void cbErrorRateButton( Widget w, XtPointer pClientThis, XtPointer pClientData ); void cbGuiTellPhrapToNotOverlapReadsDiscrepantAtThisLocation( Widget wid, XtPointer pClientData, XtPointer pCallData ); void cbGuiMakeAllReadsNAtThisLocation( Widget wid, XtPointer pClientData, XtPointer pCallData ); void cbAddReadNameToFile( Widget wid, XtPointer pClientData, XtPointer pCallData ); void cbAddReadNameWithOptionsToFile( Widget wid, XtPointer pClientData, XtPointer pCallData ); void guiContigWinButton1MotionXtEventHandler(Widget, XtPointer client_data, XEvent* pEvent, Boolean* ); void guiContigWinButton2MotionXtEventHandler(Widget, XtPointer client_data, XEvent* pEvent, Boolean* ); void cbFixNavigateMenuLabels( Widget wid, XtPointer pClientData, XtPointer pCallData ); void cbResetPopupMenuLabels( Widget wid, XtPointer pClientData, XtPointer pCallData ); #endif