Example #1
0
wxGISCoordinatesFormatMenu::wxGISCoordinatesFormatMenu(const wxString& title, long style) : wxMenu(title, style), wxGISCoordinatesFormat()
{
	//preparations
	Serialize(false);
	//TODO:
	/*
	//add selectors m -> cm etc.
	Append(wxID_ANY, _("Kilometers"));
	Append(wxID_ANY, _("Meters"));
	Append(wxID_ANY, _("Decimeters"));
	Append(wxID_ANY, _("Centimeters"));
	Append(wxID_ANY, _("Millimeters"));
	AppendSeparator();
	Append(wxID_ANY, _("Nautical miles"));
	Append(wxID_ANY, _("Miles"));
	Append(wxID_ANY, _("Yards"));
	Append(wxID_ANY, _("Feet"));
	Append(wxID_ANY, _("Inches"));
	AppendSeparator();
	Append(wxID_ANY, _("Degrees"));
	*/
	//add swp coords check mark
	//TODO: AppendSeparator();
	AppendCheckItem(ID_SWAPCOORS, _("Swap coordinates"));
	//TODO: AppendCheckItem(wxID_ANY, _("Add decimal separator"));

	//add formats
	AppendSeparator();
    for(size_t i = 0; i < m_asCoordsMask.GetCount(); ++i)
		Append(ID_MASKBEG + i, m_asCoordsMask[i]);
	//add change format list dialog
	AppendSeparator();
	Append(ID_CHANGEMASKS, _("Change masks"));
}
Example #2
0
/**************************************************************
***
**    MyMenu   ---   addCheckItem
***
***************************************************************/
void MyMenu::addCheckItem( const int &id, const bool checked )
{
    MaitreyaCommand *command = handler->getCommand( id );
    if ( command )
    {
        AppendCheckItem( id, command->getMenuRepresentation());
        Check( id, checked );
    }
    else assert( 0 );
}
Example #3
0
// {{{ PaneMenu::PaneMenu(ConnectionPage *parent, const wxString &title, wxAuiPaneInfoArray &panes)
PaneMenu::PaneMenu(ConnectionPage *parent, const wxString &title, wxAuiPaneInfoArray &panes) : wxMenu(title), pane(NULL), panes(panes), parent(parent) {
	for (size_t i = 0; i < panes.GetCount(); i++) {
		if (panes.Item(i).caption.Len() > 0) {
			AppendCheckItem(wxID_HIGHEST + i, panes.Item(i).caption)->Check(panes.Item(i).IsShown());
		}
	}

#ifdef PERSPECTIVE
	AppendSeparator();
	Append(wxID_SAVE, _("&Save Pane Layout"));
#endif
}
Example #4
0
void CMenuPlot::_Build(CPlotData *pData, CKitColors *pColors) 
{
  wxString s;
  const CSingleKitColors *pKitColors =
    pColors->GetKitColors(pData->GetKitName());
  const CChannelColors *pChannelColors;
  wxMenuItem *pItem;
  int nID;
  unsigned int iu;

  m_nChannelCount = pData->GetChannelCount();
  
  // build data menu

  m_pMenuData = new wxMenu;
  m_pMenuData->AppendCheckItem(
    _ID(IDmenuPlotDataAnalyzed),
    "Analyzed");
  m_pMenuData->AppendCheckItem(
    _ID(IDmenuPlotDataRaw),
    "Raw");
  m_pMenuData->AppendCheckItem(
    _ID(IDmenuPlotDataLadder),
    "Ladder");
  m_pMenuData->AppendCheckItem(
    _ID(IDmenuPlotDataBaseline),
    "Baseline");
  EnableBaseline(pData->HasBaseline());
  if(!m_bPreview)
  {
    m_pMenuData->Append(
      IDmenuTable,
      "Show Table");
  }


  // channel menu

  m_pMenuChannels = new wxMenu;
  if(pKitColors == NULL)
  {
    for(iu = 1; iu <= m_nChannelCount; iu++)
    {
      nID = _ID( ID_GET_CHANNEL_ID_FROM_NR(iu) );
      s.Printf("Channel %u",iu);
      m_pMenuChannels->AppendCheckItem(nID,s);
    }
  }
  else
  {
    for(iu = 1; iu <= m_nChannelCount; iu++)
    {
      pChannelColors = pKitColors->GetColorChannel(iu);
      if(pChannelColors != NULL)
      {
        nID = _ID(ID_GET_CHANNEL_ID_FROM_NR(iu));
        s = nwxString::FormatNumber((int)iu);
        s.Append(" - ");
        s.Append(pChannelColors->m_sDyeName);
        pItem = new wxMenuItem(
          m_pMenuChannels,nID,s,"",wxITEM_CHECK);
#if COLOR_MENU_ITEMS
        pItem->SetBackgroundColour(pChannelColors->m_ColorAnalyzed);
        pItem->SetTextColour(*wxWHITE);
#endif
        m_pMenuChannels->Append(pItem);
      }
    }
  }

  m_pMenuLabels = new CMenuLabels(true,m_nOffset);
  m_pMenuArtifact = new CMenuArtifact(m_nOffset);

  // now build the menu

  AppendSubMenu(m_pMenuData,"Data");
  AppendSubMenu(m_pMenuChannels,"Channel");
  if(!m_bPreview)
  {
    AppendCheckItem(
      _ID(IDmenuPlotSync),
      "Synchronize Axes");
  }
  AppendCheckItem(
    _ID(IDmenuPlotILS),
    "Show ILS");
  AppendCheckItem(
    _ID(IDmenuPlotRFU),
    "Show minimum RFU");
  m_pMenuItemLabels = AppendSubMenu(m_pMenuLabels,"Labels");
  AppendSubMenu(m_pMenuArtifact,"Artifacts");
  AppendCheckItem(
    _ID(IDmenuPlotLadderLabels),
    "Show ladder labels");
  if(!m_bPreview)
  {
    Append(_ID(IDmenuPlotResetAxes),
      "Reset Axes",
      "Reset axes to display all alleles");
    Append(_ID(IDmenuPlotResetAxesFull),
      "Show Primer Peaks",
      "Reset axes to include primer peaks");
    Append(_ID(IDmenuPlotMultiple),
      "Multiple Plots",
      "Show a plot for each channel");
    Append(_ID(IDmenuPlotAppend),
      "Append plot",
      "Append a new plot directly below this plot");
    Append(_ID(IDmenuPlotRemove),
      "Remove plot",
      "Remove this plot, keep all others");
    Append(_ID(IDmenuPlotRemoveOthers),
      "Remove other plots",
      "Remove all plots except this");
  }
  else
  {
    Append(IDMaxLadderLabels,
      LABEL_MAX_PEAK_LABELS,
      STATUS_MAX_PEAK_LABELS);
  }
}
Example #5
0
/**************************************************************
***
**    MyMenu   ---   addCheckItem
***
***************************************************************/
void MyMenu::addCheckItem( const int &id, const wxString title, const bool checked )
{
    AppendCheckItem( id, title );
    Check( id, checked );
}