NCBI C++ ToolKit
hit_matrix_renderer.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: hit_matrix_renderer.cpp 47117 2022-08-17 19:28:19Z grichenk $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrey Yazhuk
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
38 
40 #include <gui/opengl/glutils.hpp>
41 
42 #include <objmgr/util/sequence.hpp>
43 #include <gui/objutils/label.hpp>
44 
47 
48 
50 : m_ShowRulers(true),
51  m_ShowGrid(true),
52  m_BottomRuler(true),
53  m_TopRuler(true),
54  m_LeftRuler(false),
55  m_RightRuler(false),
56  m_BottomContainer(CGraphContainer::eHorzStack),
57  m_LeftContainer(CGraphContainer::eVertStack),
58  m_BackColor(1.0f, 1.0f, 1.0f),
59  m_TextFont(NULL),
60  m_SeqFont(NULL),
61  m_HitColoringParams(NULL)
62 {
65 
69 
70  m_Gen.SetIntegerMode(true, true);
71  m_Gen.EnableOneBased(false, false);
73 
75 
78 
81 
83  x_SetupAxes();
84 }
85 
86 
88 {
91 }
92 
93 
95 {
96  m_ShowRulers = show;
97 }
98 
99 
101 {
102  m_ShowGrid = show;
103 }
104 
105 
107 {
108  m_BackColor = color;
109 }
110 
111 
113 {
114  return m_MatrixPane;
115 }
116 
117 
119 {
120  return m_SubjectPane;
121 }
122 
123 
125 {
126  return m_QueryPane;
127 }
128 
129 
131 {
132  switch(area) {
133  case fMatrixArea:
134  return m_rcMatrix;
135 
136  case fSubjectGraphs:
137  return m_rcBottomContainer;
138 
139  case fSubjectRuler:
140  return m_rcBottomRuler;
141 
142  case fQueryGraphs:
143  return m_rcLeftContainer;
144 
145  case fQueryRuler:
146  return m_rcLeftRuler;
147 
148  default:
149  _ASSERT(false);
150  return TVPRect();
151  }
152 }
153 
154 
155 // TODO keep here
157 {
162 
165 
168 
171 
174 
175 }
176 
177 
178 void CHitMatrixRenderer::Render(const CGlPane& port, bool pdf)
179 {
180  if (!pdf) {
181  glClearColor(m_BackColor.GetRed(), m_BackColor.GetGreen(),
183  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
184  glLineWidth(10.0f);
185  }
186 
187  // prepare CGlPanes
188  TModelRect rc_M = port.GetModelLimitsRect();
190 
191  TModelRect rc_V = port.GetVisibleRect();
193 
194  if (m_ShowGrid || m_ShowRulers) {
195  x_AdjsutToMasterPane(port, m_SubjectPane, true, false);
196  x_AdjsutToMasterPane(port, m_QueryPane, false, true);
197 
198  // now rendering
200  }
201 
202  x_RenderContainers(port);
203 
205 }
206 
207 
209 {
211 
212  m_DataSource = ds;
213 
214  if(m_DataSource) {
217 
220  m_Graph.CreateGlyph(**it);
221  }
222 
224 
225  m_SubjectGraph->SetBioseqHandle(s_handle);
226  m_QueryGraph->SetBioseqHandle(q_handle);
227 
229  } else {
230  CBioseq_Handle h_null;
232  m_QueryGraph->SetBioseqHandle(h_null);
233  }
234 
235  Layout(port);
236 }
237 
238 
239 static const size_t kMaxRulerLabel = 60;
240 
242 {
243  string s_label, q_label;
244  if(ds) {
245  CBioseq_Handle q_handle = ds->GetQueryHandle();
246  CBioseq_Handle s_handle = ds->GetSubjectHandle();
247 
248  /// subject label
249  s_label = ds->GetLabel(ds->GetSubjectId());
250  //LOG_POST(Info << "CHitMatrixRenderer::x_SetRulerText() subject " << s_label);
251  if (s_handle) {
252  s_label += ": ";
253  s_label += sequence::CDeflineGenerator().GenerateDefline(s_handle);
254  }
255  if(s_label.size() > kMaxRulerLabel) {
256  s_label.resize(kMaxRulerLabel);
257  s_label += "...";
258  }
259 
260  /// query label
261  q_label = ds->GetLabel(ds->GetQueryId());
262  if (q_handle) {
263  q_label += ": ";
264  q_label += sequence::CDeflineGenerator().GenerateDefline(q_handle);
265  }
266  //LOG_POST(Info << "CHitMatrixRenderer::x_SetRulerText() query " << q_label);
267  if(q_label.size() > kMaxRulerLabel) {
268  q_label.resize(kMaxRulerLabel);
269  q_label += "...";
270  }
271  }
272 
273  m_BottomRuler.SetTextLabel(s_label);
274  m_LeftRuler.SetTextLabel(q_label);
275 }
276 
277 
279 {
280  size_t n = cont.GetGraphsCount();
281  for( size_t ct = 0; ct < n; ct++ ) {
282  IRenderable* r = cont.GetGraph(ct);
283 
284  CHistogramGraph* histogram = dynamic_cast<CHistogramGraph*>(r);
285  if(histogram) {
286  histogram->SetDataSource(NULL);
287  }
288  }
289  cont.RemoveAllGraphs();
290 }
291 
292 
294 {
295  CHistogramGraph* graph = new CHistogramGraph(seq == eSubject);
296 
297  // set color
299  props.m_MaxColor = descr.m_Color;
300  graph->SetProperties(props);
301 
302  // create data source
305  CDensityMapDS* ds = new CDensityMapDS(handle, descr.m_Type);
306  graph->SetDataSource(ds);
307  return graph;
308 }
309 
310 
312 {
313  m_HitColoringParams = params;
314 
315  if(m_DataSource) {
317  }
318 }
319 
320 
321 const string& CHitMatrixRenderer::GetScoreName() const
322 {
323  static string s_emp;
325 }
326 
327 
329 {
330  const TElemGlyphSet& glyphs = m_Graph.GetSelectedGlyphs();
331  bool b_first = true;
332 
333  int left, right, top, bottom;
335  const IHitElement& elem = (*it_G)->GetHitElem();
336 
337  int s_from = elem.GetSubjectStart();
338  int q_from = elem.GetQueryStart();
339  int s_len = elem.GetSubjectLength();
340  int q_len = elem.GetQueryLength();
341  int s_to = s_from + s_len;
342  int q_to = q_from + q_len;
343 
344  if(q_from > q_to)
345  swap(q_from, q_to);
346  if(s_from > s_to)
347  swap(s_from, s_to);
348 
349  if(b_first) {
350  left = s_from; right = s_to;
351  bottom = q_from; top = q_to;
352  b_first = false;
353  } else {
354  left = min(left, s_from);
355  right = max(right, s_to);
356  bottom = min(bottom, q_from);
357  top = max(top, q_to);
358  }
359  }
360  return b_first ? TModelRect(0, 0) : TModelRect(left, bottom, right + 1, top + 1);
361 }
362 
363 /*
364 Preserve for possible future use
365 
366 // populates the given collection with projections of the selected hit
367 // elements on the Subject sequence
368 void CHitMatrixRenderer::ProjectSelectedElems(TRangeColl& coll, ESequence seq) const
369 {
370  coll.clear();
371  const TElemGlyphSet& glyphs = m_Graph.GetSelectedGlyphs();
372 
373  ITERATE( CHitMatrixRenderer::TElemGlyphSet, it_G, glyphs) {
374  const IHitElement& elem = (*it_G)->GetHitElem();
375 
376  int from, to;
377  if(seq == eSubject) {
378  from = elem.GetSubjectStart();
379  to = from + elem.GetSubjectLength() - 1;
380  } else {
381  from = elem.GetQueryStart();
382  to = from + elem.GetQueryLength() - 1;
383  }
384 
385  if(from > to) {
386  swap(from, to);
387  }
388  TRangeColl::TRange r(from, to);
389  coll.CombineWith(r);
390  }
391 }
392 */
393 static const char* kSeqGraph = "Sequence";
394 
396 {
397  vector<string> types;
398  types.push_back(kSeqGraph);
400 
401  m_GraphTypes.resize(types.size());
402 
403  for( size_t ct = 0; ct < types.size(); ct++ ) {
404  m_GraphTypes[ct].m_Type = types[ct];
405  m_GraphTypes[ct].m_HasColor = true;
406  }
407 
408  m_GraphTypes[0].m_HasColor = false; // seq graph
409 }
410 
411 
412 void CHitMatrixRenderer::GetGraphTypes(vector<SGraphDescr>& types) const
413 {
415  types.push_back(*it);
416  }
417 }
418 
419 
420 void CHitMatrixRenderer::SetGraphColor(const string& name,
421  const CRgbaColor& color)
422 {
424  if(it->m_Type == name) {
425  it->m_Color = color;
426  return;
427  }
428  }
429 }
430 
431 
432 void CHitMatrixRenderer::GetGraphs(ESequence seq, vector<string>& graphs) const
433 {
434  const CGraphContainer& cont = (seq == eSubject) ? m_BottomContainer : m_LeftContainer;
435 
436  size_t n = cont.GetGraphsCount();
437  for(size_t ct = 0; ct < n; ct++ ) {
438  const IRenderable* r = cont.GetGraph(ct);
439  const CHistogramGraph* graph = dynamic_cast<const CHistogramGraph*>(r);
440  string s = graph ? graph->GetDataSource()->GetLabel() : string(kSeqGraph);
441  graphs.push_back(s);
442  }
443  std::reverse(graphs.begin(), graphs.end());
444 }
445 
446 
447 void CHitMatrixRenderer::SetGraphs(ESequence seq, const vector<string>& graphs)
448 {
449  x_SetGraphs(seq, graphs);
450 }
451 
452 
453 void CHitMatrixRenderer::x_SetGraphs(ESequence seq, const vector<string>& graphs)
454 {
455  bool horz = (seq == eSubject);
457 
458  typedef map<string, CIRef<IRenderable> > TMap;
459  TMap name_to_graph;
460 
461  size_t n = cont.GetGraphsCount();
462  for(size_t ct = 0; ct < n; ct++ ) {
463  IRenderable* r = cont.GetGraph(ct);
464  CHistogramGraph* graph = dynamic_cast<CHistogramGraph*>(r);
465  string s = graph ? graph->GetDataSource()->GetLabel() : string(kSeqGraph);
466  name_to_graph[s] = CIRef<IRenderable>(r);
467  }
468  cont.RemoveAllGraphs();
469 
470  // create graphs
471  for( int ct = (int) graphs.size() - 1; ct >= 0; ct-- ) {
472  const string& name = graphs[ct];
473  TMap::iterator it = name_to_graph.find(name);
474 
475  CIRef<IRenderable> graph;
476  if(it != name_to_graph.end()) {
477  graph = it->second;
479  name_to_graph.erase(it);
480  } else {
481  if(name == kSeqGraph) {
482  graph = horz ? m_SubjectGraph : m_QueryGraph;
483  } else {
485  const string& type = iter->m_Type;
486  if(type == name) {
487  graph = x_CreateHistogram(seq, *iter);
488  }
489  }
490  }
491  }
492 
493  cont.AddGraph(graph.GetPointer());
494  }
495 
496  cont.Layout();
497 }
498 
499 
501 {
502  CHistogramGraph* histogram = dynamic_cast<CHistogramGraph*>(graph);
503  if(histogram) {
505 
506  const string& name = histogram->GetDataSource()->GetLabel();
508  if(it->m_Type == name) {
509  color = it->m_Color;
510  break;
511  }
512  }
513 
514  CHistogramGraph::SProperties props = histogram->GetProperties();
515  props.m_MaxColor = color;
516  histogram->SetProperties(props);
517  }
518 }
519 
520 
521 void CHitMatrixRenderer::Resize(int w, int h, const CGlPane& port)
522 {
523  m_Size = TVPPoint(w, h);
524 
525  Layout(port); //TODO ?
526 }
527 
528 
529 /// recalculates recatngles for all intrnal objects so that they are positioned
530 /// correctly with regard to the new windows size
532 {
533  TVPPoint subj_cont_size = m_BottomContainer.PreferredSize();
534  TVPPoint query_cont_size = m_LeftContainer.PreferredSize();
535 
536  TVPPoint sz_left_ruler, sz_bottom_ruler;
537  const TModelRect& rc_m = port.GetModelLimitsRect();
538  if (m_ShowRulers && rc_m.Width() > 0 && rc_m.Height() > 0) {
539  int max_num_y = (int) ceil(rc_m.Top());
540  sz_left_ruler = m_LeftRuler.GetPreferredSize(max_num_y);
541  int max_num_x = (int) ceil(rc_m.Right());
542  sz_bottom_ruler = m_BottomRuler.GetPreferredSize(max_num_x);
543  }
544 
545  // calculate bounds of the matrix
546  int mx_left = query_cont_size.X()+ sz_left_ruler.X();
547  int mx_bottom = subj_cont_size.Y() + sz_bottom_ruler.Y() + 2;
548  int mx_right = m_Size.m_X - 2; // - sz_left_ruler.X();
549  int mx_top = m_Size.m_Y - 2; // - sz_bottom_ruler.Y();
550 
551  m_rcMatrix.Init(mx_left, mx_bottom, mx_right, mx_top);
552  m_rcAxes.Init(query_cont_size.X(), subj_cont_size.Y(), m_Size.m_X - 1, m_Size.m_Y - 1);
553 
554  // set Rulers rects
555  m_rcBottomRuler.Init(mx_left, m_rcAxes.Bottom(), mx_right, mx_bottom - 1);
556  m_rcLeftRuler.Init(m_rcAxes.Left(), mx_bottom, mx_left - 1, mx_top);
557 
558  // set Graph Containers
559  m_rcBottomContainer.Init(mx_left, 0, mx_right, m_rcAxes.Bottom() - 1);
561 
562  m_rcLeftContainer.Init(0, mx_bottom, m_rcAxes.Left() - 1, mx_top);
564 
565  // adjust panes
567 
568  {
569  TVPRect rc_vp = m_rcBottomRuler;
571  m_SubjectPane.SetViewport(rc_vp);
572  x_AdjsutToMasterPane(port, m_SubjectPane, true, false);
573 
574  rc_vp = m_rcLeftRuler;
576  m_QueryPane.SetViewport(rc_vp);
577  x_AdjsutToMasterPane(port, m_QueryPane, false, true);
578  }
579 }
580 
581 // TODO keep here
583 {
584  if (gr_pane.GetViewport().Width() < 20 ||
585  gr_pane.GetViewport().Height() < 20)
586  return;
587 
589  pane.EnableOffset(true);
590  pane.SetViewport(m_rcAxes);
591 
592  if (m_ShowGrid) {
593  x_AdjsutToMasterPane(port, pane, true, true);
594  m_Grid.Render(&pane, &gr_pane, &m_Gen);
595  }
596 
597  if (m_ShowRulers) {
598  // draw horizontal rulers
599  // draw bottom ruler
601  m_rcMatrix.Right(), m_rcMatrix.Bottom() - 1);
602  pane.SetViewport(rc_VP);
603  x_AdjsutToMasterPane(port, pane, true, false);
604 
605  m_BottomRuler.Render(pane);
606 
607  // draw vertical rulers
608  // draw left ruler
609  rc_VP.Init(m_rcAxes.Left(), m_rcMatrix.Bottom(),
610  m_rcMatrix.Left() - 1, m_rcMatrix.Top());
611  pane.SetViewport(rc_VP);
612  x_AdjsutToMasterPane(port, pane, false, true);
613 
614  m_LeftRuler.Render(pane);
615  }
616 }
617 
618 
620 {
621  CGlPane pane;
622  pane.EnableOffset(true);
623 
625  x_AdjsutToMasterPane(port, pane, true, false);
628 
630  x_AdjsutToMasterPane(port, pane, false, true);
632 
633  m_LeftContainer.Render(pane);
634 }
635 
636 
637 void CHitMatrixRenderer::x_AdjsutToMasterPane(const CGlPane& port, CGlPane& pane, bool b_model_x, bool b_model_y)
638 {
639  TModelRect rc_vis = port.GetVisibleRect();
640  TModelRect rc_lim = port.GetModelLimitsRect();
641 
642  // assuming that Viewport in the pane has been set properly
643  if(! b_model_x) { // adjust horz range to represent pixels
644  int max_x = pane.GetViewport().Width() - 1;
645  rc_lim.SetHorz(0, max_x);
646  rc_vis.SetHorz(0, max_x);
647  }
648 
649  if(! b_model_y) { // adjust vert range to represent pixels
650  int max_y = pane.GetViewport().Height() - 1;
651  rc_lim.SetVert(0, max_y);
652  rc_vis.SetVert(0, max_y);
653  }
654  pane.SetModelLimitsRect(rc_lim);
655  pane.SetVisibleRect(rc_vis);
656 }
657 
658 
660 {
661  if(m_rcMatrix.PtInRect(vp_x, vp_y)) {
662  return fMatrixArea;
663  } else if(m_rcBottomRuler.PtInRect(vp_x, vp_y)) {
664  return fSubjectRuler;
665  } else if(m_rcLeftRuler.PtInRect(vp_x, vp_y)) {
666  return fQueryRuler;
667  } else if(m_rcBottomContainer.PtInRect(vp_x, vp_y)) {
668  return fSubjectGraphs;
669  } else if(m_rcLeftContainer.PtInRect(vp_x, vp_y)) {
670  return fQueryGraphs;
671  }
672  return fOther;
673 }
674 
675 
676 bool CHitMatrixRenderer::NeedTooltip(int area, int vp_x, int vp_y)
677 {
678  switch(area) {
680  return m_BottomContainer.NeedTooltip(m_SubjectPane, vp_x, vp_y);
681 
683  return m_LeftContainer.NeedTooltip(m_QueryPane, vp_x, vp_y);
684 
685  default:
686  return false;
687  };
688 }
689 
690 
692 {
693  switch(area) {
695  return m_BottomContainer.GetTooltip();
696 
698  return m_LeftContainer.GetTooltip();
699 
700  default:
701  _ASSERT(false);
702  return "";
703  };
704 }
705 
706 
CBioseq_Handle –.
CDensityMapDS.
static void GetGraphTypes(vector< string > &types)
class CGlPane
Definition: glpane.hpp:62
CGraphContainer CGraphContainer a composite IRenderable that manages several child IRenderable graphs...
virtual void Layout()
virtual void RemoveAllGraphs()
virtual void SetVPRect(const TVPRect &rect)
virtual string GetTooltip()
virtual bool NeedTooltip(CGlPane &pane, int vp_x, int vp_y)
virtual void SetModelRect(const TModelRect &rc)
virtual size_t GetGraphsCount() const
virtual void Render(CGlPane &pane)
virtual bool AddGraph(TGraph *graph, bool front=false)
virtual TGraph * GetGraph(size_t index)
virtual TVPPoint PreferredSize()
CHistogramGraph.
void SetProperties(const SProperties &props)
virtual IHistogramGraphDS * GetDataSource()
virtual void SetDataSource(IHistogramGraphDS *ds)
const SProperties & GetProperties() const
const TElemGlyphSet & GetSelectedGlyphs() const
void AssignColorsByScore(const SHitColoringParams *params)
void Render(CGlPane &pane)
virtual void DeleteGlyphs()
virtual void CreateGlyph(const IHit &hit_elem)
void SetGraphColor(const string &name, const CRgbaColor &color)
void x_RenderContainers(const CGlPane &port)
void GetGraphTypes(vector< SGraphDescr > &types) const
virtual void ShowRulers(bool show)
CGraphContainer m_LeftContainer
const SHitColoringParams * m_HitColoringParams
CRegularGridRenderer m_Grid
virtual bool NeedTooltip(int area, int vp_x, int vp_y)
void x_SetGraphs(ESequence seq, const vector< string > &graphs)
IHitMatrixDataSource * m_DataSource
void x_SetRulerText(IHitMatrixDataSource *ds)
virtual int GetAreaByVPPos(TVPUnit vp_x, TVPUnit vp_y)
void SetGraphs(ESequence seq, const vector< string > &graphs)
CGraphContainer m_BottomContainer
virtual void ShowGrid(bool show)
void Layout(const CGlPane &pane)
recalculates recatngles for all intrnal objects so that they are positioned correctly with regard to ...
void x_UpdateGraphColor(IRenderable *graph)
CHistogramGraph * x_CreateHistogram(ESequence seq, const SGraphDescr &descr)
ESequence
identifies one of the two sequences in the pane
void GetGraphs(ESequence seq, vector< string > &graphs) const
vector< SGraphDescr > TGraphTypes
CRef< CGlTextureFont > m_SeqFont
virtual void Update(IHitMatrixDataSource *ds, const CGlPane &port)
TVPRect GetRect(EArea area)
CRef< CHitMatrixSeqGraph > m_QueryGraph
void x_DestroyGraphs(CGraphContainer &cont)
virtual void Render(const CGlPane &port, bool pdf=false)
CRef< CHitMatrixSeqGraph > m_SubjectGraph
void x_RenderAxisAndGrid(const CGlPane &port, CGlPane &gr_pane)
TModelRect GetSelectedHitElemsRect() const
virtual void SetBackgroundColor(CRgbaColor &color)
void ColorByScore(const SHitColoringParams *params)
virtual string GetTooltip(int area)
const string & GetScoreName() const
virtual void Resize(int w, int h, const CGlPane &port)
void x_AdjsutToMasterPane(const CGlPane &port, CGlPane &pane, bool b_model_x, bool b_model_y)
adjusts limits and visible rect of the given pane to the master pane
CHitMatrixSeqGraph.
Definition: seq_graph.hpp:52
void SetBioseqHandle(objects::CBioseq_Handle &handle)
Definition: seq_graph.cpp:67
void SetFonts(CGlTextureFont *seq_font)
Definition: seq_graph.cpp:61
class CRgbaColor provides a simple abstraction for managing colors.
Definition: rgba_color.hpp:58
void SetColor(EColorType type, const CRgbaColor &color)
Definition: ruler.cpp:133
@ fShowTextLabel
Definition: ruler.hpp:112
void SetTextLabel(const string &label)
Definition: ruler.cpp:197
@ eBackground
Definition: ruler.hpp:54
@ eTop
Definition: ruler.hpp:93
@ eRight
Definition: ruler.hpp:95
TVPPoint GetPreferredSize(int max_num=0) const
Definition: ruler.cpp:286
void SetHorizontal(bool b_horz, ELabelPlacement place=eDefault, ELabelAlign aln=eAln_Center)
Definition: ruler.cpp:92
void SetLabelOrientation(CGlTextureFont::EFontRotateFlags rotate, int rotate_degrees)
Definition: ruler.cpp:155
void SetDisplayOptions(int options)
Definition: ruler.cpp:165
virtual void Render(CGlPane &pane)
Definition: ruler.cpp:460
virtual string GetLabel() const =0
IHitElement.
Definition: hit.hpp:50
virtual TSeqPos GetQueryLength() const =0
virtual TSignedSeqPos GetQueryStart() const =0
virtual TSeqPos GetSubjectLength() const =0
virtual TSignedSeqPos GetSubjectStart() const =0
IHitMatrixDataSource - abstract Data Source for Hit Matrix Widget.
virtual const THitAdapterCont & GetHits() const =0
virtual IHitSeqId & GetSubjectId() const =0
virtual IHitSeqId & GetQueryId() const =0
vector< IHit * > THitAdapterCont
virtual objects::CBioseq_Handle GetQueryHandle()=0
virtual string GetLabel(const IHitSeqId &id)=0
virtual objects::CBioseq_Handle GetSubjectHandle()=0
IRenderable class IRenderable defines an abstract interface required for rendering graphical panels i...
Definition: irenderable.hpp:50
Definition: map.hpp:338
#define true
Definition: bool.h:35
#define false
Definition: bool.h:36
static const struct type types[]
Definition: type.c:22
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
Definition: ncbimisc.hpp:1508
string
Definition: cgiapp.hpp:687
#define NULL
Definition: ncbistd.hpp:225
void Render(CGlPane *pAreaPane, CGlPane *pPane, CRegularGridGen *pGenerator) const
void EnableOneBased(bool en_x, bool en_y)
plus/minus one base to align grid to ruler bars.
void SetIntegerMode(bool IntegerX, bool IntegerY)
CRegularGridGen inline methods.
void EnableIntegerCentering(bool b_en)
void SetModelLimitsRect(const TModelRect &R)
Definition: glpane.hpp:342
T X() const
Definition: glpoint.hpp:59
T Height() const
Definition: glrect.hpp:90
void SetViewport(const TVPRect &R)
Definition: glpane.cpp:96
void Init()
Definition: glrect.hpp:62
CGlPoint< TVPUnit > TVPPoint
Definition: gltypes.hpp:50
T Top() const
Definition: glrect.hpp:84
CGlRect & CombineWith(const CGlRect &r)
Definition: glrect.hpp:223
T Bottom() const
Definition: glrect.hpp:82
T Width() const
Definition: glrect.hpp:86
T Right() const
Definition: glrect.hpp:83
TVPRect & GetViewport(void)
Definition: glpane.hpp:332
CGlRect< TVPUnit > TVPRect
Definition: gltypes.hpp:53
TModelRect & GetModelLimitsRect(void)
Definition: glpane.hpp:347
T Left() const
Definition: glrect.hpp:81
T Y() const
Definition: glpoint.hpp:60
bool PtInRect(T x, T y) const
Definition: glrect.hpp:154
int TVPUnit
Definition: gltypes.hpp:47
void SetVert(T bottom, T top)
Definition: glrect.hpp:123
void SetVisibleRect(const TModelRect &R)
Definition: glpane.cpp:113
TModelRect & GetVisibleRect(void)
Definition: glpane.hpp:357
CGlRect< TModelUnit > TModelRect
Definition: gltypes.hpp:54
void SetHorz(T left, T right)
Definition: glrect.hpp:117
void EnableOffset(bool b_en=true)
Offset is used as a workaround for OpenGL precision problems emerging when size of visible range is s...
Definition: glpane.hpp:405
@ fFontRotateBase
Rotate around lower-left corner of unrotated text box.
@ eAlwaysUpdate
Definition: glpane.hpp:85
float GetBlue(void) const
Definition: rgba_color.hpp:333
float GetGreen(void) const
Definition: rgba_color.hpp:327
float GetAlpha(void) const
Definition: rgba_color.hpp:339
float GetRed(void) const
Get specific channels in floating point values.
Definition: rgba_color.hpp:321
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
USING_SCOPE(objects)
static const size_t kMaxRulerLabel
static const char * kSeqGraph
n background color
yy_size_t n
T max(T x_, T y_)
T min(T x_, T y_)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Definition: type.c:6
#define _ASSERT
Modified on Sun Apr 14 05:26:52 2024 by modify_doxy.py rev. 669887