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

Go to the SVN repository for this file.

1 /* $Id: alnmulti_pane.cpp 47485 2023-05-02 14:46:59Z ucko $
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 #include <corelib/ncbistl.hpp>
34 #include <corelib/ncbitime.hpp>
35 
36 #include <objmgr/scope.hpp>
37 
41 
43 
45 
46 #include <gui/opengl/glutils.hpp>
47 #include <gui/opengl/glhelpers.hpp>
48 #include <gui/opengl/irender.hpp>
49 
51 
52 #include <gui/utils/command.hpp>
53 
54 #include <algorithm>
55 #include <sstream>
56 
58 
59 
60 BEGIN_EVENT_TABLE(CAlnMultiPane, CGlWidgetPane)
61  EVT_SIZE(CAlnMultiPane::OnSize)
62 
63  EVT_LEFT_DOWN(CAlnMultiPane::OnLeftDown)
64  EVT_LEFT_UP(CAlnMultiPane::OnLeftUp)
65  EVT_MOTION(CAlnMultiPane::OnMotion)
66  EVT_LEFT_DCLICK(CAlnMultiPane::OnLeftDoubleClick)
67  EVT_MOUSEWHEEL(CAlnMultiPane::OnMouseWheel)
68 
69  EVT_KEY_DOWN(CAlnMultiPane::OnKeyDown)
71 
72 
73 
74 CAlnMultiPane::CAlnMultiPane(wxWindow* parent, wxWindowID id, const wxPoint& pos,
75  const wxSize& size, long style)
76 : CGlWidgetPane(parent, id, pos, size, style),
77  m_Parent(NULL),
78  m_Context(NULL),
79  m_Model(NULL),
80  m_Renderer(TVPRect(0, 0, size.x, size.y))
81 {
82  // TODO
83  //m_Tooltip.EnableActiveMode(this);
84  //m_Tooltip.SetMode(CTooltip::eHideOnMove);
85 
86  m_HandlerPane.EnableOffset();
87 
88  m_Renderer.SetBackColor(CRgbaColor(0.95f, 1.0f, 0.95f));
89 
90  //setup Event Handlers
91  m_SelHandler.SetHost(this);
92  x_RegisterHandler(&m_SelHandler, fAlignArea|fRulerArea, &m_HandlerPane);
93 
94  m_MouseZoomHandler.SetMode(CMouseZoomHandler::eHorz);
95  m_MouseZoomHandler.SetHost(this);
96  m_MouseZoomHandler.SetPanOnMouseDown(true);
97  x_RegisterHandler(&m_MouseZoomHandler, fAlignArea|fRulerArea, &m_HandlerPane);
98 
99  m_MarkHandler.SetHost(this);
100  x_RegisterHandler(&m_MarkHandler, fAlignArea, &m_HandlerPane);
101 
102  m_HeaderHandler.SetHost(this);
103  x_RegisterHandler(&m_HeaderHandler, fHeaderArea, &m_HandlerPane);
104 
105  //m_TooltipHandler.SetHost(this);
106  //m_TooltipHandler.SetMode(CTooltipHandler::eHideOnMove);
107  //x_RegisterHandler(&m_TooltipHandler, fAllAreas, &m_HandlerPane);
108 
109  m_TooltipManager.SetHost(static_cast<IStickyTooltipHandlerHost*>(this));
110  x_RegisterHandler( dynamic_cast<IGlEventHandler*>(&m_TooltipManager), fAllAreas, &m_HandlerPane);
111 
112 
113  m_ProgressPanel.SetVisible(true);
114 }
115 
116 
118 {
119 }
120 
121 
123 {
124  return TVPPoint();//TODO
125 }
126 
127 void CAlnMultiPane::Init(objects::CScope* scope)
128 {
130 }
131 
132 
134 {
135  if (m_Parent) { // disconnect old parent
136  RemoveListener(dynamic_cast<CEventHandler*>(m_Parent));
137  }
138 
139  m_Parent = parent;
140 
141  if(m_Parent) {
143  }
144 }
145 
146 
148 {
149  m_Context = context;
151 
152  if(m_Context) {
154  }
155 }
156 
157 
159 {
161 }
162 
164 {
166 }
167 
169 {
170  return m_Renderer.GetRuler();
171 }
172 
173 
175 {
176  return m_Renderer;
177 }
178 
179 
180 void CAlnMultiPane::OnSize(wxSizeEvent& event)
181 {
182  CGlWidgetPane::OnSize(event);
183 
184  wxSize sz = GetClientSize();
185  m_Renderer.Resize(TVPRect(0, 0, sz.x - 1, sz.y - 1));
186 
187  if(x_GetParent()) {
189  }
190 
191  event.Skip();
192 }
193 
194 
195 void CAlnMultiPane::OnLeftDown(wxMouseEvent& event)
196 {
197  event.Skip();
198  // rows can handle event in Icons column
199  wxPoint ms_pos = event.GetPosition();
200  int area = x_GetAreaByWindowPos(ms_pos);
201  if (area == fIconsArea || area == fAlignArea) {
202  x_OnRowMouseEvent(event);
203  if (!event.GetSkipped())
204  return;
205  }
207 
208  if(event.GetSkipped()) {
209  event.Skip(false);
210  if (x_IsMasterLineByWindowY(ms_pos.y)) {
211  TSelListModel* model = SLC_GetModel();
212  if (model) {
214 
215  switch(state) {
218  break;
220  m_ProcessMouseUp = true;
221  break;
222  default:
223  break;
224  }
225 
226  //Refresh();
227  //NotifyParent(eSelRowChanged);
228  }
229  }
230  else
231  x_OnLeftDown(event);
232  }
233 }
234 
235 
236 void CAlnMultiPane::OnLeftUp(wxMouseEvent& event)
237 {
238  event.Skip();
239  wxPoint ms_pos = event.GetPosition();
240  int area = x_GetAreaByWindowPos(ms_pos);
241  if (area == fIconsArea || area == fAlignArea) {
242  x_OnRowMouseEvent(event);
243  if (!event.GetSkipped())
244  return;
245  }
246 
248 
249  if(event.GetSkipped()) {
250  event.Skip(false);
251 
252  // let CSelListController handle remaining events
253  wxPoint ms_pos = event.GetPosition();
254  if (x_IsMasterLineByWindowY(ms_pos.y)) {
255  TSelListModel* model = SLC_GetModel();
256  if(model && m_ProcessMouseUp) {
260  else if(state == CGUIEvent::eSelectState)
262 
263  Refresh();
265  }
266  }
267  else
268  x_OnLeftUp(event);
269  }
270 }
271 
272 
273 void CAlnMultiPane::OnMotion(wxMouseEvent& event)
274 {
275 
276  event.Skip();
277  wxPoint ms_pos = event.GetPosition();
278  int area = x_GetAreaByWindowPos(ms_pos);
279  if (area == fIconsArea || area == fAlignArea) {
280  x_OnRowMouseEvent(event);
281  if (!event.GetSkipped())
282  return;
283  }
284 
286  if(event.GetSkipped()) {
287  event.Skip(false);
288  x_OnMotion(event);
289  }
290 }
291 
292 void CAlnMultiPane::OnLeftDoubleClick(wxMouseEvent& event)
293 {
294  event.Skip();
295  wxPoint ms_pos = event.GetPosition();
296  int area = x_GetAreaByWindowPos(ms_pos);
297  if (fAlignArea)
298  x_OnRowMouseEvent(event);
299 }
300 
301 
302 void CAlnMultiPane::OnMouseWheel(wxMouseEvent& event)
303 {
305 
306  if(event.GetSkipped()) {
307  // let CSelListController handle remaining events
308  event.Skip(false);
309  int d_y = event.GetWheelRotation();
310  if (SLC_GetModel()->SLM_GetItemsCount() > 0) {
311  // GetLineHeight increases if the row is expanded which I don't
312  // think we want, so just use a standard (pixel) height for an average row
313  // times # of scroll clicks (each click is 120)
314  //int h = MHH_GetLineHeight(0);
315  //d_y = (d_y / h) * h;
316  int h = 15;
317  d_y = h*(d_y/120);
318  }
319  x_GetParent()->Scroll(0, (TModelUnit) -d_y);
320  }
321 }
322 
323 
324 void CAlnMultiPane::OnKeyDown(wxKeyEvent& event)
325 {
326  if (HasCapture())
327  return;
329 
330  if(event.GetSkipped()) {
331  // let CSelListController handle remaining events
332  event.Skip(false);
333  x_OnKeyDown(event);
334  }
335 }
336 
337 
338 void CAlnMultiPane::x_OnRowMouseEvent(wxMouseEvent& event)
339 {
340  auto is_being_handled =
341  (wxGetKeyState(wxKeyCode('Z')) || wxGetKeyState(wxKeyCode('R')) || wxGetKeyState(wxKeyCode('P')));
342  is_being_handled = is_being_handled
344  && dynamic_cast<CMouseZoomHandler*>(m_pCurrHandlerRec->m_pHandler) != 0;
345  if (is_being_handled)
346  return;
348  event.Skip();
349  return;
350  }
351 
352  wxPoint pos = event.GetPosition();
353  IAlignRow* p_row = 0;
354  bool is_master = x_IsMasterLineByWindowY(pos.y);
355  if (is_master) {
356  p_row = x_GetContext()->GetMasterRow();
357  }
358  else {
359  int i_line = x_GetLineByWindowY(pos.y);
360  if(i_line >= 0) {
361  p_row = x_GetContext()->GetRowByLine(i_line);
362  int row_top = m_Renderer.GetVPListTop() - x_GetContext()->GetLinePosY(i_line);
363 
364  const CGlPane& VP = x_GetContext()->GetAlignPort();
365  }
366  else {
367  event.Skip();
368  return;
369  }
370  }
371 
372  _ASSERT(p_row);
373  // grab focus so that track settings changes will be saved on KillFocus event
374  if (event.GetEventType() == wxEVT_LEFT_DOWN)
375  SetFocus();
376 
377  int i_col = m_Renderer.GetColumnIndexByX(pos.x);
379  (int) m_Renderer.GetColumn(i_col).m_UserData;
380 
381  CGlPane pane(x_GetContext()->GetAlignPort()); // (CGlPane::eNeverUpdate);
382  pane.EnableOffset();
383  if (is_master) {
385  // pane.SetViewport(m_Renderer.GetMasterArea());
386  }
387 
388  m_Renderer.SetupPaneForColumn(pane, i_col);
389 
390  p_row->OnMouseEvent(event, type, pane);
391 }
392 
393 
394 /// Functor to retrieve tooltip (used for async execution)
395 ///
397 {
398  string operator()(CAlnMultiRenderer& renderer)
399  {
400  return renderer.GetTooltip();
401  }
402 };
403 
404 static int TTHH_id = 0;
405 
406 string CAlnMultiPane::TTHH_NeedTooltip(const wxPoint& point)
407 {
408  TVPPoint pt = x_GetVPPosByWindowPos( point.x, point.y );
409 
410  return m_Renderer.NeedTooltip(pt.X(), pt.Y()) ? NStr::IntToString( ++TTHH_id ) : "";
411 }
412 
414 {
416 
417  info.SetTipID("");
418  info.SetTipText("");
419  info.SetTitleText("");
420 
421  try {
422  //CGetTooltip_local func;
423  //tt =
424  // GUI_AsyncExec1<string, CAlnMultiRenderer&,
425  // CGetTooltip_local>(func, m_Renderer);
426  string tt = m_Renderer.GetTooltip();
427  if (!tt.empty()) {
428  info.SetTipText( tt );
429  info.SetTipID( NStr::IntToString( TTHH_id ) );
430  }
431  } catch (const CException& e) {
432  // Failed to show the tooltip, log it
433  ERR_POST("CAlnMultiPane::TTHH_GetTooltip() " << e.GetMsg());
434  }
435  catch (const exception& e) {
436  LOG_POST(Error << "CAlnMultiPane::TTHH_GetTooltip() " << e.what());
437  }
438  return info;
439 }
440 
441 bool CAlnMultiPane::TTHH_ProcessURL(const wxString & href)
442 {
443  objects::CScope *scope = m_SelectionVisitor.GetScope();
444  if (nullptr == scope)
445  return false;
446  CURLTooltipHandler url_handler(*scope, *this);
447  return url_handler.ProcessURL(href.ToStdString());
448 }
449 
451 {
452  CAlnMultiWidget *parent = dynamic_cast<CAlnMultiWidget*>(m_Parent);
453  _ASSERT(parent);
454  return parent->GetPort().GetViewport();
455 }
456 
457 
458 void CAlnMultiPane::RenderVectorGraphics(int vp_width, int vp_height)
459 {
460  if (!x_GetParent())
461  return;
462 
463  IRender& gl = GetGl();
464 
465  // main rendering...
466  string error;
467  try {
468  m_Renderer.SetFocused(false);
470  bool icons_visible = m_Renderer.IsColumnVisible(icons_index);
471  if (icons_visible)
472  m_Renderer.SetColumnVisible(icons_index, false);
473  m_Renderer.Render();
474 
475  if (m_Title) {
476 
477  CAlnMultiWidget* widget = dynamic_cast<CAlnMultiWidget*>(m_Parent);
478  _ASSERT(widget);
479  CGlTextureFont font = widget->GetModel()->GetDisplayStyle()->m_TextFont;
480  font.SetFontSize(12);
481  float title_height = font.TextHeight() - font.GetFontDescender();
482  float vert_offset = title_height + 12.f;
483 
484  std::stringstream strm;
485  strm << "NCBI Genome Workbench, Version ";
487  string title = strm.str();
488 
489  gl.Viewport(0, vp_height - vert_offset, vp_width, vert_offset);
490  gl.MatrixMode(GL_PROJECTION);
491  gl.LoadIdentity();
492  gl.Ortho(0, vp_width, 0, vert_offset, -1.0, 1.0);
493  gl.MatrixMode(GL_MODELVIEW);
494  gl.LoadIdentity();
495  gl.Color3f(0.f, 0.f, 0.f);
496  gl.BeginText(&font);
497  TModelUnit yoffset = -font.GetFontDescender();
498  gl.WriteText(0.0f, yoffset, float(vp_width), float(vert_offset - yoffset), title.c_str(), IGlFont::eAlign_Left | IGlFont::eAlign_VCenter);
499  gl.EndText();
500  }
501 
502  if (icons_visible)
503  m_Renderer.SetColumnVisible(icons_index, true);
504  }
505  catch (CException& e) {
506  error = e.GetMsg();
507  }
508  catch (std::exception& e) {
509  error = e.what();
510  }
511  if (!error.empty()) {
512  ERR_POST("CAlnMultiPane::Render() " << error);
513  }
514 }
515 
516 
518 {
519  // No specific layout
520 }
521 
523 {
524  string error;
525  try {
526  m_Renderer.SetFocused(FindFocus() == this);
527  m_Renderer.Render();
528 
530  x_RenderMark();
534 
535  } catch(CException& e) {
536  error = e.GetMsg();
537  } catch(std::exception& e) {
538  error = e.what();
539  }
540  if( ! error.empty()) {
541  ERR_POST("CAlnMultiPane::Render() " << error);
542  }
543 }
544 
545 
547 {
548  m_Renderer.Update();
550 
551  if(x_GetParent())
553 }
554 
555 
557 {
560 
561  if(x_GetParent())
563 }
564 
565 
567 {
569 }
570 
571 
573 {
574  return m_SelHandler.GetSelection();
575 }
576 
577 
578 void CAlnMultiPane::SetSelection(const TRangeColl& C, bool redraw)
579 {
580  m_SelHandler.SetSelection(C, redraw);
581 }
582 
583 
585 {
587 }
588 
589 
591 {
593 }
594 
595 
597 {
599 }
600 
601 
603 {
604  return m_MarkHandler.GetMarks();
605 }
606 
607 
609 {
610  return GetListAreaHeight();
611 }
612 
613 
615 {
617  return m_Renderer.GetColumn(iAlign).m_Width;
618 }
619 
620 
621 ////////////////////////////////////////////////////////////////////////////////
622 /// protected members
623 
625 {
626  IRender& gl = GetGl();
627 
628  if(x_GetParent()) {
629  const CGlPane& VP = x_GetContext()->GetAlignPort();
630  if(! VP.GetVisibleRect().IsEmpty())
631  {
633  if(rc_vp.Width() > 0) {
635  m_HandlerPane.SetViewport(rc_vp);
636 
637  TModelRect rcM = VP.GetModelLimitsRect();
638  rcM.SetVert(0, 1);
640 
641  TModelRect rcV = VP.GetVisibleRect();
642  rcV.SetVert(0, 1);
644 
645  //CGlAttrGuard guard(GL_ENABLE_BIT);
646  gl.Enable(GL_BLEND);
647  gl.BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
648 
650  }
651  }
652  }
653 }
654 
655 
657 {
658  if(x_GetParent()) {
659  const CGlPane& VP = x_GetContext()->GetAlignPort();
660 
661  IRender& gl = GetGl();
662 
664  if(rc_vp.Width() > 0) {
665  rc_vp.SetTop(m_Renderer.GetVPListTop());
666  m_HandlerPane.SetViewport(rc_vp);
667 
668  TModelRect rcM = VP.GetModelLimitsRect();
670 
671  TModelRect rcV = VP.GetVisibleRect();
672  rcV.SetBottom(rcV.Top() + rc_vp.Height());
674 
675  //CGlAttrGuard guard(GL_ENABLE_BIT);
676  gl.Enable(GL_BLEND);
677  gl.BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
678 
680 
681  gl.Disable(GL_BLEND);
682  }
683  }
684 }
685 
686 
688 {
689  if(x_GetParent()) {
691  if(rc_vp.Width() > 0) {
692  IRender& gl = GetGl();
693  m_HandlerPane.SetViewport(rc_vp);
694 
695  //CGlAttrGuard guard(GL_ENABLE_BIT);
696  gl.Enable(GL_BLEND);
697  gl.BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
698 
700 
701  gl.Disable(GL_BLEND);
702  }
703  }
704 }
705 
706 
708 {
709  if(m_HeaderHandler.IsActive()) {
712 
713  m_HeaderHandler.Render(pane);
714  }
715 }
716 
717 
719 {
720  if(m_ProgressPanel.IsVisible()) {
722 
723  static int offset = 4;
724 
725  TVPRect rc(m_Renderer.GetRect());
726  rc.Inflate(-offset, -offset);
727 
729 
730  rc.SetTop(rc.Bottom() + min_sz.Y() - 1);
731  pane.SetViewport(rc);
732 
734  m_ProgressPanel.Render(pane);
735  }
736 }
737 
738 
740 {
741  int vp_x = x;
742  int vp_y = GetClientSize().y - 1 - y;
743  return TVPPoint(vp_x, vp_y);
744 }
745 
746 
748 {
749  int vpY = WinY - m_Renderer.GetListTop();
750  int offset_y = (int) x_GetContext()->GetAlignPort().GetVisibleRect().Top();
751  return x_GetContext()->GetLineByModelY(vpY + offset_y);
752 }
753 
755 {
756  if (x_GetContext()->GetMasterRow() == 0)
757  return false;
758 
759  int vp_y = GetClientSize().y - 1 - WinY;
761  return vp_y >= rc.Bottom() && vp_y <= rc.Top();
762 }
763 
765 {
766  int top = 0, H = 0;
767  if(x_GetParent() && index >= 0) {
768  int offset_y = (int) x_GetContext()->GetAlignPort().GetVisibleRect().Top();
769  top = x_GetContext()->GetLinePosY(index) - offset_y;
770  H = x_GetContext()->GetLineHeight(index);
771  }
772  int w = GetClientSize().x;
773  return TVPRect(0, top + H -1, w - 1, top);
774 }
775 
776 
777 ////////////////////////////////////////////////////////////////////////////////
778 // ISelListView implementation
780 {
781  m_Model = pModel;
782 }
783 
784 
786 {
787  bool redraw = false;
788 
789  wxSize sz = GetClientSize();
790  TVPRect rcVisible(0, sz.y - 1, sz.x - 1, 0);
791 
792  for( size_t j = 0; j < v_indexes.size() && ! redraw; j++ ) {
793  int index = v_indexes[j];
794  TVPRect rcItem = x_GetLineRect(index);
795  redraw = rcItem.Intersects(rcVisible);
796  }
797  if(redraw) {
798  Refresh();
799  }
800 
802 }
803 
804 
805 void CAlnMultiPane::SLV_UpdateRange(int iFirstItem, int iLastItem)
806 {
807  if(iLastItem >= iFirstItem) {
808  TVPRect rc_first = x_GetLineRect(iFirstItem);
809  TVPRect rc_last = x_GetLineRect(iLastItem);
810  rc_first.CombineWith(rc_last);
811  wxSize sz = GetClientSize();
812  TVPRect rc_visible(0, sz.y - 1, sz.x - 1, 0);
813 
814  if(rc_first.Intersects(rc_visible)) {
815  Refresh();
816  }
817  } else {
818  Refresh();
819  }
820 
822 }
823 
824 
826 {
830 }
831 
832 
833 ////////////////////////////////////////////////////////////////////////////////
834 /// CSelListController extension
836 {
837  //NOP
838 }
839 
840 
842 {
843  return this;
844 }
845 
846 
848 {
849  return x_GetModel();
850 }
851 
852 
854 {
855  return GetClientSize().y;
856 }
857 
858 
859 int CAlnMultiPane::SLC_GetLineByWindowY(int WinY, bool b_clip)
860 {
862  if(! b_clip || WinY >= h) {
863  return x_GetLineByWindowY(WinY);
864  } else return -1;
865 }
866 
867 
869 {
870  if(x_GetParent() && index >= 0) {
872  int top = x_GetContext()->GetLinePosY(index);
873  if (top < r.Top()) {
874  x_GetParent()->Scroll(0, top - r.Top());
875  } else {
876  int last_row_top = (int)r.Bottom() - x_GetContext()->GetLineHeight(index);
877  if (top > last_row_top)
878  x_GetParent()->Scroll(0, top - last_row_top);
879  }
880  }
881 
882 }
883 
884 
885 ////////////////////////////////////////////////////////////////////////////////
886 /// ISelHandlerHost implementation
888 {
889  Refresh();
890 
891  //broadcast selection
893 }
894 
895 
897 {
898  // Update pane first
899  const CGlPane& VP = x_GetContext()->GetAlignPort();
900  if (!VP.GetVisibleRect().IsEmpty()) {
902  if (rc_vp.Width() > 0) {
905 
906  m_HandlerPane.SetViewport(rc_vp);
907  TModelRect rcM = VP.GetModelLimitsRect();
909 
910  TModelRect rcV = VP.GetVisibleRect();
911  rcV.SetBottom(rcV.Top() + rc_vp.Height());
913 
916  }
917  }
918 
919  switch(orient) {
920  case eHorz:
921  return m_HandlerPane.UnProjectX(z);
922  case eVert:
923  return m_HandlerPane.UnProjectY(GetClientSize().y - z);
924  default:
925  _ASSERT(false);
926  return -1;
927  }
928 }
929 
930 
932 {
933  switch(orient) {
934  case eHorz:
935  return m_HandlerPane.ProjectX(z);
936  case eVert:
937  return GetClientSize().y - m_HandlerPane.ProjectY(z);
938  default:
939  _ASSERT(false);
940  return -1;
941  }
942 }
943 
944 
945 ////////////////////////////////////////////////////////////////////////////////
946 /// IAlnMarkHandlerHost implementation
948 {
949  return x_GetParent()->GetDataSource();
950 }
951 
952 
954 {
955  return x_GetModel();
956 }
957 
958 
960 {
961  return x_GetParent()->GetRowNumByLine(Index);
962 }
963 
964 
966 {
967  return x_GetParent()->GetLineByRowNum(Row);
968 }
969 
970 
972 {
973  return x_GetLineByWindowY(Y);
974 }
975 
976 
977 int CAlnMultiPane::MHH_GetLinePosY(int Index) const
978 {
979  return x_GetContext()->GetLinePosY(Index);
980 }
981 
982 
984 {
985  return x_GetContext()->GetLineHeight(Index);
986 }
987 
988 
989 ///### refactor ??
991 {
992  return m_HandlerPane.UnProjectX(X);
993 }
994 
995 
997 {
998  const CGlPane& port = x_GetContext()->GetAlignPort();
999 
1000  switch(type) {
1001  case eCurrent: return port.GetScaleX();
1002  case eMin: return port.GetMinScaleX();
1003  case eMax: return port.GetZoomAllScaleX();
1004  default: _ASSERT(false); return -1;
1005  }
1006 }
1007 
1008 
1010 {
1011  x_GetParent()->SetScaleX(scale, point);
1012 }
1013 
1014 
1016 {
1017  x_GetParent()->ZoomRect(rc);
1018 }
1019 
1020 
1022 {
1023  x_GetParent()->ZoomPoint(point, factor);
1024 }
1025 
1026 
1028 {
1029  x_GetParent()->Scroll(d_x, d_y);
1030 }
1031 
1032 
1034 {
1035  Refresh();
1036 }
1037 
1038 
1040 {
1041  return GetClientSize().y - 1 - y;
1042 }
1043 
1044 
1046 {
1047  x_GetParent()->OnRowChanged(p_row);
1048 }
1049 
1050 
1052 {
1053  return x_GetVPPosByWindowPos(pos.x, pos.y);
1054 }
1055 
1057 {
1059 }
1060 
1062 {
1063  return &m_SelectionVisitor;
1064 }
1065 
1067 {
1068  if (x_GetContext()->GetMasterRow() == p_row) {
1069  const TVPRect& rc = m_Renderer.GetMasterArea();
1070  return rc.Top();
1071  }
1072  int index = x_GetContext()->GetLineByRowNum(p_row->GetRowNum());
1073  if (index < 0)
1074  return index;
1076  return y - x_GetContext()->GetLinePosY(index);
1077 }
1078 
1079 
1080 ///////////////////////////////////////////////////////////////////////////////
1081 /// IAMHeaderHandlerHost implementation
1083 {
1084  return &m_Renderer;
1085 }
1086 
1087 
1089 {
1090  return m_Renderer.GetHeader().GetVPRect();
1091 }
1092 
1093 
1095 {
1096  return x_GetVPPosByWindowPos(pos.x, pos.y);
1097 }
1098 
1099 
1100 void CAlnMultiPane::HHH_SetColumns(const TColumns& columns, int resizable_index)
1101 {
1102  m_Renderer.SetColumns(columns, resizable_index);
1103  Update();
1104  Refresh();
1105 
1107 }
1108 
1109 
1111 {
1112  SortByColumn(index);
1113 }
1114 
1116 {
1117  return x_GetVPPosByWindowPos(pos.x, pos.y);
1118 }
1119 
1121 {
1123  TColumn& column = m_Renderer.GetColumn(index);
1124 
1125  bool ok = false;
1126 
1127  switch(column.m_SortState) {
1129  ok = x_GetContext()->SortByColumn(type, true);
1130  break;
1132  ok = x_GetContext()->SortByColumn(type, false);
1133  break;
1136  break;
1137  default:
1138  break;
1139  }
1140 
1141  if(ok) { // update column state
1143  }
1144 }
1145 
1146 
1148 {
1149  int n = m_Renderer.GetColumnsCount();
1150  for( int j = 0; j < n; j++ ) {
1151  TColumn& col = m_Renderer.GetColumn(j);
1153  col.m_SortState = state;
1154  }
1155 }
1156 
1157 
1159 {
1161 }
1162 
1163 
1165 {
1166  int vp_y = GetClientSize().y - pos.y;
1167  return x_GetAreaByVPPos(pos.x, vp_y);
1168 }
1169 
1170 
1171 int CAlnMultiPane::x_GetAreaByVPPos(int vp_x, int vp_y)
1172 {
1173  int list_h = m_Renderer.GetListAreaHeight();
1174  int ruler_h = m_Renderer.GetRulerAreaHeight();
1175  int master_h = m_Renderer.GetMasterAreaHeight();
1176 
1177  if(vp_y < list_h + master_h + ruler_h) {
1179 
1180  switch(type) {
1181  case IAlignRow::eDescr:
1182  return fDescrArea;
1183  case IAlignRow::eIcons:
1186  return fIconsArea;
1187  case IAlignRow::eAlignment:
1188  if (vp_y >list_h + master_h)
1189  return fRulerArea;
1190  else
1191  return fAlignArea;
1192  default:
1193  return fOtherAreas;
1194  }
1195  } else if(vp_y < list_h + master_h + ruler_h) {
1196  return fOtherAreas;
1197  } else {
1198  return fHeaderArea;
1199  }
1200 }
1201 
1202 
1203 void CAlnMultiPane::ShowProgressPanel(float progress, const string& msg)
1204 {
1206  m_ProgressPanel.Update(progress, msg);
1207  Refresh();
1208 }
1209 
1210 
1212 {
1213  m_ProgressPanel.SetVisible(false);
1214  Refresh();
1215 }
1216 
1218 {
1220 }
1221 
1223 {
1225 }
1226 
1227 
static int TTHH_id
void UnMarkAll(TNumrow row)
void MarkSelectedRows(const TRangeColl &C, bool set)
void Render(CGlPane &Pane)
const TRowToMarkMap & GetMarks() const
virtual void Render(CGlPane &pane)
virtual void RenderColumnHeader(int index, const TVPRect &rc)
virtual CWidgetDisplayStyle * GetDisplayStyle()
@ kMasterRowIndex
dummy master row index used in selection logic
class CAlnMultiPane
void OnLeftDown(wxMouseEvent &event)
virtual void SLV_UpdateRange(int iFirstItem, int iLastItem) override
virtual void ARH_OnSelectionChanged() override
notifies a host about selection change
virtual void MZHH_ZoomRect(const TModelRect &rc) override
virtual void x_OnRowMouseEvent(wxMouseEvent &event)
TSelListModel * m_Model
virtual int SLC_GetHeight() override
void UpdateHeaderSortState()
virtual wxEvtHandler * GetEvtHandler() override
IAlnMultiRendererContext * x_GetContext()
IAlnMultiRendererContext * m_Context
void SetMasterBackColor(const CRgbaColor &color)
virtual TModelUnit SHH_GetModelByWindow(int z, EOrientation orient) override
virtual TVPPoint GCH_GetVPPosByWindowPos(const wxPoint &pos)
virtual void x_Render() override
bool HasSelectedObjects() const
void SetContext(IAlnMultiRendererContext *p_context)
CLinearSelHandler m_SelHandler
virtual TVPPoint GetPortSize(void) override
returns size of the master pane in screen coordinates
void HideProgressPanel()
void OnLeftUp(wxMouseEvent &event)
virtual void SetPane(CGlPane *pane) override
CSelListController extension.
CAlnMultiHeaderHandler m_HeaderHandler
const TRowToMarkMap & GetMarks() const
void NotifyParent(EEventType type)
virtual TVPPoint HHH_GetVPPosByWindowPos(const wxPoint &pos) override
returns bounds of the Header
virtual const TVPRect & GetViewportRect() const override
virtual void MZHH_Scroll(TModelUnit d_x, TModelUnit d_y) override
virtual void x_RenderMark()
void ResetSelection(bool redraw)
CProgressPanel m_ProgressPanel
int x_GetAreaByWindowPos(const wxPoint &pos) override
virtual void SLV_SetModel(TSelListModel *pModel) override
virtual int MHH_GetLineByWindowY(int Y) const override
virtual int ARH_GetRowTop(IAlignRow *p_row) override
Returns Y-pos for row.
CAlignMarkHandler m_MarkHandler
CAlnMultiRenderer & GetRenderer()
virtual const TSelListModel * MHH_GetSelListModel() const override
void SetBackColor(const CRgbaColor &color)
virtual void HHH_SortByColumn(int index) override
CRuler & GetRuler()
virtual int SLC_GetLineByWindowY(int WinY, bool b_clip=false) override
virtual TModelUnit MHH_GetSeqPosByX(int X) const override
### refactor ??
void OnSize(wxSizeEvent &event)
virtual void Update() override
CSelectionVisitor m_SelectionVisitor
virtual TModelUnit MZHH_GetScale(EScaleType type) override
virtual void MZHH_EndOp() override
void OnLeftDoubleClick(wxMouseEvent &event)
TSelListModel * x_GetModel()
virtual TNumrow MHH_GetRowByLine(int Index) const override
int GetListAreaHeight() const
@)
const TRangeColl & GetSelection() const
bool x_IsMasterLineByWindowY(int WinY)
int GetAlignVPWidth() const
int x_GetLineByWindowY(int WinY) const
virtual void UpdateOnDataChanged()
virtual void RenderVectorGraphics(int vp_width, int vp_height) override
Render for vector output.
void Init(objects::CScope *scope)
void ShowProgressPanel(float progress, const string &msg)
virtual void HHH_SetColumns(const TColumns &columns, int resizable_index) override
change order of columns, their width and posisitions
virtual CTooltipInfo TTHH_GetTooltip(const wxRect &rect) override
Return the contents to be displayed in the tool tip.
void OnMouseWheel(wxMouseEvent &event)
CAlnMultiRenderer m_Renderer
virtual int x_GetAreaByVPPos(TVPUnit vp_x, TVPUnit vp_y) override
virtual void x_RenderSelection()
protected members
void SetSelection(const TRangeColl &C, bool redraw)
virtual int MHH_GetLinePosY(int Index) const override
virtual IAlnMultiHeaderContext * HHH_GetContext() override
IAMHeaderHandlerHost implementation.
IAlnMultiPaneParent * m_Parent
TVPRect x_GetLineRect(int Index) const
virtual void x_RenderProgressPanel()
virtual int MHH_GetLineHeight(int Index) const override
virtual void UpdateVectorLayout() override
void MarkSelectedRows(const TRangeColl &C, bool bMark)
IAlignRow::TColumnType TColumnType
virtual void x_RenderZoomHandler()
void OnMotion(wxMouseEvent &event)
virtual void SLV_UpdateItems(const TIndexVector &vIndices) override
void SetWidget(IAlnMultiPaneParent *p_arent)
bool m_Title
When rendering vector image, add a title.
void OnKeyDown(wxKeyEvent &event)
virtual CSelectionVisitor * ARH_GetSelectionVisitor() override
notifies a host about selection change
virtual TVPPoint ARH_GetVPPosByWindowPos(const wxPoint &pos) override
provides mouse coords in OpenGL viewport coord system
CRange< TSeqPos > GetSelectionLimits()
virtual TVPRect HHH_GetHeaderRect() override
virtual void SHH_OnChanged() override
ISelHandlerHost implementation.
IAlnMultiPaneParent * x_GetParent()
virtual TSelListModel * SLC_GetModel() override
virtual const IAlnMultiDataSource * MHH_GetAlnDS() const override
IAlnMarkHandlerHost implementation.
virtual void x_RenderHeaderHandler()
virtual void HHH_RenderColumnHeader(int index, const TVPRect &rc) override
virtual void MZHH_SetScale(TModelUnit scale, const TModelPoint &point) override
virtual bool TTHH_ProcessURL(const wxString &href) override
Return true if the specified URL has been processed. Used for custom commands.
virtual void MZHH_ZoomPoint(const TModelPoint &point, TModelUnit factor) override
virtual TVPUnit MZHH_GetVPPosByY(int y) const override
converts window coord to Viewport coord
void SortByColumn(int index)
CGlPane m_HandlerPane
virtual int MHH_GetLineByRowNum(TNumrow Row) const override
int GetAlignVPHeight() const
virtual void SLC_VertScrollToMakeVisible(int Index) override
TVPPoint x_GetVPPosByWindowPos(int x, int y)
CMouseZoomHandler m_MouseZoomHandler
void GetObjectSelection(TConstObjects &objs) const
virtual string TTHH_NeedTooltip(const wxPoint &pt) override
Return id of the underlying element to dispaly a tooltip, otherwise "".
virtual void ARH_OnRowChanged(IAlignRow *p_row) override
notifies a host about changes the row
virtual TVPUnit SHH_GetWindowByModel(TModelUnit z, EOrientation orient) override
class CAlnMultiRenderer - renders multiple alignment represented by IAlnMultiRendererContext (the Mod...
CAlnMultiHeader & GetHeader()
virtual void UpdateOnDataChanged()
bool IsColumnVisible(int index) const
virtual void Resize(const TVPRect &rc)
TColumnType GetColumnTypeByX(int vp_x) const
void SetContext(IAlnMultiRendererContext *pContext)
virtual int GetColumnsCount() const
virtual int GetColumnIndexByX(int x) const
virtual bool NeedTooltip(int vp_x, int vp_y)
TVPRect GetMasterArea() const
virtual const SColumn & GetColumn(int index) const
TVPRect GetColumnRectByType(TColumnType type, bool include_header) const
void SetColumns(const vector< SColumn > &columns, int resizable_index)
int GetColumnIndexByType(TColumnType type) const
void SetFocused(bool b_set)
int GetMasterAreaHeight() const
void SetBackColor(const CRgbaColor Color)
virtual string GetTooltip()
void SetColumnVisible(int index, bool b_visible)
virtual void Render()
renders OpenGL graphics
int GetVPListTop() const
return OpenGL viewport coordinate of the top pixel in the list area
int GetListAreaHeight() const
int GetRulerAreaHeight() const
virtual void Update(bool layout_only=false)
void SetMasterBackColor(const CRgbaColor Color)
virtual TVPRect GetRect() const
void SetupPaneForColumn(CGlPane &pane, int i_col) const
TColumnType GetColumnTypeByIndex(int i_col) const
int GetListTop() const
protected members
class CAlnMultiWidget
virtual CGlPane & GetPort()
implement these 2 functions in derived classes
virtual CAlnMultiModel * GetModel()
CEventHandler.
@ eMajor
absolute (in)compatibility
@ eMinor
backward (in)compatibility
@ ePatchLevel
patch level
static EGUIState wxGetSelectState(const wxMouseEvent &event)
Definition: gui_event.cpp:42
@ eSelectIncState
Definition: gui_event.hpp:109
class CGlPane
Definition: glpane.hpp:62
CGlWidgetPane represent a window component residing in CGlWidgetBase client area.
void OnMouseUp(wxMouseEvent &event)
void OnMouseDown(wxMouseEvent &event)
void OnMouseWheel(wxMouseEvent &event)
void OnMotion(wxMouseEvent &event)
void OnKeyEvent(wxKeyEvent &event)
void OnSize(wxSizeEvent &event)
SHandlerRec * m_pCurrHandlerRec
pointer to record for last active handler
void Render(CGlPane &Pane, ERenderingOption option=eActiveState)
void SetSelection(const TRangeColl &C, bool bRedraw)
void ResetSelection(bool bRedraw)
const TRangeColl & GetSelection() const
TSeqRange GetSelectionLimits() const
CMouseZoomHandler provides support for mouse-driven zoom and pan operations.
virtual bool IsScaleMode() const
virtual void Render(CGlPane &Pane)
virtual TVPPoint PreferredSize()
virtual void Render(CGlPane &pane)
virtual void Update(float progress, const string &msg)
virtual void SetVisible(bool set)
Definition: renderable.cpp:88
virtual void SetVPRect(const TVPRect &rc)
Definition: renderable.cpp:58
virtual TVPRect GetVPRect() const
Definition: renderable.cpp:52
virtual bool IsVisible()
Definition: renderable.cpp:82
class CRgbaColor provides a simple abstraction for managing colors.
Definition: rgba_color.hpp:58
CRuler is a renderable object drawing a scale with position labels.
Definition: ruler.hpp:49
virtual void x_OnLeftDown(wxMouseEvent &event)
virtual void x_OnMotion(wxMouseEvent &event)
virtual void x_OnLeftUp(wxMouseEvent &event)
virtual void x_OnKeyDown(wxKeyEvent &event)
class CSelectionVisitor is a concrete glyph visitor for selection traversal and deselection traversal...
objects::CScope * GetScope()
void GetObjectSelection(TConstObjects &objs) const
bool HasSelectedObjects() const
void SetScope(objects::CScope *scope)
Contents of a single tool tip including display text and an ID that will indicate which underlying vi...
bool ProcessURL(const string &href)
CGlTextureFont m_TextFont
IAlnExplorer::TNumrow TNumrow
Interface IAlignRow - abstracts row rendering in Multiple Alignment Widget.
Definition: ialign_row.hpp:67
virtual int GetRowNum() const =0
Returns index of row in IAlnMultiDataSource.
int TColumnType
Definition: ialign_row.hpp:70
virtual void OnMouseEvent(wxMouseEvent &event, TColumnType col_type, CGlPane &pane)=0
EColumnType
Column identifier for use as TColumnType, defines basic column types this set can be extended in deri...
Definition: ialign_row.hpp:74
@ eIconStrand
Icon for Positive/Negative (Mixed?) strand.
Definition: ialign_row.hpp:84
@ eIconExpand
Icon for expand (+) button.
Definition: ialign_row.hpp:85
@ eIcons
Strand + Expand icons.
Definition: ialign_row.hpp:77
IAlnMultiDataSource - interface to a data source representing an abstract multiple alignment.
IAlnMultiHeaderContext.
Interface IAlnMultiPaneParent represents a context in which an instance of CAlnMultiPane lives.
virtual void ZoomPoint(const TModelPoint &point, TModelUnit factor)=0
virtual void OnRowChanged(IAlignRow *p_row)=0
virtual void OnChildResize()=0
virtual const IAlnMultiDataSource * GetDataSource(void) const =0
virtual void SetScaleX(TModelUnit scale_x, const TModelPoint &point)=0
virtual void ZoomRect(const TModelRect &rc)=0
virtual TNumrow GetRowNumByLine(int index) const =0
virtual int GetLineByRowNum(TNumrow row) const =0
virtual void Scroll(TModelUnit d_x, TModelUnit d_y)=0
virtual void OnColumnsChanged()=0
IAlnMultiRendererContext - this interface represents context in which CAlnMultiRenderer lives.
virtual int GetLineByRowNum(TNumrow row) const =0
virtual const CGlPane & GetAlignPort() const =0
virtual bool SortByColumn(TColumnType type, bool ascending)=0
virtual IAlignRow * GetRowByLine(int index)=0
all Y coordinates are OpenGL Viewport coordinates (not widget coords) "index" is a line index (not ro...
virtual int GetLinePosY(int index) const =0
virtual int GetLineHeight(int index) const =0
virtual IAlnExplorer::ESortState GetColumnSortState(TColumnType type)=0
virtual IAlignRow * GetMasterRow()=0
virtual int GetLineByModelY(int y) const =0
IGlEventHandler.
interface ISelListModel
Definition: list_mvc.hpp:45
virtual void SLM_InvertSingleItem(TIndex index)=0
virtual void SLM_SelectSingleItem(TIndex index)=0
TSelListModel::TIndexVector TIndexVector
Definition: list_mvc.hpp:79
IStickyTooltipHandlerHost - Class from which windows that want to support sticky tooltips ultimately ...
GUI command routing and handling framework.
#define C(s)
Definition: common.h:231
#define H(x, y, z)
Definition: md4.c:180
static const char * column
Definition: stats.c:23
int offset
Definition: replacements.h:160
static const column_t columns[]
Definition: utf8_2.c:22
#define NULL
Definition: ncbistd.hpp:225
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:186
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
Definition: ncbiexpt.cpp:342
GLdouble TModelUnit
Definition: gltypes.hpp:48
void SetModelLimitsRect(const TModelRect &R)
Definition: glpane.hpp:342
T X() const
Definition: glpoint.hpp:59
virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)=0
T Height() const
Definition: glrect.hpp:90
void SetViewport(const TVPRect &R)
Definition: glpane.cpp:96
virtual void Enable(GLenum glstate)=0
bool OpenOrtho()
Definition: glpane.hpp:427
CGlPoint< TVPUnit > TVPPoint
Definition: gltypes.hpp:50
void SetBottom(T bottom)
Definition: glrect.hpp:113
T Top() const
Definition: glrect.hpp:84
CGlRect & CombineWith(const CGlRect &r)
Definition: glrect.hpp:223
virtual void BlendFunc(GLenum sfactor, GLenum dfactor)=0
Options to be used when GL_BLEND is enabled.
void Color3f(GLfloat r, GLfloat g, GLfloat b)
Definition: irender.hpp:95
T Bottom() const
Definition: glrect.hpp:82
T Width() const
Definition: glrect.hpp:86
virtual void MatrixMode(GLenum mode)=0
TVPUnit ProjectX(TModelUnit m_x) const
Definition: glpane.cpp:661
bool IsEmpty() const
Definition: glrect.hpp:150
IRender & GetGl()
convenience function for getting current render manager
TVPRect & GetViewport(void)
Definition: glpane.hpp:332
CGlRect< TVPUnit > TVPRect
Definition: gltypes.hpp:53
virtual void BeginText(const CGlTextureFont *font, const CRgbaColor &color)=0
Text is drawn is pixel coordinates.
virtual TModelUnit GetFontDescender() const
virtual void LoadIdentity()=0
TVPUnit ProjectY(TModelUnit m_y) const
Definition: glpane.cpp:676
virtual void EndText()=0
Pops matrices and attributes after writing text.
TModelUnit UnProjectX(TVPUnit m_x) const
Definition: glpane.cpp:706
TModelRect & GetModelLimitsRect(void)
Definition: glpane.hpp:347
T Y() const
Definition: glpoint.hpp:60
void Inflate(T d_x, T d_y)
Definition: glrect.hpp:178
void Close(void)
Definition: glpane.cpp:178
TModelUnit UnProjectY(TVPUnit m_y) const
Definition: glpane.cpp:722
int TVPUnit
Definition: gltypes.hpp:47
TModelUnit GetZoomAllScaleX(void) const
Definition: glpane.cpp:133
void SetVert(T bottom, T top)
Definition: glrect.hpp:123
void SetVisibleRect(const TModelRect &R)
Definition: glpane.cpp:113
virtual void WriteText(TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)=0
Write text at specified model coords.
virtual TModelUnit TextHeight(void) const
void SetFontSize(unsigned int size)
Set/get font size in points.
TModelRect & GetVisibleRect(void)
Definition: glpane.hpp:357
virtual void Disable(GLenum glstate)=0
glDisable()
virtual void Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal)=0
TModelUnit GetMinScaleX(void) const
Definition: glpane.hpp:452
TModelUnit GetScaleX(void) const
Definition: glpane.cpp:118
bool Intersects(const CGlRect &R) const
Definition: glrect.hpp:163
void SetTop(T top)
Definition: glrect.hpp:115
EOrientation
Definition: gltypes.hpp:58
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
@ eAlign_Left
Definition: glfont.hpp:102
@ eAlign_VCenter
Definition: glfont.hpp:108
@ eNeverUpdate
Definition: glpane.hpp:84
@ eHorz
Definition: gltypes.hpp:59
@ eVert
Definition: gltypes.hpp:60
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
vector< CConstRef< CObject > > TConstObjects
Definition: objects.hpp:64
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
virtual bool Send(CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
Sends an event synchronously.
@ eDispatch_Default
dispatch until handled at least by one handler
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5084
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
n background color
END_EVENT_TABLE()
yy_size_t n
static MDB_envinfo info
Definition: mdb_load.c:37
const struct ncbi::grid::netcache::search::fields::SIZE size
The NCBI C++/STL use hints.
Defines: CTimeFormat - storage class for time format.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Functor to retrieve tooltip (used for async execution)
string operator()(CAlnMultiRenderer &renderer)
IGlEventHandler * m_pHandler
SColumn describes a single column.
int m_Width
horizontal position in viewport
Definition: type.c:6
#define _ASSERT
void SetFocus(CRef< objects::CSeq_entry > entry)
static CS_CONTEXT * context
Definition: will_convert.c:21
#define const
Definition: zconf.h:232
Modified on Tue Apr 23 07:41:03 2024 by modify_doxy.py rev. 669887