• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ FindWidget函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: FindWidget

bool Mint::ProcessEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
	if(!m_pMainFrame) return false;

	MEvent e;
	int nResult = e.TranslateEvent(hwnd, message, wparam, lparam);
	if(nResult&EVENT_MINT_TRANSLATED){
		// Drag & Drop
		if(m_pDragSourceObject!=NULL){
#define DRAm_VISIBLE_LENGTH	2	// µå·¡±× ¿ÀºêÁ§Æ®¸¦ º¸¿©Áֱ⠽ÃÀÛÇÏ´Â °£°Ý
			if(e.nMessage==MWM_MOUSEMOVE){
				MPOINT p = e.Pos;
				//MPOINT p = MEvent::GetMousePos();
				int px = m_GrabPoint.x - p.x;
				if ( px < 0)  px *= -1;
				int py = m_GrabPoint.y - p.y;
				if ( py < 0)  py *= -1;

				if( m_bVisibleDragObject==false &&
				    ((px > DRAm_VISIBLE_LENGTH) || (py > DRAm_VISIBLE_LENGTH)))
                    m_bVisibleDragObject = true;
				MWidget* pFind = FindWidget(p);
				if(pFind!=NULL && pFind->IsDropable(m_pDragSourceObject)==true)
					m_pDropableObject = pFind;
				else
					m_pDropableObject = NULL;
			}
			if(e.nMessage==MWM_LBUTTONUP){
				MPOINT p = e.Pos;
				MWidget* pFind = FindWidgetDropAble(p);
//				MWidget* pFind = FindWidget(p);
				if(pFind!=NULL && pFind->IsDropable(m_pDragSourceObject)==true)
					pFind->Drop(m_pDragSourceObject, m_pDragObjectBitmap, m_szDragObjectString, m_szDragObjectItemString);	// ÇØ´ç À§Á¬¿¡ µå·Ó
				m_pDragSourceObject = NULL;
				m_pMainFrame->ReleaseCapture();
				return true;
			}
		}

		// Àü¿ª À̺¥Æ® ó¸®
		if (m_fnGlobalEventCallBack) {
			if (m_fnGlobalEventCallBack(&e) == true) return true;
		}

		// ÀÏ¹Ý À̺¥Æ® ó¸®
		if(m_pMainFrame->Event(&e)==true) return true;
		// ¾øÀ¸¸é Accelerator ó¸®
		if(m_pMainFrame->EventAccelerator(&e)==true) return true;
		// Default Key(Enter, ESC) ó¸®
		if(m_pMainFrame->EventDefaultKey(&e)==true) return true;

	}
	if(nResult&EVENT_PROCESSED) return true;	// ¹«Á¶°Ç 󸮵Ê

	return false;
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:56,代码来源:Mint.cpp


示例2: QueueOperationL

// ----------------------------------------------------------------------------
// 
// ----------------------------------------------------------------------------
//
void CWrtHarvester::ProcessNetworkModeL( TUid& aUid, TWidgetOperations aOperation )
    {
    // first queue the online/offline event and then the resume event
    QueueOperationL( aOperation, aUid );
    
    // check if there is a resume event to queue
    TInt idx = FindWidget(aUid, EResumeState);
    if ( idx != -1 )
        {
        QueueResumeL( aUid );          
        }
    idx = (idx == -1) ? FindWidget(aUid): idx;
    if(idx != -1 )
        {
        // remove it from the array, no longer needed
        delete iWidgetStateArray[idx];
        iWidgetStateArray.Remove(idx);
        }
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:23,代码来源:wrtharvester.cpp


示例3: PostSetup

bool pawsConfigEntityInteraction::PostSetup()
{
    for (size_t i=0; i < entTypes->types.GetSize(); i++)
    {
        psEntityType * type = entTypes->types[i];
        pawsTextBox * txt = dynamic_cast <pawsTextBox*> (FindWidget(type->id+"_label"));
        if (txt == NULL)
            return false;
        txt->SetText(type->label+":");
        
        pawsComboBox * combo = dynamic_cast <pawsComboBox*> (FindWidget(type->id));
        if (combo == NULL)
            return false;
        
        for (size_t j=0; j < type->labels.GetSize(); j++)
            combo->NewOption(type->labels[j]);
    }
    return true;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:19,代码来源:pawsconfigentityinter.cpp


示例4: FindWidget

void pawsTabWindow::SetTab(const csString & name)
{
    pawsWidget * tab = FindWidget(name);
    if(!tab)
    	return;
    if(!dynamic_cast<pawsButton*>(tab))
    	SetTab(tab->GetID() - 100);
    else
        SetTab(tab->GetID());
}
开发者ID:diana-coman,项目名称:Eulora-client,代码行数:10,代码来源:pawstabwindow.cpp


示例5: Error1

bool pawsConfigPopup::PostSetup()
{
    magicWindow = (pawsActiveMagicWindow*)PawsManager::GetSingleton().FindWidget("ActiveMagicWindow");
    if(!magicWindow)
    {
        Error1("Couldn't find ActiveMagicWindow!");
        return false;
    }
    //check if we can get the pawsnpcdialog else fail.
    npcDialog = (pawsNpcDialogWindow*)PawsManager::GetSingleton().FindWidget("NPCDialogWindow");
    if(!npcDialog)
    {
        Error1("Couldn't find NPCDialogWindow!");
        return false;
    }
    //check if we can get the psmainwidget else fail.
    mainWidget = psengine->GetMainWidget();
    if(!mainWidget)
    {
        Error1("Couldn't find psmainwidget!");
        return false;
    }

    showActiveMagicConfig = (pawsCheckBox*)FindWidget("ShowActiveMagicWindowConfig");
    if (!showActiveMagicConfig)
        return false;

    useNpcDialogBubbles = (pawsCheckBox*)FindWidget("UseNpcDialogBubbles");
    if (!useNpcDialogBubbles)
        return false;

    //we set all checkboxes as true by default
    for(size_t i = 0; i < children.GetSize(); i++)
    {
        pawsCheckBox *check = dynamic_cast<pawsCheckBox*>(children.Get(i));
        if(check)
        {
            check->SetState(true);
        }
    }

    return true;
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:43,代码来源:pawsconfigpopup.cpp


示例6: FindWidget

PG_Widget* PG_Navigator::FindDown(PG_Widget* widget) {
	if(widget == NULL) {
		widget = my_currentWidget;
	}

	PG_Point p;
	p.x = widget->x + widget->w / 2;
	p.y = widget->y + widget->h / 2;

	return FindWidget(widget, p, true, false, 0, +1);
}
开发者ID:UIKit0,项目名称:paragui,代码行数:11,代码来源:pgnavigator.cpp


示例7: PostSetup

bool pawsLifeEventWindow::PostSetup()
{
    choiceSelection = (pawsSelectorBox*)FindWidget("Life Event");
    if ( choiceSelection == NULL )
        return false;  
        
    cpBox = (pawsTextBox*)FindWidget("CP");
    if ( !cpBox )
        return false;   
                
    choiceDesc = (pawsMultiLineTextBox*)FindWidget("EventDesc");
    if ( !choiceDesc )
        return false;
        
    selectedDesc = (pawsMultiLineTextBox*)FindWidget("SelEventDesc");
    if ( !selectedDesc )
        return false;
        
    return true;     
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:20,代码来源:pawslife.cpp


示例8: PostSetup

bool pawsSummaryWindow::PostSetup()
{
    skillsList = (pawsListBox*)FindWidget("skill_list");
    if ( skillsList == NULL ) return false;
    
    statsList = (pawsListBox*)FindWidget("stat_list");
    if ( statsList == NULL ) return false;
    
    serverStatus  = (pawsTextBox*)FindWidget("server_status");
    if ( serverStatus == NULL ) return false;
    
    view = (pawsObjectView*)FindWidget("ModelView");
    if ( view == NULL ) return false;
    while(!view->ContinueLoad())
    {
        csSleep(100);
    }
    
    return true;
}
开发者ID:huigou,项目名称:planeshift,代码行数:20,代码来源:pawssummary.cpp


示例9: PostSetup

bool pawsQuestRewardWindow::PostSetup()
{
    if ( !psCmdBase::Setup( psengine->GetMsgHandler(), psengine->GetCmdHandler()) )
        return false;

    msgqueue->Subscribe(this, MSGTYPE_QUESTREWARD);

    rewardList  = (pawsListBox*)FindWidget("QuestRewardList");

    return true;
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:11,代码来源:pawsquestrewardwindow.cpp


示例10: SelectFirstItem

void PG_ListBox::SelectFirstItem() 
{
	PG_ListBoxBaseItem* item = (PG_ListBoxBaseItem*)FindWidget(0);
	
	if(item == NULL) 
	{
		return;
	}

	item->Select();
}
开发者ID:KAMI911,项目名称:openmortal,代码行数:11,代码来源:pglistbox.cpp


示例11: SetAlwaysOnTop

bool pawsControlWindow::PostSetup()
{
    SetAlwaysOnTop(true);

    AddWindow( "InventoryWindow" ,   "InventoryButton" );
    AddWindow( "ConfigWindow" ,      "OptionsButton" );
    AddWindow( "SpellBookWindow" ,   "SpellBookButton" );
    AddWindow( "AttackBookWindow" ,  "AttackButton" );
    AddWindow( "InfoWindow" ,        "InfoButton" );
    AddWindow( "HelpWindow" ,        "HelpButton" );
    AddWindow( "ShortcutMenu" ,    "ShortcutButton" );
    AddWindow( "BuddyWindow" ,       "BuddyButton" );
    AddWindow( "GroupWindow" ,       "GroupButton" );
    AddWindow( "PetitionWindow" ,    "PetitionButton" );
    AddWindow( "ChatWindow" ,        "ChatButton" );
    AddWindow( "SkillWindow" ,       "SkillsButton" );
    AddWindow( "QuestNotebook" ,     "QuestButton" );
    AddWindow( "GuildWindow" ,       "GuildButton" );
    AddWindow( "ActiveMagicWindow" ,       "ActiveMagicButton" );

    keyboard = csQueryRegistry<iKeyboardDriver> (PawsManager::GetSingleton().GetObjectRegistry());

    //The quit button is a bit special
    //We need to manualy register it
    QuitIcon = new Icon;
    QuitIcon->window = NULL;
    QuitIcon->theirButton = (pawsButton*)FindWidget("QuitButton");
    QuitIcon->orgRes = QuitIcon->theirButton->GetBackground();
    QuitIcon->IsActive = false;
    QuitIcon->IsOver = false;
    buttons.Push(QuitIcon);

    csRef<iConfigManager> file = psengine->GetConfig();
    int loadStyle = file->GetInt("PlaneShift.GUI.ControlWindow.CurrentStyle", 1);
    for (int i=0; i < loadStyle; i++)
        NextStyle(); // Switch to saved style

    buttonUp = FindWidget("ShowButtonUp");
    buttonDown = FindWidget("ShowButtonDown");
    return true;
}
开发者ID:joaocc,项目名称:planeshift-git,代码行数:41,代码来源:pawscontrolwindow.cpp


示例12: FindWidget

void pawsCharacterPickerWindow::SelectCharacter(int character, pawsWidget* widget)
{
    if(!gotStrings)
        return;

    pawsWidget* wdg;
// change 4 to 1 get char chetty
    for (int i = 0;i < 1; i++)
    {
        csString name;
        name = "ImgCharacter";
        name += i;
        wdg = FindWidget(name);
        if (!wdg)
            return;

        if (character == i)
            wdg->SetBackground("radioon2");
        else
            wdg->SetBackground("radiooff2");
    }

    pawsButton* loginWidget = (pawsButton*)FindWidget("login");

    selectedCharacter = widget->GetID();                                    
    loginWidget->SetText( PawsManager::GetSingleton().Translate("Join") );
                
    // If the button selected has an empty character then button will
    // be for creating a new character
    if ( widget->GetID() >= charactersFound  )
    {            
        SetupCharacterCreationScreens();
    }
    else
    {
        // Show the model for the selected character.
        loaded = false;
        charApp->SetMesh(0);
        CheckLoadStatus();
    }
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:41,代码来源:pawscharpick.cpp


示例13: FindWidget

void pawsCharBirth::OnListAction( pawsListBox* widget, int status )
{
    if (status==LISTBOX_HIGHLIGHTED)
    {
        // Figure out which list box was checked and act accordingly
        pawsListBoxRow* row = widget->GetSelectedRow();            

        if (widget->GetID() == MONTH_COMBOBOX)
        {
            pawsWidget* imgBox = FindWidget("zodiac_img");
            pawsTextBox* textBox = (pawsTextBox*)FindWidget("zodiac");
            pawsMultiLineTextBox* descBox = (pawsMultiLineTextBox*)FindWidget("zodiac_description");

            if (!imgBox || !textBox || !descBox)
                return;

            Zodiac* zodiac = GetZodiac(widget->GetSelectedRowNum()+1);
            if (!zodiac)
            {
                Error2("No zodiac found for month number %d!",widget->GetSelectedRowNum()+1);
                return;
            }

            imgBox->SetBackground(zodiac->img);
            imgBox->SetBackgroundAlpha(0);
            textBox->SetText(zodiac->name);
            descBox->SetText(zodiac->desc);
            
            if ( lastZodiacChoice != -1 )
            {
                createManager->RemoveChoice( lastZodiacChoice );            
            }
                                    
            createManager->AddChoice( row->GetID() );
            lastZodiacChoice = row->GetID();
        
            UpdateCP();                        
        }
    }
    UpdateCP();
}
开发者ID:diana-coman,项目名称:Eulora-client,代码行数:41,代码来源:pawscharbirth.cpp


示例14: LoadConfig

bool pawsConfigEntityInteraction::LoadConfig()
{
    for (size_t i=0; i < entTypes->types.GetSize(); i++)
    {
        psEntityType * type = entTypes->types[i];
        pawsComboBox * combo = dynamic_cast <pawsComboBox*> (FindWidget(type->id));
        if (combo)
            combo->Select(type->usedCommand);
    }
    dirty = false;
    return true;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:12,代码来源:pawsconfigentityinter.cpp


示例15: switch

bool pawsCharacterPickerWindow::OnButtonReleased(int /*mouseButton*/, int /*keyModifer*/, pawsWidget* widget)
{
    if(!widget)
        return false;

    switch ( widget->GetID() )
    {
        case YES_DELETE_CHARACTER:
        {
            PawsManager::GetSingleton().SetModalWidget(NULL);
            widget->GetParent()->Hide();

            pawsStringPromptWindow::Create("Please enter your account password to confirm:", csString(""),false, 220, 20, this, "DeletionConfirm", 0, true); 
            pawsEditTextBox* passbox =  dynamic_cast<pawsEditTextBox*>
                                        (PawsManager::GetSingleton().FindWidget("stringPromptEntry"));

            if (passbox)
            {
               passbox->SetPassword(true);
            }
            return true;
        }

        case NO_DELETE_CHARACTER:
        {
            return true;
        }
        case CONFIRM_YES:
        {
            //Delete the selected character
            csString name;
            name.Format("SelectCharacter%i", selectedCharacter);

            // Get Full name.
            psString charFullName( ((pawsButton*)FindWidget(name))->GetText() );
            psString charFirstName;
            charFullName.GetWord( 0, charFirstName );

            psCharDeleteMessage msg(charFirstName, 0);
            msg.SendMessage();

            return true;
        }

        case CONFIRM_NO:
        {
            PawsManager::GetSingleton().SetModalWidget(NULL);
            widget->GetParent()->Hide();
            return true;
        }
    }
    return false;
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:53,代码来源:pawscharpick.cpp


示例16: PostSetup

bool pawsCharacterPickerWindow::PostSetup()
{
    // Subscribe our message types that we are interested in. 
    psengine->GetMsgHandler()->Subscribe(this,MSGTYPE_AUTHAPPROVED);
    psengine->GetMsgHandler()->Subscribe(this, MSGTYPE_CHAR_DELETE);
        
    view = (pawsObjectView*)FindWidget("PaperDollView");
    view->Rotate(10,0.01f);
    view->EnableMouseControl(true);

    return true;
}
开发者ID:garinh,项目名称:planeshift,代码行数:12,代码来源:pawscharpick.cpp


示例17: FindWidget

bool pawsNpcDialogWindow::PostSetup()
{
    psengine->GetMsgHandler()->Subscribe(this, MSGTYPE_DIALOG_MENU);
    psengine->GetMsgHandler()->Subscribe(this, MSGTYPE_CHAT);
    psengine->GetMsgHandler()->Subscribe(this, MSGTYPE_REMOVE_OBJECT);

    responseList = dynamic_cast<pawsListBox*>(FindWidget("ResponseList"));
    speechBubble = FindWidget("SpeechBubble");
    textBox = dynamic_cast<pawsEditTextBox*>(FindWidget("InputText"));
    closeBubble = dynamic_cast<pawsButton*>(FindWidget("CloseBubble"));

    if(!responseList || !FindWidget("Lists") || !speechBubble || !FindWidget("Bubbles") || !closeBubble)
    {
        return false;
    }

    //loads the options regarding this window
    if(!LoadSetting())
    {
        //setup the window with defaults.
        SetupWindowWidgets();
        CleanBubbles();
    }
    return true;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:25,代码来源:pawsnpcdialog.cpp


示例18: SaveConfig

bool pawsConfigEntityInteraction::SaveConfig()
{
    for (size_t i=0; i < entTypes->types.GetSize(); i++)
    {
        psEntityType * type = entTypes->types[i];
        pawsComboBox * combo = dynamic_cast <pawsComboBox*> (FindWidget(type->id));
        if (combo)
            type->usedCommand = combo->GetSelectedRowNum();
    }
    entTypes->SaveConfigToFile();
    dirty = false;
    return true;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:13,代码来源:pawsconfigentityinter.cpp


示例19: SetDefault

void pawsConfigEntityInteraction::SetDefault()
{
    for (size_t i=0; i < entTypes->types.GetSize(); i++)
    {
        psEntityType * type = entTypes->types[i];
        pawsComboBox * combo = dynamic_cast <pawsComboBox*> (FindWidget(type->id));
        if (combo)
            combo->Select(type->dflt);
        type->usedCommand = type->dflt;
    }
    entTypes->SaveConfigToFile();
    dirty = true;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:13,代码来源:pawsconfigentityinter.cpp


示例20: PostSetup

bool pawsGroupWindow::PostSetup()
{
    psengine->GetMsgHandler()->Subscribe(this, MSGTYPE_GUIGROUP);

    memberList = (pawsListBox*)FindWidget("List");
    if ( !memberList ) return false;

    chatWindow = (pawsChatWindow*)PawsManager::GetSingleton().FindWidget("ChatWindow");
    if (!chatWindow)
        return false;

    return true;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:13,代码来源:pawsgroupwindow.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FindWindow函数代码示例发布时间:2022-05-30
下一篇:
C++ FindView函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap