當前位置: 首頁>>代碼示例>>C++>>正文


C++ FindWidget函數代碼示例

本文整理匯總了C++中FindWidget函數的典型用法代碼示例。如果您正苦於以下問題:C++ FindWidget函數的具體用法?C++ FindWidget怎麽用?C++ FindWidget使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了FindWidget函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的FindWidget函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。