ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/clview/mdichild.h
Revision: 40
Committed: Sat Aug 27 16:48:50 2011 UTC (10 years, 8 months ago) by gpertea
File size: 2914 byte(s)
Log Message:
added clview files and examples

Line User Rev File contents
1 gpertea 40 #ifndef CLVIEWMDICHILD_H
2     #define CLVIEWMDICHILD_H
3    
4     #include "fx.h"
5     #include "FXClView.h"
6     #include "AceParser.h"
7    
8     static FXString seqbuf;
9    
10     // Main Window
11     class MDIChild : public FXMDIChild {
12     FXDECLARE(MDIChild)
13     protected:
14     //=== static, class-wide resources:
15     static FXFont* ifont; //info font
16     static short numInst;
17     static FXIcon* icnDefCS;
18     static FXIcon* icnBaseCS;
19     static FXIcon* icnDensCS;
20    
21     // Member data
22     int prevColumn;
23     FXPopup* pop;
24     FXVerticalFrame* contents;
25     FXComboBox* selcontig;
26     FXComboBox* selseq;
27     FXHorizontalFrame* clframe;
28     FXVerticalFrame* toolframe;
29     FXVerticalFrame* vframe;
30     FXHorizontalFrame* hframe;
31     FXLabel* zyLabel;
32     FXLabel* zxLabel;
33     FXButton* nozoomBtn;
34     FXLabel* seqData; //length, clipping, strand
35     FXTextField* seqComment;
36     FXLabel* seqAsmInfo;
37     FXLabel* columnInfo;
38     FXStatusBar *statusbar; // Status bar
39     FXSlider* sliderZX;
40     FXSlider* sliderZY;
41     FXCheckButton* cbgaps;
42     FXString file;
43     LayoutParser* layoutparser;
44     LayoutParser* groupHolder;
45     bool isAce; //file is an .ACE file (cap3)
46     bool zooming;
47     bool panning;
48     bool wasMaximized;
49     double startZX, startZY;
50     FXPoint zoomPt;
51     protected:
52     void assignGroups();
53     MDIChild(){}
54     public:
55     // Message handlers
56     FXClView* alignview;
57     FXOption* clropt1;
58     FXOption* clropt2;
59     FXOption* clropt3;
60    
61     long onCmdClZoom(FXObject*,FXSelector,void*);
62     long onSeqSelect(FXObject*,FXSelector,void*); //clicking
63     long onRMouseDown(FXObject*,FXSelector,void*);
64     long onRMouseUp(FXObject*,FXSelector,void*);
65     long onMMouseDown(FXObject*,FXSelector,void*);
66     long onMMouseUp(FXObject*,FXSelector,void*);
67     long onMouseMove(FXObject*,FXSelector,void*);
68     long onNoZoom(FXObject*,FXSelector,void*);
69     long onMaxZoom(FXObject*,FXSelector,void*);
70     long onColorOption(FXObject*,FXSelector,void*);
71     long onSelContig(FXObject*, FXSelector, void*);
72     long onHideGaps(FXObject*, FXSelector, void*);
73     long onSelSeq(FXObject*, FXSelector, void*); //from list
74     long onCmdGrps(FXObject*, FXSelector, void*);
75     long onMaxRestore(FXObject*, FXSelector, void*);
76     public:
77     // Messages
78     enum{
79     ID_CLXZOOM=FXMDIChild::ID_LAST,
80     ID_CLYZOOM,
81     ID_CLNOZOOM,
82     ID_CL1PXZOOM,//1pixel zoom
83     ID_CSTYLE1,
84     ID_CSTYLE2,
85     ID_CSTYLE3,
86     ID_CLVIEW,
87     ID_CLGRPS,
88     ID_HIDEGAPS,
89     ID_SELSEQ,
90     ID_MAXRESTORE,
91     ID_CONTIG
92     };
93     public:
94     MDIChild(FXMDIClient* p,const FXString& name,FXIcon* ic,FXMenuPane* mn,
95     FXuint opts,FXint x,FXint y,FXint w,FXint h);
96     ~MDIChild();
97     virtual void create();
98     void showSeqInfo(ClSeq* seq);
99     FXString getFileName() { return file; }
100     bool isAceFile() { return isAce; }
101     bool openFile(const char* filename);
102     void loadGroups(FXString& lytfile);
103     bool loadLayoutFile(FXString& lytfile);
104     void selContig(int ctgno, bool hideGaps);
105     };
106    
107     #endif