当前位置: 首页>>代码示例>>C++>>正文


C++ UpdateSelection函数代码示例

本文整理汇总了C++中UpdateSelection函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateSelection函数的具体用法?C++ UpdateSelection怎么用?C++ UpdateSelection使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UpdateSelection函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetControl

LTBOOL	CFolderWeaponControls::OnRButtonUp(int x, int y)
{
	// Get the control that the click was on
	int nControlIndex=0;
	if (GetControlUnderPoint(x, y, &nControlIndex))
	{
		CLTGUICtrl* pCtrl = GetControl(nControlIndex);
		if (pCtrl && pCtrl->GetParam1())
		{
			CLTGUIColumnTextCtrl *pColumn=(CLTGUIColumnTextCtrl *)pCtrl;
			int nAct = pCtrl->GetParam1()-1;
			m_nActions[nAct] = GetPreviousCommand(m_nActions[nAct]);

			int nWeaponId = g_pWeaponMgr->GetWeaponId(m_nActions[nAct]);
			WEAPON *pWeapon = g_pWeaponMgr->GetWeapon(nWeaponId);
			if (pWeapon)
				pColumn->SetString(1,pWeapon->nNameId);
			else
				pColumn->SetString(1,IDS_CONTROL_UNASSIGNED);
			UpdateSelection();
			return LTTRUE;
		}
	}
	return CBaseFolder::OnRButtonUp(x, y);
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:25,代码来源:FolderWeaponControls.cpp

示例2: UpdateSelection

void SelectionHandler::UpdateSelection(const COORD& coordCurrent, CharInfo screenBuffer [])
{
	if ((m_selectionState != selstateStartedSelecting) &&
		(m_selectionState != selstateSelecting))
	{
		return;
	}

	if ((coordCurrent.X == m_coordCurrent.X) && (coordCurrent.Y == m_coordCurrent.Y)) return;

//	TRACE(L"Update selection current: %ix%i\n", coordCurrent.X, coordCurrent.Y);
	m_coordCurrent = coordCurrent;


	SMALL_RECT&	 srWindow = m_consoleInfo->csbi.srWindow;

	int nDeltaX = m_coordCurrent.X - srWindow.Left;
	int nDeltaY = m_coordCurrent.Y - srWindow.Top;

	if (nDeltaX < 0) nDeltaX = 0;
	if (nDeltaY < 0) nDeltaY = 0;

 	if (screenBuffer[nDeltaY * m_consoleParams->dwColumns + nDeltaX].charInfo.Attributes & COMMON_LVB_LEADING_BYTE)
	{
		++m_coordCurrent.X;
	}

	UpdateSelection();
}
开发者ID:minagi,项目名称:console,代码行数:29,代码来源:SelectionHandler.cpp

示例3: UpdateSelection

void PSelectionInteraction::HandleGlobalInteraction (int inIndex, PlotDataBase *inXData, PlotDataBase *inYData, bool inHit, long inNearestPointIndex, DataDrawerBase *inDataDrawer, PlotDataSelection *inPlotDataSelection) {
    if (inPlotDataSelection->size ()>0) {
      for (int theI=0;theI<inPlotDataSelection->size ();theI++) {
        UpdateSelection (inIndex, theI, inXData, inYData, inHit, inPlotDataSelection);
      }
    }
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:7,代码来源:iupPPlotInteraction.cpp

示例4: WXUNUSED

void CViewMessagesGrid::OnMessagesCopyAll( wxCommandEvent& WXUNUSED(event) ) {
    wxLogTrace(wxT("Function Start/End"), wxT("CViewMessagesGrid::OnMessagesCopyAll - Function Begin"));

    CAdvancedFrame* pFrame      = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);

    wxASSERT(pFrame);
    wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame));

#ifdef wxUSE_CLIPBOARD

    wxInt32 iIndex          = -1;
    wxInt32 iRowCount       = 0;
    pFrame->UpdateStatusText(_("Copying all messages to the clipboard..."));
    OpenClipboard();

	iRowCount = m_pGridPane->GetRows();
    for (iIndex = 0; iIndex < iRowCount; iIndex++) {
        CopyToClipboard(iIndex);
    }

    CloseClipboard();
    pFrame->UpdateStatusText(wxT(""));

#endif

    UpdateSelection();
    pFrame->FireRefreshView();

    wxLogTrace(wxT("Function Start/End"), wxT("CViewMessagesGrid::OnMessagesCopyAll - Function End"));
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:30,代码来源:ViewMessagesGrid.cpp

示例5: wxDialog

LLEModulesManagerFrame::LLEModulesManagerFrame(wxWindow* parent)
	: wxDialog(parent, wxID_ANY, "LLEModulesManagerFrame", wxDefaultPosition, wxSize(480, 640))
{
	wxBoxSizer *s_panel = new wxBoxSizer(wxVERTICAL);
	wxBoxSizer *s_p_panel = new wxBoxSizer(wxVERTICAL);
	wxPanel *p_main = new wxPanel(this);
	m_check_list = new wxCheckListBox(p_main, wxID_ANY);

	// select / unselect
	wxStaticBoxSizer* s_selection = new wxStaticBoxSizer(wxHORIZONTAL, p_main);
	wxButton* b_select = new wxButton(p_main, wxID_ANY, "Select All", wxDefaultPosition, wxSize(80, -1));
	wxButton* b_unselect = new wxButton(p_main, wxID_ANY, "Unselect All", wxDefaultPosition, wxSize(80, -1));
	s_selection->Add(b_select);
	s_selection->Add(b_unselect);

	s_p_panel->Add(s_selection);
	s_p_panel->Add(m_check_list, 1, wxEXPAND | wxALL, 5);
	p_main->SetSizerAndFit(s_p_panel);

	s_panel->Add(p_main, 1, wxEXPAND | wxALL, 5);
	SetSizerAndFit(s_panel);
	Refresh();
	SetSize(350, 500);

	b_select->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) { OnSelectAll(event, true); event.Skip(); });
	b_unselect->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) { OnSelectAll(event, false); event.Skip(); });
	Bind(wxEVT_CHECKLISTBOX, [this](wxCommandEvent& event) { UpdateSelection(event.GetInt()); event.Skip(); });
	Bind(wxEVT_SIZE, [p_main, this](wxSizeEvent& event) { p_main->SetSize(GetClientSize()); m_check_list->SetSize(p_main->GetClientSize() - wxSize(10, 50)); event.Skip(); });
}
开发者ID:Aaahh,项目名称:rpcs3,代码行数:29,代码来源:LLEModulesManager.cpp

示例6: WXUNUSED

void CViewTransfers::OnTransfersRetryNow( wxCommandEvent& WXUNUSED(event) ) {
    wxLogTrace(wxT("Function Start/End"), wxT("CViewTransfers::OnTransfersRetryNow - Function Begin"));

    CMainDocument*  pDoc    = wxGetApp().GetDocument();
    CAdvancedFrame* pFrame  = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
    int row;

    wxASSERT(pDoc);
    wxASSERT(wxDynamicCast(pDoc, CMainDocument));
    wxASSERT(pFrame);
    wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame));

    pFrame->UpdateStatusText(_("Retrying transfer now..."));
    row = -1;
    while (1) {
        // Step through all selected items
        row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (row < 0) break;
        
        pDoc->TransferRetryNow(m_iSortedIndexes[row]);
    }
    pFrame->UpdateStatusText(wxT(""));

    UpdateSelection();
    pFrame->ResetReminderTimers();
    pFrame->FireRefreshView();

    wxLogTrace(wxT("Function Start/End"), wxT("CViewTransfers::OnTransfersRetryNow - Function End"));
}
开发者ID:phenix3443,项目名称:synecdoche,代码行数:29,代码来源:ViewTransfers.cpp

示例7: event

bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result)
{
  wxBookCtrlEvent event(wxEVT_NULL, m_windowId);

  NMHDR* hdr = (NMHDR *)lParam;
  switch ( hdr->code ) {
    case TCN_SELCHANGE:
      event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
      break;

    case TCN_SELCHANGING:
      event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING);
      break;

    default:
      return wxControl::MSWOnNotify(idCtrl, lParam, result);
  }

  event.SetSelection(TabCtrl_GetCurSel(GetHwnd()));
  event.SetOldSelection(m_selection);
  event.SetEventObject(this);
  event.SetInt(idCtrl);

  // Change the selection before generating the event as its handler should
  // already see the new page selected.
  if ( hdr->code == TCN_SELCHANGE )
      UpdateSelection(event.GetSelection());

  bool processed = HandleWindowEvent(event);
  *result = !event.IsAllowed();
  return processed;
}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:32,代码来源:notebook.cpp

示例8: WXUNUSED

void CViewProjects::OnProjectNoNewWork( wxCommandEvent& WXUNUSED(event) ) {
    wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectNoNewWork - Function Begin"));

    CMainDocument*  pDoc   = wxGetApp().GetDocument();
    CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
    int row;

    wxASSERT(pDoc);
    wxASSERT(wxDynamicCast(pDoc, CMainDocument));
    wxASSERT(pFrame);
    wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame));
    wxASSERT(m_pListPane);

    row = -1;
    while (1) {
        // Step through all selected items
        row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (row < 0) break;
        
        PROJECT* project = pDoc->project(m_iSortedIndexes[row]);
        if (project) {
            if (project->dont_request_more_work) {
                pDoc->ProjectAllowMoreWork(m_iSortedIndexes[row]);
            } else {
                pDoc->ProjectNoMoreWork(m_iSortedIndexes[row]);
            }
        }
    }
    
    m_bForceUpdateSelection = true;
    UpdateSelection();
    pFrame->FireRefreshView();

    wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectNoNewWork - Function End"));
}
开发者ID:DanAurea,项目名称:boinc,代码行数:35,代码来源:ViewProjects.cpp

示例9: WXUNUSED

void CViewWork::OnWorkShowVMConsole( wxCommandEvent& WXUNUSED(event) ) {
    wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkShowVMConsole - Function Begin"));

    CMainDocument* pDoc     = wxGetApp().GetDocument();
    CAdvancedFrame* pFrame  = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
    RESULT* result;
    int row;

    wxASSERT(pDoc);
    wxASSERT(wxDynamicCast(pDoc, CMainDocument));
    wxASSERT(pFrame);
    wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame));
    wxASSERT(m_pListPane);

    row = -1;
    while (1) {
        // Step through all selected items
        row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (row < 0) break;
        
        result = pDoc->result(m_iSortedIndexes[row]);
        if (result) {
            pDoc->WorkShowVMConsole(result);
        }
    }

    UpdateSelection();
    pFrame->FireRefreshView();

    wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkShowVMConsole - Function End"));
}
开发者ID:DanAurea,项目名称:boinc,代码行数:31,代码来源:ViewWork.cpp

示例10: PingSelected

static menuSound_t PingSelected(void)
{
    serverslot_t *slot;
    netadr_t address;
    char *hostname;

    if (!m_servers.list.numItems)
        return QMS_BEEP;
    if (m_servers.list.curvalue < 0)
        return QMS_BEEP;

    slot = m_servers.list.items[m_servers.list.curvalue];
    address = slot->address;
    hostname = slot->hostname;
    FreeSlot(slot);

    slot = UI_FormatColumns(SLOT_EXTRASIZE, hostname,
                            "???", "???", "?/?", "???", NULL);
    slot->status = SLOT_PENDING;
    slot->address = address;
    slot->hostname = hostname;
    slot->color = U32_WHITE;
    slot->numRules = 0;
    slot->numPlayers = 0;
    slot->timestamp = com_eventTime;

    m_servers.list.items[m_servers.list.curvalue] = slot;

    UpdateStatus();
    UpdateSelection();

    CL_SendStatusRequest(&slot->address);
    return QMS_SILENT;
}
开发者ID:m4son,项目名称:q2pro,代码行数:34,代码来源:servers.c

示例11: WXUNUSED

void CViewTasks::OnInit(wxCommandEvent& WXUNUSED(event))
{
    CBSLClient* pState = wxGetApp().GetState();
    CViewTaskItem* pItem = NULL;
    CBSLTaskInstance bslTaskInstance;
    std::vector<BSLTASKINSTANCE> oTaskInstances;

    // Add any projects we know about
    pState->EnumerateTaskInstances(m_hHost, oTaskInstances, false);
    for (std::vector<BSLTASKINSTANCE>::iterator iter = oTaskInstances.begin(); iter != oTaskInstances.end(); iter++)
    {
        pState->GetTaskInstance(*iter, &bslTaskInstance);

        pItem = new CViewTaskItem();
        m_oTaskItems.push_back(pItem);
        pItem->hTaskInstance = bslTaskInstance.GetTaskInstanceHandle();
        pItem->uiIndex = (wxUint32)m_oTaskItems.size() - 1;

        pState->SetTaskInstanceEventData(bslTaskInstance.GetTaskInstanceHandle(), (wxUIntPtr)pItem);

        // Update the content of the list item
        UpdateTaskInstance(*pItem, bslTaskInstance);
    }

    m_pListPane->SetItemCount(m_oTaskItems.size());

    // Register for task instance events
    pState->RegisterEventHandler(this, wxEVT_BSLTASKINSTANCE_BULKADD, m_hHost, NULL);
    pState->RegisterEventHandler(this, wxEVT_BSLTASKINSTANCE_BULKUPDATE, m_hHost, NULL);
    pState->RegisterEventHandler(this, wxEVT_BSLTASKINSTANCE_DELETE, m_hHost, NULL);

    // Update Everything
    UpdateSelection();
}
开发者ID:romw,项目名称:boincsentinels,代码行数:34,代码来源:ViewTasks.cpp

示例12: if

boolean StringBrowser::LeftButtonDown (Event& e) {
    boolean status = false;

    if (DoubleClicked(e)) {
        subject->SetValue(done[0]);
        status = true;

    } else if (uniqueSel) {
        if (Selections() == 0) {
            Select(Locate(e.x, e.y));
        } else {
            Unselect(Selection());
            if (!e.shift) {
                Select(Locate(e.x, e.y));
            }
        }

    } else {
        lastdot = lastmark = Locate(e.x, e.y);

        if (Selected(lastdot) && e.shift) {
            Unselect(lastdot);
            do {
                ScrollToView(e.x, e.y);
                UpdateSelection(lastdot, Locate(e.x, e.y), Plain);
                Poll(e);
            } while (e.leftmouse);

        } else {
            if (!e.shift) {
                UnselectAll();
            }
            Select(lastdot);
            do {
                ScrollToView(e.x, e.y);
                UpdateSelection(lastdot, Locate(e.x, e.y), highlight);
                Poll(e);
            } while (e.leftmouse);
        }
    }
    Note(e);
    if (singleClick) {
        subject->SetValue(done[0]);
        status = true;
    }
    return status;
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:47,代码来源:strbrowser.c

示例13: CBOINCBaseView

CViewResources::CViewResources(wxNotebook* pNotebook) :
	CBOINCBaseView(pNotebook)
{
	m_BOINCwasEmpty=false;

	wxGridSizer* itemGridSizer = new wxGridSizer(2, 0, 3);
    wxASSERT(itemGridSizer);

	// create pie chart ctrl for total disk usage
	m_pieCtrlTotal = new wxPieCtrl(this, ID_PIECTRL_RESOURCEUTILIZATIONVIEWTOTAL, wxDefaultPosition, wxSize(-1,-1));
	wxASSERT(m_pieCtrlTotal);

    // setup the legend
    m_pieCtrlTotal->SetTransparent(true);
    m_pieCtrlTotal->SetHorLegendBorder(10);
    m_pieCtrlTotal->SetLabelFont(*wxSWISS_FONT);
    m_pieCtrlTotal->SetLabelColour(wxColour(0,0,0));
    m_pieCtrlTotal->SetLabel(_("Total disk usage"));

    // initialize pie control
	m_pieCtrlTotal->m_Series.Clear();
	wxPiePart CtrlTotalPart;
    CtrlTotalPart.SetLabel(wxEmptyString);
	CtrlTotalPart.SetValue(1);
	CtrlTotalPart.SetColour(wxColour(255,255,255));
	m_pieCtrlTotal->m_Series.Add(CtrlTotalPart);
	m_pieCtrlTotal->Refresh();

    
    // create pie chart ctrl for BOINC disk usage
	m_pieCtrlBOINC = new wxPieCtrl(this, ID_PIECTRL_RESOURCEUTILIZATIONVIEW, wxDefaultPosition, wxSize(-1,-1));
	wxASSERT(m_pieCtrlBOINC);

    //setup the legend
    m_pieCtrlBOINC->SetTransparent(true);
    m_pieCtrlBOINC->SetHorLegendBorder(10);
    m_pieCtrlBOINC->SetLabelFont(*wxSWISS_FONT);
    m_pieCtrlBOINC->SetLabelColour(wxColour(0,0,0));
    m_pieCtrlBOINC->SetLabel(_("Disk usage by BOINC projects"));

    // initialize pie control
	m_pieCtrlBOINC->m_Series.Clear();
	wxPiePart CtrlBOINCPart;
    CtrlBOINCPart.SetLabel(wxEmptyString);
	CtrlBOINCPart.SetValue(1);
	CtrlBOINCPart.SetColour(wxColour(255,255,255));
	m_pieCtrlBOINC->m_Series.Add(CtrlBOINCPart);
	m_pieCtrlBOINC->Refresh();

    //init the flexGrid
    itemGridSizer->Add(m_pieCtrlTotal, 1, wxGROW|wxALL,1);
    itemGridSizer->Add(m_pieCtrlBOINC, 1, wxGROW|wxALL,1);

    SetSizer(itemGridSizer);

    Layout();

    UpdateSelection();
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:59,代码来源:ViewResources.cpp

示例14: UpdateSelection

bool emFileManModel::Cycle()
{
	if (IsSignaled(FileUpdateSignalModel->Sig)) {
		UpdateSelection();
		UpdateCommands();
	}
	return false;
}
开发者ID:ackalker,项目名称:eaglemode,代码行数:8,代码来源:emFileManModel.cpp

示例15: setSelected

//------------------------------------------------------------------------------
// mousePressEvent - Handle mouse press events.
//------------------------------------------------------------------------------
void Card::mousePressEvent(QGraphicsSceneMouseEvent*)
{
    if ( isEnabled() && (flags() & QGraphicsItem::ItemIsSelectable))
    {
        setSelected(!isSelected());
        UpdateSelection();
    }
}
开发者ID:Kramspill,项目名称:Qt_Piquet,代码行数:11,代码来源:Card.cpp


注:本文中的UpdateSelection函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。