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


C++ Freeze函数代码示例

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


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

示例1: SetAllItems

void SymbolList::ActionList::Find(const wxString& searchtext, bool refresh) {
	m_searchText = searchtext; // cache for later updates

	if (searchtext.empty()) {
		SetAllItems();
		return;
	}

	// Convert to upper case for case insensitive search
	const wxString text = searchtext.Upper();

	m_items.clear();
	vector<unsigned int> hlChars;
	for (unsigned int i = 0; i < m_actions.GetCount(); ++i) {
		const wxString& name = m_actions[i];
		unsigned int charpos = 0;
		wxChar c = text[charpos];
		hlChars.clear();

		for (unsigned int textpos = 0; textpos < name.size(); ++textpos) {
			if ((wxChar)wxToupper(name[textpos]) == c) {
				hlChars.push_back(textpos);
				++charpos;
				if (charpos == text.size()) {
					// All chars found.
					m_items.push_back(aItem(i, &m_actions[i], hlChars));
					break;
				}
				else c = text[charpos];
			}
		}
	}

	sort(m_items.begin(), m_items.end());

	Freeze();
	SetItemCount(m_items.size());
	if (refresh) {
		if (m_items.empty()) SetSelection(-1); // deselect
		else SetSelection(0);

		RefreshAll();
	}
	Thaw();
}
开发者ID:boulerne,项目名称:e,代码行数:45,代码来源:SymbolList.cpp

示例2: KGLOG_PROCESS_ERROR

BOOL KBall::SlamDunk(KHero* pSlamer, KBasketSocket* pTargetSocket)
{
    BOOL        bResult            = false;
    BOOL        bRetCode           = false;
    KBasket*    pBasket             = NULL;
    KBODY       cSocketBody;
    KBODY       cSlamerBody;
    KPOSITION   cSlamerDstPos;
    KPOSITION   cBallDstPos;
   
    KGLOG_PROCESS_ERROR(pSlamer && pTargetSocket);

    pBasket = pTargetSocket->m_pBasket; // ûÀº¿ð
    KGLOG_PROCESS_ERROR(pBasket);

    bRetCode = BeUnTake(pSlamer);
    KGLOG_PROCESS_ERROR(bRetCode);

    cSocketBody = pTargetSocket->GetBody();
    cSlamerBody = pSlamer->GetBody();

    if (pTargetSocket->m_eDir == csdRight)
        cSlamerDstPos.nX = cSocketBody.nX + cSocketBody.nLength / 2 + cSlamerBody.nLength;
    else
        cSlamerDstPos.nX = cSocketBody.nX - cSocketBody.nLength / 2 - cSlamerBody.nLength;
    cSlamerDstPos.nY = cSocketBody.nY;
    cSlamerDstPos.nZ = cSocketBody.nZ - CELL_LENGTH * 3;

    pSlamer->EnsureNotStandOnObject();
    pSlamer->SetPosition(cSlamerDstPos);
    pSlamer->ClearVelocity();
    pSlamer->LoseControlByCounter(cdSlamDunkFrameCount);

    cBallDstPos = pTargetSocket->GetPosition();
    SetPosition(cBallDstPos);
    m_dwShooterID   = pSlamer->m_dwID;
    m_dwThrowerID   = ERROR_ID;
    m_pTargetSocket = pTargetSocket;

    Freeze(g_pSO3World->m_Settings.m_ConstList.nSlamBallReboundFrame);

    bResult = true;
Exit0:
    return bRetCode;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:45,代码来源:KBall.cpp

示例3: Freeze

void WindowStack::DoSelect(wxWindow* win)
{
    Freeze();
    // remove the old selection
    if(m_selection) {
        m_mainSizer->Detach(m_selection);
        m_selection->Hide();
    }
    if(win) {
        m_mainSizer->Add(win, 1, wxEXPAND);
        win->Show();
        m_selection = win;
    } else {
        m_selection = NULL;
    }
    m_mainSizer->Layout();
    Thaw();
}
开发者ID:massimiliano76,项目名称:codelite,代码行数:18,代码来源:windowstack.cpp

示例4: Freeze

bool wxFlatNotebook::DeleteAllPages()
{
	if(m_windows.empty())
		return false;

	Freeze();
	int i = 0;
	for(; i<(int)m_windows.GetCount(); i++){
		delete m_windows[i];
	}

	m_windows.Clear();
	Thaw();

	// Clear the container of the tabs as well
	m_pages->DeleteAllPages();
	return true;
}
开发者ID:05storm26,项目名称:codelite,代码行数:18,代码来源:wxFlatNotebook.cpp

示例5: MAMain

int MAMain() {
	double d;
	static const char str1[] = "4.56";
	static const char str2[] = "12389.5612323545034954378343";

	InitConsole();
	printf("Hello World.\n");
	printf("1: %s\n", str1);
	d = strtod(str1, NULL);
	printf("d: %f\n", d);
	printf("2: %s\n", str2);
	d = strtod(str2, NULL);
	printf("d: %f\n", d);

	//Freeze
	Freeze(0);
	return 0;
}
开发者ID:Felard,项目名称:MoSync,代码行数:18,代码来源:strtod.c

示例6: Freeze

void GERBER_LAYER_WIDGET::ReFill()
{
    Freeze();

    ClearLayerRows();

    for( int layer = 0; layer < GERBER_DRAWLAYERS_COUNT; ++layer )
    {
        wxString msg = g_GERBER_List.GetDisplayName( layer );

        AppendLayerRow( LAYER_WIDGET::ROW( msg, layer,
                        myframe->GetLayerColor( layer ), wxEmptyString, true ) );
    }

    Thaw();

    installRightLayerClickHandler();
}
开发者ID:ephtable,项目名称:kicad-source-mirror,代码行数:18,代码来源:class_gerbview_layer_widget.cpp

示例7: Freeze

bool WIDGET_HOTKEY_LIST::TransferDefaultsToControl()
{
    Freeze();

    for( wxTreeListItem item = GetFirstItem(); item.IsOk(); item = GetNextItem( item ) )
    {
        WIDGET_HOTKEY_CLIENT_DATA* hkdata = GetHKClientData( item );
        if( hkdata == NULL)
            continue;

        hkdata->GetHotkey().ResetKeyCodeToDefault();
    }

    UpdateFromClientData();
    Thaw();

    return true;
}
开发者ID:RocFan,项目名称:kicad-source-mirror,代码行数:18,代码来源:widget_hotkey_list.cpp

示例8: Freeze

void wxTreeCtrlBase::CollapseAllChildren(const wxTreeItemId& item)
{
    Freeze();
    // first (recursively) collapse all the children
    wxTreeItemIdValue cookie;
    for ( wxTreeItemId idCurr = GetFirstChild(item, cookie);
          idCurr.IsOk();
          idCurr = GetNextChild(item, cookie) )
    {
        CollapseAllChildren(idCurr);
    }

    // then collapse this element too unless it's the hidden root which can't
    // be collapsed
    if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
        Collapse(item);
    Thaw();
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:18,代码来源:treebase.cpp

示例9: wxTreeItemId

void BundlePane::OnTreeEndDrag(wxTreeEvent& event) {
	if (!m_draggedItem.IsOk()) return;

	const wxTreeItemId itemSrc = m_draggedItem;
	const wxTreeItemId itemDst = event.GetItem();
	m_draggedItem = wxTreeItemId();

	if (!itemDst.IsOk()) return; // Invalid destintion
	if (itemSrc == itemDst) return; // Can't drag to self
	if (IsTreeItemParentOf(itemSrc, itemDst)) return; // Can't drag to one of your own children

	wxLogDebug(wxT("Ending Drag over item: %s"), m_bundleTree->GetItemText(itemDst).c_str());

	const BundleItemData* srcData = (BundleItemData*)m_bundleTree->GetItemData(itemSrc);
	const BundleItemData* dstData = (BundleItemData*)m_bundleTree->GetItemData(itemDst);

	if (!dstData->IsMenuItem()) return; // You can only drag items to menu
	if (dstData->m_bundleId != srcData->m_bundleId) return; // Items can only be dragged within same bundle

	// We have to cache uuid of submenus
	const wxString subUuid = (srcData->m_type == BUNDLE_SUBDIR) ? srcData->m_uuid : wxString(wxEmptyString);

	const unsigned int bundleId = srcData->m_bundleId;
	PListDict infoDict = GetEditableMenuPlist(bundleId);
	
	// Insert the item
	Freeze();
	const wxString name = m_bundleTree->GetItemText(itemSrc);
	const wxTreeItemId insertedItem = InsertMenuItem(itemDst, name, new BundleItemData(*srcData), infoDict);

	if (srcData->m_type == BUNDLE_SUBDIR) {
		CopySubItems(itemSrc, insertedItem);
	}

	// Delete source ref
	if (srcData->IsMenuItem()) RemoveMenuItem(itemSrc, false, infoDict);
	Thaw();

	// Save the modified plist
	m_plistHandler.SaveBundle(bundleId);

	// Update menu in editorFrame
	m_syntaxHandler.ReParseBundles(true/*onlyMenu*/);
}
开发者ID:khmerlovers,项目名称:e,代码行数:44,代码来源:BundlePane.cpp

示例10: wxPanel

VAnnoView::VAnnoView(wxWindow* frame, wxWindow* parent,
	wxWindowID id,
	const wxPoint& pos,
	const wxSize& size,
	long style,
	const wxString& name) :
wxPanel(parent, id, pos, size, style, name),
m_frame(frame),
m_data(0)
{
	SetEvtHandlerEnabled(false);
	Freeze();

	m_root_sizer = new wxBoxSizer(wxVERTICAL);
	wxStaticText* st = 0;

	wxBoxSizer* sizer_1 = new wxBoxSizer(wxHORIZONTAL);
	st = new wxStaticText(this, 0, "Info:",
		wxDefaultPosition, wxDefaultSize);
	sizer_1->Add(10, 10);
	sizer_1->Add(st);

	wxBoxSizer* sizer_2 = new wxBoxSizer(wxHORIZONTAL);
	m_text = new myTextCtrl(frame, this, wxID_ANY, "",
		wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxHSCROLL);
	sizer_2->Add(10, 10);
	sizer_2->Add(m_text, 1, wxEXPAND);
	sizer_2->Add(10, 10);

	
	m_root_sizer->Add(10, 10);
	m_root_sizer->Add(sizer_1, 0, wxALIGN_LEFT);
	m_root_sizer->Add(sizer_2, 1, wxEXPAND);
	m_root_sizer->Add(10, 10);

	//m_root_sizer->Hide(m_roi_root_sizer);
	
	SetSizer(m_root_sizer);
	Layout();

	Thaw();
	SetEvtHandlerEnabled(true);
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:43,代码来源:VAnnoView.cpp

示例11: Freeze

void WIDGET_HOTKEY_LIST::ResetAllHotkeys( bool aResetToDefault )
{
    Freeze();

    // Reset all the hotkeys, not just the ones shown
    // Should not need to check conflicts, as the state we're about
    // to set to a should be consistent
    if( aResetToDefault )
    {
        m_hk_store.ResetAllHotkeysToDefault();
    }
    else
    {
        m_hk_store.ResetAllHotkeysToOriginal();
    }

    UpdateFromClientData();
    Thaw();
}
开发者ID:Lotharyx,项目名称:kicad-source-mirror,代码行数:19,代码来源:widget_hotkey_list.cpp

示例12: wxTreeItemId

void BFBackupTree::Init ()
{
    lastItemId_ = wxTreeItemId();

    Freeze();

    // recreate the treeCtrl with all tasks
    BFBackup::Instance().InitThat(this);

    // expand all items in the treeCtlr
    ExpandAll();

	if ( lastItemId_.IsOk() )
		SelectItem(lastItemId_);
	else
		SelectItem(GetRootItem());

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

示例13: wxGetApp

bool CDlgMessages::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    CSkinAdvanced*         pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
    wxASSERT(pSkinAdvanced);
    wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));

        
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);

    wxDialog::Create( parent, id, caption, pos, size, style );

    wxString strCaption = caption;
    if (strCaption.IsEmpty()) {
        strCaption.Printf(_("%s - Notices"), pSkinAdvanced->GetApplicationName().c_str());
    }
    SetTitle(strCaption);

    // Initialize Application Icon
    SetIcons(*pSkinAdvanced->GetApplicationIcon());

    Freeze();

    SetBackgroundStyle(wxBG_STYLE_CUSTOM);

#if TEST_BACKGROUND_WITH_MAGENTA_FILL
    SetBackgroundColour(wxColour(255, 0, 255));
#endif
    SetForegroundColour(*wxBLACK);

    CreateControls();

    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);

    // To work properly on Mac, RestoreState() must be called _after_ 
    //  calling GetSizer()->Fit(), GetSizer()->SetSizeHints() and Center()
    RestoreState();   

    Thaw();

    return true;
}
开发者ID:Ashod,项目名称:Boinc,代码行数:42,代码来源:sg_DlgMessages.cpp

示例14: Freeze

void LatexPreviewWindow::SetImage(const wxBitmap& img)
{
    Freeze();

    int old_width = 0,
        old_height = 0;
    if (m_img.IsOk()) {
        old_width = m_img.GetWidth();
        old_height = m_img.GetHeight();
    }

    wxSize increase(img.GetWidth() - old_width,
                    img.GetHeight() - old_height),
           frame_size( GetSize() ),
           new_img_size(img.GetWidth() + 40, img.GetHeight() + 40);
    m_img = img;

    // m_mainpanel->Layout();

    // m_control_image->SetVirtualSizeHints( new_img_size );
    m_control_image->SetInitialSize( new_img_size );
    m_control_image->SetMinSize( new_img_size );
    m_control_image->SetSize( new_img_size );

    m_panel_formula->GetSizer()->Layout();
    GetSizer()->SetSizeHints(this);

    if (m_resize_frame) {
        if (m_control_image->GetSize().x > m_panel_image->GetSize().x)
            frame_size.x += m_control_image->GetSize().x - m_panel_image->GetSize().x;
        frame_size.y += increase.y;
    }

    // m_control_image->Refresh();
    // m_control_image->Update();
    // m_mainpanel->GetSizer()->SetSizeHints(m_mainpanel);

    SetSize(frame_size);
    Thaw();

    Refresh();
}
开发者ID:coldfix,项目名称:latex-preview,代码行数:42,代码来源:window.cpp

示例15: SetDisplayMode

void FrameMain::OnVideoOpen() {
	if (!context->videoController->IsLoaded()) {
		SetDisplayMode(0, -1);
		return;
	}

	Freeze();
	int vidx = context->videoController->GetWidth(),
		vidy = context->videoController->GetHeight();

	// Set zoom level based on video resolution and window size
	double zoom = context->videoDisplay->GetZoom();
	wxSize windowSize = GetSize();
	if (vidx*3*zoom > windowSize.GetX()*4 || vidy*4*zoom > windowSize.GetY()*6)
		context->videoDisplay->SetZoom(zoom * .25);
	else if (vidx*3*zoom > windowSize.GetX()*2 || vidy*4*zoom > windowSize.GetY()*3)
		context->videoDisplay->SetZoom(zoom * .5);

	SetDisplayMode(1,-1);

	if (OPT_GET("Video/Detached/Enabled")->GetBool() && !context->dialog->Get<DialogDetachedVideo>())
		cmd::call("video/detach", context.get());
	Thaw();

	if (!blockAudioLoad && OPT_GET("Video/Open Audio")->GetBool() && context->audioController->GetAudioURL() != context->videoController->GetVideoName()) {
		try {
			context->audioController->OpenAudio(context->videoController->GetVideoName());
		}
		catch (agi::UserCancelException const&) { }
		// Opening a video with no audio data isn't an error, so just log
		// and move on
		catch (agi::fs::FileSystemError const&) {
			LOG_D("video/open/audio") << "File " << context->videoController->GetVideoName() << " found by video provider but not audio provider";
		}
		catch (agi::AudioDataNotFoundError const& e) {
			LOG_D("video/open/audio") << "File " << context->videoController->GetVideoName() << " has no audio data: " << e.GetChainedMessage();
		}
		catch (agi::AudioOpenError const& err) {
			wxMessageBox(to_wx(err.GetMessage()), "Error loading audio", wxOK | wxICON_ERROR | wxCENTER);
		}
	}
}
开发者ID:Leinad4Mind,项目名称:Aegisub,代码行数:42,代码来源:frame_main.cpp


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