Source code for MSQuant: SDUPspectrumMarking.vb, MSQuant/msquant/src/GUI/SDUPspectrumMarking.vb.

Table of contents page.

Home page for MSQuant.

'****************************************************************************
'* Copyright (C) 2008 Peter Mortensen and Matthias Mann                     *
'* This file is part of MSQuant.                                            *
'*                                                                          *
'* MSQuant is distributed under the terms of                                *
'* the GNU General Public License. See src/COPYING.TXT or                   *
'* <http://www.gnu.org/licenses/gpl.txt> for details.                       *
'*                                                                          *
'* MSQuant is free software; you can redistribute it                        *
'* and/or modify it under the terms of the GNU                              *
'* General Public License as published by the Free                          *
'* Software Foundation; either version 2 of the                             *
'* License, or (at your option) any later version.                          *
'*                                                                          *
'* MSQuant is distributed in the hope that it will be                       *
'* useful, but WITHOUT ANY WARRANTY; without even the                       *
'* implied warranty of MERCHANTABILITY or FITNESS FOR                       *
'* A PARTICULAR PURPOSE.  See the GNU General Public                        *
'* License for more details.                                                *
'*                                                                          *
'* You should have received a copy of the GNU General                       *
'* Public License along with MSQuant; if not, write to                      *
'* the Free Software Foundation, Inc., 59 Temple                            *
'* Place, Suite 330, Boston, MA  02111-1307  USA                            *
'*                                                                          *
'* Purpose: base class for marking in mass spectra (in fact in any          *
'*          kind of graphics), e.g. a/b/y ions in a MS-MS spectrum.         *
'*                                                                          *
'****************************************************************************

'****************************************************************************
'*                               CEBI                                       *
'*                    Software Development Group                            *
'*                         Peter Mortensen                                  *
'*                E-mail: NUKESPAMMERSdrmortensen@get2netZZZZZZ.dk          *
'*                 WWW: http://www.cebi.sdu.dk/                             *
'*                                                                          *
'*  Program for post-processing of result from search in mass               *
'*    spectrometric data.                                                   *
'*                                                                          *
'*    FILENAME:   SDUPspectrumMarking.vb                                    *
'*    TYPE:  VISUAL_BASIC                                                   *
'*                                                                          *
'* CREATED: PM 2007-09-01   Vrs 1.0. Estimated date.                        *
'* UPDATED: PM 2008-xx-xx                                                   *
'*                                                                          *
'****************************************************************************

Option Strict On
Option Explicit On

Imports massSpectrometryBase 'For ionTypeEnum.


'****************************************************************************
'*    <placeholder for header>                                              *
'****************************************************************************
Public Structure markerStructure
    Dim MCR As Double

    'Dim Yion As Boolean
    'Dim Bion As Boolean
    Dim ionType3 As ionTypeEnum
    '  Is knowledge of the type of ion required here. Isn't it enough
    '  to specify which colour???

    Dim charge As Integer

    Dim labelDescription As String 'For label in spectrum.

    Dim moreDescription As String 'Extra for tooltip.

    Dim tag As String

    'Changed PM_FRAGMENTDISPLAY 2008-05-18
    Dim matchingData As Boolean 'Field to keep track of some client
    '  side state, e.g. wether the marker is close to data/peaks in a spectrum.
End Structure 'markerStructure


Public Enum labelDirectionEnum
    enumLineDown = 409
    enumLineRight

End Enum 'labelDirectionEnum


'****************************************************************************
'*    <placeholder for header>                                              *
'****************************************************************************
Public MustInherit Class SDUPspectrumMarking


    'Note: addIonMarker() is a higher level function than addMarker(). It 
    '      knows about ion types, labels for ions. What actually happens 
    '      is dependent on  the type of the derived class.
    Public MustOverride Sub addIonMarker( _
      ByVal anIon As fragmentExStructure, _
      ByVal aMCRdelta As Double, _
      ByVal aToken As Integer)


    Public MustOverride Sub addMarker2( _
      ByRef anInMarker As markerStructure, _
      ByVal anInBaseLineLength As Integer, _
      ByVal anInHighlight As Boolean, _
      ByVal anOverrideColour As Color, _
      ByVal anInLabelDirection As labelDirectionEnum, _
      ByVal anInYpixelOffset As Integer, _
      ByVal anYdisplayLevel As Integer)

    Public MustOverride Sub lastMarkerAdded(ByVal aHighestX As Double)

    Public MustOverride Sub highLightMarker(ByVal aTag As Integer)

    Public MustOverride Sub clearMarkers()

    Public MustOverride Sub updateMarkersPosition()

    Public MustOverride Sub newXaxisPosition(ByVal aNewPixelXvalue As Integer)


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Public Sub newZoomEtc( _
      ByVal aZoom As massZoomStructure, _
      ByVal aSpecX As Integer, _
      ByVal aSpecY As Integer, _
      ByVal aSizeX As Integer, _
      ByVal aSizeY As Integer _
      )
        mZoom = aZoom

        mSpectrumControlX = aSpecX
        mSpectrumControlY = aSpecY
        mSpectrumControlSizeX = aSizeX
        mSpectrumControlSizeY = aSizeY
    End Sub 'newZoom


    'P U B L I C   E N D 


    Protected mZoom As massZoomStructure 'Updated from creator,
    '  usually instance of frmSpectrumDisplay.

    Protected mSpectrumControlX As Integer
    Protected mSpectrumControlY As Integer
    Protected mSpectrumControlSizeX As Integer
    Protected mSpectrumControlSizeY As Integer

End Class 'SDUPspectrumMarking


    

    

Generated by script codePublish.pl at 2009-01-05T15:20:59.