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


C++ Thaw函数代码示例

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


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

示例1: FileTypeOf

// ----------------------------------------------------------------------------
bool ThreadSearchFrame::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& files)
// ----------------------------------------------------------------------------
{
    bool success = true; // Safe case initialisation

    // first check to see if a workspace is passed. If so, only this will be loaded
    wxString foundWorkspace;
    for (unsigned int i = 0; i < files.GetCount(); ++i)
    {
        FileType ft = FileTypeOf(files[i]);
        if (ft == ftCodeBlocksWorkspace || ft == ftMSVC6Workspace || ft == ftMSVC7Workspace)
        {
            foundWorkspace = files[i];
            break;
        }
    }

    if (!foundWorkspace.IsEmpty())
      success &= OpenGeneric(foundWorkspace);
    else
    {
        wxBusyCursor useless;
        wxPaintEvent e;
        ProcessEvent(e);

        Freeze();
        for (unsigned int i = 0; i < files.GetCount(); ++i)
          success &= OpenGeneric(files[i]);
        Thaw();
    }
    return success;
}
开发者ID:469306621,项目名称:Languages,代码行数:33,代码来源:ThreadSearchFrame.cpp

示例2: Freeze

void wxFoldPanelBar::RefreshPanelsFrom(size_t i)
{
    Freeze();

    // if collapse to bottom is on, the panels that are not expanded
    // should be drawn at the bottom. All panels that are expanded
    // are drawn on top. The last expanded panel gets all the extra space

    if(m_extraStyle & wxFPB_COLLAPSE_TO_BOTTOM)
    {
        int offset = 0;

        for(size_t j = 0; j < m_panels.GetCount(); j++)
        {
            if(m_panels.Item(j)->IsExpanded())
                offset += m_panels.Item(j)->Reposition(offset);
        }

        // put all non collapsed panels at the bottom where there is space, else
        // put them right behind the expanded ones

        RepositionCollapsedToBottom();
    }
    else
    {
        int pos = m_panels.Item(i)->GetItemPos() + m_panels.Item(i)->GetPanelLength();
        for(i++; i < m_panels.GetCount(); i++)
            pos += m_panels.Item(i)->Reposition(pos);
    }
    Thaw();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:31,代码来源:foldpanelbar.cpp

示例3: WXUNUSED

void DiffPanel::OnButtonSwap(wxCommandEvent& WXUNUSED(event)) {
	m_mainSizer->Detach(m_leftEditor);
	m_mainSizer->Detach(m_rightEditor);
	EditorCtrl* temp = m_leftEditor;
	m_leftEditor = m_rightEditor;
	m_rightEditor = temp;
	m_mainSizer->Add(m_leftEditor, wxGBPosition(1,1), wxGBSpan(1,1), wxEXPAND);
	m_mainSizer->Add(m_rightEditor, wxGBPosition(1,3), wxGBSpan(1,1), wxEXPAND);

	m_leftEditor->SetScrollbarLeft(true);
	m_rightEditor->SetScrollbarLeft(false);
	m_leftEditor->SetGutterRight(false);
	m_rightEditor->SetGutterRight(true);

	m_leftMarkBar->SetEditor(m_leftEditor);
	m_rightMarkBar->SetEditor(m_rightEditor);
	
	m_diffBar->Swap();
	
	Freeze();
	m_leftTitle->SetValue(m_leftEditor->GetPath());
	m_rightTitle->SetValue(m_rightEditor->GetPath());

	m_mainSizer->Layout();

	m_leftEditor->ReDraw();
	m_rightEditor->ReDraw();
	Thaw();
}
开发者ID:dxtravi,项目名称:e,代码行数:29,代码来源:DiffPanel.cpp

示例4: Freeze

void ConfigurationManagerDlg::PopulateConfigurations()
{
	//popuplate the configurations
	BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix();
	if (!matrix) {
		return;
	}

	wxFlexGridSizer *mainSizer = dynamic_cast<wxFlexGridSizer*>(m_scrolledWindow->GetSizer());
	if (!mainSizer) return;

	Freeze();
	// remove old entries from the configuration table
	wxSizerItemList list = mainSizer->GetChildren();
	for ( wxSizerItemList::Node *node = list.GetFirst(); node; node = node->GetNext() ) {
		wxSizerItem *current = node->GetData();
		current->GetWindow()->Destroy();
	}
	m_projSettingsMap.clear();

	std::list<CSolitionConfigurationPtr> configs = matrix->GetConfigurations();
	std::list<CSolitionConfigurationPtr>::iterator iter = configs.begin();

	m_choiceConfigurations->Clear();
	for (; iter != configs.end(); iter++) {
		m_choiceConfigurations->Append((*iter)->GetName());
	}

	// append the 'New' & 'Delete' commands
	m_choiceConfigurations->Append(clCMD_NEW);
	m_choiceConfigurations->Append(clCMD_EDIT);

	int sel = m_choiceConfigurations->FindString(matrix->GetSelectedConfigurationName());
	if (sel != wxNOT_FOUND) {
		m_choiceConfigurations->SetSelection(sel);
	} else if (m_choiceConfigurations->GetCount() > 2) {
		m_choiceConfigurations->SetSelection(2);
	} else {
		m_choiceConfigurations->Append(wxT("Debug"));
		m_choiceConfigurations->SetSelection(2);
	}

	// keep the current workspace configuration
	m_currentWorkspaceConfiguration = m_choiceConfigurations->GetStringSelection();

	wxArrayString projects;
	ManagerST::Get()->GetProjectList(projects);
	projects.Sort(wxStringCmpFunc);
	
	for (size_t i=0; i<projects.GetCount(); i++) {
		wxString selConf = matrix->GetProjectSelectedConf(matrix->GetSelectedConfigurationName(),  projects.Item(i));
		AddEntry(projects.Item(i), selConf);
	}

	Thaw();
	mainSizer->Fit(m_scrolledWindow);
	Layout();

}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:59,代码来源:configuration_manager_dlg.cpp

示例5: if

//---------------------------------------------------------
void CData_Source_PgSQL::Update_Source(const wxTreeItemId &Item)
{
	CData_Source_PgSQL_Data	*pData	= Item.IsOk() ? (CData_Source_PgSQL_Data *)GetItemData(Item) : NULL; if( pData == NULL )	return;

	if( pData->Get_Type() != TYPE_SOURCE )
	{
		return;
	}

	Freeze();

	DeleteChildren(Item);

	//-----------------------------------------------------
	if( !pData->is_Connected() )
	{
		SetItemImage(Item, IMG_SRC_CLOSED, wxTreeItemIcon_Normal);
		SetItemImage(Item, IMG_SRC_CLOSED, wxTreeItemIcon_Selected);
	}
	else
	{
		SetItemImage(Item, IMG_SRC_OPENED, wxTreeItemIcon_Normal);
		SetItemImage(Item, IMG_SRC_OPENED, wxTreeItemIcon_Selected);

		CSG_Table	Tables;

		RUN_MODULE(DB_PGSQL_Table_List, false,	// CTable_List
				SET_PARAMETER("CONNECTION", pData->Get_Value())
			&&	SET_PARAMETER("TABLES"    , &Tables)
		);

		Tables.Set_Index(1, TABLE_INDEX_Ascending, 0, TABLE_INDEX_Ascending);

		for(int i=0; i<Tables.Get_Count(); i++)
		{
			CSG_String	s(Tables[i].asString(1));

			TSG_Shape_Type	Shape;
			TSG_Vertex_Type	Vertex;

			if( CSG_Shapes_OGIS_Converter::to_ShapeType(s, Shape, Vertex) )
			{
				switch( Shape )
				{
				case SHAPE_TYPE_Point:   Append_Table(Item, Tables[i].asString(0), TYPE_SHAPES, IMG_POINT  ); break;
				case SHAPE_TYPE_Points:  Append_Table(Item, Tables[i].asString(0), TYPE_SHAPES, IMG_POINTS ); break;
				case SHAPE_TYPE_Line:    Append_Table(Item, Tables[i].asString(0), TYPE_SHAPES, IMG_LINE   ); break;
				case SHAPE_TYPE_Polygon: Append_Table(Item, Tables[i].asString(0), TYPE_SHAPES, IMG_POLYGON); break;
				}
			}
			else if( !s.Cmp("RASTER" ) ) Append_Table(Item, Tables[i].asString(0), TYPE_GRIDS , IMG_GRIDS  );
			else if( !s.Cmp("TABLE"  ) ) Append_Table(Item, Tables[i].asString(0), TYPE_TABLE , IMG_TABLE  );
		}

		Expand(Item);
	}

	Thaw();
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:60,代码来源:data_source_pgsql.cpp

示例6: WXUNUSED

void Frame::OnInsertPage(wxCommandEvent& WXUNUSED(event))
{
	size_t index = book->GetSelection();
	Freeze();
	bool ret = InsertNotebookPage((long)index);
	wxUnusedVar(ret);
	Thaw();	
}
开发者ID:senadj,项目名称:wxfolder,代码行数:8,代码来源:Frame.cpp

示例7: FNB_MIN

bool wxFlatNotebook::InsertPage(size_t index, wxWindow* page, const wxString& text, bool select, const int imgindex)
{
	// sanity check
	if (!page)
		return false;

	// reparent the window to us
	page->Reparent(this);

	if( !m_pages->IsShown() )
		m_pages->Show();

	index = FNB_MIN((unsigned int)index, (unsigned int)m_windows.GetCount());
	// Insert tab
	bool bSelected = select || m_windows.empty();
	int curSel = m_pages->GetSelection();

	if(index <= m_windows.GetCount())
	{
		m_windows.Insert(page, index);
		wxLogTrace(wxTraceMask(), wxT("New page inserted. Index = %i"), index);
	}
	else
	{
		m_windows.Add(page);
		wxLogTrace(wxTraceMask(), wxT("New page appended. Index = %i"), index);
	}

	if( !m_pages->InsertPage(index, page, text, bSelected, imgindex) )
		return false;

	if((int)index <= curSel) curSel++;

	Freeze();

	// Check if a new selection was made
	if(bSelected)
	{
		if(curSel >= 0)
		{
			// Remove the window from the main sizer
			m_mainSizer->Detach(m_windows[curSel]);
			m_windows[curSel]->Hide();
		}
		m_pages->SetSelection(index);
	}
	else
	{
		// Hide the page
		page->Hide();
	}
	m_mainSizer->Layout();
	Thaw();
	Refresh();

	return true;
}
开发者ID:yasriady,项目名称:wxProjects,代码行数:57,代码来源:wxFlatNotebook.cpp

示例8: Freeze

void BFBackupTree::RefreshPlaceholders ()
{
    Freeze ();

    // only refresh filled placeholders!
    if ( GetFillBlackfiskPlaceholders() )
    {
        VectorTreeItemId vecIdsDate;
        VectorTreeItemId vecIdsTime;
        VectorTreeItemId vecIdsAll;

        // find all items with a label matching to the old filled placeholders
        if ( !(BFCore::Instance().GetDateString_Old().IsEmpty()) )
            vecIdsDate = FindItems (GetRootItem(), BF_BACKUPTREE_FILLED_DATE_MASK);

        if ( !(BFCore::Instance().GetTimeString_Old().IsEmpty()) )
            vecIdsTime = FindItems (GetRootItem(), BF_BACKUPTREE_FILLED_TIME_MASK);

        vecIdsAll.reserve(vecIdsDate.size() + vecIdsTime.size());
        vecIdsAll.insert( vecIdsAll.end(), vecIdsDate.begin(), vecIdsDate.end() );
        vecIdsAll.insert( vecIdsAll.end(), vecIdsTime.begin(), vecIdsTime.end() );

        // are there items to refresh?
        if ( !(vecIdsAll.empty()) )
        {
            wxString strPath;
            wxString strLabel;

            // iterate on the items
            for (ItVectorTreeItemId it = vecIdsAll.begin();
                 it != vecIdsAll.end();
                 ++it)
            {
                strPath = GetPathByItem(*it);

                while ( strPath.Matches(BF_BACKUPTREE_PLACEHOLDER_MASK)
                     || strPath.Matches(BF_BACKUPTREE_PLACEHOLDER_MASK))
                {
                    strLabel = GetItemText(*it);

                    if ( strLabel.Matches(BF_BACKUPTREE_FILLED_DATE_MASK)
                      || strLabel.Matches(BF_BACKUPTREE_FILLED_TIME_MASK))
                    {
                        strLabel = strPath.AfterLast(wxFILE_SEP_PATH);
                        SetItemText(*it, BFBackup::FillBlackfiskPlaceholders(strLabel));
                    }

                    // cut the last diretory from path
                    strPath = strPath.BeforeLast(wxFILE_SEP_PATH);
                }
            }
        }
    }

    Thaw();
}
开发者ID:BackupTheBerlios,项目名称:blackfisk-svn,代码行数:56,代码来源:BFBackupTree.cpp

示例9: wxGetApp

void CContextControl::CreateTab()
{
	wxGetApp().AddStartupProfileRecord(_T("CContextControl::CreateTab"));
	Freeze();

	CState* pState = 0;

	// See if we can reuse an existing context
	for (size_t i = 0; i < m_context_controls.size(); i++)
	{
		if (m_context_controls[i].tab_index != -1)
			continue;

		if (m_context_controls[i].pState->IsRemoteConnected() ||
			!m_context_controls[i].pState->IsRemoteIdle())
			continue;

		pState = m_context_controls[i].pState;
		m_context_controls.erase(m_context_controls.begin() + i);
		if (m_current_context_controls > (int)i)
			m_current_context_controls--;
		break;
	}
	if (!pState)
	{
		pState = CContextManager::Get()->CreateState(m_pMainFrame);
		if (!pState->CreateEngine())
		{
			wxMessageBoxEx(_("Failed to initialize FTP engine"));
		}
	}

	// Restore last server and path
	CServer last_server;
	CServerPath last_path;
	if (COptions::Get()->GetLastServer(last_server) && last_path.SetSafePath(COptions::Get()->GetOption(OPTION_LASTSERVERPATH)))
		pState->SetLastServer(last_server, last_path);

	CreateContextControls(pState);

	pState->GetRecursiveOperationHandler()->SetQueue(m_pMainFrame->GetQueue());

	wxString localDir = COptions::Get()->GetOption(OPTION_LASTLOCALDIR);
	if (!pState->SetLocalDir(localDir))
		pState->SetLocalDir(_T("/"));

	CContextManager::Get()->SetCurrentContext(pState);

	if (!m_pMainFrame->RestoreSplitterPositions())
		m_pMainFrame->SetDefaultSplitterPositions();

	if (m_tabs)
		m_tabs->SetSelection(m_tabs->GetPageCount() - 1);

	Thaw();
}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:56,代码来源:context_control.cpp

示例10: ReloadBitmaps

  void ReloadBitmaps()
  {
    Freeze();

    InitialiseThemedBitmaps();
    for (int i = 0; i < ID_NUM; ++i)
      SetToolBitmap(i, m_Bitmaps[i]);

    Thaw();
  }
开发者ID:OrN,项目名称:dolphin,代码行数:10,代码来源:WatchWindow.cpp

示例11: Freeze

void WorkspaceTab::OnProjectRemoved(clCommandEvent& e)
{
    e.Skip();
    Freeze();
    m_fileView->BuildTree();
    OnGoHome(e);
    Thaw();
    DoUpdateChoiceWithProjects();
    SendCmdEvent(wxEVT_FILE_VIEW_REFRESHED);
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:10,代码来源:workspacetab.cpp

示例12: lock

void HeadersDetectorDlg::OnTimer1Trigger(wxTimerEvent& /*event*/)
{
    wxCriticalSectionLocker lock(m_Section);
    Freeze();
    m_FileNameTxt->SetLabel( m_FileName );
    m_ProgressBar->SetValue( m_Progress );
    if ( m_Finished )
        EndModal( m_Cancel ? wxID_CANCEL : wxID_OK );
    Thaw();
}
开发者ID:SaturnSDK,项目名称:Saturn-SDK-IDE,代码行数:10,代码来源:headersdetectordlg.cpp

示例13: GetCurrentPos

void ctlSQLBox::OnPositionStc(wxStyledTextEvent &event)
{
	int pos = GetCurrentPos();
	wxChar ch = GetCharAt(pos - 1);
	int st = GetStyleAt(pos - 1);
	int match;


	// Line numbers
	// Ensure we don't recurse through any paint handlers on Mac
#ifdef __WXMAC__
	Freeze();
#endif
	UpdateLineNumber();
#ifdef __WXMAC__
	Thaw();
#endif

	// Clear all highlighting
	BraceBadLight(wxSTC_INVALID_POSITION);

	// Check for braces that aren't in comment styles,
	// double quoted styles or single quoted styles
	if ((ch == '{' || ch == '}' ||
	        ch == '[' || ch == ']' ||
	        ch == '(' || ch == ')') &&
	        st != 2 && st != 6 && st != 7)
	{
		match = BraceMatch(pos - 1);
		if (match != wxSTC_INVALID_POSITION)
			BraceHighlight(pos - 1, match);
	}

	// Roll back through the doc and highlight any unmatched braces
	while ((pos--) >= 0)
	{
		ch = GetCharAt(pos);
		st = GetStyleAt(pos);

		if ((ch == '{' || ch == '}' ||
		        ch == '[' || ch == ']' ||
		        ch == '(' || ch == ')') &&
		        st != 2 && st != 6 && st != 7)
		{
			match = BraceMatch(pos);
			if (match == wxSTC_INVALID_POSITION)
			{
				BraceBadLight(pos);
				break;
			}
		}
	}

	event.Skip();
}
开发者ID:Timosha,项目名称:pgadmin3,代码行数:55,代码来源:ctlSQLBox.cpp

示例14: GetSelectedAction

void GotoFileList::UpdateList(const bool reloadAll) {
	const FileEntry* selEntry = GetSelectedAction();
	const int topLine = GetFirstVisibleLine();
	int selection = -1;
	const unsigned int startItem = reloadAll ? 0 : m_items.size();

	// Insert new items
	if (m_searchText.empty()) {
		// Copy all actions to items
		m_items.resize(m_actions.size());
		for (unsigned int i = startItem; i < m_actions.size(); ++i) {
			m_items[i].file_entry = m_actions[i];
			m_items[i].hlChars.clear();
		}
	}
	else {
		// Copy matching actions to items
		for (unsigned int i = m_actionCount; i < m_actions.size(); ++i) {
			if (m_tempEntry->path.empty() || m_actions[i]->path != m_tempEntry->path)
				AddFileIfMatching(m_searchText, m_actions[i]);
		}
	}

	// Sort the items
	if (startItem) {
		sort(m_items.begin() + startItem, m_items.end());
		inplace_merge(m_items.begin(), m_items.begin() + startItem, m_items.end());
	}
	else sort(m_items.begin(), m_items.end());

	// Keep same selection
	if (selEntry) {
		for (unsigned int i = 0; i < m_items.size(); ++i) {
			if (m_items[i].file_entry == selEntry) {
				selection = i;
				break;
			}
		}
	}

	// Refresh and redraw listCtrl
	Freeze();
	SetItemCount(m_items.size());
	SetSelection(selection);

	if (selection == -1)
		ScrollToLine(topLine);
	else if (!IsVisible(selection))
		ScrollToLine(selection);

	RefreshAll();
	Thaw();

	m_actionCount = m_actions.size();
}
开发者ID:BBkBlade,项目名称:e,代码行数:55,代码来源:GotoFileDlg.cpp

示例15: Freeze

void CBOINCBaseView::InitSort() {
    wxListItem      item;

    if (m_iSortColumn < 0) return;
    item.SetMask(wxLIST_MASK_IMAGE);
    item.SetImage(m_bReverseSort ? 0 : 1);
    m_pListPane->SetColumn(m_iSortColumn, item);
    Freeze();   // To reduce flicker
    sortData();
    Thaw();
}
开发者ID:williamsullivan,项目名称:AndroidBOINC,代码行数:11,代码来源:BOINCBaseView.cpp


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