initialized =
false;
102 constwxString& name)
104m_DataSource(
NULL),
115 if(model !=
NULL) {
224 boolb_invert_others)
240vsel.reserve(rows.size());
242 for(
size_t i= 0;
i< rows.size();
i++ ) {
245vsel.push_back(index);
422wxPoint point =
event.GetPosition();
424 boolfrom_keyboard = (point == wxPoint(-1, -1));
425 if(! from_keyboard) {
426point = ScreenToClient(point);
471}
catch(exception& e) {
512 event.Enable(
true);
522 event.Enable(
true);
554 event.Enable(
false);
585}
else if(sh_right > 0) {
586sh =
min(sh_right, sh_left);
603 intSelIndex = vIndices[0];
608 string msg=
"Please select a ";
609 msg+= (sel_n == 0) ?
"row!":
"single row!";
679rows.push_back(master_row->
GetRowNum());
685rows.push_back(
row);
694vector<TNumrow> sel_rows;
705sel_rows.push_back(
row);
772vector<TNumrow> rows;
795hidden.
insert(pair<string, TNumrow>(acc,
row));
804 while(ppp.first != ppp.second) {
805rows.push_back(ppp.first->second);
814vector<TNumrow> rows;
822vector<TNumrow> selected;
824 string text=
"Unhide ";
825 if(selected.empty()) {
827}
else if(selected.size() == 1) {
834vector<TNumrow> rows;
836 event.Enable(!rows.empty());
842vector<TNumrow> rows;
862vector<TNumrow> rows;
880st_cols.resize(cols_n);
882 for(
int i= 0;
i< cols_n;
i++ ) {
886st_cols[
i].m_Width = col.
m_Width;
902st_cols.resize(cols_n);
903 for(
int i= 0;
i< cols_n;
i++ ) {
906st_cols[
i].m_Width = col.
m_Width;
915 if(dlg.ShowModal() == wxID_OK) {
923 event.Enable(
true);
952ls_locs.push_back(
new CSeq_loc());
953 CSeq_loc& seq_loc = *ls_locs.back();
960p_int.
AddInterval(seq_id, it_r->GetFrom(), it_r->GetTo());
1071 if(ds && ! ds->
IsEmpty()) {
1092vector<TNumrow> rows;
1093rows.push_back(iRow);
1233vector<TNumrow> rows;
1234rows.push_back(iRow);
1264dlg.
Setup(name, sc_type);
1267 if(dlg.ShowModal() == wxID_OK) {
1290dlg.SetTitle(
wxT(
"Coloring Method Properties"));
1292 if(dlg.ShowModal() == wxID_OK) {
1322 event.Check( ! en);
1331 returnmethod ? method->
GetName() :
"";
1345 if(current_name != method_name) {
1346 if(method_name ==
"") {
1364 string msg=
string(
"Method \"") + method_name;
1365 msg+=
"\" is invalid.";
1390 int cmd=
event.GetId();
1405 event.Check(current_name == method_name);
1417*def_name = current_name;
1446 stringmru_list =
"Multiple Alignment Widget Scoring Methods - "+
tag;
1525wxMenu* root = cmd_reg.
CreateMenu(kPopupMenu);
1527 if(GetDataSource()) {
1534wxMenu* color_menu =
FindSubItem(*root,
wxT(
"Coloring"))->GetMenu();
1535x_CreateScoringMethodsMenu(*color_menu);
1538m_CmdToName.clear();
1540 stringcurrent_method = x_GetCurrentMethodName();
1541 stringmru_list = x_GetScoringMRUListName();
1543vector<string> MRU_names;
1550 if(! current_method.empty()) {
1551vector<string>::const_iterator it =
1552std::find(MRU_names.begin(), MRU_names.end(), current_method);
1553 if(it == MRU_names.end()) {
1554MRU_names.push_back(current_method);
1558 if( ! MRU_names.empty()) {
1560 std::sort(MRU_names.begin(), MRU_names.end());
1563wxMenu* submenu = col_item->GetSubMenu();
1566 ITERATE(vector<string>, it_name, MRU_names) {
1568 const string& method_name = *it_name;
1571m_CmdToName[
cmd] = method_name;
1575submenu->AppendSeparator();
1578 string* def_name = x_GetDefMethodName();
1581 if(*def_name != current_method) {
1602wxMenu* item_menu =
CreateMenu(method_item);
1603color_menu.AppendSubMenu(item_menu,
1625 intshown = original_shown;
1644title_height += 12.f;
1646 size_theight = (size_t)-model_limits.
Height();
1647 size_twidth = original_rect.
Width();
1648 intheader_height = 0;
1655height += header_height;
1664rc_vis.
SetVert(y + (height - 1), y);
1669 if(title_height > 0.0) {
1673grabber->DisableGouraudShading(simplified);
1678renderer.
Resize(original_rect);
1683wxMessageBox(
wxT(
"Graphics system does not support in-memory image save feature"),
wxT(
"Error Saving"), wxOK);
1686wxMessageBox(
wxT(
"File error occured during save. Make sure file and directory names are valid."),
wxT(
"Error Saving"), wxOK);
class CAlnMultiModel - represents a visual model of an alignment.
virtual bool CanChangeMasterRow() const
changes Master (Anchor) and performs necessary updates
virtual void CreateConsensus(void)
Creates consenus row if it is not already created.
virtual int GetLineByRowNum(TNumrow row) const
virtual void SetDefaultMethod(const string &method_name)
void GetSelectedRows(vector< TNumrow > &rows)
virtual void UpdateSortOrder(void)
enables auto sorting of rows, sorts rows using x_SortRows() and performs necessary updates
virtual bool AddScoringMethod(IScoringMethod *method)
adds scoring method; model assumes ownership of the method, it will be deleted automatically
virtual CWidgetDisplayStyle * GetDisplayStyle()
virtual string GetDefaultMethod(void)
IAlignRow * GetRow(TNumrow row)
CAlnMultiModel inline functions.
virtual const IScoringMethod * GetCurrentMethod() const
virtual void UpdateOnScoringChanged(const TSeqRange &range=TSeqRange::GetEmpty())
const size_t GetNumRows() const
Get number of rows registered in model.
virtual void SetRowOrder(const vector< TNumrow > &rows, int pos=0)
disables auto sorting, reorders rows in alignment so that rows from the given vector appear in the sp...
virtual void SetStyleCatalog(const CRowStyleCatalog *catalog)
virtual void ClearRows(void)
Update handlers.
virtual void UpdateOnRowHChanged(void)
updates model after row height changed
virtual void SetListener(CScoreCache::IListener *listener)
virtual IAlignRow * GetMasterRow()
virtual bool SetMasterRow(TNumrow new_row)
virtual IAlignRow * GetRowByLine(TLine line)
all Y coordinates are OpenGL Viewport coordinates (not widget coords) "index" is a line index (not ro...
virtual void SetShownElements(int shown_mask)
virtual void UpdateOnStyleChanged(void)
virtual void UpdateOnDataChanged()
virtual void SLM_SelectAll(bool bSelect)
void SetVisible(vector< TNumrow > rows, bool b_visible, bool b_invert_others=false)
makes specified rows visible/hidden, if b_invert_others == "true" then visibility of all rows not in ...
virtual void ResetCurrentMethod()
virtual void SetDataSource(IAlnMultiDataSource *p_ds)
virtual int GetShownElements()
returns mask of shown elements - header, ruler, master row, alignment, track matrix
virtual bool SetCurrentMethod(const string &name, const TSeqRange &range=TSeqRange::GetEmpty())
void UpdateHeaderSortState()
virtual TModelUnit SHH_GetModelByWindow(int z, EOrientation orient) override
bool HasSelectedObjects() const
void SetContext(IAlnMultiRendererContext *p_context)
const TRowToMarkMap & GetMarks() const
void ResetSelection(bool redraw)
CAlnMultiRenderer & GetRenderer()
void SetBackColor(const CRgbaColor &color)
virtual void Update() override
const TRangeColl & GetSelection() const
int GetAlignVPWidth() const
virtual void UpdateOnDataChanged()
void Init(objects::CScope *scope)
void ShowProgressPanel(float progress, const string &msg)
void SetSelection(const TRangeColl &C, bool redraw)
void MarkSelectedRows(const TRangeColl &C, bool bMark)
void SetWidget(IAlnMultiPaneParent *p_arent)
CRange< TSeqPos > GetSelectionLimits()
int GetAlignVPHeight() const
void GetObjectSelection(TConstObjects &objs) const
class CAlnMultiRenderer - renders multiple alignment represented by IAlnMultiRendererContext (the Mod...
virtual void Resize(const TVPRect &rc)
void SetColumnsByStyle(CWidgetDisplayStyle &style)
virtual int GetColumnsCount() const
int GetHeaderAreaHeight() const
virtual const SColumn & GetColumn(int index) const
int GetMasterAreaHeight() const
int GetRulerAreaHeight() const
virtual TVPRect GetRect() const
void SetParams(CWidgetDisplayStyle &style)
CUpdate - notification send by CUIDataSource to the listener.
double GetProgressNorm() const
virtual void SetRegistryPath(const string &path)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
static IImageGrabber * CreateImageGrabber(EOutputFormat format, IVectorGraphicsRenderer &pane)
void AddInterval(const CSeq_interval &ival)
for convenience
static const string & GetFileExtension(EOutputFormat format)
TThisType & CombineWith(const TRange &r)
class CRegistryReadView provides a nested hierarchical view at a particular key.
class CRgbaColor provides a simple abstraction for managing colors.
CRowStyleCatalog is a collection of CRowDisplayStyle-s assigned to rows in alignment.
bool Create(wxWindow *parent, wxWindowID id=ID_CSCORINGMETHODSDLG, const wxString &caption=_("Alignment Scoring Methods"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
Creation.
void Setup(const string &sel_method, IAlnExplorer::EAlignType type)
wxString GetSelectedMethod() const
virtual void SLM_SelectItems(const TIndexVector &vIndeces, bool b_reset_others=false)
Select items with given indices.
virtual TIndex SLM_GetSelectedCount() const
virtual void SLM_GetSelectedIndices(TIndexVector &vIndices) const
virtual void SLM_AddSLView(TSelListView *pView)
CUICommandRegistry is a centralized registry where all application commands should be registered.
static CUICommandRegistry & GetInstance()
the main instance associated with the application
wxMenu * CreateMenu(const SwxMenuItemRec *items)
create a menu from a static definition (see WX_*_MENU macros)
int RegisterCommand(CUICommand *cmd)
assumes ownership of the given object returns a command id (useful when registry is used for auto id ...
wxMenuItem * AppendMenuItem(wxMenu &menu, TCmdID cmd_id) const
Interface IAlignRow - abstracts row rendering in Multiple Alignment Widget.
virtual int GetRowNum() const =0
Returns index of row in IAlnMultiDataSource.
virtual string & GetColumnText(TColumnType col_type, string &text, bool for_printer=false) const =0
virtual void SetHost(IAlignRowHost *pHost)=0
virtual int GetRowState() const =0
Returns row state (combination of EState flags)
@ eRight
Towards higher aln coord (always to the right)
@ eLeft
Towards lower aln coord (always to the left)
IAlnMultiDataSource - interface to a data source representing an abstract multiple alignment.
virtual IAlnExplorer::EAlignType GetAlignType() const =0
virtual TSignedSeqPos GetSeqPosFromAlnPos(TNumrow for_row, TSeqPos aln_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const =0
virtual TSignedSeqPos GetAlnPosFromSeqPos(TNumrow row, TSeqPos seq_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const =0
virtual int GetConsensusRow() const =0
returns index of the Consensus row or -1 if it doesn't exist
virtual TNumrow GetNumRows(void) const =0
number of rows in alignment
virtual const objects::CSeq_id & GetSeqId(TNumrow row) const =0
virtual TNumrow GetAnchor(void) const =0
virtual bool CanCreateConsensus()=0
virtual void SetCreateConsensus(bool b)=0
virtual bool IsEmpty() const =0
Interface IAlnMultiPaneParent represents a context in which an instance of CAlnMultiPane lives.
IAlnMultiDataSource::TNumrow TNumrow
IAlnMultiRendererContext - this interface represents context in which CAlnMultiRenderer lives.
@ fShownElement_MasterRow
void SetTitleHeight(TModelUnit h)
Set size for optional pdf title.
IScoringMethod represents an abstract algorithm for calculating alignment scores and assigning colors...
static const char * GetAlignmentTagByType(IAlnExplorer::EAlignType type)
returns symbolic label for the given alignment type, should be
vector< TIndex > TIndexVector
const_iterator_pair equal_range(const key_type &key) const
iterator insert(const value_type &val)
container_type::iterator iterator
iterator_bool insert(const value_type &val)
void WidgetsData_RegisterCommands(CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
Register standard commands defined in this file and wxWidgets headers.
static const char * catalog
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
int TSignedSeqPos
Type for signed sequence position.
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
static bool Match(const objects::CSeq_id &id1, const objects::CSeq_id &id2, objects::CScope *scope=NULL)
check to see if two seq-ids are identical.
void ZoomPoint(TModelUnit x, TModelUnit y, TModelUnit factor, int options=fZoomXY)
void SetSize(T width, T height)
void SetViewport(const TVPRect &R)
TVPRect & GetViewport(void)
CGlRect< TVPUnit > TVPRect
void SetScale(TModelUnit scale_x, TModelUnit scale_y, TModelPoint p_center)
virtual TModelUnit GetFontDescender() const
void SetScaleRefPoint(TModelUnit scale_x, TModelUnit scale_y, TModelPoint p_ref)
void ZoomRect(const TModelRect &r)
TModelRect & GetModelLimitsRect(void)
void Scroll(TModelUnit dx, TModelUnit dy)
void SetVert(T bottom, T top)
void SetVisibleRect(const TModelRect &R)
virtual TModelUnit GetMetric(EMetric metric, const char *text=NULL, int len=-1) const
virtual TModelUnit TextHeight(void) const
void SetFontSize(unsigned int size)
Set/get font size in points.
TModelRect & GetVisibleRect(void)
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
vector< CConstRef< CObject > > TConstObjects
const string & GetLabel() const
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
virtual bool Send(CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
Sends an event synchronously.
@ eCmdZoomSeq
Zoom to Selection.
@ eDispatch_Default
dispatch until handled at least by one handler
void SetPacked_int(TPacked_int &v)
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
bool NotEmpty(void) const
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
static void text(MDB_val *v)
CMinPanelContainer::OnRestoreWindow EVT_UPDATE_UI_RANGE(eCmdCloseDockPanel, eCmdWindowRestore, CMinPanelContainer::OnUpdateWindowCommand) CMinPanelContainer
constexpr auto sort(_Init &&init)
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
SColumn describes a single column.
int m_Width
horizontal position in viewport
bool m_Visible
can be used to identify column
#define WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
#define WX_SUBMENU(label)
#define WX_MENU_SEPARATOR_L(label)
#define WX_MENU_ITEM(cmd)
#define WX_MENU_SEPARATOR()
const string & CDCN_GetMessage(const CDataChangeNotifier::CUpdate &update)
wxMenu * CreateMenu(const CMenuItem *item)
Creates a wxMenu object replicating the structure of CMenuItem.
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
wxMenuItem * FindSubItem(wxMenu &menu, const wxString &text)
Find a subitem of the given menu by text.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4